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

Unified Diff: media/video/capture/mac/video_capture_device_factory_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 side-by-side diff with in-line comments
Download patch
Index: media/video/capture/mac/video_capture_device_factory_mac.mm
diff --git a/media/video/capture/mac/video_capture_device_factory_mac.mm b/media/video/capture/mac/video_capture_device_factory_mac.mm
index f383b425fde3c4169bee5a3503074ef98a0f7c82..1fd4ecf4783259fac4b4b33a704b82bf2aad34a3 100644
--- a/media/video/capture/mac/video_capture_device_factory_mac.mm
+++ b/media/video/capture/mac/video_capture_device_factory_mac.mm
@@ -13,6 +13,7 @@
#import "media/base/mac/avfoundation_glue.h"
#import "media/video/capture/mac/video_capture_device_avfoundation_mac.h"
#include "media/video/capture/mac/video_capture_device_mac.h"
+#import "media/video/capture/mac/video_capture_device_decklink_mac.h"
#import "media/video/capture/mac/video_capture_device_qtkit_mac.h"
namespace media {
@@ -157,6 +158,9 @@ void VideoCaptureDeviceFactoryMac::GetDeviceNames(
}
}
}
+
+ // Also retrieve Blackmagic devices, if present, via DeckLink SDK API.
+ VideoCaptureDeviceDeckLinkMac::EnumerateDevices(device_names);
} else {
// We should not enumerate QTKit devices in Device Thread;
NOTREACHED();
@@ -185,11 +189,13 @@ void VideoCaptureDeviceFactoryMac::GetDeviceSupportedFormats(
const VideoCaptureDevice::Name& device,
VideoCaptureFormats* supported_formats) {
DCHECK(thread_checker_.CalledOnValidThread());
- if (device.capture_api_type() == VideoCaptureDevice::Name::AVFOUNDATION) {
+ switch (device.capture_api_type()) {
+ case VideoCaptureDevice::Name::AVFOUNDATION:
DVLOG(1) << "Enumerating video capture capabilities, AVFoundation";
[VideoCaptureDeviceAVFoundation getDevice:device
supportedFormats:supported_formats];
- } else {
+ break;
+ case VideoCaptureDevice::Name::QTKIT:
// Blacklisted cameras provide their own supported format(s), otherwise no
// such information is provided for QTKit.
if (device.is_blacklisted()) {
@@ -205,6 +211,14 @@ void VideoCaptureDeviceFactoryMac::GetDeviceSupportedFormats(
}
}
}
+ break;
+ case VideoCaptureDevice::Name::DECKLINK:
+ DVLOG(1) << "Enumerating video capture capabilities " << device.name();
+ VideoCaptureDeviceDeckLinkMac::EnumerateDeviceCapabilities(
+ device, supported_formats);
+ break;
+ default:
+ NOTREACHED();
}
}
« no previous file with comments | « media/video/capture/mac/video_capture_device_decklink_mac.mm ('k') | media/video/capture/mac/video_capture_device_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698