Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: webrtc/media/engine/webrtcvideoengine2_unittest.cc

Issue 2483173002: Negotiate H264 profiles in SDP (Closed)
Patch Set: Rebase Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 2501 matching lines...) Expand 10 before | Expand all | Expand 10 after
2512 for (size_t i = 0; i < arraysize(kIncorrectPayloads); ++i) { 2512 for (size_t i = 0; i < arraysize(kIncorrectPayloads); ++i) {
2513 parameters.codecs[0].id = kIncorrectPayloads[i]; 2513 parameters.codecs[0].id = kIncorrectPayloads[i];
2514 EXPECT_FALSE(channel_->SetSendParameters(parameters)) 2514 EXPECT_FALSE(channel_->SetSendParameters(parameters))
2515 << "Bad payload type '" << kIncorrectPayloads[i] << "' accepted."; 2515 << "Bad payload type '" << kIncorrectPayloads[i] << "' accepted.";
2516 } 2516 }
2517 } 2517 }
2518 2518
2519 TEST_F(WebRtcVideoChannel2Test, SetSendCodecsAcceptAllValidPayloadTypes) { 2519 TEST_F(WebRtcVideoChannel2Test, SetSendCodecsAcceptAllValidPayloadTypes) {
2520 cricket::VideoSendParameters parameters; 2520 cricket::VideoSendParameters parameters;
2521 parameters.codecs.push_back(kVp8Codec); 2521 parameters.codecs.push_back(kVp8Codec);
2522 for (int payload_type = 0; payload_type <= 127; ++payload_type) { 2522 // Only the dynamic payload types are valid for video codecs.
2523 for (int payload_type = 96; payload_type <= 127; ++payload_type) {
2523 parameters.codecs[0].id = payload_type; 2524 parameters.codecs[0].id = payload_type;
2524 EXPECT_TRUE(channel_->SetSendParameters(parameters)) 2525 EXPECT_TRUE(channel_->SetSendParameters(parameters))
2525 << "Payload type '" << payload_type << "' rejected."; 2526 << "Payload type '" << payload_type << "' rejected.";
2526 } 2527 }
2527 } 2528 }
2528 2529
2529 // Test that setting the a different set of codecs but with an identical front 2530 // Test that setting the a different set of codecs but with an identical front
2530 // codec doesn't result in the stream being recreated. 2531 // codec doesn't result in the stream being recreated.
2531 // This may happen when a subsequent negotiation includes fewer codecs, as a 2532 // This may happen when a subsequent negotiation includes fewer codecs, as a
2532 // result of one of the codecs being rejected. 2533 // result of one of the codecs being rejected.
(...skipping 1210 matching lines...) Expand 10 before | Expand all | Expand 10 after
3743 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) { 3744 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) {
3744 VerifySimulcastSettings(kVp8Codec, 1280, 720, 3, 3); 3745 VerifySimulcastSettings(kVp8Codec, 1280, 720, 3, 3);
3745 } 3746 }
3746 3747
3747 // Test that we normalize send codec format size in simulcast. 3748 // Test that we normalize send codec format size in simulcast.
3748 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { 3749 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) {
3749 cricket::VideoCodec codec(kVp8Codec); 3750 cricket::VideoCodec codec(kVp8Codec);
3750 VerifySimulcastSettings(codec, 541, 271, 2, 2); 3751 VerifySimulcastSettings(codec, 541, 271, 2, 2);
3751 } 3752 }
3752 } // namespace cricket 3753 } // namespace cricket
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698