OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 // | 4 // |
5 // VideoCaptureDevice is the abstract base class for realizing video capture | 5 // VideoCaptureDevice is the abstract base class for realizing video capture |
6 // device support in Chromium. It provides the interface for OS dependent | 6 // device support in Chromium. It provides the interface for OS dependent |
7 // implementations. | 7 // implementations. |
8 // The class is created and functions are invoked on a thread owned by | 8 // The class is created and functions are invoked on a thread owned by |
9 // VideoCaptureManager. Capturing is done on other threads, depending on the OS | 9 // VideoCaptureManager. Capturing is done on other threads, depending on the OS |
10 // specific implementation. | 10 // specific implementation. |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
99 return other.id() == unique_id_; | 99 return other.id() == unique_id_; |
100 } | 100 } |
101 bool operator<(const Name& other) const { | 101 bool operator<(const Name& other) const { |
102 return unique_id_ < other.id(); | 102 return unique_id_ < other.id(); |
103 } | 103 } |
104 | 104 |
105 #if defined(OS_WIN) || defined(OS_MACOSX) | 105 #if defined(OS_WIN) || defined(OS_MACOSX) |
106 CaptureApiType capture_api_type() const { | 106 CaptureApiType capture_api_type() const { |
107 return capture_api_class_.capture_api_type(); | 107 return capture_api_class_.capture_api_type(); |
108 } | 108 } |
| 109 const char* GetCaptureApiTypeString() const; |
109 #endif | 110 #endif |
110 #if defined(OS_WIN) | 111 #if defined(OS_WIN) |
111 // Certain devices need an ID different from the |unique_id_| for | 112 // Certain devices need an ID different from the |unique_id_| for |
112 // capabilities retrieval. | 113 // capabilities retrieval. |
113 const std::string& capabilities_id() const { | 114 const std::string& capabilities_id() const { |
114 return capabilities_id_; | 115 return capabilities_id_; |
115 } | 116 } |
116 void set_capabilities_id(const std::string& id) { | 117 void set_capabilities_id(const std::string& id) { |
117 capabilities_id_ = id; | 118 capabilities_id_ = id; |
118 } | 119 } |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
320 virtual void CaptureImage() {} | 321 virtual void CaptureImage() {} |
321 | 322 |
322 protected: | 323 protected: |
323 static const int kPowerLine50Hz = 50; | 324 static const int kPowerLine50Hz = 50; |
324 static const int kPowerLine60Hz = 60; | 325 static const int kPowerLine60Hz = 60; |
325 }; | 326 }; |
326 | 327 |
327 } // namespace media | 328 } // namespace media |
328 | 329 |
329 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 330 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
OLD | NEW |