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

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

Issue 518073002: Mac VideoCapture: Support for Blackmagic DeckLink device & capabilities enumeration, using SDK. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: scoped_refptr cannot be negated in logical operations, use .get() first. Created 6 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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_avfoundation_mac.h" 5 #import "media/video/capture/mac/video_capture_device_avfoundation_mac.h"
6 6
7 #import <CoreVideo/CoreVideo.h> 7 #import <CoreVideo/CoreVideo.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/mac/foundation_util.h" 10 #include "base/mac/foundation_util.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 break; 63 break;
64 case CoreMediaGlue::kCMPixelFormat_422YpCbCr8_yuvs: 64 case CoreMediaGlue::kCMPixelFormat_422YpCbCr8_yuvs:
65 pixelFormat = media::PIXEL_FORMAT_YUY2; 65 pixelFormat = media::PIXEL_FORMAT_YUY2;
66 break; 66 break;
67 case CoreMediaGlue::kCMVideoCodecType_JPEG_OpenDML: 67 case CoreMediaGlue::kCMVideoCodecType_JPEG_OpenDML:
68 pixelFormat = media::PIXEL_FORMAT_MJPEG; 68 pixelFormat = media::PIXEL_FORMAT_MJPEG;
69 default: 69 default:
70 break; 70 break;
71 } 71 }
72 72
73 CoreMediaGlue::CMVideoDimensions dimensions = 73 CoreMediaGlue::CMVideoDimensions dimensions =
74 CoreMediaGlue::CMVideoFormatDescriptionGetDimensions( 74 CoreMediaGlue::CMVideoFormatDescriptionGetDimensions(
75 [format formatDescription]); 75 [format formatDescription]);
76 76
77 for (CrAVFrameRateRange* frameRate in 77 for (CrAVFrameRateRange* frameRate in
78 [format videoSupportedFrameRateRanges]) { 78 [format videoSupportedFrameRateRanges]) {
79 media::VideoCaptureFormat format( 79 media::VideoCaptureFormat format(
80 gfx::Size(dimensions.width, dimensions.height), 80 gfx::Size(dimensions.width, dimensions.height),
81 frameRate.maxFrameRate, 81 frameRate.maxFrameRate,
82 pixelFormat); 82 pixelFormat);
83 formats->push_back(format); 83 formats->push_back(format);
84 DVLOG(2) << name.name() << " " << format.ToString(); 84 DVLOG(2) << name.name() << " " << format.ToString();
85 } 85 }
86 } 86 }
87 87
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 } 287 }
288 288
289 - (void)sendErrorString:(NSString*)error { 289 - (void)sendErrorString:(NSString*)error {
290 DLOG(ERROR) << [error UTF8String]; 290 DLOG(ERROR) << [error UTF8String];
291 base::AutoLock lock(lock_); 291 base::AutoLock lock(lock_);
292 if (frameReceiver_) 292 if (frameReceiver_)
293 frameReceiver_->ReceiveError([error UTF8String]); 293 frameReceiver_->ReceiveError([error UTF8String]);
294 } 294 }
295 295
296 @end 296 @end
OLDNEW
« no previous file with comments | « media/video/capture/mac/DEPS ('k') | media/video/capture/mac/video_capture_device_decklink_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698