Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(384)

Side by Side Diff: media/capture/video/video_capture_device.h

Issue 2365223002: Video Capture: Allow suspension of individual devices. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 video capturer may or may not honor
chfremer 2016/09/27 00:54:59 nit: "video capturer" -> "VideoCaptureDevice" or "
miu 2016/09/27 23:42:23 Done.
171 // this request. The purpose of this is to allow minimizing resource usage
172 // while there are no frame consumers present.
chfremer 2016/09/27 00:54:59 nit: The names "Suspend" and "Resume" already some
miu 2016/09/27 23:42:23 Done.
173 virtual void MaybeSuspend() {}
174
175 // Resumes frame delivery, if it was suspended.
176 virtual void Resume() {}
177
170 // Deallocates the video capturer, possibly asynchronously. 178 // Deallocates the video capturer, possibly asynchronously.
171 // 179 //
172 // This call requires the device to do the following things, eventually: put 180 // 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 181 // hardware into a state where other applications could use it, free the
174 // memory associated with capture, and delete the |client| pointer passed into 182 // memory associated with capture, and delete the |client| pointer passed into
175 // AllocateAndStart. 183 // AllocateAndStart.
176 // 184 //
177 // If deallocation is done asynchronously, then the device implementation must 185 // If deallocation is done asynchronously, then the device implementation must
178 // ensure that a subsequent AllocateAndStart() operation targeting the same ID 186 // ensure that a subsequent AllocateAndStart() operation targeting the same ID
179 // would be sequenced through the same task runner, so that deallocation 187 // would be sequenced through the same task runner, so that deallocation
(...skipping 24 matching lines...) Expand all
204 212
205 private: 213 private:
206 // Gets the power line frequency from the current system time zone if this is 214 // Gets the power line frequency from the current system time zone if this is
207 // defined, otherwise returns 0. 215 // defined, otherwise returns 0.
208 PowerLineFrequency GetPowerLineFrequencyForLocation() const; 216 PowerLineFrequency GetPowerLineFrequencyForLocation() const;
209 }; 217 };
210 218
211 } // namespace media 219 } // namespace media
212 220
213 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_H_ 221 #endif // MEDIA_CAPTURE_VIDEO_VIDEO_CAPTURE_DEVICE_H_
OLDNEW
« content/renderer/media/video_capture_impl_manager.h ('K') | « media/base/video_capturer_source.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698