Chromium Code Reviews| Index: media/video/capture/video_capture_device.h |
| diff --git a/media/video/capture/video_capture_device.h b/media/video/capture/video_capture_device.h |
| index 187145ffa84596ed5ea6f7eeccb3d790af4dafc2..db45a18896bfca95a01538767e1cea9042475403 100644 |
| --- a/media/video/capture/video_capture_device.h |
| +++ b/media/video/capture/video_capture_device.h |
| @@ -108,6 +108,19 @@ class MEDIA_EXPORT VideoCaptureDevice { |
| } |
| #endif |
| #if defined(OS_WIN) |
| + const std::string capture_api_type_string() const { |
|
tommi (sloooow) - chröme
2014/10/20 22:09:42
nit: these methods might as well just return const
burnik
2014/10/21 11:27:04
Done.
|
| + 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 "API_TYPE_UNKNOWN"; |
| + } |
| + } |
| // Certain devices need an ID different from the |unique_id_| for |
| // capabilities retrieval. |
| const std::string& capabilities_id() const { |
| @@ -118,6 +131,19 @@ class MEDIA_EXPORT VideoCaptureDevice { |
| } |
| #endif |
| #if defined(OS_MACOSX) |
| + const std::string capture_api_type_string() const { |
| + switch(capture_api_type()) { |
| + case AVFOUNDATION: |
| + return "AVFOUNDATION"; |
| + case QTKIT: |
| + return "QTKIT"; |
| + case DECKLINK: |
| + return "DECKLINK"; |
| + default: |
| + NOTREACHED() << "Unknown Video Capture API type!"; |
| + return "API_TYPE_UNKNOWN"; |
| + } |
| + } |
| TransportType transport_type() const { |
| return transport_type_; |
| } |