| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2015 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 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 _captureSession = captureSession; | 400 _captureSession = captureSession; |
| 401 return YES; | 401 return YES; |
| 402 } | 402 } |
| 403 | 403 |
| 404 - (AVCaptureVideoDataOutput *)videoDataOutput { | 404 - (AVCaptureVideoDataOutput *)videoDataOutput { |
| 405 if (!_videoDataOutput) { | 405 if (!_videoDataOutput) { |
| 406 // Make the capturer output NV12. Ideally we want I420 but that's not | 406 // Make the capturer output NV12. Ideally we want I420 but that's not |
| 407 // currently supported on iPhone / iPad. | 407 // currently supported on iPhone / iPad. |
| 408 AVCaptureVideoDataOutput *videoDataOutput = | 408 AVCaptureVideoDataOutput *videoDataOutput = |
| 409 [[AVCaptureVideoDataOutput alloc] init]; | 409 [[AVCaptureVideoDataOutput alloc] init]; |
| 410 videoDataOutput = [[AVCaptureVideoDataOutput alloc] init]; | |
| 411 videoDataOutput.videoSettings = @{ | 410 videoDataOutput.videoSettings = @{ |
| 412 (NSString *)kCVPixelBufferPixelFormatTypeKey : | 411 (NSString *)kCVPixelBufferPixelFormatTypeKey : |
| 413 @(kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) | 412 @(kCVPixelFormatType_420YpCbCr8BiPlanarFullRange) |
| 414 }; | 413 }; |
| 415 videoDataOutput.alwaysDiscardsLateVideoFrames = NO; | 414 videoDataOutput.alwaysDiscardsLateVideoFrames = NO; |
| 416 [videoDataOutput setSampleBufferDelegate:self queue:self.frameQueue]; | 415 [videoDataOutput setSampleBufferDelegate:self queue:self.frameQueue]; |
| 417 _videoDataOutput = videoDataOutput; | 416 _videoDataOutput = videoDataOutput; |
| 418 } | 417 } |
| 419 return _videoDataOutput; | 418 return _videoDataOutput; |
| 420 } | 419 } |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 } | 717 } |
| 719 | 718 |
| 720 OnFrame(cricket::WebRtcVideoFrame(buffer, webrtc::kVideoRotation_0, | 719 OnFrame(cricket::WebRtcVideoFrame(buffer, webrtc::kVideoRotation_0, |
| 721 translated_camera_time_us, 0), | 720 translated_camera_time_us, 0), |
| 722 captured_width, captured_height); | 721 captured_width, captured_height); |
| 723 | 722 |
| 724 CVBufferRelease(image_buffer); | 723 CVBufferRelease(image_buffer); |
| 725 } | 724 } |
| 726 | 725 |
| 727 } // namespace webrtc | 726 } // namespace webrtc |
| OLD | NEW |