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 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
160 // improve the video quality of unchanging content. | 160 // improve the video quality of unchanging content. |
161 // | 161 // |
162 // The default implementation is a no-op. VideoCaptureDevice implementations | 162 // The default implementation is a no-op. VideoCaptureDevice implementations |
163 // are not required to honor this request, especially if they do not | 163 // are not required to honor this request, especially if they do not |
164 // self-pause and/or if honoring the request would cause them to exceed their | 164 // self-pause and/or if honoring the request would cause them to exceed their |
165 // configured maximum frame rate. Any VideoCaptureDevice that does self-pause, | 165 // configured maximum frame rate. Any VideoCaptureDevice that does self-pause, |
166 // however, should provide an implementation of this method that makes | 166 // however, should provide an implementation of this method that makes |
167 // reasonable attempts to honor these requests. | 167 // reasonable attempts to honor these requests. |
168 virtual void RequestRefreshFrame() {} | 168 virtual void RequestRefreshFrame() {} |
169 | 169 |
170 // Optionally suspends frame delivery. The VideoCaptureDevice may or may not | |
171 // honor this request. The purpose of this is to quickly place the device into | |
172 // a state where it's resource utilization is minimized while there are no | |
173 // frame consumers; and then quickly resume once a frame consumer is present. | |
174 virtual void MaybeSuspend() {} | |
mcasas
2016/09/28 21:34:44
Could we say here MaybePause()? It would sound
to
| |
175 | |
176 // Resumes frame delivery, if it was suspended. | |
177 virtual void Resume() {} | |
178 | |
170 // Deallocates the video capturer, possibly asynchronously. | 179 // Deallocates the video capturer, possibly asynchronously. |
171 // | 180 // |
172 // This call requires the device to do the following things, eventually: put | 181 // This call requires the device to do the following things, eventually: put |
173 // hardware into a state where other applications could use it, free the | 182 // hardware into a state where other applications could use it, free the |
174 // memory associated with capture, and delete the |client| pointer passed into | 183 // memory associated with capture, and delete the |client| pointer passed into |
175 // AllocateAndStart. | 184 // AllocateAndStart. |
176 // | 185 // |
177 // If deallocation is done asynchronously, then the device implementation must | 186 // If deallocation is done asynchronously, then the device implementation must |
178 // ensure that a subsequent AllocateAndStart() operation targeting the same ID | 187 // ensure that a subsequent AllocateAndStart() operation targeting the same ID |
179 // would be sequenced through the same task runner, so that deallocation | 188 // would be sequenced through the same task runner, so that deallocation |
(...skipping 24 matching lines...) Expand all Loading... | |
204 | 213 |
205 private: | 214 private: |
206 // Gets the power line frequency from the current system time zone if this is | 215 // Gets the power line frequency from the current system time zone if this is |
207 // defined, otherwise returns 0. | 216 // defined, otherwise returns 0. |
208 PowerLineFrequency GetPowerLineFrequencyForLocation() const; | 217 PowerLineFrequency GetPowerLineFrequencyForLocation() const; |
209 }; | 218 }; |
210 | 219 |
211 } // namespace media | 220 } // namespace media |
212 | 221 |
213 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_H_ | 222 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_H_ |
OLD | NEW |