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

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

Issue 2304363002: Let ViEEncoder express resolution requests as Sinkwants (Closed)
Patch Set: Revert changes to OveruseFrameDetector. Fix merge mistake Created 4 years, 2 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 716390557cd4497198ef9028f3b1535c0cdfd183..2f37a83e4027faf648fa4b35d45b00a454090295 100644
--- a/webrtc/media/engine/webrtcvideoengine2.h
+++ b/webrtc/media/engine/webrtcvideoengine2.h
@@ -241,8 +241,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,
@@ -275,13 +274,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);
@@ -318,9 +313,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),
@@ -348,25 +343,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_

Powered by Google App Engine
This is Rietveld 408576698