OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2013 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 26 matching lines...) Expand all Loading... | |
37 NSCondition* _captureChangingCondition; | 37 NSCondition* _captureChangingCondition; |
38 } | 38 } |
39 | 39 |
40 @synthesize frameRotation = _framRotation; | 40 @synthesize frameRotation = _framRotation; |
41 | 41 |
42 - (id)initWithOwner:(VideoCaptureIos*)owner captureId:(int)captureId { | 42 - (id)initWithOwner:(VideoCaptureIos*)owner captureId:(int)captureId { |
43 if (self == [super init]) { | 43 if (self == [super init]) { |
44 _owner = owner; | 44 _owner = owner; |
45 _captureId = captureId; | 45 _captureId = captureId; |
46 _captureSession = [[AVCaptureSession alloc] init]; | 46 _captureSession = [[AVCaptureSession alloc] init]; |
47 #if defined(__IPHONE_7_0) && __IPHONE_OS_VERSION_MAX_ALLOWED >= __IPHONE_7_0 | |
magjed_webrtc
2016/09/29 11:39:58
It looks like the purpose of this check was to exe
| |
48 NSString* version = [[UIDevice currentDevice] systemVersion]; | |
49 if ([version integerValue] >= 7) { | |
50 _captureSession.usesApplicationAudioSession = NO; | |
51 } | |
52 #endif | |
53 _captureChanging = NO; | 47 _captureChanging = NO; |
54 _captureChangingCondition = [[NSCondition alloc] init]; | 48 _captureChangingCondition = [[NSCondition alloc] init]; |
55 | 49 |
56 if (!_captureSession || !_captureChangingCondition) { | 50 if (!_captureSession || !_captureChangingCondition) { |
57 return nil; | 51 return nil; |
58 } | 52 } |
59 | 53 |
60 // create and configure a new output (using callbacks) | 54 // create and configure a new output (using callbacks) |
61 AVCaptureVideoDataOutput* captureOutput = | 55 AVCaptureVideoDataOutput* captureOutput = |
62 [[AVCaptureVideoDataOutput alloc] init]; | 56 [[AVCaptureVideoDataOutput alloc] init]; |
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
414 } | 408 } |
415 | 409 |
416 - (void)waitForCaptureChangeToFinish { | 410 - (void)waitForCaptureChangeToFinish { |
417 [_captureChangingCondition lock]; | 411 [_captureChangingCondition lock]; |
418 while (_captureChanging) { | 412 while (_captureChanging) { |
419 [_captureChangingCondition wait]; | 413 [_captureChangingCondition wait]; |
420 } | 414 } |
421 [_captureChangingCondition unlock]; | 415 [_captureChangingCondition unlock]; |
422 } | 416 } |
423 @end | 417 @end |
OLD | NEW |