Index: webrtc/media/engine/webrtcvideoengine2.h |
diff --git a/webrtc/media/engine/webrtcvideoengine2.h b/webrtc/media/engine/webrtcvideoengine2.h |
index 16b7cc51577f306433e353df2565a1e700459a13..928a14ade38c511f1e3dba15bd249e5788aaceab 100644 |
--- a/webrtc/media/engine/webrtcvideoengine2.h |
+++ b/webrtc/media/engine/webrtcvideoengine2.h |
@@ -129,9 +129,7 @@ class WebRtcVideoEngine2 { |
rtc::scoped_ptr<WebRtcVideoEncoderFactory> simulcast_encoder_factory_; |
}; |
-class WebRtcVideoChannel2 : public VideoMediaChannel, |
- public webrtc::Transport, |
- public webrtc::LoadObserver { |
+class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport { |
public: |
WebRtcVideoChannel2(webrtc::Call* call, |
const MediaConfig& config, |
@@ -168,8 +166,6 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, |
void OnReadyToSend(bool ready) override; |
void SetInterface(NetworkInterface* iface) override; |
- void OnLoadUpdate(Load load) override; |
- |
// Implemented for VideoMediaChannelTest. |
bool sending() const { return sending_; } |
uint32_t GetDefaultSendChannelSsrc() { return default_send_ssrc_; } |
@@ -229,7 +225,8 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, |
// Wrapper for the sender part, this is where the capturer is connected and |
// frames are then converted from cricket frames to webrtc frames. |
class WebRtcVideoSendStream |
- : public rtc::VideoSinkInterface<cricket::VideoFrame> { |
+ : public rtc::VideoSinkInterface<cricket::VideoFrame>, |
+ public webrtc::LoadObserver { |
public: |
WebRtcVideoSendStream( |
webrtc::Call* call, |
@@ -237,6 +234,7 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, |
const webrtc::VideoSendStream::Config& config, |
WebRtcVideoEncoderFactory* external_encoder_factory, |
const VideoOptions& options, |
+ bool enable_cpu_overuse_detection, |
int max_bitrate_bps, |
const rtc::Optional<VideoCodecSettings>& codec_settings, |
const std::vector<webrtc::RtpExtension>& rtp_extensions, |
@@ -255,6 +253,9 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, |
void Start(); |
void Stop(); |
+ // Implements webrtc::LoadObserver. |
+ void OnLoadUpdate(Load load) override; |
+ |
const std::vector<uint32_t>& GetSsrcs() const; |
VideoSenderInfo GetVideoSenderInfo(); |
void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info); |
@@ -340,10 +341,14 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, |
void SetDimensions(int width, int height, bool is_screencast) |
EXCLUSIVE_LOCKS_REQUIRED(lock_); |
+ rtc::ThreadChecker thread_checker_; |
const std::vector<uint32_t> ssrcs_; |
const std::vector<SsrcGroup> ssrc_groups_; |
webrtc::Call* const call_; |
rtc::VideoSinkWants sink_wants_; |
+ class LoadObserverProxy; |
+ rtc::scoped_ptr<LoadObserverProxy> load_proxy_; |
+ size_t cpu_downgrade_count_ = 0; |
WebRtcVideoEncoderFactory* const external_encoder_factory_ |
GUARDED_BY(lock_); |