Chromium Code Reviews| 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 } | 99 } |
| 100 bool operator<(const Name& other) const { | 100 bool operator<(const Name& other) const { |
| 101 return unique_id_ < other.id(); | 101 return unique_id_ < other.id(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 #if defined(OS_WIN) || defined(OS_MACOSX) | 104 #if defined(OS_WIN) || defined(OS_MACOSX) |
| 105 CaptureApiType capture_api_type() const { | 105 CaptureApiType capture_api_type() const { |
| 106 return capture_api_class_.capture_api_type(); | 106 return capture_api_class_.capture_api_type(); |
| 107 } | 107 } |
| 108 #endif | 108 #endif |
| 109 #if defined(OS_WIN) | |
| 110 const std::string& capabilities_unique_id() const { | |
|
perkj_chrome
2014/09/02 09:22:03
add comment what this id really is and why this is
mcasas
2014/09/02 15:13:41
Done.
| |
| 111 return capabilities_unique_id_; | |
| 112 } | |
| 113 void set_capabilities_unique_id(const std::string& id) { | |
| 114 capabilities_unique_id_ = id; | |
| 115 } | |
| 116 #endif | |
| 109 #if defined(OS_MACOSX) | 117 #if defined(OS_MACOSX) |
| 110 TransportType transport_type() const { | 118 TransportType transport_type() const { |
| 111 return transport_type_; | 119 return transport_type_; |
| 112 } | 120 } |
| 113 bool is_blacklisted() const { | 121 bool is_blacklisted() const { |
| 114 return is_blacklisted_; | 122 return is_blacklisted_; |
| 115 } | 123 } |
| 116 void set_is_blacklisted(bool is_blacklisted) { | 124 void set_is_blacklisted(bool is_blacklisted) { |
| 117 is_blacklisted_ = is_blacklisted; | 125 is_blacklisted_ = is_blacklisted; |
| 118 } | 126 } |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 132 CaptureApiType capture_api_type() const { | 140 CaptureApiType capture_api_type() const { |
| 133 DCHECK_NE(capture_api_type_, API_TYPE_UNKNOWN); | 141 DCHECK_NE(capture_api_type_, API_TYPE_UNKNOWN); |
| 134 return capture_api_type_; | 142 return capture_api_type_; |
| 135 } | 143 } |
| 136 private: | 144 private: |
| 137 CaptureApiType capture_api_type_; | 145 CaptureApiType capture_api_type_; |
| 138 }; | 146 }; |
| 139 | 147 |
| 140 CaptureApiClass capture_api_class_; | 148 CaptureApiClass capture_api_class_; |
| 141 #endif | 149 #endif |
| 150 #if defined(OS_WIN) | |
| 151 // ID used for capabilities retrieval. By default is equal to |unique_id|. | |
| 152 std::string capabilities_unique_id_; | |
| 153 #endif | |
| 142 #if defined(OS_MACOSX) | 154 #if defined(OS_MACOSX) |
| 143 TransportType transport_type_; | 155 TransportType transport_type_; |
| 144 // Flag used to mark blacklisted devices for QTKit Api. | 156 // Flag used to mark blacklisted devices for QTKit Api. |
| 145 bool is_blacklisted_; | 157 bool is_blacklisted_; |
| 146 #endif | 158 #endif |
| 147 // Allow generated copy constructor and assignment. | 159 // Allow generated copy constructor and assignment. |
| 148 }; | 160 }; |
| 149 | 161 |
| 150 // Manages a list of Name entries. | 162 // Manages a list of Name entries. |
| 151 typedef std::list<Name> Names; | 163 typedef std::list<Name> Names; |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 259 int GetPowerLineFrequencyForLocation() const; | 271 int GetPowerLineFrequencyForLocation() const; |
| 260 | 272 |
| 261 protected: | 273 protected: |
| 262 static const int kPowerLine50Hz = 50; | 274 static const int kPowerLine50Hz = 50; |
| 263 static const int kPowerLine60Hz = 60; | 275 static const int kPowerLine60Hz = 60; |
| 264 }; | 276 }; |
| 265 | 277 |
| 266 } // namespace media | 278 } // namespace media |
| 267 | 279 |
| 268 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 280 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
| OLD | NEW |