OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2017 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2017 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 return eligibleDeviceFormats; | 114 return eligibleDeviceFormats; |
115 } | 115 } |
116 | 116 |
117 - (void)startCaptureWithDevice:(AVCaptureDevice *)device | 117 - (void)startCaptureWithDevice:(AVCaptureDevice *)device |
118 format:(AVCaptureDeviceFormat *)format | 118 format:(AVCaptureDeviceFormat *)format |
119 fps:(NSInteger)fps { | 119 fps:(NSInteger)fps { |
120 _willBeRunning = true; | 120 _willBeRunning = true; |
121 [RTCDispatcher | 121 [RTCDispatcher |
122 dispatchAsyncOnType:RTCDispatcherTypeCaptureSession | 122 dispatchAsyncOnType:RTCDispatcherTypeCaptureSession |
123 block:^{ | 123 block:^{ |
124 RTCLogInfo("startCaptureWithDevice %@ @ %zd fps", format,
fps); | 124 RTCLogInfo("startCaptureWithDevice %@ @ %ld fps", format,
(long)fps); |
125 | 125 |
126 #if TARGET_OS_IPHONE | 126 #if TARGET_OS_IPHONE |
127 [[UIDevice currentDevice] beginGeneratingDeviceOrientation
Notifications]; | 127 [[UIDevice currentDevice] beginGeneratingDeviceOrientation
Notifications]; |
128 #endif | 128 #endif |
129 | 129 |
130 _currentDevice = device; | 130 _currentDevice = device; |
131 | 131 |
132 NSError *error = nil; | 132 NSError *error = nil; |
133 if (![_currentDevice lockForConfiguration:&error]) { | 133 if (![_currentDevice lockForConfiguration:&error]) { |
134 RTCLogError( | 134 RTCLogError( |
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
416 case UIDeviceOrientationFaceUp: | 416 case UIDeviceOrientationFaceUp: |
417 case UIDeviceOrientationFaceDown: | 417 case UIDeviceOrientationFaceDown: |
418 case UIDeviceOrientationUnknown: | 418 case UIDeviceOrientationUnknown: |
419 // Ignore. | 419 // Ignore. |
420 break; | 420 break; |
421 } | 421 } |
422 #endif | 422 #endif |
423 } | 423 } |
424 | 424 |
425 @end | 425 @end |
OLD | NEW |