Chromium Code Reviews| Index: device/video/video_capture_device_factory.mojom |
| diff --git a/device/video/video_capture_device_factory.mojom b/device/video/video_capture_device_factory.mojom |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..1323d8285b8fa70832902d3b9c6b0a68771cd082 |
| --- /dev/null |
| +++ b/device/video/video_capture_device_factory.mojom |
| @@ -0,0 +1,47 @@ |
| +// Copyright 2016 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +module device.mojom; |
| + |
| +import "device/video/video_capture_device.mojom"; |
| +import "device/video/video_capture_format.mojom"; |
| + |
| +enum VideoCaptureApi { |
| + LINUX_V4L2_SINGLE_PLANE, |
| + WIN_MEDIA_FOUNDATION, |
| + WIN_DIRECT_SHOW, |
| + MACOSX_AVFOUNDATION, |
| + MACOSX_DECKLINK, |
| + ANDROID_API1, |
| + ANDROID_API2_LEGACY, |
| + ANDROID_API2_FULL, |
| + ANDROID_API2_LIMITED, |
| + ANDROID_TANGO, |
| + UNKNOWN |
| +}; |
| + |
| +enum VideoCaptureTransportType { |
| + // For AVFoundation Api, identify devices that are built-in or USB. |
| + MACOSX_USB_OR_BUILT_IN, |
| + OTHER_TRANSPORT |
| +}; |
| + |
| +struct VideoCaptureDeviceDescriptor { |
| + string display_name; |
| + string device_id; |
| + string model_id; |
| + VideoCaptureApi capture_api; |
| + VideoCaptureTransportType transport_type; |
| +}; |
| + |
| +interface VideoCaptureDeviceFactory { |
|
Ken Rockot(use gerrit already)
2016/08/02 22:46:25
nit: VideoCaptureDeviceProvider? I don't think "fa
chfremer
2016/08/03 22:14:15
I feel the term "Factory" is correct here in a sen
|
| + EnumerateDeviceDescriptors() |
| + => (array<VideoCaptureDeviceDescriptor> descriptors); |
|
Ken Rockot(use gerrit already)
2016/08/02 22:46:25
nit: +4 space indent for line continuations.
chfremer
2016/08/03 22:14:14
Done.
|
| + |
| + GetSupportedFormats(VideoCaptureDeviceDescriptor device_descriptor) |
| + => (array<VideoCaptureFormat> supported_formats); |
| + |
| + CreateDevice(VideoCaptureDeviceDescriptor device_descriptor) |
|
Ken Rockot(use gerrit already)
2016/08/02 22:46:25
Idiomatic mojom would be
CreateDevice(VideoCapt
chfremer
2016/08/03 22:14:14
Thanks. That is really smart and I wouldn't have t
|
| + => (VideoCaptureDevice device); |
| +}; |