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 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 214 virtual void Stop() = 0; | 214 virtual void Stop() = 0; |
| 215 | 215 |
| 216 // Deallocates the camera. This means other applications can use it. After | 216 // Deallocates the camera. This means other applications can use it. After |
| 217 // this function has been called the capture device is reset to the state it | 217 // this function has been called the capture device is reset to the state it |
| 218 // was when created. After DeAllocate() is called, the VideoCaptureDevice is | 218 // was when created. After DeAllocate() is called, the VideoCaptureDevice is |
| 219 // not permitted to make any additional calls to its EventHandler. | 219 // not permitted to make any additional calls to its EventHandler. |
| 220 virtual void DeAllocate() = 0; | 220 virtual void DeAllocate() = 0; |
| 221 | 221 |
| 222 // Get the name of the capture device. | 222 // Get the name of the capture device. |
| 223 virtual const Name& device_name() = 0; | 223 virtual const Name& device_name() = 0; |
| 224 | |
| 225 // Gets the supported video capture formats, if operation is supported by the | |
| 226 // driver, for a particular video capture device. This operation must be run | |
| 227 // after the device being opened with Allocate(), and it may take into account | |
|
perkj_chrome
2013/09/13 10:33:05
It seems a bit weird that we require Allocate to b
ncarter (slow)
2013/09/13 19:21:08
I have a CL out that merges Start+Allocate, and th
| |
| 228 // the current state of the device, f.i. an already opened device might see | |
| 229 // supported formats limited etc. | |
|
ncarter (slow)
2013/09/16 16:20:02
The current contract of this function seems to exp
mcasas
2013/09/24 15:02:27
Asynchronous reply would be the answer, let me wri
| |
| 230 virtual void GetDeviceSupportedFormats( | |
|
scherkus (not reviewing)
2013/09/12 17:29:09
how do I know if this method succeeded or not? wha
mcasas
2013/09/24 15:02:27
On the asynchronous reply, it would be empty.
| |
| 231 VideoCaptureFormats* capture_formats) = 0; | |
|
scherkus (not reviewing)
2013/09/12 17:29:09
this CL could be dramatically simplified if you pr
mcasas
2013/09/24 15:02:27
Done.
| |
| 224 }; | 232 }; |
| 225 | 233 |
| 226 } // namespace media | 234 } // namespace media |
| 227 | 235 |
| 228 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ | 236 #endif // MEDIA_VIDEO_CAPTURE_VIDEO_CAPTURE_DEVICE_H_ |
| OLD | NEW |