Remove assumption that all video codecs are known.
Bug: webrtc:9516 Change-Id: I810e9bfe556e6d2ccfeb7a35f7c6785c9909a0e2 Reviewed-on: https://webrtc-review.googlesource.com/94512 Reviewed-by: Sebastian Jansson <srte@webrtc.org> Reviewed-by: Rasmus Brandt <brandtr@webrtc.org> Commit-Queue: Kári Helgason <kthelgason@webrtc.org> Cr-Commit-Position: refs/heads/master@{#24420}
This commit is contained in:

committed by
Commit Bot

parent
a765c8208a
commit
e8a2e6c82f
@ -48,29 +48,25 @@ static void CodecSettings(VideoCodecType codec_type, VideoCodec* settings) {
|
||||
kTestTimingFramesDelayMs, kTestOutlierFrameSizePercent,
|
||||
};
|
||||
|
||||
settings->codecType = codec_type;
|
||||
switch (codec_type) {
|
||||
case kVideoCodecVP8:
|
||||
settings->codecType = kVideoCodecVP8;
|
||||
*(settings->VP8()) = VideoEncoder::GetDefaultVp8Settings();
|
||||
return;
|
||||
case kVideoCodecVP9:
|
||||
settings->codecType = kVideoCodecVP9;
|
||||
*(settings->VP9()) = VideoEncoder::GetDefaultVp9Settings();
|
||||
return;
|
||||
case kVideoCodecH264:
|
||||
settings->codecType = kVideoCodecH264;
|
||||
// TODO(brandtr): Set |qpMax| here, when the OpenH264 wrapper supports it.
|
||||
*(settings->H264()) = VideoEncoder::GetDefaultH264Settings();
|
||||
return;
|
||||
case kVideoCodecI420:
|
||||
settings->codecType = kVideoCodecI420;
|
||||
// Bitrate needed for this size and framerate.
|
||||
settings->startBitrate =
|
||||
3 * kTestWidth * kTestHeight * 8 * kTestFrameRate / 1000 / 2;
|
||||
settings->maxBitrate = settings->startBitrate;
|
||||
return;
|
||||
default:
|
||||
RTC_NOTREACHED();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user