| 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 |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "webrtc/video/send_statistics_proxy.h" | 21 #include "webrtc/video/send_statistics_proxy.h" |
| 22 #include "webrtc/video/transport_adapter.h" | 22 #include "webrtc/video/transport_adapter.h" |
| 23 #include "webrtc/video/video_capture_input.h" | 23 #include "webrtc/video/video_capture_input.h" |
| 24 #include "webrtc/video_receive_stream.h" | 24 #include "webrtc/video_receive_stream.h" |
| 25 #include "webrtc/video_send_stream.h" | 25 #include "webrtc/video_send_stream.h" |
| 26 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" | 26 #include "webrtc/system_wrappers/interface/critical_section_wrapper.h" |
| 27 | 27 |
| 28 namespace webrtc { | 28 namespace webrtc { |
| 29 | 29 |
| 30 class ChannelGroup; | 30 class ChannelGroup; |
| 31 class CpuOveruseObserver; | |
| 32 class ProcessThread; | 31 class ProcessThread; |
| 33 class ViEChannel; | 32 class ViEChannel; |
| 34 class ViEEncoder; | 33 class ViEEncoder; |
| 35 | 34 |
| 36 namespace internal { | 35 namespace internal { |
| 37 | 36 |
| 38 class VideoSendStream : public webrtc::VideoSendStream { | 37 class VideoSendStream : public webrtc::VideoSendStream, |
| 38 public webrtc::CpuOveruseObserver { |
| 39 public: | 39 public: |
| 40 VideoSendStream(CpuOveruseObserver* overuse_observer, | 40 VideoSendStream(int num_cpu_cores, |
| 41 int num_cpu_cores, | |
| 42 ProcessThread* module_process_thread, | 41 ProcessThread* module_process_thread, |
| 43 ChannelGroup* channel_group, | 42 ChannelGroup* channel_group, |
| 44 int channel_id, | 43 int channel_id, |
| 45 const VideoSendStream::Config& config, | 44 const VideoSendStream::Config& config, |
| 46 const VideoEncoderConfig& encoder_config, | 45 const VideoEncoderConfig& encoder_config, |
| 47 const std::map<uint32_t, RtpState>& suspended_ssrcs); | 46 const std::map<uint32_t, RtpState>& suspended_ssrcs); |
| 48 | 47 |
| 49 ~VideoSendStream() override; | 48 ~VideoSendStream() override; |
| 50 | 49 |
| 51 // webrtc::SendStream implementation. | 50 // webrtc::SendStream implementation. |
| 52 void Start() override; | 51 void Start() override; |
| 53 void Stop() override; | 52 void Stop() override; |
| 54 void SignalNetworkState(NetworkState state) override; | 53 void SignalNetworkState(NetworkState state) override; |
| 55 bool DeliverRtcp(const uint8_t* packet, size_t length) override; | 54 bool DeliverRtcp(const uint8_t* packet, size_t length) override; |
| 56 | 55 |
| 57 // webrtc::VideoSendStream implementation. | 56 // webrtc::VideoSendStream implementation. |
| 58 VideoCaptureInput* Input() override; | 57 VideoCaptureInput* Input() override; |
| 59 bool ReconfigureVideoEncoder(const VideoEncoderConfig& config) override; | 58 bool ReconfigureVideoEncoder(const VideoEncoderConfig& config) override; |
| 60 Stats GetStats() override; | 59 Stats GetStats() override; |
| 61 | 60 |
| 61 // webrtc::CpuOveruseObserver implementation. |
| 62 void OveruseDetected() override; |
| 63 void NormalUsage() override; |
| 64 |
| 62 typedef std::map<uint32_t, RtpState> RtpStateMap; | 65 typedef std::map<uint32_t, RtpState> RtpStateMap; |
| 63 RtpStateMap GetRtpStates() const; | 66 RtpStateMap GetRtpStates() const; |
| 64 | 67 |
| 65 int64_t GetRtt() const; | 68 int64_t GetRtt() const; |
| 66 | 69 |
| 67 private: | 70 private: |
| 68 bool SetSendCodec(VideoCodec video_codec); | 71 bool SetSendCodec(VideoCodec video_codec); |
| 69 void ConfigureSsrcs(); | 72 void ConfigureSsrcs(); |
| 70 TransportAdapter transport_adapter_; | 73 TransportAdapter transport_adapter_; |
| 71 EncodedFrameCallbackAdapter encoded_frame_proxy_; | 74 EncodedFrameCallbackAdapter encoded_frame_proxy_; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 85 // start bitrate initially, instead of the one reported by VideoEngine (which | 88 // start bitrate initially, instead of the one reported by VideoEngine (which |
| 86 // defaults to too high). | 89 // defaults to too high). |
| 87 bool use_config_bitrate_; | 90 bool use_config_bitrate_; |
| 88 | 91 |
| 89 SendStatisticsProxy stats_proxy_; | 92 SendStatisticsProxy stats_proxy_; |
| 90 }; | 93 }; |
| 91 } // namespace internal | 94 } // namespace internal |
| 92 } // namespace webrtc | 95 } // namespace webrtc |
| 93 | 96 |
| 94 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ | 97 #endif // WEBRTC_VIDEO_VIDEO_SEND_STREAM_H_ |
| OLD | NEW |