Added field trials to disable video resizing
Bug: webrtc:11812 Change-Id: If4d270c1c9abb4b0809fad579697faf63b9015cd Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/180540 Commit-Queue: Razvan Surdulescu <razvans@google.com> Reviewed-by: Christoffer Rodbro <crodbro@webrtc.org> Reviewed-by: Niels Moller <nisse@webrtc.org> Cr-Commit-Position: refs/heads/master@{#31876}
This commit is contained in:

committed by
Commit Bot

parent
5184219b6f
commit
c55e24acc7
@ -427,10 +427,12 @@ WebRtcVideoChannel::WebRtcVideoSendStream::ConfigureVideoEncoderSettings(
|
||||
const VideoCodec& codec) {
|
||||
RTC_DCHECK_RUN_ON(&thread_checker_);
|
||||
bool is_screencast = parameters_.options.is_screencast.value_or(false);
|
||||
// No automatic resizing when using simulcast or screencast.
|
||||
bool automatic_resize =
|
||||
!is_screencast && (parameters_.config.rtp.ssrcs.size() == 1 ||
|
||||
// No automatic resizing when using simulcast or screencast, or when
|
||||
// disabled by field trial flag.
|
||||
bool automatic_resize = !disable_automatic_resize_ && !is_screencast &&
|
||||
(parameters_.config.rtp.ssrcs.size() == 1 ||
|
||||
NumActiveStreams(rtp_parameters_) == 1);
|
||||
|
||||
bool frame_dropping = !is_screencast;
|
||||
bool denoising;
|
||||
bool codec_default_denoising = false;
|
||||
@ -1946,7 +1948,9 @@ WebRtcVideoChannel::WebRtcVideoSendStream::WebRtcVideoSendStream(
|
||||
encoder_sink_(nullptr),
|
||||
parameters_(std::move(config), options, max_bitrate_bps, codec_settings),
|
||||
rtp_parameters_(CreateRtpParametersWithEncodings(sp)),
|
||||
sending_(false) {
|
||||
sending_(false),
|
||||
disable_automatic_resize_(webrtc::field_trial::IsEnabled(
|
||||
"WebRTC-Video-DisableAutomaticResize")) {
|
||||
// Maximum packet size may come in RtpConfig from external transport, for
|
||||
// example from QuicTransportInterface implementation, so do not exceed
|
||||
// given max_packet_size.
|
||||
|
@ -433,6 +433,11 @@ class WebRtcVideoChannel : public VideoMediaChannel,
|
||||
// destructed as they are used in asynchronous tasks it has to be destructed
|
||||
// first.
|
||||
rtc::AsyncInvoker invoker_;
|
||||
|
||||
// TODO(asapersson): investigate why setting
|
||||
// DegrationPreferences::MAINTAIN_RESOLUTION isn't sufficient to disable
|
||||
// downscaling everywhere in the pipeline.
|
||||
const bool disable_automatic_resize_;
|
||||
};
|
||||
|
||||
// Wrapper for the receiver part, contains configs etc. that are needed to
|
||||
|
Reference in New Issue
Block a user