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_receiver.h" | |
18 | 19 |
19 namespace webrtc { | 20 namespace webrtc { |
20 | 21 |
21 class FlexfecReceiver; | 22 class FlexfecReceiver; |
22 class ProcessThread; | 23 class ProcessThread; |
23 class ReceiveStatistics; | 24 class ReceiveStatistics; |
24 class RecoveredPacketReceiver; | 25 class RecoveredPacketReceiver; |
25 class RtcpRttStats; | 26 class RtcpRttStats; |
26 class RtpPacketReceived; | 27 class RtpPacketReceived; |
27 class RtpRtcp; | 28 class RtpRtcp; |
28 | 29 |
29 class FlexfecReceiveStreamImpl : public FlexfecReceiveStream { | 30 class FlexfecReceiveStreamImpl |
31 : public FlexfecReceiveStream, | |
32 public RtpPacketReceiver { | |
30 public: | 33 public: |
31 FlexfecReceiveStreamImpl(const Config& config, | 34 FlexfecReceiveStreamImpl(const Config& config, |
32 RecoveredPacketReceiver* recovered_packet_receiver, | 35 RecoveredPacketReceiver* recovered_packet_receiver, |
33 RtcpRttStats* rtt_stats, | 36 RtcpRttStats* rtt_stats, |
34 ProcessThread* process_thread); | 37 ProcessThread* process_thread); |
35 ~FlexfecReceiveStreamImpl() override; | 38 ~FlexfecReceiveStreamImpl() override; |
36 | 39 |
37 const Config& GetConfig() const { return config_; } | 40 const Config& GetConfig() const { return config_; } |
38 | 41 |
39 bool AddAndProcessReceivedPacket(const RtpPacketReceived& packet); | 42 // Implements RtpPacketReceiver |
43 bool OnRtpPacket(const RtpPacketReceived& packet) override; | |
44 const RtpConfig& rtp_config() const override; | |
40 | 45 |
41 // Implements FlexfecReceiveStream. | 46 // Implements FlexfecReceiveStream. |
42 void Start() override; | 47 void Start() override; |
43 void Stop() override; | 48 void Stop() override; |
44 Stats GetStats() const override; | 49 Stats GetStats() const override; |
45 | 50 |
46 private: | 51 private: |
47 // Config. | 52 // Config. |
48 const Config config_; | 53 const Config config_; |
54 const RtpConfig rtp_config_; | |
brandtr
2017/02/09 14:51:55
The information in |rtp_config_| is completely bas
nisse-webrtc
2017/02/09 16:20:48
I agree. Main show stopper at the moment is the di
| |
49 bool started_ GUARDED_BY(crit_); | 55 bool started_ GUARDED_BY(crit_); |
50 rtc::CriticalSection crit_; | 56 rtc::CriticalSection crit_; |
51 | 57 |
52 // Erasure code interfacing. | 58 // Erasure code interfacing. |
53 const std::unique_ptr<FlexfecReceiver> receiver_; | 59 const std::unique_ptr<FlexfecReceiver> receiver_; |
54 | 60 |
55 // RTCP reporting. | 61 // RTCP reporting. |
56 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; | 62 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; |
57 const std::unique_ptr<RtpRtcp> rtp_rtcp_; | 63 const std::unique_ptr<RtpRtcp> rtp_rtcp_; |
58 ProcessThread* process_thread_; | 64 ProcessThread* process_thread_; |
59 }; | 65 }; |
60 | 66 |
61 } // namespace webrtc | 67 } // namespace webrtc |
62 | 68 |
63 #endif // WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ | 69 #endif // WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ |
OLD | NEW |