From 3288168e4f06df650c42fd3291452feeb337303b Mon Sep 17 00:00:00 2001 From: Ilya Nikolaevskiy Date: Wed, 22 Aug 2018 12:58:55 +0200 Subject: [PATCH] Enable video adaptation for all screenshare content MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Since screenshare uses "Maintain resolution" degradation preference, adapting should be enabled to reduce framerate if encoder can't keep up. Bug: chromium:690537 Change-Id: I1f4418b7b7b4faa13f34d5353e3c625a59975c05 Reviewed-on: https://webrtc-review.googlesource.com/95460 Reviewed-by: Erik Språng Reviewed-by: Fredrik Solenberg Commit-Queue: Ilya Nikolaevskiy Cr-Commit-Position: refs/heads/master@{#24426} --- media/base/videocapturer.cc | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/media/base/videocapturer.cc b/media/base/videocapturer.cc index 643134c546..576365e26f 100644 --- a/media/base/videocapturer.cc +++ b/media/base/videocapturer.cc @@ -17,7 +17,6 @@ #include "api/video/i420_buffer.h" #include "api/video/video_frame.h" #include "rtc_base/logging.h" -#include "system_wrappers/include/field_trial.h" namespace cricket { @@ -27,8 +26,6 @@ static const int64_t kMaxDistance = ~(static_cast(1) << 63); #ifdef WEBRTC_LINUX static const int kYU12Penalty = 16; // Needs to be higher than MJPG index. #endif -static const char* kSimulcastScreenshareFieldTrialName = - "WebRTC-SimulcastScreenshare"; } // namespace @@ -184,10 +181,7 @@ bool VideoCapturer::AdaptFrame(int width, return false; } - bool simulcast_screenshare_enabled = - !webrtc::field_trial::IsDisabled(kSimulcastScreenshareFieldTrialName); - if (enable_video_adapter_ && - (!IsScreencast() || simulcast_screenshare_enabled)) { + if (enable_video_adapter_) { if (!video_adapter_.AdaptFrameResolution( width, height, camera_time_us * rtc::kNumNanosecsPerMicrosec, crop_width, crop_height, out_width, out_height)) {