Index: media/video/capture/video_capture_device.cc |
diff --git a/media/video/capture/video_capture_device.cc b/media/video/capture/video_capture_device.cc |
index 3b74417cbf823c0e9d235953809fb40a2cadaaef..dc62fc9ccd790e28b222f69685f66685f14bd4ea 100644 |
--- a/media/video/capture/video_capture_device.cc |
+++ b/media/video/capture/video_capture_device.cc |
@@ -57,6 +57,36 @@ VideoCaptureDevice::Name::Name(const std::string& name, |
VideoCaptureDevice::Name::~Name() {} |
+#if defined(OS_WIN) |
+const char* VideoCaptureDevice::Name::GetCaptureApiTypeString() const { |
+ switch(capture_api_type()) { |
+ case MEDIA_FOUNDATION: |
+ return "Media Foundation"; |
+ case DIRECT_SHOW: |
+ return "Direct Show"; |
+ case DIRECT_SHOW_WDM_CROSSBAR: |
+ return "Direct Show WDM Crossbar"; |
+ default: |
+ NOTREACHED() << "Unknown Video Capture API type!"; |
+ return "Unknown API"; |
+ } |
+} |
+#elif defined(OS_MACOSX) |
+const char* VideoCaptureDevice::Name::GetCaptureApiTypeString() const { |
+ switch(capture_api_type()) { |
+ case AVFOUNDATION: |
+ return "AV Foundation"; |
+ case QTKIT: |
+ return "QTKit"; |
+ case DECKLINK: |
+ return "DeckLink"; |
+ default: |
+ NOTREACHED() << "Unknown Video Capture API type!"; |
+ return "Unknown API"; |
+ } |
+} |
+#endif |
+ |
VideoCaptureDevice::~VideoCaptureDevice() {} |
int VideoCaptureDevice::GetPowerLineFrequencyForLocation() const { |