OLD | NEW |
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 |
11 #import "ARDVideoCallViewController.h" | 11 #import "ARDVideoCallViewController.h" |
12 | 12 |
13 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSession.h" | 13 #import "webrtc/modules/audio_device/ios/objc/RTCAudioSession.h" |
14 | 14 |
15 #import "ARDAppClient.h" | 15 #import "ARDAppClient.h" |
16 #import "ARDMediaConstraintsModel.h" | 16 #import "ARDSettingsModel.h" |
17 #import "ARDVideoCallView.h" | 17 #import "ARDVideoCallView.h" |
18 #import "WebRTC/RTCAVFoundationVideoSource.h" | 18 #import "WebRTC/RTCAVFoundationVideoSource.h" |
19 #import "WebRTC/RTCDispatcher.h" | 19 #import "WebRTC/RTCDispatcher.h" |
20 #import "WebRTC/RTCLogging.h" | 20 #import "WebRTC/RTCLogging.h" |
21 #import "WebRTC/RTCMediaConstraints.h" | 21 #import "WebRTC/RTCMediaConstraints.h" |
22 | 22 |
23 @interface ARDVideoCallViewController () <ARDAppClientDelegate, | 23 @interface ARDVideoCallViewController () <ARDAppClientDelegate, |
24 ARDVideoCallViewDelegate> | 24 ARDVideoCallViewDelegate> |
25 @property(nonatomic, strong) RTCVideoTrack *localVideoTrack; | 25 @property(nonatomic, strong) RTCVideoTrack *localVideoTrack; |
26 @property(nonatomic, strong) RTCVideoTrack *remoteVideoTrack; | 26 @property(nonatomic, strong) RTCVideoTrack *remoteVideoTrack; |
(...skipping 12 matching lines...) Expand all Loading... |
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 _delegate = delegate; | 47 _delegate = delegate; |
48 _client = [[ARDAppClient alloc] initWithDelegate:self]; | 48 _client = [[ARDAppClient alloc] initWithDelegate:self]; |
49 ARDMediaConstraintsModel *mediaConstraintsModel = [[ARDMediaConstraintsModel
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:[mediaConstraintsModel | 52 optionalConstraints:[settingsModel |
53 currentMediaConstraintFromStoreAsRTCDic
tionary]]; | 53 currentMediaConstraintFromStoreAsRTCDic
tionary]]; |
54 [_client setCameraConstraints:cameraConstraints]; | 54 [_client setCameraConstraints:cameraConstraints]; |
55 [_client connectToRoomWithId:room | 55 [_client connectToRoomWithId:room |
56 isLoopback:isLoopback | 56 isLoopback:isLoopback |
57 isAudioOnly:isAudioOnly | 57 isAudioOnly:isAudioOnly |
58 shouldMakeAecDump:shouldMakeAecDump | 58 shouldMakeAecDump:shouldMakeAecDump |
59 shouldUseLevelControl:shouldUseLevelControl]; | 59 shouldUseLevelControl:shouldUseLevelControl]; |
60 } | 60 } |
61 return self; | 61 return self; |
62 } | 62 } |
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
220 - (void)showAlertWithMessage:(NSString*)message { | 220 - (void)showAlertWithMessage:(NSString*)message { |
221 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil | 221 UIAlertView* alertView = [[UIAlertView alloc] initWithTitle:nil |
222 message:message | 222 message:message |
223 delegate:nil | 223 delegate:nil |
224 cancelButtonTitle:@"OK" | 224 cancelButtonTitle:@"OK" |
225 otherButtonTitles:nil]; | 225 otherButtonTitles:nil]; |
226 [alertView show]; | 226 [alertView show]; |
227 } | 227 } |
228 | 228 |
229 @end | 229 @end |
OLD | NEW |