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

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

Issue 366593003: Mac VideoCapture: return empty GetModel() for non-USB non-built-in cameras. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: FakeVCD and FileVCD specify AVFoundation API type. Created 6 years, 5 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
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..3f953f8896282aea43ba17e5d79ed5e5bcaad16d 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_;
+#endif
// Allow generated copy constructor and assignment.
};
« no previous file with comments | « media/video/capture/mac/video_capture_device_qtkit_mac.mm ('k') | media/video/capture/video_capture_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698