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

Unified Diff: content/browser/renderer_host/media/video_capture_manager.h

Issue 29423003: Added video capture capabilities retrieval and caching to VideoCaptureManager (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/renderer_host/media/video_capture_manager.h
diff --git a/content/browser/renderer_host/media/video_capture_manager.h b/content/browser/renderer_host/media/video_capture_manager.h
index 6f0b0ec4702dedd2e9e2f43caecee942542ec5e8..e13db133343081b1a89b9a763097414628be4a87 100644
--- a/content/browser/renderer_host/media/video_capture_manager.h
+++ b/content/browser/renderer_host/media/video_capture_manager.h
@@ -82,6 +82,12 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
VideoCaptureControllerID client_id,
VideoCaptureControllerEventHandler* client_handler);
+ // Retrieve the available capture capabilities for a particular device. The
+ // capabilities are cached during GetAvailableDevicesOnDeviceThread() and
+ // updated on DoStartDeviceOnDeviceThread(). The call is synchronous.
+ const media::VideoCaptureCapabilities* EnumerateDeviceCapabilities(
+ const StreamDeviceInfo& device_info);
+
private:
virtual ~VideoCaptureManager();
struct DeviceEntry;
@@ -177,6 +183,13 @@ class CONTENT_EXPORT VideoCaptureManager : public MediaStreamProvider {
// device thread.
media::VideoCaptureDevice::Names video_capture_devices_;
+ // Local cache of video capture capabilities, indexed by unique id. It is
+ // created in GetAvailableDevicesOnDeviceThread(), updated in
+ // DoStartDeviceOnDeviceThread() and retrieved for a particular device id in
+ // EnumerateDeviceCapabilities(), read only.
+ std::map<std::string, media::VideoCaptureCapabilities>
+ video_capture_capabilities_;
+
DISALLOW_COPY_AND_ASSIGN(VideoCaptureManager);
};

Powered by Google App Engine
This is Rietveld 408576698