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

Side by Side Diff: webrtc/examples/objc/AppRTCMobile/tests/ARDAppClientTest.mm

Issue 2520933002: iOS AppRTCMobile: Fix SDP video codec reordering for multiple H264 profiles (Closed)
Patch Set: 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 2014 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2014 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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after
351 }]; 351 }];
352 } 352 }
353 353
354 @end 354 @end
355 355
356 @interface ARDSDPUtilsTest : ARDTestCase 356 @interface ARDSDPUtilsTest : ARDTestCase
357 - (void)testPreferVideoCodec; 357 - (void)testPreferVideoCodec;
358 @end 358 @end
359 359
360 @implementation ARDSDPUtilsTest 360 @implementation ARDSDPUtilsTest
361 361
daniela-webrtc 2016/11/21 16:23:00 Perhaps few more tests can be added. For instance
magjed_webrtc 2016/11/22 14:40:24 Done, I added some more tests.
362 - (void)testPreferVideoCodec { 362 - (void)testPreferVideoCodec {
363 NSString *sdp = @("m=video 9 RTP/SAVPF 100 116 117 96 120\n" 363 NSString *sdp = @("m=video 9 RTP/SAVPF 100 116 117 96 120 97\n"
364 "a=rtpmap:120 H264/90000\n"); 364 "a=rtpmap:120 H264/90000\n"
365 NSString *expectedSdp = @("m=video 9 RTP/SAVPF 120 100 116 117 96\n" 365 "a=rtpmap:97 H264/90000\n");
366 "a=rtpmap:120 H264/90000\n"); 366 NSString *expectedSdp = @("m=video 9 RTP/SAVPF 120 97 100 116 117 96\n"
367 "a=rtpmap:120 H264/90000\n"
368 "a=rtpmap:97 H264/90000\n");
367 RTCSessionDescription* desc = 369 RTCSessionDescription* desc =
368 [[RTCSessionDescription alloc] initWithType:RTCSdpTypeOffer sdp:sdp]; 370 [[RTCSessionDescription alloc] initWithType:RTCSdpTypeOffer sdp:sdp];
369 RTCSessionDescription *h264Desc = 371 RTCSessionDescription *h264Desc =
370 [ARDSDPUtils descriptionForDescription:desc 372 [ARDSDPUtils descriptionForDescription:desc
371 preferredVideoCodec:@"H264"]; 373 preferredVideoCodec:@"H264"];
372 EXPECT_TRUE([h264Desc.description rangeOfString:expectedSdp].location != NSNot Found); 374 EXPECT_TRUE([h264Desc.description rangeOfString:expectedSdp].location != NSNot Found);
373 } 375 }
374 376
375 @end 377 @end
376 378
(...skipping 28 matching lines...) Expand all
405 @autoreleasepool { 407 @autoreleasepool {
406 ARDSDPUtilsTest *test = [[ARDSDPUtilsTest alloc] init]; 408 ARDSDPUtilsTest *test = [[ARDSDPUtilsTest alloc] init];
407 [test testPreferVideoCodec]; 409 [test testPreferVideoCodec];
408 } 410 }
409 } 411 }
410 412
411 int main(int argc, char **argv) { 413 int main(int argc, char **argv) {
412 ::testing::InitGoogleTest(&argc, argv); 414 ::testing::InitGoogleTest(&argc, argv);
413 return RUN_ALL_TESTS(); 415 return RUN_ALL_TESTS();
414 } 416 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698