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

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

Issue 2770113004: Pass settings model to ARDAppClient instead of individual settings. (Closed)
Patch Set: Fix test. Created 3 years, 8 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 27 matching lines...) Expand all
38 @synthesize delegate = _delegate; 38 @synthesize delegate = _delegate;
39 39
40 - (instancetype)initForRoom:(NSString *)room 40 - (instancetype)initForRoom:(NSString *)room
41 isLoopback:(BOOL)isLoopback 41 isLoopback:(BOOL)isLoopback
42 isAudioOnly:(BOOL)isAudioOnly 42 isAudioOnly:(BOOL)isAudioOnly
43 shouldMakeAecDump:(BOOL)shouldMakeAecDump 43 shouldMakeAecDump:(BOOL)shouldMakeAecDump
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 ARDSettingsModel *settingsModel = [[ARDSettingsModel alloc] init]; 47 ARDSettingsModel *settingsModel = [[ARDSettingsModel alloc] init];
48 NSString* videoCodec = [settingsModel currentVideoCodecSettingFromStore];
49 _delegate = delegate; 48 _delegate = delegate;
50 _client = [[ARDAppClient alloc] initWithDelegate:self 49 _client = [[ARDAppClient alloc] initWithDelegate:self];
51 preferVideoCodec:videoCodec];
52 RTCMediaConstraints *cameraConstraints = [[RTCMediaConstraints alloc]
53 initWithMandatoryConstraints:nil
54 optionalConstraints:[settingsModel
55 currentMediaConstraintFromStoreAsRTCDic tionary]];
56 [_client setMaxBitrate:[settingsModel currentMaxBitrateSettingFromStore]];
57 [_client setCameraConstraints:cameraConstraints];
58 [_client connectToRoomWithId:room 50 [_client connectToRoomWithId:room
51 settings:settingsModel
59 isLoopback:isLoopback 52 isLoopback:isLoopback
60 isAudioOnly:isAudioOnly 53 isAudioOnly:isAudioOnly
61 shouldMakeAecDump:shouldMakeAecDump 54 shouldMakeAecDump:shouldMakeAecDump
62 shouldUseLevelControl:shouldUseLevelControl]; 55 shouldUseLevelControl:shouldUseLevelControl];
63 } 56 }
64 return self; 57 return self;
65 } 58 }
66 59
67 - (void)loadView { 60 - (void)loadView {
68 _videoCallView = [[ARDVideoCallView alloc] initWithFrame:CGRectZero]; 61 _videoCallView = [[ARDVideoCallView alloc] initWithFrame:CGRectZero];
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
223 - (void)showAlertWithMessage:(NSString*)message { 216 - (void)showAlertWithMessage:(NSString*)message {
224 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil 217 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil
225 message:message 218 message:message
226 delegate:nil 219 delegate:nil
227 cancelButtonTitle:@"OK" 220 cancelButtonTitle:@"OK"
228 otherButtonTitles:nil]; 221 otherButtonTitles:nil];
229 [alertView show]; 222 [alertView show];
230 } 223 }
231 224
232 @end 225 @end
OLDNEW
« no previous file with comments | « webrtc/examples/objc/AppRTCMobile/ios/ARDSettingsStore.m ('k') | webrtc/examples/objc/AppRTCMobile/mac/APPRTCViewController.m » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698