| 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 <vector> | 14 #include <vector> |
| 15 | 15 |
| 16 #include "webrtc/base/scoped_ptr.h" | 16 #include "webrtc/base/scoped_ptr.h" |
| 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/interface/incoming_video_stream.h" | 19 #include "webrtc/common_video/interface/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/video_render/include/video_render_defines.h" | 21 #include "webrtc/modules/video_render/include/video_render_defines.h" |
| 22 #include "webrtc/system_wrappers/interface/clock.h" | 22 #include "webrtc/system_wrappers/interface/clock.h" |
| 23 #include "webrtc/video/encoded_frame_callback_adapter.h" | 23 #include "webrtc/video/encoded_frame_callback_adapter.h" |
| 24 #include "webrtc/video/receive_statistics_proxy.h" | 24 #include "webrtc/video/receive_statistics_proxy.h" |
| 25 #include "webrtc/video_encoder.h" | 25 #include "webrtc/video_encoder.h" |
| 26 #include "webrtc/video_engine/vie_channel.h" | 26 #include "webrtc/video_engine/vie_channel.h" |
| 27 #include "webrtc/video_engine/vie_channel_group.h" | |
| 28 #include "webrtc/video_engine/vie_encoder.h" | 27 #include "webrtc/video_engine/vie_encoder.h" |
| 29 #include "webrtc/video_receive_stream.h" | 28 #include "webrtc/video_receive_stream.h" |
| 30 | 29 |
| 31 namespace webrtc { | 30 namespace webrtc { |
| 32 | 31 |
| 33 class CallStats; | 32 class CallStats; |
| 33 class CongestionController; |
| 34 class VoiceEngine; | 34 class VoiceEngine; |
| 35 | 35 |
| 36 namespace internal { | 36 namespace internal { |
| 37 | 37 |
| 38 class VideoReceiveStream : public webrtc::VideoReceiveStream, | 38 class VideoReceiveStream : public webrtc::VideoReceiveStream, |
| 39 public I420FrameCallback, | 39 public I420FrameCallback, |
| 40 public VideoRenderCallback, | 40 public VideoRenderCallback, |
| 41 public EncodedImageCallback { | 41 public EncodedImageCallback { |
| 42 public: | 42 public: |
| 43 VideoReceiveStream(int num_cpu_cores, | 43 VideoReceiveStream(int num_cpu_cores, |
| 44 ChannelGroup* channel_group, | 44 CongestionController* congestion_controller, |
| 45 const VideoReceiveStream::Config& config, | 45 const VideoReceiveStream::Config& config, |
| 46 webrtc::VoiceEngine* voice_engine, | 46 webrtc::VoiceEngine* voice_engine, |
| 47 ProcessThread* process_thread, | 47 ProcessThread* process_thread, |
| 48 CallStats* call_stats); | 48 CallStats* call_stats); |
| 49 ~VideoReceiveStream() override; | 49 ~VideoReceiveStream() override; |
| 50 | 50 |
| 51 // webrtc::ReceiveStream implementation. | 51 // webrtc::ReceiveStream implementation. |
| 52 void Start() override; | 52 void Start() override; |
| 53 void Stop() override; | 53 void Stop() override; |
| 54 void SignalNetworkState(NetworkState state) override; | 54 void SignalNetworkState(NetworkState state) override; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 75 const Config& config() const { return config_; } | 75 const Config& config() const { return config_; } |
| 76 | 76 |
| 77 void SetSyncChannel(VoiceEngine* voice_engine, int audio_channel_id); | 77 void SetSyncChannel(VoiceEngine* voice_engine, int audio_channel_id); |
| 78 | 78 |
| 79 private: | 79 private: |
| 80 TransportAdapter transport_adapter_; | 80 TransportAdapter transport_adapter_; |
| 81 EncodedFrameCallbackAdapter encoded_frame_proxy_; | 81 EncodedFrameCallbackAdapter encoded_frame_proxy_; |
| 82 const VideoReceiveStream::Config config_; | 82 const VideoReceiveStream::Config config_; |
| 83 Clock* const clock_; | 83 Clock* const clock_; |
| 84 | 84 |
| 85 ChannelGroup* const channel_group_; | 85 CongestionController* const congestion_controller_; |
| 86 CallStats* const call_stats_; | 86 CallStats* const call_stats_; |
| 87 | 87 |
| 88 rtc::scoped_ptr<IncomingVideoStream> incoming_video_stream_; | 88 rtc::scoped_ptr<IncomingVideoStream> incoming_video_stream_; |
| 89 rtc::scoped_ptr<ReceiveStatisticsProxy> stats_proxy_; | 89 rtc::scoped_ptr<ReceiveStatisticsProxy> stats_proxy_; |
| 90 rtc::scoped_ptr<ViEChannel> vie_channel_; | 90 rtc::scoped_ptr<ViEChannel> vie_channel_; |
| 91 }; | 91 }; |
| 92 } // namespace internal | 92 } // namespace internal |
| 93 } // namespace webrtc | 93 } // namespace webrtc |
| 94 | 94 |
| 95 #endif // WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ | 95 #endif // WEBRTC_VIDEO_VIDEO_RECEIVE_STREAM_H_ |
| OLD | NEW |