Chromium Code Reviews| 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_transport_controller_receive.h" | |
| 19 #include "webrtc/modules/rtp_rtcp/source/rtp_header_extension.h" | |
| 18 | 20 |
| 19 namespace webrtc { | 21 namespace webrtc { |
| 20 | 22 |
| 21 class FlexfecReceiver; | 23 class FlexfecReceiver; |
| 22 class ProcessThread; | 24 class ProcessThread; |
| 23 class ReceiveStatistics; | 25 class ReceiveStatistics; |
| 24 class RecoveredPacketReceiver; | 26 class RecoveredPacketReceiver; |
| 25 class RtcpRttStats; | 27 class RtcpRttStats; |
| 26 class RtpPacketReceived; | 28 class RtpPacketReceived; |
| 27 class RtpRtcp; | 29 class RtpRtcp; |
| 28 | 30 |
| 29 class FlexfecReceiveStreamImpl : public FlexfecReceiveStream { | 31 class FlexfecReceiveStreamImpl : public FlexfecReceiveStream, |
| 32 public RtpPacketReceiverInterface, | |
| 33 public RtpPacketSinkInterface { | |
| 30 public: | 34 public: |
| 31 FlexfecReceiveStreamImpl(const Config& config, | 35 FlexfecReceiveStreamImpl(const Config& config, |
| 32 RecoveredPacketReceiver* recovered_packet_receiver, | 36 RecoveredPacketReceiver* recovered_packet_receiver, |
| 33 RtcpRttStats* rtt_stats, | 37 RtcpRttStats* rtt_stats, |
| 34 ProcessThread* process_thread); | 38 ProcessThread* process_thread); |
| 35 ~FlexfecReceiveStreamImpl() override; | 39 ~FlexfecReceiveStreamImpl() override; |
| 36 | 40 |
| 37 const Config& GetConfig() const { return config_; } | 41 const Config& GetConfig() const { return config_; } |
| 38 | 42 |
| 39 // TODO(nisse): Intended to be part of an RtpPacketReceiver interface. | 43 // webrtc::RtpPacketReceiverInterface implementation, for the |
|
the sun
2017/04/18 09:59:00
What's the difference between an RtpPacketReceiver
nisse-webrtc
2017/04/19 08:35:43
A PacketReceiver knows the extensions mapping, and
| |
| 40 void OnRtpPacket(const RtpPacketReceived& packet); | 44 // FlexFEC stream. |
| 45 bool OnRtpPacketReceive(RtpPacketReceived* packet) override; | |
| 46 | |
| 47 // webrtc::RtpPacketSinkInterface implementation, for the media | |
| 48 // streams protected by FlexFEC. | |
| 49 void OnRtpPacket(const RtpPacketReceived& packet) override; | |
| 41 | 50 |
| 42 // Implements FlexfecReceiveStream. | 51 // Implements FlexfecReceiveStream. |
| 43 void Start() override; | 52 void Start() override; |
| 44 void Stop() override; | 53 void Stop() override; |
| 45 Stats GetStats() const override; | 54 Stats GetStats() const override; |
| 46 | 55 |
| 47 private: | 56 private: |
| 48 // Config. | 57 // Config. |
| 49 const Config config_; | 58 const Config config_; |
| 59 const RtpHeaderExtensionMap rtp_header_extensions_; | |
| 60 | |
| 50 bool started_ GUARDED_BY(crit_); | 61 bool started_ GUARDED_BY(crit_); |
| 51 rtc::CriticalSection crit_; | 62 rtc::CriticalSection crit_; |
| 52 | 63 |
| 53 // Erasure code interfacing. | 64 // Erasure code interfacing. |
| 54 const std::unique_ptr<FlexfecReceiver> receiver_; | 65 const std::unique_ptr<FlexfecReceiver> receiver_; |
| 55 | 66 |
| 56 // RTCP reporting. | 67 // RTCP reporting. |
| 57 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; | 68 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; |
| 58 const std::unique_ptr<RtpRtcp> rtp_rtcp_; | 69 const std::unique_ptr<RtpRtcp> rtp_rtcp_; |
| 59 ProcessThread* process_thread_; | 70 ProcessThread* process_thread_; |
| 60 }; | 71 }; |
| 61 | 72 |
| 62 } // namespace webrtc | 73 } // namespace webrtc |
| 63 | 74 |
| 64 #endif // WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ | 75 #endif // WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ |
| OLD | NEW |