Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: webrtc/modules/video_capture/objc/rtc_video_capture_objc.mm

Issue 2765243002: Delete RawVideoType enum, use the VideoType enum instead. (Closed)
Patch Set: Define constant webrtc::kI420, for backwards compatibility. Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 341 matching lines...) Expand 10 before | Expand all | Expand 10 after
352 CVPixelBufferGetBytesPerRowOfPlane(videoFrame, kUVPlaneIndex); 352 CVPixelBufferGetBytesPerRowOfPlane(videoFrame, kUVPlaneIndex);
353 size_t uvPlaneHeight = 353 size_t uvPlaneHeight =
354 CVPixelBufferGetHeightOfPlane(videoFrame, kUVPlaneIndex); 354 CVPixelBufferGetHeightOfPlane(videoFrame, kUVPlaneIndex);
355 size_t frameSize = 355 size_t frameSize =
356 yPlaneBytesPerRow * yPlaneHeight + uvPlaneBytesPerRow * uvPlaneHeight; 356 yPlaneBytesPerRow * yPlaneHeight + uvPlaneBytesPerRow * uvPlaneHeight;
357 357
358 VideoCaptureCapability tempCaptureCapability; 358 VideoCaptureCapability tempCaptureCapability;
359 tempCaptureCapability.width = CVPixelBufferGetWidth(videoFrame); 359 tempCaptureCapability.width = CVPixelBufferGetWidth(videoFrame);
360 tempCaptureCapability.height = CVPixelBufferGetHeight(videoFrame); 360 tempCaptureCapability.height = CVPixelBufferGetHeight(videoFrame);
361 tempCaptureCapability.maxFPS = _capability.maxFPS; 361 tempCaptureCapability.maxFPS = _capability.maxFPS;
362 tempCaptureCapability.rawType = kVideoNV12; 362 tempCaptureCapability.videoType = VideoType::kNV12;
363 363
364 _owner->IncomingFrame(baseAddress, frameSize, tempCaptureCapability, 0); 364 _owner->IncomingFrame(baseAddress, frameSize, tempCaptureCapability, 0);
365 365
366 CVPixelBufferUnlockBaseAddress(videoFrame, kFlags); 366 CVPixelBufferUnlockBaseAddress(videoFrame, kFlags);
367 } 367 }
368 368
369 - (void)signalCaptureChangeEnd { 369 - (void)signalCaptureChangeEnd {
370 [_captureChangingCondition lock]; 370 [_captureChangingCondition lock];
371 _captureChanging = NO; 371 _captureChanging = NO;
372 [_captureChangingCondition signal]; 372 [_captureChangingCondition signal];
373 [_captureChangingCondition unlock]; 373 [_captureChangingCondition unlock];
374 } 374 }
375 375
376 - (void)waitForCaptureChangeToFinish { 376 - (void)waitForCaptureChangeToFinish {
377 [_captureChangingCondition lock]; 377 [_captureChangingCondition lock];
378 while (_captureChanging) { 378 while (_captureChanging) {
379 [_captureChangingCondition wait]; 379 [_captureChangingCondition wait];
380 } 380 }
381 [_captureChangingCondition unlock]; 381 [_captureChangingCondition unlock];
382 } 382 }
383 @end 383 @end
OLDNEW
« no previous file with comments | « webrtc/modules/video_capture/objc/device_info_objc.mm ('k') | webrtc/modules/video_capture/objc/video_capture.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698