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 147 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 158 TransportType transport_type_; | 158 TransportType transport_type_; |
| 159 // Flag used to mark blacklisted devices for QTKit Api. | 159 // Flag used to mark blacklisted devices for QTKit Api. |
| 160 bool is_blacklisted_; | 160 bool is_blacklisted_; |
| 161 #endif | 161 #endif |
| 162 // Allow generated copy constructor and assignment. | 162 // Allow generated copy constructor and assignment. |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 // Manages a list of Name entries. | 165 // Manages a list of Name entries. |
| 166 typedef std::list<Name> Names; | 166 typedef std::list<Name> Names; |
| 167 | 167 |
| 168 // A convenience wrap of a devices' name and associated supported formats. | |
| 169 struct DeviceInfo { | |
|
perkj_chrome
2014/10/08 11:49:59
Please move this out of VideoCaptureDevice and why
mcasas
2014/10/08 14:05:18
Done.
| |
| 170 DeviceInfo(); | |
| 171 DeviceInfo(const Name& name, | |
| 172 const VideoCaptureFormats& supported_formats); | |
| 173 ~DeviceInfo(); | |
| 174 | |
| 175 Name name; | |
| 176 VideoCaptureFormats supported_formats; | |
| 177 }; | |
| 178 typedef std::vector<DeviceInfo> DeviceInfos; | |
| 179 | |
| 168 class MEDIA_EXPORT Client { | 180 class MEDIA_EXPORT Client { |
| 169 public: | 181 public: |
| 170 // Memory buffer returned by Client::ReserveOutputBuffer(). | 182 // Memory buffer returned by Client::ReserveOutputBuffer(). |
| 171 class Buffer : public base::RefCountedThreadSafe<Buffer> { | 183 class Buffer : public base::RefCountedThreadSafe<Buffer> { |
| 172 public: | 184 public: |
| 173 int id() const { return id_; } | 185 int id() const { return id_; } |
| 174 void* data() const { return data_; } | 186 void* data() const { return data_; } |
| 175 size_t size() const { return size_; } | 187 size_t size() const { return size_; } |
| 176 | 188 |
| 177 protected: | 189 protected: |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 320 virtual void CaptureImage() {} | 332 virtual void CaptureImage() {} |
| 321 | 333 |
| 322 protected: | 334 protected: |
| 323 static const int kPowerLine50Hz = 50; | 335 static const int kPowerLine50Hz = 50; |
| 324 static const int kPowerLine60Hz = 60; | 336 static const int kPowerLine60Hz = 60; |
| 325 }; | 337 }; |
| 326 | 338 |
| 327 } // namespace media | 339 } // namespace media |
| 328 | 340 |
| 329 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 341 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
| OLD | NEW |