Remove VideoCodec resolution validation.

This is needed to be able to land https://codereview.webrtc.org/2408153002/  "Remove cricket::VideoCodec with, height and framerate properties" without breaking upstream projects.

BUG=webrtc:5332
TBR=pthatcher@webrtc.org

Review URL: https://codereview.webrtc.org/2437453003 .

Cr-Commit-Position: refs/heads/master@{#14681}
This commit is contained in:
Per 2016-10-19 13:57:59 +02:00
parent e3e411a1aa
commit 061ea0df03
3 changed files with 0 additions and 29 deletions

View File

@ -315,11 +315,6 @@ bool VideoCodec::ValidateCodecFormat() const {
}
// Video validation from here on.
if (width <= 0 || height <= 0) {
LOG(LS_ERROR) << "Codec with invalid dimensions: " << ToString();
return false;
}
int min_bitrate = -1;
int max_bitrate = -1;
if (GetParam(kCodecParamMinBitrate, &min_bitrate) &&

View File

@ -348,16 +348,6 @@ TEST(CodecTest, TestValidateCodecFormat) {
too_high_payload_type.id = 128;
EXPECT_FALSE(too_high_payload_type.ValidateCodecFormat());
// Reject zero-width codecs.
VideoCodec zero_width = codec;
zero_width.width = 0;
EXPECT_FALSE(zero_width.ValidateCodecFormat());
// Reject zero-height codecs.
VideoCodec zero_height = codec;
zero_height.height = 0;
EXPECT_FALSE(zero_height.ValidateCodecFormat());
// Accept non-video codecs with zero dimensions.
VideoCodec zero_width_rtx_codec = VideoCodec::CreateRtxCodec(96, 120);
zero_width_rtx_codec.width = 0;

View File

@ -2518,20 +2518,6 @@ TEST_F(WebRtcVideoChannel2Test, SetSendCodecsWithMaxQuantization) {
EXPECT_EQ(kMaxQuantization, codec.params[kCodecParamMaxQuantization]);
}
TEST_F(WebRtcVideoChannel2Test, SetSendCodecsRejectBadDimensions) {
cricket::VideoSendParameters parameters;
parameters.codecs.push_back(kVp8Codec);
parameters.codecs[0].width = 0;
EXPECT_FALSE(channel_->SetSendParameters(parameters))
<< "Codec set though codec width is zero.";
parameters.codecs[0].width = kVp8Codec.width;
parameters.codecs[0].height = 0;
EXPECT_FALSE(channel_->SetSendParameters(parameters))
<< "Codec set though codec height is zero.";
}
TEST_F(WebRtcVideoChannel2Test, SetSendCodecsRejectBadPayloadTypes) {
// TODO(pbos): Should we only allow the dynamic range?
static const int kIncorrectPayloads[] = {-2, -1, 128, 129};