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

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

Issue 2304363002: Let ViEEncoder express resolution requests as Sinkwants (Closed)
Patch Set: Rebased. Created 4 years, 1 month 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
« no previous file with comments | « webrtc/media/engine/fakewebrtccall.cc ('k') | webrtc/media/engine/webrtcvideoengine2.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/media/engine/webrtcvideoengine2.h
diff --git a/webrtc/media/engine/webrtcvideoengine2.h b/webrtc/media/engine/webrtcvideoengine2.h
index 263e834a95b51571ae306ab9900a829601de419d..bc114257567817e2ff3e0e47d5269b346754c102 100644
--- a/webrtc/media/engine/webrtcvideoengine2.h
+++ b/webrtc/media/engine/webrtcvideoengine2.h
@@ -238,8 +238,7 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
// frames are then converted from cricket frames to webrtc frames.
class WebRtcVideoSendStream
: public rtc::VideoSinkInterface<cricket::VideoFrame>,
- public rtc::VideoSourceInterface<webrtc::VideoFrame>,
- public webrtc::LoadObserver {
+ public rtc::VideoSourceInterface<webrtc::VideoFrame> {
public:
WebRtcVideoSendStream(
webrtc::Call* call,
@@ -272,13 +271,9 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
bool SetVideoSend(bool mute,
const VideoOptions* options,
rtc::VideoSourceInterface<cricket::VideoFrame>* source);
- void DisconnectSource();
void SetSend(bool send);
- // Implements webrtc::LoadObserver.
- void OnLoadUpdate(Load load) override;
-
const std::vector<uint32_t>& GetSsrcs() const;
VideoSenderInfo GetVideoSenderInfo(bool log_stats);
void FillBandwidthEstimationInfo(BandwidthEstimationInfo* bwe_info);
@@ -315,9 +310,9 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
bool external;
};
- // TODO(perkj): VideoFrameInfo is currently used for CPU adaptation since
- // we currently do not express CPU overuse using SinkWants in lower
- // layers. This will be fixed in an upcoming cl.
+ // TODO(perkj): VideoFrameInfo is currently used for sending a black frame
+ // when the video source is removed. Consider moving that logic to
+ // VieEncoder or remove it.
struct VideoFrameInfo {
VideoFrameInfo()
: width(0),
@@ -345,25 +340,13 @@ class WebRtcVideoChannel2 : public VideoMediaChannel, public webrtc::Transport {
// and whether or not the encoding in |rtp_parameters_| is active.
void UpdateSendState();
- void UpdateHistograms() const EXCLUSIVE_LOCKS_REQUIRED(lock_);
-
rtc::ThreadChecker thread_checker_;
rtc::AsyncInvoker invoker_;
rtc::Thread* worker_thread_;
const std::vector<uint32_t> ssrcs_ ACCESS_ON(&thread_checker_);
const std::vector<SsrcGroup> ssrc_groups_ ACCESS_ON(&thread_checker_);
webrtc::Call* const call_;
- rtc::VideoSinkWants sink_wants_ ACCESS_ON(&thread_checker_);
- // Counter used for deciding if the video resolution is currently
- // restricted by CPU usage. It is reset if |source_| is changed.
- int cpu_restricted_counter_;
- // Total number of times resolution as been requested to be changed due to
- // CPU adaptation.
- int number_of_cpu_adapt_changes_ ACCESS_ON(&thread_checker_);
- // Total number of frames sent to |stream_|.
- int frame_count_ GUARDED_BY(lock_);
- // Total number of cpu restricted frames sent to |stream_|.
- int cpu_restricted_frame_count_ GUARDED_BY(lock_);
+ const bool enable_cpu_overuse_detection_;
rtc::VideoSourceInterface<cricket::VideoFrame>* source_
ACCESS_ON(&thread_checker_);
WebRtcVideoEncoderFactory* const external_encoder_factory_
« no previous file with comments | « webrtc/media/engine/fakewebrtccall.cc ('k') | webrtc/media/engine/webrtcvideoengine2.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698