| OLD | NEW |
| 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 |
| 11 #import "APPRTCViewController.h" | 11 #import "APPRTCViewController.h" |
| 12 | 12 |
| 13 #import <AVFoundation/AVFoundation.h> | 13 #import <AVFoundation/AVFoundation.h> |
| 14 | 14 |
| 15 #import "WebRTC/RTCNSGLVideoView.h" | 15 #import "WebRTC/RTCNSGLVideoView.h" |
| 16 #import "WebRTC/RTCVideoTrack.h" | 16 #import "WebRTC/RTCVideoTrack.h" |
| 17 | 17 |
| 18 #import "ARDAppClient.h" | 18 #import "ARDAppClient.h" |
| 19 #import "ARDSettingsModel.h" |
| 19 | 20 |
| 20 static NSUInteger const kContentWidth = 900; | 21 static NSUInteger const kContentWidth = 900; |
| 21 static NSUInteger const kRoomFieldWidth = 200; | 22 static NSUInteger const kRoomFieldWidth = 200; |
| 22 static NSUInteger const kActionItemHeight = 30; | 23 static NSUInteger const kActionItemHeight = 30; |
| 23 static NSUInteger const kBottomViewHeight = 200; | 24 static NSUInteger const kBottomViewHeight = 200; |
| 24 | 25 |
| 25 @class APPRTCMainView; | 26 @class APPRTCMainView; |
| 26 @protocol APPRTCMainViewDelegate | 27 @protocol APPRTCMainViewDelegate |
| 27 | 28 |
| 28 - (void)appRTCMainView:(APPRTCMainView*)mainView | 29 - (void)appRTCMainView:(APPRTCMainView*)mainView |
| (...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 362 - (void)appRTCMainView:(APPRTCMainView*)mainView | 363 - (void)appRTCMainView:(APPRTCMainView*)mainView |
| 363 didEnterRoomId:(NSString*)roomId | 364 didEnterRoomId:(NSString*)roomId |
| 364 loopback:(BOOL)isLoopback { | 365 loopback:(BOOL)isLoopback { |
| 365 | 366 |
| 366 if ([roomId isEqualToString:@""]) { | 367 if ([roomId isEqualToString:@""]) { |
| 367 [self.mainView displayLogMessage:@"Missing room id"]; | 368 [self.mainView displayLogMessage:@"Missing room id"]; |
| 368 return; | 369 return; |
| 369 } | 370 } |
| 370 | 371 |
| 371 [_client disconnect]; | 372 [_client disconnect]; |
| 372 ARDAppClient *client = [[ARDAppClient alloc] initWithDelegate:self | 373 ARDAppClient* client = [[ARDAppClient alloc] initWithDelegate:self]; |
| 373 preferVideoCodec:@"H264"]; | |
| 374 [client connectToRoomWithId:roomId | 374 [client connectToRoomWithId:roomId |
| 375 settings:[[ARDSettingsModel alloc] init] // Use default se
ttings. |
| 375 isLoopback:isLoopback | 376 isLoopback:isLoopback |
| 376 isAudioOnly:NO | 377 isAudioOnly:NO |
| 377 shouldMakeAecDump:NO | 378 shouldMakeAecDump:NO |
| 378 shouldUseLevelControl:NO]; | 379 shouldUseLevelControl:NO]; |
| 379 _client = client; | 380 _client = client; |
| 380 } | 381 } |
| 381 | 382 |
| 382 #pragma mark - Private | 383 #pragma mark - Private |
| 383 | 384 |
| 384 - (APPRTCMainView*)mainView { | 385 - (APPRTCMainView*)mainView { |
| (...skipping 14 matching lines...) Expand all Loading... |
| 399 [self.mainView.remoteVideoView renderFrame:nil]; | 400 [self.mainView.remoteVideoView renderFrame:nil]; |
| 400 [self.mainView.localVideoView renderFrame:nil]; | 401 [self.mainView.localVideoView renderFrame:nil]; |
| 401 } | 402 } |
| 402 | 403 |
| 403 - (void)disconnect { | 404 - (void)disconnect { |
| 404 [self resetUI]; | 405 [self resetUI]; |
| 405 [_client disconnect]; | 406 [_client disconnect]; |
| 406 } | 407 } |
| 407 | 408 |
| 408 @end | 409 @end |
| OLD | NEW |