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 afb4c3567ac3362a9a9cae08c14fada1b507067a..b0d3271c4798190d5d71b0da969054a3d0dd7269 100644 |
| --- a/media/video/capture/video_capture_device.h |
| +++ b/media/video/capture/video_capture_device.h |
| @@ -38,9 +38,8 @@ class MEDIA_EXPORT VideoCaptureDevice { |
| // VideoCaptureDevice::Create. |
| class MEDIA_EXPORT Name { |
| public: |
| - Name() {} |
| - Name(const std::string& name, const std::string& id) |
| - : device_name_(name), unique_id_(id) {} |
| + Name(); |
| + Name(const std::string& name, const std::string& id); |
| #if defined(OS_WIN) |
| // Windows targets Capture Api type: it can only be set on construction. |
| @@ -57,14 +56,24 @@ class MEDIA_EXPORT VideoCaptureDevice { |
| QTKIT, |
| API_TYPE_UNKNOWN |
| }; |
| + // For AVFoundation Api, identify devices that are built-in or USB. |
| + enum TransportType { |
| + USB_OR_BUILT_IN, |
| + OTHER_TRANSPORT |
| + }; |
| #endif |
| #if defined(OS_WIN) || defined(OS_MACOSX) |
| Name(const std::string& name, |
| const std::string& id, |
| - const CaptureApiType api_type) |
| - : device_name_(name), unique_id_(id), capture_api_class_(api_type) {} |
| + const CaptureApiType api_type); |
| +#endif |
| +#if defined(OS_MACOSX) |
| + Name(const std::string& name, |
| + const std::string& id, |
| + const CaptureApiType api_type, |
| + const TransportType transport_type); |
| #endif |
| - ~Name() {} |
| + ~Name(); |
| // Friendly name of a device |
| const std::string& name() const { return device_name_; } |
| @@ -95,6 +104,11 @@ class MEDIA_EXPORT VideoCaptureDevice { |
| CaptureApiType capture_api_type() const { |
| return capture_api_class_.capture_api_type(); |
| } |
| +#endif |
| +#if defined(OS_MACOSX) |
| + TransportType transport_type() const { |
| + return transport_type_; |
| + } |
| #endif // if defined(OS_WIN) |
| private: |
| @@ -118,6 +132,9 @@ class MEDIA_EXPORT VideoCaptureDevice { |
| CaptureApiClass capture_api_class_; |
| #endif |
| +#if defined(OS_MACOSX) |
| + TransportType transport_type_ = OTHER_TRANSPORT; |
|
Robert Sesek
2014/07/01 16:23:57
I think this is only C++11 and I'm not sure it's s
mcasas
2014/07/02 07:37:35
Done.
|
| +#endif |
| // Allow generated copy constructor and assignment. |
| }; |