LCOV - code coverage report
Current view: top level - media/webrtc/trunk/webrtc/call - flexfec_receive_stream.h (source / functions) Hit Total Coverage
Test: output.info Lines: 0 3 0.0 %
Date: 2017-07-14 16:53:18 Functions: 0 5 0.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*
       2             :  *  Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
       3             :  *
       4             :  *  Use of this source code is governed by a BSD-style license
       5             :  *  that can be found in the LICENSE file in the root of the source
       6             :  *  tree. An additional intellectual property rights grant can be found
       7             :  *  in the file PATENTS.  All contributing project authors may
       8             :  *  be found in the AUTHORS file in the root of the source tree.
       9             :  */
      10             : 
      11             : #ifndef WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_H_
      12             : #define WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_H_
      13             : 
      14             : #include <stdint.h>
      15             : 
      16             : #include <string>
      17             : #include <vector>
      18             : 
      19             : #include "webrtc/api/call/transport.h"
      20             : #include "webrtc/config.h"
      21             : 
      22             : namespace webrtc {
      23             : 
      24           0 : class FlexfecReceiveStream {
      25             :  public:
      26             :   struct Stats {
      27             :     std::string ToString(int64_t time_ms) const;
      28             : 
      29             :     // TODO(brandtr): Add appropriate stats here.
      30             :     int flexfec_bitrate_bps;
      31             :   };
      32             : 
      33           0 :   struct Config {
      34             :     explicit Config(Transport* rtcp_send_transport)
      35             :         : rtcp_send_transport(rtcp_send_transport) {
      36             :       RTC_DCHECK(rtcp_send_transport);
      37             :     }
      38             : 
      39             :     std::string ToString() const;
      40             : 
      41             :     // Returns true if all RTP information is available in order to
      42             :     // enable receiving FlexFEC.
      43             :     bool IsCompleteAndEnabled() const;
      44             : 
      45             :     // Payload type for FlexFEC.
      46             :     int payload_type = -1;
      47             : 
      48             :     // SSRC for FlexFEC stream to be received.
      49             :     uint32_t remote_ssrc = 0;
      50             : 
      51             :     // Vector containing a single element, corresponding to the SSRC of the
      52             :     // media stream being protected by this FlexFEC stream. The vector MUST have
      53             :     // size 1.
      54             :     //
      55             :     // TODO(brandtr): Update comment above when we support multistream
      56             :     // protection.
      57             :     std::vector<uint32_t> protected_media_ssrcs;
      58             : 
      59             :     // SSRC for RTCP reports to be sent.
      60             :     uint32_t local_ssrc = 0;
      61             : 
      62             :     // What RTCP mode to use in the reports.
      63             :     RtcpMode rtcp_mode = RtcpMode::kCompound;
      64             : 
      65             :     // Transport for outgoing RTCP packets.
      66             :     Transport* rtcp_send_transport = nullptr;
      67             : 
      68             :     // |transport_cc| is true whenever the send-side BWE RTCP feedback message
      69             :     // has been negotiated. This is a prerequisite for enabling send-side BWE.
      70             :     bool transport_cc = false;
      71             : 
      72             :     // RTP header extensions that have been negotiated for this track.
      73             :     std::vector<RtpExtension> rtp_header_extensions;
      74             :   };
      75             : 
      76             :   // Starts stream activity.
      77             :   // When a stream is active, it can receive and process packets.
      78             :   virtual void Start() = 0;
      79             :   // Stops stream activity.
      80             :   // When a stream is stopped, it can't receive nor process packets.
      81             :   virtual void Stop() = 0;
      82             : 
      83             :   virtual Stats GetStats() const = 0;
      84             : 
      85             :  protected:
      86           0 :   virtual ~FlexfecReceiveStream() = default;
      87             : };
      88             : 
      89             : }  // namespace webrtc
      90             : 
      91             : #endif  // WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_H_

Generated by: LCOV version 1.13