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

Side by Side Diff: media/video/capture/mac/video_capture_device_qtkit_mac.mm

Issue 22876027: Consolidate duplicated frame / capability structures in video_capture_types.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased: changed media::VideoCaptureCapability::kI420 -> media::PIXEL_FORMAT_I420 etc. Created 7 years, 3 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 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "media/video/capture/mac/video_capture_device_qtkit_mac.h" 5 #import "media/video/capture/mac/video_capture_device_qtkit_mac.h"
6 6
7 #import <QTKit/QTKit.h> 7 #import <QTKit/QTKit.h>
8 8
9 #include "base/debug/crash_logging.h" 9 #include "base/debug/crash_logging.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 expectedBytesPerRow); 259 expectedBytesPerRow);
260 } 260 }
261 261
262 addressToPass = adjustedAddress; 262 addressToPass = adjustedAddress;
263 frameSize = frameHeight * expectedBytesPerRow; 263 frameSize = frameHeight * expectedBytesPerRow;
264 } 264 }
265 media::VideoCaptureCapability captureCapability; 265 media::VideoCaptureCapability captureCapability;
266 captureCapability.width = frameWidth_; 266 captureCapability.width = frameWidth_;
267 captureCapability.height = frameHeight_; 267 captureCapability.height = frameHeight_;
268 captureCapability.frame_rate = frameRate_; 268 captureCapability.frame_rate = frameRate_;
269 captureCapability.color = media::VideoCaptureCapability::kARGB; 269 captureCapability.color = media::PIXEL_FORMAT_ARGB;
270 captureCapability.expected_capture_delay = 0; 270 captureCapability.expected_capture_delay = 0;
271 captureCapability.interlaced = false; 271 captureCapability.interlaced = false;
272 272
273 // Deliver the captured video frame. 273 // Deliver the captured video frame.
274 frameReceiver_->ReceiveFrame(addressToPass, frameSize, captureCapability); 274 frameReceiver_->ReceiveFrame(addressToPass, frameSize, captureCapability);
275 275
276 CVPixelBufferUnlockBaseAddress(videoFrame, kLockFlags); 276 CVPixelBufferUnlockBaseAddress(videoFrame, kLockFlags);
277 } 277 }
278 [lock_ unlock]; 278 [lock_ unlock];
279 } 279 }
280 280
281 - (void)handleNotification:(NSNotification *)errorNotification { 281 - (void)handleNotification:(NSNotification *)errorNotification {
282 NSError * error = (NSError *)[[errorNotification userInfo] 282 NSError * error = (NSError *)[[errorNotification userInfo]
283 objectForKey:QTCaptureSessionErrorKey]; 283 objectForKey:QTCaptureSessionErrorKey];
284 frameReceiver_->ReceiveError([[error localizedDescription] UTF8String]); 284 frameReceiver_->ReceiveError([[error localizedDescription] UTF8String]);
285 } 285 }
286 286
287 @end 287 @end
OLDNEW
« no previous file with comments | « media/video/capture/mac/video_capture_device_mac.mm ('k') | media/video/capture/video_capture_device_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698