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

Side by Side Diff: webrtc/examples/objc/AppRTCMobile/ios/ARDVideoCallViewController.m

Issue 2735303004: Add video codec setting to AppRTCMobile on iOS. (Closed)
Patch Set: Replace if statements with switches. Created 3 years, 9 months 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 2015 The WebRTC Project Authors. All rights reserved. 2 * Copyright 2015 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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 shouldUseLevelControl:(BOOL)shouldUseLevelControl 44 shouldUseLevelControl:(BOOL)shouldUseLevelControl
45 delegate:(id<ARDVideoCallViewControllerDelegate>)delegate { 45 delegate:(id<ARDVideoCallViewControllerDelegate>)delegate {
46 if (self = [super init]) { 46 if (self = [super init]) {
47 _delegate = delegate; 47 _delegate = delegate;
48 _client = [[ARDAppClient alloc] initWithDelegate:self]; 48 _client = [[ARDAppClient alloc] initWithDelegate:self];
49 ARDSettingsModel *settingsModel = [[ARDSettingsModel alloc] init]; 49 ARDSettingsModel *settingsModel = [[ARDSettingsModel alloc] init];
50 RTCMediaConstraints *cameraConstraints = [[RTCMediaConstraints alloc] 50 RTCMediaConstraints *cameraConstraints = [[RTCMediaConstraints alloc]
51 initWithMandatoryConstraints:nil 51 initWithMandatoryConstraints:nil
52 optionalConstraints:[settingsModel 52 optionalConstraints:[settingsModel
53 currentMediaConstraintFromStoreAsRTCDic tionary]]; 53 currentMediaConstraintFromStoreAsRTCDic tionary]];
54 [_client setVideoCodec:[settingsModel currentVideoCodecSettingFromStore]];
kthelgason 2017/03/10 10:41:44 I realize that this is just copying the style belo
sakal 2017/03/10 11:23:13 Done.
54 [_client setMaxBitrate:[settingsModel currentMaxBitrateSettingFromStore]]; 55 [_client setMaxBitrate:[settingsModel currentMaxBitrateSettingFromStore]];
55 [_client setCameraConstraints:cameraConstraints]; 56 [_client setCameraConstraints:cameraConstraints];
56 [_client connectToRoomWithId:room 57 [_client connectToRoomWithId:room
57 isLoopback:isLoopback 58 isLoopback:isLoopback
58 isAudioOnly:isAudioOnly 59 isAudioOnly:isAudioOnly
59 shouldMakeAecDump:shouldMakeAecDump 60 shouldMakeAecDump:shouldMakeAecDump
60 shouldUseLevelControl:shouldUseLevelControl]; 61 shouldUseLevelControl:shouldUseLevelControl];
61 } 62 }
62 return self; 63 return self;
63 } 64 }
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 - (void)showAlertWithMessage:(NSString*)message { 222 - (void)showAlertWithMessage:(NSString*)message {
222 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil 223 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil
223 message:message 224 message:message
224 delegate:nil 225 delegate:nil
225 cancelButtonTitle:@"OK" 226 cancelButtonTitle:@"OK"
226 otherButtonTitles:nil]; 227 otherButtonTitles:nil];
227 [alertView show]; 228 [alertView show];
228 } 229 }
229 230
230 @end 231 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698