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

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

Issue 2483173002: Negotiate H264 profiles in SDP (Closed)
Patch Set: Extract IsSameH264Profile and don't check payload type in FindMatchingCodec 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
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/pc/DEPS » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 1204 matching lines...) Expand 10 before | Expand all | Expand 10 after
3737 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) { 3738 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWith3SimulcastStreams) {
3738 VerifySimulcastSettings(kVp8Codec, 1280, 720, 3, 3); 3739 VerifySimulcastSettings(kVp8Codec, 1280, 720, 3, 3);
3739 } 3740 }
3740 3741
3741 // Test that we normalize send codec format size in simulcast. 3742 // Test that we normalize send codec format size in simulcast.
3742 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) { 3743 TEST_F(WebRtcVideoChannel2SimulcastTest, SetSendCodecsWithOddSizeInSimulcast) {
3743 cricket::VideoCodec codec(kVp8Codec); 3744 cricket::VideoCodec codec(kVp8Codec);
3744 VerifySimulcastSettings(codec, 541, 271, 2, 2); 3745 VerifySimulcastSettings(codec, 541, 271, 2, 2);
3745 } 3746 }
3746 } // namespace cricket 3747 } // namespace cricket
OLDNEW
« no previous file with comments | « webrtc/media/engine/webrtcvideoengine2.cc ('k') | webrtc/pc/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698