Chromium Code Reviews| 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..155098adfccb7eaced40355795038b0063ae92e6 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); |
|
perkj_chrome
2014/09/01 09:50:41
Isn't there a risk that we enumerate BM devices tw
mcasas
2014/09/01 14:04:50
Short answer: _not_ in 64bit builds.
Long answer:
|
| } 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,11 @@ void VideoCaptureDeviceFactoryMac::GetDeviceSupportedFormats( |
| } |
| } |
| } |
| + } else { |
| + DCHECK_EQ(device.capture_api_type(), VideoCaptureDevice::Name::DECKLINK); |
|
perkj_chrome
2014/09/01 09:50:41
How do we now that |device| is Declink?
mcasas
2014/09/01 14:04:50
Missed this one, should check in l.210.
|
| + DVLOG(1) << "Enumerating video capture capabilities, Blackmagic"; |
| + VideoCaptureDeviceDeckLinkMac::EnumerateDeviceCapabilities( |
| + device, supported_formats); |
| } |
| } |