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 #import "webrtc/api/objc/RTCNSGLVideoView.h" |
| 15 #import "webrtc/api/objc/RTCVideoTrack.h" |
| 16 |
14 #import "ARDAppClient.h" | 17 #import "ARDAppClient.h" |
15 #import "RTCNSGLVideoView.h" | |
16 #import "RTCVideoTrack.h" | |
17 | 18 |
18 static NSUInteger const kContentWidth = 1280; | 19 static NSUInteger const kContentWidth = 1280; |
19 static NSUInteger const kContentHeight = 720; | 20 static NSUInteger const kContentHeight = 720; |
20 static NSUInteger const kRoomFieldWidth = 80; | 21 static NSUInteger const kRoomFieldWidth = 80; |
21 static NSUInteger const kLogViewHeight = 280; | 22 static NSUInteger const kLogViewHeight = 280; |
22 | 23 |
23 @class APPRTCMainView; | 24 @class APPRTCMainView; |
24 @protocol APPRTCMainViewDelegate | 25 @protocol APPRTCMainViewDelegate |
25 | 26 |
26 - (void)appRTCMainView:(APPRTCMainView*)mainView | 27 - (void)appRTCMainView:(APPRTCMainView*)mainView |
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
243 break; | 244 break; |
244 case kARDAppClientStateDisconnected: | 245 case kARDAppClientStateDisconnected: |
245 NSLog(@"Client disconnected."); | 246 NSLog(@"Client disconnected."); |
246 [self resetUI]; | 247 [self resetUI]; |
247 _client = nil; | 248 _client = nil; |
248 break; | 249 break; |
249 } | 250 } |
250 } | 251 } |
251 | 252 |
252 - (void)appClient:(ARDAppClient *)client | 253 - (void)appClient:(ARDAppClient *)client |
253 didChangeConnectionState:(RTCICEConnectionState)state { | 254 didChangeConnectionState:(RTCIceConnectionState)state { |
254 } | 255 } |
255 | 256 |
256 - (void)appClient:(ARDAppClient *)client | 257 - (void)appClient:(ARDAppClient *)client |
257 didReceiveLocalVideoTrack:(RTCVideoTrack *)localVideoTrack { | 258 didReceiveLocalVideoTrack:(RTCVideoTrack *)localVideoTrack { |
258 _localVideoTrack = localVideoTrack; | 259 _localVideoTrack = localVideoTrack; |
259 } | 260 } |
260 | 261 |
261 - (void)appClient:(ARDAppClient *)client | 262 - (void)appClient:(ARDAppClient *)client |
262 didReceiveRemoteVideoTrack:(RTCVideoTrack *)remoteVideoTrack { | 263 didReceiveRemoteVideoTrack:(RTCVideoTrack *)remoteVideoTrack { |
263 _remoteVideoTrack = remoteVideoTrack; | 264 _remoteVideoTrack = remoteVideoTrack; |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
301 _remoteVideoTrack = nil; | 302 _remoteVideoTrack = nil; |
302 [self.mainView.remoteVideoView renderFrame:nil]; | 303 [self.mainView.remoteVideoView renderFrame:nil]; |
303 } | 304 } |
304 | 305 |
305 - (void)disconnect { | 306 - (void)disconnect { |
306 [self resetUI]; | 307 [self resetUI]; |
307 [_client disconnect]; | 308 [_client disconnect]; |
308 } | 309 } |
309 | 310 |
310 @end | 311 @end |
OLD | NEW |