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

Unified Diff: services/video_capture/public/interfaces/video_capture_device_factory.mojom

Issue 2494033004: [Mojo Video Capture] Use string keys instead of VideoCaptureDeviceDescriptor (Closed)
Patch Set: Rebase Created 4 years, 1 month 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
« no previous file with comments | « services/video_capture/mock_device_test.cc ('k') | services/video_capture/receiver_mojo_to_media_adapter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/video_capture/public/interfaces/video_capture_device_factory.mojom
diff --git a/services/video_capture/public/interfaces/video_capture_device_factory.mojom b/services/video_capture/public/interfaces/video_capture_device_factory.mojom
index 01752012226cdb183d43f83111506f992b9b1f57..bf0aa378590947489a609d5d10b7479ed028b8a7 100644
--- a/services/video_capture/public/interfaces/video_capture_device_factory.mojom
+++ b/services/video_capture/public/interfaces/video_capture_device_factory.mojom
@@ -17,21 +17,20 @@ enum DeviceAccessResultCode {
// Enables access to a set of video capture devices.
// Typical operation is to first call EnumerateDeviceDescriptors() to obtain
-// information about available devices. The obtained descriptors can then be
-// used to either obtain the supported formats for a device using
-// GetSupportedFormats(), or to create an instance of VideoCaptureDevice for
-// the device using CreateDevice().
-// TODO(chfremer): Consider using a simple string identifier instead of a
-// VideoCaptureDeviceDescriptor.
-// https://crbug.com/637439
+// information about available devices. The |device_id| of the descriptors can
+// subsequently be used to either obtain the supported formats for a device
+// using GetSupportedFormats(), or to create an instance of
+// VideoCaptureDeviceProxy using CreateDeviceProxy().
+// The factory guarantees that no two device descriptors it returns use the
+// same |device_id|.
interface VideoCaptureDeviceFactory {
EnumerateDeviceDescriptors()
=> (array<VideoCaptureDeviceDescriptor> descriptors);
- GetSupportedFormats(VideoCaptureDeviceDescriptor device_descriptor)
+ GetSupportedFormats(string device_id)
=> (array<VideoCaptureFormat> supported_formats);
- // Provides exclusive access to the device identified by |device_descriptor|.
+ // Provides exclusive access to the device identified by |device_id|.
// The access is valid until either the message pipe associated with
// |proxy_request| is closed by the client, or a subsequent call to
// CreateDeviceProxy() is made. When a subsequent call is made while the
@@ -42,7 +41,7 @@ interface VideoCaptureDeviceFactory {
// |proxy_request| has been (asynchronously) discarded a subsequent call to
// CreateDeviceProxy() would succeed if it were to deny access while still
// in use.
- CreateDeviceProxy(VideoCaptureDeviceDescriptor device_descriptor,
+ CreateDeviceProxy(string device_id,
VideoCaptureDeviceProxy& proxy_request)
=> (DeviceAccessResultCode result_code);
};
« no previous file with comments | « services/video_capture/mock_device_test.cc ('k') | services/video_capture/receiver_mojo_to_media_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698