Set initial decoder resolution from field trial.

Bug: webrtc:11898
Change-Id: Ie1313bfa3e99abe80f00ed3067f29c775d0f6831
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183040
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#32025}
This commit is contained in:
Sergey Silkin 2020-09-01 11:40:38 +02:00 committed by Commit Bot
parent 2bca008914
commit 2597a1b22c

View File

@ -132,8 +132,19 @@ VideoCodec CreateDecoderVideoCodec(const VideoReceiveStream::Decoder& decoder) {
return associated_codec;
}
codec.width = 320;
codec.height = 180;
FieldTrialOptional<int> width("w");
FieldTrialOptional<int> height("h");
ParseFieldTrial(
{&width, &height},
field_trial::FindFullName("WebRTC-Video-InitialDecoderResolution"));
if (width && height) {
codec.width = width.Value();
codec.height = height.Value();
} else {
codec.width = 320;
codec.height = 180;
}
const int kDefaultStartBitrate = 300;
codec.startBitrate = codec.minBitrate = codec.maxBitrate =
kDefaultStartBitrate;