Index: webrtc/call/flexfec_receive_stream.h |
diff --git a/webrtc/call/flexfec_receive_stream.h b/webrtc/call/flexfec_receive_stream.h |
index 384a94d1d58091e386b39344ae54888a236e5f92..83b212bad6a6b84c53715d6463195cb4dd7355a1 100644 |
--- a/webrtc/call/flexfec_receive_stream.h |
+++ b/webrtc/call/flexfec_receive_stream.h |
@@ -11,40 +11,69 @@ |
#ifndef WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_H_ |
#define WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_H_ |
-#include <memory> |
#include <string> |
+#include <vector> |
-#include "webrtc/api/call/flexfec_receive_stream.h" |
-#include "webrtc/base/basictypes.h" |
-#include "webrtc/base/criticalsection.h" |
-#include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h" |
+#include "webrtc/api/call/transport.h" |
+#include "webrtc/config.h" |
namespace webrtc { |
-namespace internal { |
- |
-class FlexfecReceiveStream : public webrtc::FlexfecReceiveStream { |
+class FlexfecReceiveStream { |
public: |
- FlexfecReceiveStream(const Config& config, |
- RecoveredPacketReceiver* recovered_packet_callback); |
- ~FlexfecReceiveStream(); |
+ struct Stats { |
+ std::string ToString(int64_t time_ms) const; |
- bool AddAndProcessReceivedPacket(const uint8_t* packet, size_t length); |
+ // TODO(brandtr): Add appropriate stats here. |
+ int flexfec_bitrate_bps; |
+ }; |
- // Implements webrtc::FlexfecReceiveStream. |
- void Start() override; |
- void Stop() override; |
- Stats GetStats() const override; |
+ struct Config { |
+ std::string ToString() const; |
- private: |
- rtc::CriticalSection crit_; |
- bool started_ GUARDED_BY(crit_); |
+ // Payload type for FlexFEC. |
+ int payload_type = -1; |
- const Config config_; |
- const std::unique_ptr<FlexfecReceiver> receiver_; |
-}; |
+ // SSRC for FlexFEC stream to be received. |
+ uint32_t remote_ssrc = 0; |
+ |
+ // Vector containing a single element, corresponding to the SSRC of the |
+ // media stream being protected by this FlexFEC stream. The vector MUST have |
+ // size 1. |
+ // |
+ // TODO(brandtr): Update comment above when we support multistream |
+ // protection. |
+ std::vector<uint32_t> protected_media_ssrcs; |
+ |
+ // SSRC for RTCP reports to be sent. |
+ uint32_t local_ssrc = 0; |
+ |
+ // What RTCP mode to use in the reports. |
+ RtcpMode rtcp_mode = RtcpMode::kCompound; |
+ |
+ // Transport for outgoing RTCP packets. |
+ Transport* rtcp_send_transport = nullptr; |
-} // namespace internal |
+ // |transport_cc| is true whenever the send-side BWE RTCP feedback message |
+ // has been negotiated. This is a prerequisite for enabling send-side BWE. |
+ bool transport_cc = false; |
+ |
+ // RTP header extensions that have been negotiated for this track. |
+ std::vector<RtpExtension> extensions; |
+ }; |
+ |
+ // Starts stream activity. |
+ // When a stream is active, it can receive and process packets. |
+ virtual void Start() = 0; |
+ // Stops stream activity. |
+ // When a stream is stopped, it can't receive nor process packets. |
+ virtual void Stop() = 0; |
+ |
+ virtual Stats GetStats() const = 0; |
+ |
+ protected: |
+ virtual ~FlexfecReceiveStream() = default; |
+}; |
} // namespace webrtc |