OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 module device.mojom; | |
6 | |
7 import "device/video/video_capture_device.mojom"; | |
8 import "device/video/video_capture_format.mojom"; | |
9 | |
10 enum VideoCaptureApi { | |
11 LINUX_V4L2_SINGLE_PLANE, | |
12 WIN_MEDIA_FOUNDATION, | |
13 WIN_DIRECT_SHOW, | |
14 MACOSX_AVFOUNDATION, | |
15 MACOSX_DECKLINK, | |
16 ANDROID_API1, | |
17 ANDROID_API2_LEGACY, | |
18 ANDROID_API2_FULL, | |
19 ANDROID_API2_LIMITED, | |
20 ANDROID_TANGO, | |
21 UNKNOWN | |
22 }; | |
23 | |
24 enum VideoCaptureTransportType { | |
25 // For AVFoundation Api, identify devices that are built-in or USB. | |
26 MACOSX_USB_OR_BUILT_IN, | |
27 OTHER_TRANSPORT | |
28 }; | |
29 | |
30 struct VideoCaptureDeviceDescriptor { | |
31 string display_name; | |
32 string device_id; | |
33 string model_id; | |
34 VideoCaptureApi capture_api; | |
35 VideoCaptureTransportType transport_type; | |
36 }; | |
37 | |
38 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
| |
39 EnumerateDeviceDescriptors() | |
40 => (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.
| |
41 | |
42 GetSupportedFormats(VideoCaptureDeviceDescriptor device_descriptor) | |
43 => (array<VideoCaptureFormat> supported_formats); | |
44 | |
45 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
| |
46 => (VideoCaptureDevice device); | |
47 }; | |
OLD | NEW |