| 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 | 47 #if defined(WEBRTC_IOS) |
| 48 NSString* version = [[UIDevice currentDevice] systemVersion]; | 48 _captureSession.usesApplicationAudioSession = NO; |
| 49 if ([version integerValue] >= 7) { | |
| 50 _captureSession.usesApplicationAudioSession = NO; | |
| 51 } | |
| 52 #endif | 49 #endif |
| 53 _captureChanging = NO; | 50 _captureChanging = NO; |
| 54 _captureChangingCondition = [[NSCondition alloc] init]; | 51 _captureChangingCondition = [[NSCondition alloc] init]; |
| 55 | 52 |
| 56 if (!_captureSession || !_captureChangingCondition) { | 53 if (!_captureSession || !_captureChangingCondition) { |
| 57 return nil; | 54 return nil; |
| 58 } | 55 } |
| 59 | 56 |
| 60 // create and configure a new output (using callbacks) | 57 // create and configure a new output (using callbacks) |
| 61 AVCaptureVideoDataOutput* captureOutput = | 58 AVCaptureVideoDataOutput* captureOutput = |
| (...skipping 352 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 414 } | 411 } |
| 415 | 412 |
| 416 - (void)waitForCaptureChangeToFinish { | 413 - (void)waitForCaptureChangeToFinish { |
| 417 [_captureChangingCondition lock]; | 414 [_captureChangingCondition lock]; |
| 418 while (_captureChanging) { | 415 while (_captureChanging) { |
| 419 [_captureChangingCondition wait]; | 416 [_captureChangingCondition wait]; |
| 420 } | 417 } |
| 421 [_captureChangingCondition unlock]; | 418 [_captureChangingCondition unlock]; |
| 422 } | 419 } |
| 423 @end | 420 @end |
| OLD | NEW |