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_packet_sink_interface.h" | |
| 19 | 18 |
| 20 namespace webrtc { | 19 namespace webrtc { |
| 21 | 20 |
| 22 class FlexfecReceiver; | 21 class FlexfecReceiver; |
| 23 class ProcessThread; | 22 class ProcessThread; |
| 24 class ReceiveStatistics; | 23 class ReceiveStatistics; |
| 25 class RecoveredPacketReceiver; | 24 class RecoveredPacketReceiver; |
| 26 class RtcpRttStats; | 25 class RtcpRttStats; |
| 27 class RtpPacketReceived; | 26 class RtpPacketReceived; |
| 28 class RtpRtcp; | 27 class RtpRtcp; |
| 29 class RtpStreamReceiverControllerInterface; | 28 class RtpStreamReceiverControllerInterface; |
| 30 class RtpStreamReceiverInterface; | 29 class RtpStreamReceiverInterface; |
| 31 | 30 |
| 32 class FlexfecReceiveStreamImpl : public FlexfecReceiveStream, | 31 class FlexfecReceiveStreamImpl : public FlexfecReceiveStream { |
| 33 public RtpPacketSinkInterface { | |
| 34 public: | 32 public: |
| 35 FlexfecReceiveStreamImpl( | 33 FlexfecReceiveStreamImpl( |
| 36 RtpStreamReceiverControllerInterface* receiver_controller, | 34 RtpStreamReceiverControllerInterface* receiver_controller, |
| 37 const Config& config, | 35 const Config& config, |
| 38 RecoveredPacketReceiver* recovered_packet_receiver, | 36 RecoveredPacketReceiver* recovered_packet_receiver, |
| 39 RtcpRttStats* rtt_stats, | 37 RtcpRttStats* rtt_stats, |
| 40 ProcessThread* process_thread); | 38 ProcessThread* process_thread); |
| 41 ~FlexfecReceiveStreamImpl() override; | 39 ~FlexfecReceiveStreamImpl() override; |
| 42 | 40 |
| 43 // RtpPacketSinkInterface. | 41 // RtpPacketSinkInterface. |
| 44 void OnRtpPacket(const RtpPacketReceived& packet) override; | 42 void OnRtpPacket(const RtpPacketReceived& packet) override; |
| 45 | 43 |
| 46 // Implements FlexfecReceiveStream. | 44 // Implements FlexfecReceiveStream. |
| 47 void Start() override; | 45 void Start() override; |
| 48 void Stop() override; | 46 void Stop() override; |
| 49 Stats GetStats() const override; | 47 Stats GetStats() const override; |
| 50 | 48 |
| 51 const Config& GetConfig() const override; | 49 const Config& GetConfig() const override; |
| 52 | 50 |
| 53 private: | 51 private: |
| 54 // Config. | 52 // Config. |
| 55 const Config config_; | 53 const Config config_; |
| 54 // TODO(eladalon): This critical section, which only protects crit_, is odd. | |
| 55 // We should probably just use an atomic-bool. | |
|
danilchap
2017/07/19 12:07:25
is this TODO somehow related to the CL topic?
eladalon
2017/07/21 14:42:08
1. Looking at it again, I see I have mis-worded; t
danilchap
2017/07/24 09:03:45
this is issue looks too small to me to deserve an
eladalon
2017/07/24 13:15:48
Created https://codereview.webrtc.org/2991533002/
| |
| 56 bool started_ GUARDED_BY(crit_); | 56 bool started_ GUARDED_BY(crit_); |
| 57 rtc::CriticalSection crit_; | 57 rtc::CriticalSection crit_; |
| 58 | 58 |
| 59 // Erasure code interfacing. | 59 // Erasure code interfacing. |
| 60 const std::unique_ptr<FlexfecReceiver> receiver_; | 60 const std::unique_ptr<FlexfecReceiver> receiver_; |
| 61 | 61 |
| 62 // RTCP reporting. | 62 // RTCP reporting. |
| 63 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; | 63 const std::unique_ptr<ReceiveStatistics> rtp_receive_statistics_; |
| 64 const std::unique_ptr<RtpRtcp> rtp_rtcp_; | 64 const std::unique_ptr<RtpRtcp> rtp_rtcp_; |
| 65 ProcessThread* process_thread_; | 65 ProcessThread* process_thread_; |
| 66 | 66 |
| 67 std::unique_ptr<RtpStreamReceiverInterface> rtp_stream_receiver_; | 67 std::unique_ptr<RtpStreamReceiverInterface> rtp_stream_receiver_; |
| 68 }; | 68 }; |
| 69 | 69 |
| 70 } // namespace webrtc | 70 } // namespace webrtc |
| 71 | 71 |
| 72 #endif // WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ | 72 #endif // WEBRTC_CALL_FLEXFEC_RECEIVE_STREAM_IMPL_H_ |
| OLD | NEW |