Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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_VIDEO_VIDEO_RECEIVE_STREAM_H_ | 11 #ifndef WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ |
| 12 #define WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ | 12 #define WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 #include <vector> | 15 #include <vector> |
| 16 | 16 |
| 17 #include "webrtc/call.h" | 17 #include "webrtc/call.h" |
| 18 #include "webrtc/call/transport_adapter.h" | 18 #include "webrtc/call/transport_adapter.h" |
| 19 #include "webrtc/common_video/include/incoming_video_stream.h" | 19 #include "webrtc/common_video/include/incoming_video_stream.h" |
| 20 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 20 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
| 21 #include "webrtc/modules/rtp_rtcp/include/flexfec_receiver.h" | |
| 21 #include "webrtc/modules/video_coding/video_coding_impl.h" | 22 #include "webrtc/modules/video_coding/video_coding_impl.h" |
| 22 #include "webrtc/system_wrappers/include/clock.h" | 23 #include "webrtc/system_wrappers/include/clock.h" |
| 23 #include "webrtc/video/receive_statistics_proxy.h" | 24 #include "webrtc/video/receive_statistics_proxy.h" |
| 24 #include "webrtc/video/rtp_stream_receiver.h" | 25 #include "webrtc/video/rtp_stream_receiver.h" |
| 25 #include "webrtc/video/rtp_streams_synchronizer.h" | 26 #include "webrtc/video/rtp_streams_synchronizer.h" |
| 26 #include "webrtc/video/video_stream_decoder.h" | 27 #include "webrtc/video/video_stream_decoder.h" |
| 27 #include "webrtc/video_receive_stream.h" | 28 #include "webrtc/video_receive_stream.h" |
| 28 | 29 |
| 29 namespace webrtc { | 30 namespace webrtc { |
| 30 | 31 |
| 31 class CallStats; | 32 class CallStats; |
| 32 class CongestionController; | 33 class CongestionController; |
| 33 class IvfFileWriter; | 34 class IvfFileWriter; |
| 34 class ProcessThread; | 35 class ProcessThread; |
| 35 class RTPFragmentationHeader; | 36 class RTPFragmentationHeader; |
| 36 class VoiceEngine; | 37 class VoiceEngine; |
| 37 class VieRemb; | 38 class VieRemb; |
| 38 | 39 |
| 39 namespace internal { | 40 namespace internal { |
| 40 | 41 |
| 41 class VideoReceiveStream : public webrtc::VideoReceiveStream, | 42 class VideoReceiveStream : public webrtc::VideoReceiveStream, |
| 42 public rtc::VideoSinkInterface<VideoFrame>, | 43 public rtc::VideoSinkInterface<VideoFrame>, |
| 43 public EncodedImageCallback, | 44 public EncodedImageCallback, |
| 44 public NackSender, | 45 public NackSender, |
| 45 public KeyFrameRequestSender { | 46 public KeyFrameRequestSender, |
| 47 public RecoveredPacketReceiver { | |
|
stefan-webrtc
2016/10/10 15:42:02
It's not really necessary for this to implement Re
brandtr
2016/10/10 23:05:19
You are absolutely right. It doesn't really make s
| |
| 46 public: | 48 public: |
| 47 VideoReceiveStream(int num_cpu_cores, | 49 VideoReceiveStream(int num_cpu_cores, |
| 48 CongestionController* congestion_controller, | 50 CongestionController* congestion_controller, |
| 49 VideoReceiveStream::Config config, | 51 VideoReceiveStream::Config config, |
| 50 webrtc::VoiceEngine* voice_engine, | 52 webrtc::VoiceEngine* voice_engine, |
| 51 ProcessThread* process_thread, | 53 ProcessThread* process_thread, |
| 52 CallStats* call_stats, | 54 CallStats* call_stats, |
| 53 VieRemb* remb); | 55 VieRemb* remb); |
| 54 ~VideoReceiveStream() override; | 56 ~VideoReceiveStream() override; |
| 55 | 57 |
| 56 void SignalNetworkState(NetworkState state); | 58 void SignalNetworkState(NetworkState state); |
| 57 bool DeliverRtcp(const uint8_t* packet, size_t length); | 59 bool DeliverRtcp(const uint8_t* packet, size_t length); |
| 58 bool DeliverRtp(const uint8_t* packet, | 60 bool DeliverRtp(const uint8_t* packet, |
| 59 size_t length, | 61 size_t length, |
| 60 const PacketTime& packet_time); | 62 const PacketTime& packet_time); |
| 61 | 63 |
| 64 // Implements RecoveredPacketReceiver. | |
| 65 bool OnRecoveredPacket(const uint8_t* packet, size_t length) override; | |
| 66 | |
| 62 // webrtc::VideoReceiveStream implementation. | 67 // webrtc::VideoReceiveStream implementation. |
| 63 void Start() override; | 68 void Start() override; |
| 64 void Stop() override; | 69 void Stop() override; |
| 65 | 70 |
| 66 webrtc::VideoReceiveStream::Stats GetStats() const override; | 71 webrtc::VideoReceiveStream::Stats GetStats() const override; |
| 67 | 72 |
| 68 // Overrides rtc::VideoSinkInterface<VideoFrame>. | 73 // Overrides rtc::VideoSinkInterface<VideoFrame>. |
| 69 void OnFrame(const VideoFrame& video_frame) override; | 74 void OnFrame(const VideoFrame& video_frame) override; |
| 70 | 75 |
| 71 // Overrides EncodedImageCallback. | 76 // Overrides EncodedImageCallback. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 113 std::unique_ptr<VideoStreamDecoder> video_stream_decoder_; | 118 std::unique_ptr<VideoStreamDecoder> video_stream_decoder_; |
| 114 RtpStreamsSynchronizer rtp_stream_sync_; | 119 RtpStreamsSynchronizer rtp_stream_sync_; |
| 115 | 120 |
| 116 rtc::CriticalSection ivf_writer_lock_; | 121 rtc::CriticalSection ivf_writer_lock_; |
| 117 std::unique_ptr<IvfFileWriter> ivf_writer_ GUARDED_BY(ivf_writer_lock_); | 122 std::unique_ptr<IvfFileWriter> ivf_writer_ GUARDED_BY(ivf_writer_lock_); |
| 118 }; | 123 }; |
| 119 } // namespace internal | 124 } // namespace internal |
| 120 } // namespace webrtc | 125 } // namespace webrtc |
| 121 | 126 |
| 122 #endif // WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ | 127 #endif // WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ |
| OLD | NEW |