| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 213 NSError *error; | 213 NSError *error; |
| 214 if (![_captureSession addOutput:_captureDecompressedVideoOutput error:&error]) | 214 if (![_captureSession addOutput:_captureDecompressedVideoOutput error:&error]) |
| 215 return NO; | 215 return NO; |
| 216 | 216 |
| 217 return YES; | 217 return YES; |
| 218 } | 218 } |
| 219 | 219 |
| 220 - (void)captureOutput:(QTCaptureOutput *)captureOutput | 220 - (void)captureOutput:(QTCaptureOutput *)captureOutput |
| 221 didDropVideoFrameWithSampleBuffer:(QTSampleBuffer *)sampleBuffer | 221 didDropVideoFrameWithSampleBuffer:(QTSampleBuffer *)sampleBuffer |
| 222 fromConnection:(QTCaptureConnection *)connection { | 222 fromConnection:(QTCaptureConnection *)connection { |
| 223 // TODO(mflodman) Experiment more when this happens. | |
| 224 } | 223 } |
| 225 | 224 |
| 226 - (void)captureOutput:(QTCaptureOutput *)captureOutput | 225 - (void)captureOutput:(QTCaptureOutput *)captureOutput |
| 227 didOutputVideoFrame:(CVImageBufferRef)videoFrame | 226 didOutputVideoFrame:(CVImageBufferRef)videoFrame |
| 228 withSampleBuffer:(QTSampleBuffer *)sampleBuffer | 227 withSampleBuffer:(QTSampleBuffer *)sampleBuffer |
| 229 fromConnection:(QTCaptureConnection *)connection { | 228 fromConnection:(QTCaptureConnection *)connection { |
| 230 | 229 |
| 231 [_lock lock]; | 230 [_lock lock]; |
| 232 if (!_owner) { | 231 if (!_owner) { |
| 233 [_lock unlock]; | 232 [_lock unlock]; |
| (...skipping 17 matching lines...) Expand all Loading... |
| 251 _owner->IncomingFrame((unsigned char*)baseAddress, frameSize, | 250 _owner->IncomingFrame((unsigned char*)baseAddress, frameSize, |
| 252 tempCaptureCapability, 0); | 251 tempCaptureCapability, 0); |
| 253 CVPixelBufferUnlockBaseAddress(videoFrame, kFlags); | 252 CVPixelBufferUnlockBaseAddress(videoFrame, kFlags); |
| 254 } | 253 } |
| 255 [_lock unlock]; | 254 [_lock unlock]; |
| 256 _framesDelivered++; | 255 _framesDelivered++; |
| 257 _framesRendered++; | 256 _framesRendered++; |
| 258 } | 257 } |
| 259 | 258 |
| 260 @end | 259 @end |
| OLD | NEW |