Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(435)

Unified Diff: webrtc/media/engine/webrtcvideoengine2.h

Issue 1695263002: Move direct use of VideoCapturer::VideoAdapter to VideoSinkWants. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebased Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/media/engine/webrtcvideoengine2.h
diff --git a/webrtc/media/engine/webrtcvideoengine2.h b/webrtc/media/engine/webrtcvideoengine2.h
index 91a92bff5fc5a16ecbd8e92aa6d5addbeddb6bed..91e2eab61b8159e98fe9a6b01e488df760341951 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_; }
@@ -230,13 +226,15 @@ 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,
const StreamParams& sp,
const webrtc::VideoSendStream::Config& config,
WebRtcVideoEncoderFactory* external_encoder_factory,
+ 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);
@@ -341,10 +342,15 @@ 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_;
+ bool cpu_adapted_;
+ int number_of_cpu_adapt_changes_;
+ class LoadObserverProxy;
+ rtc::scoped_ptr<LoadObserverProxy> load_proxy_;
WebRtcVideoEncoderFactory* const external_encoder_factory_
GUARDED_BY(lock_);
@@ -361,7 +367,6 @@ class WebRtcVideoChannel2 : public VideoMediaChannel,
VideoCapturer* capturer_ GUARDED_BY(lock_);
bool sending_ GUARDED_BY(lock_);
bool muted_ GUARDED_BY(lock_);
- int old_adapt_changes_ GUARDED_BY(lock_);
// The timestamp of the first frame received
// Used to generate the timestamps of subsequent frames

Powered by Google App Engine
This is Rietveld 408576698