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

Unified Diff: media/video/capture/video_capture_device.cc

Issue 637953008: Improve video capture columns in chrome://media-internals (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Human readable capture API type Created 6 years, 2 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
« no previous file with comments | « media/video/capture/video_capture_device.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 {
« no previous file with comments | « media/video/capture/video_capture_device.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698