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

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: perkj@ and magjed@s comments Created 6 years, 4 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 f0efe6b760b534880623738f832b8da4934720c7..c568016694a0603d8979b743ba2d7ac5812f1c0b 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/video/capture/mac/avfoundation_glue.h"
#include "media/video/capture/mac/video_capture_device_mac.h"
#import "media/video/capture/mac/video_capture_device_avfoundation_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();
@@ -187,7 +191,7 @@ void VideoCaptureDeviceFactoryMac::GetDeviceSupportedFormats(
DVLOG(1) << "Enumerating video capture capabilities, AVFoundation";
[VideoCaptureDeviceAVFoundation getDevice:device
supportedFormats:supported_formats];
- } else {
+ } else if (device.capture_api_type() == VideoCaptureDevice::Name::QTKIT) {
// Blacklisted cameras provide their own supported format(s), otherwise no
// such information is provided for QTKit.
if (device.is_blacklisted()) {
@@ -203,6 +207,12 @@ void VideoCaptureDeviceFactoryMac::GetDeviceSupportedFormats(
}
}
}
+ } else if (device.capture_api_type() == VideoCaptureDevice::Name::DECKLINK) {
+ DVLOG(1) << "Enumerating video capture capabilities, Blackmagic";
+ VideoCaptureDeviceDeckLinkMac::EnumerateDeviceCapabilities(
+ device, supported_formats);
+ } else {
+ DCHECK(false);
perkj_chrome 2014/09/01 14:44:08 NOTREACHED()
mcasas 2014/09/02 12:45:54 Done.
}
}

Powered by Google App Engine
This is Rietveld 408576698