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 CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ 12 #define CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ 13 14 #include <memory> 15 16 #include "call/flexfec_receive_stream.h" 17 #include "call/rtp_packet_sink_interface.h" 18 #include "modules/rtp_rtcp/source/rtp_rtcp_impl2.h" 19 #include "system_wrappers/include/clock.h" 20 21 namespace webrtc { 22 23 class FlexfecReceiver; 24 class ProcessThread; 25 class ReceiveStatistics; 26 class RecoveredPacketReceiver; 27 class RtcpRttStats; 28 class RtpPacketReceived; 29 class RtpRtcp; 30 class RtpStreamReceiverControllerInterface; 31 class RtpStreamReceiverInterface; 32 33 class FlexfecReceiveStreamImpl : public FlexfecReceiveStream { 34 public: 35 FlexfecReceiveStreamImpl( 36 Clock* clock, 37 RtpStreamReceiverControllerInterface* receiver_controller, 38 const Config& config, 39 RecoveredPacketReceiver* recovered_packet_receiver, 40 RtcpRttStats* rtt_stats, 41 ProcessThread* process_thread); 42 ~FlexfecReceiveStreamImpl() override; 43 44 // RtpPacketSinkInterface. 45 void OnRtpPacket(const RtpPacketReceived& packet) override; 46 47 Stats GetStats() const override; 48 const Config& GetConfig() const override; 49 50 private: 51 // Config. 52 const Config config_; 53 54 // Erasure code interfacing. 55 const std::unique_ptr<FlexfecReceiver> receiver_; 56 57 // RTCP reporting. 58 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; 59 const std::unique_ptr<ModuleRtpRtcpImpl2> rtp_rtcp_; 60 ProcessThread* process_thread_; 61 62 std::unique_ptr<RtpStreamReceiverInterface> rtp_stream_receiver_; 63 }; 64 65 } // namespace webrtc 66 67 #endif // CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ 68