OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 #ifndef WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ | 11 #ifndef WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ |
12 #define WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ | 12 #define WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ |
13 | 13 |
14 #include <memory> | 14 #include <memory> |
15 | 15 |
16 #include "webrtc/base/criticalsection.h" | 16 #include "webrtc/base/criticalsection.h" |
17 #include "webrtc/call/flexfec_receive_stream.h" | 17 #include "webrtc/call/flexfec_receive_stream.h" |
18 #include "webrtc/call/rtp_packet_sink_interface.h" | 18 #include "webrtc/call/rtp_packet_sink_interface.h" |
19 | 19 |
20 namespace webrtc { | 20 namespace webrtc { |
21 | 21 |
22 class FlexfecReceiver; | 22 class FlexfecReceiver; |
23 class ProcessThread; | 23 class ProcessThread; |
24 class ReceiveStatistics; | 24 class ReceiveStatistics; |
25 class RecoveredPacketReceiver; | 25 class RecoveredPacketReceiver; |
26 class RtcpRttStats; | 26 class RtcpRttStats; |
27 class RtpPacketReceived; | 27 class RtpPacketReceived; |
28 class RtpRtcp; | 28 class RtpRtcp; |
| 29 class RtpStreamReceiverControllerInterface; |
| 30 class RtpStreamReceiverInterface; |
29 | 31 |
30 class FlexfecReceiveStreamImpl : public FlexfecReceiveStream, | 32 class FlexfecReceiveStreamImpl : public FlexfecReceiveStream, |
31 public RtpPacketSinkInterface { | 33 public RtpPacketSinkInterface { |
32 public: | 34 public: |
33 FlexfecReceiveStreamImpl(const Config& config, | 35 FlexfecReceiveStreamImpl( |
34 RecoveredPacketReceiver* recovered_packet_receiver, | 36 RtpStreamReceiverControllerInterface* receiver_controller, |
35 RtcpRttStats* rtt_stats, | 37 const Config& config, |
36 ProcessThread* process_thread); | 38 RecoveredPacketReceiver* recovered_packet_receiver, |
| 39 RtcpRttStats* rtt_stats, |
| 40 ProcessThread* process_thread); |
37 ~FlexfecReceiveStreamImpl() override; | 41 ~FlexfecReceiveStreamImpl() override; |
38 | 42 |
39 const Config& GetConfig() const { return config_; } | 43 const Config& GetConfig() const { return config_; } |
40 | 44 |
41 // RtpPacketSinkInterface. | 45 // RtpPacketSinkInterface. |
42 void OnRtpPacket(const RtpPacketReceived& packet) override; | 46 void OnRtpPacket(const RtpPacketReceived& packet) override; |
43 | 47 |
44 // Implements FlexfecReceiveStream. | 48 // Implements FlexfecReceiveStream. |
45 void Start() override; | 49 void Start() override; |
46 void Stop() override; | 50 void Stop() override; |
47 Stats GetStats() const override; | 51 Stats GetStats() const override; |
48 | 52 |
49 private: | 53 private: |
50 // Config. | 54 // Config. |
51 const Config config_; | 55 const Config config_; |
52 bool started_ GUARDED_BY(crit_); | 56 bool started_ GUARDED_BY(crit_); |
53 rtc::CriticalSection crit_; | 57 rtc::CriticalSection crit_; |
54 | 58 |
55 // Erasure code interfacing. | 59 // Erasure code interfacing. |
56 const std::unique_ptr<FlexfecReceiver> receiver_; | 60 const std::unique_ptr<FlexfecReceiver> receiver_; |
57 | 61 |
58 // RTCP reporting. | 62 // RTCP reporting. |
59 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; | 63 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; |
60 const std::unique_ptr<RtpRtcp> rtp_rtcp_; | 64 const std::unique_ptr<RtpRtcp> rtp_rtcp_; |
61 ProcessThread* process_thread_; | 65 ProcessThread* process_thread_; |
| 66 |
| 67 std::unique_ptr<RtpStreamReceiverInterface> rtp_stream_receiver_; |
62 }; | 68 }; |
63 | 69 |
64 } // namespace webrtc | 70 } // namespace webrtc |
65 | 71 |
66 #endif // WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ | 72 #endif // WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ |
OLD | NEW |