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

Unified Diff: media/video/capture/video_capture_device.h

Issue 24079003: Add VideoCaptureDevice::GetDeviceSupportedFormats to interface + implementation for Linux and Fake (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed inexistent video_capture_device_dummy; also removed from media.gyp targets. Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: media/video/capture/video_capture_device.h
diff --git a/media/video/capture/video_capture_device.h b/media/video/capture/video_capture_device.h
index e7340841ceecf5a22212489d86d449f672a76a39..bd767485f7aae1a61855957402ec157e22fe5890 100644
--- a/media/video/capture/video_capture_device.h
+++ b/media/video/capture/video_capture_device.h
@@ -181,6 +181,11 @@ class MEDIA_EXPORT VideoCaptureDevice {
// Called when the native resolution of VideoCaptureDevice has been changed
// and it needs to inform its client of the new frame size.
virtual void OnFrameInfoChanged(const VideoCaptureCapability& info) {};
+
+ // Called when VideoCaptureDevice::GetDeviceSupportedFormats() has been
+ // called, to reply with the the resulting device capabilities.
+ virtual void OnDeviceSupportedFormatsEnumerated(
+ const VideoCaptureFormats& formats) {};
};
// Creates a VideoCaptureDevice object.
// Return NULL if the hardware is not available.
@@ -210,6 +215,13 @@ class MEDIA_EXPORT VideoCaptureDevice {
// would be sequenced through the same task runner, so that deallocation
// happens first.
virtual void StopAndDeAllocate() = 0;
+
+ // Gets the supported video capture formats, if operation is supported by the
+ // driver, for a particular video capture device. This operation may be called
+ // before or after AllocateAndStart, and it may take into account the current
+ // state of the device, f.i. an already opened device might see supported
+ // formats limited etc.
+ virtual void GetDeviceSupportedFormats(scoped_ptr<EventHandler> client) {};
perkj_chrome 2013/09/25 07:58:41 Instead of |client| beeing an EventHandler - it mi
mcasas 2013/10/02 08:13:23 Done.
};
// VideoCaptureDevice1 is a bridge to an older API against which

Powered by Google App Engine
This is Rietveld 408576698