OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 module media.mojom; | 5 module media.mojom; |
6 | 6 |
7 // Equivalent to idl MediaSettingsRange, arbitrary range representing the | 7 // Equivalent to idl MediaSettingsRange, arbitrary range representing the |
8 // allowed variations of a Capability or an Option. | 8 // allowed variations of a Capability or an Option. |
9 // https://w3c.github.io/mediacapture-image/#mediasettingsrange-section | 9 // https://w3c.github.io/mediacapture-image/#mediasettingsrange-section |
10 struct Range { | 10 struct Range { |
11 double max; | 11 double max; |
12 double min; | 12 double min; |
13 double current; | 13 double current; |
14 double step; | 14 double step; |
15 }; | 15 }; |
16 | 16 |
17 // https://w3c.github.io/mediacapture-image/#mediasettingsrange-section | 17 // https://w3c.github.io/mediacapture-image/#meteringmode-section |
18 enum MeteringMode { NONE, MANUAL, SINGLE_SHOT, CONTINUOUS }; | 18 enum MeteringMode { NONE, MANUAL, SINGLE_SHOT, CONTINUOUS }; |
19 | 19 |
20 // https://w3c.github.io/mediacapture-image/#redeyereduction-section | 20 // https://w3c.github.io/mediacapture-image/#redeyereduction-section |
21 enum RedEyeReduction { NEVER, ALWAYS, CONTROLLABLE }; | 21 enum RedEyeReduction { NEVER, ALWAYS, CONTROLLABLE }; |
22 | 22 |
23 // https://www.w3.org/TR/image-capture/#FillLightMode | 23 // https://www.w3.org/TR/image-capture/#FillLightMode |
24 enum FillLightMode { OFF, AUTO, FLASH }; | 24 enum FillLightMode { OFF, AUTO, FLASH }; |
25 | 25 |
26 // Equivalent to idl's MediaTrackCapabilities plus PhotoCapabilities. | 26 // Equivalent to idl's MediaTrackCapabilities plus PhotoCapabilities. |
27 struct PhotoCapabilities { | 27 struct PhotoCapabilities { |
28 // https://w3c.github.io/mediacapture-image/#mediatrackcapabilities-section | 28 // https://w3c.github.io/mediacapture-image/#mediatrackcapabilities-section |
29 MeteringMode white_balance_mode; | 29 array<MeteringMode> supported_white_balance_modes; |
30 MeteringMode exposure_mode; | 30 MeteringMode current_white_balance_mode; |
31 MeteringMode focus_mode; | 31 array<MeteringMode> supported_exposure_modes; |
| 32 MeteringMode current_exposure_mode; |
| 33 array<MeteringMode> supported_focus_modes; |
| 34 MeteringMode current_focus_mode; |
32 array<Point2D> points_of_interest; | 35 array<Point2D> points_of_interest; |
33 | 36 |
34 Range exposure_compensation; | 37 Range exposure_compensation; |
35 Range color_temperature; | 38 Range color_temperature; |
36 Range iso; | 39 Range iso; |
37 | 40 |
38 Range brightness; | 41 Range brightness; |
39 Range contrast; | 42 Range contrast; |
40 Range saturation; | 43 Range saturation; |
41 Range sharpness; | 44 Range sharpness; |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 // https://www.w3.org/TR/image-capture/#dom-imagecapture-setoptions | 127 // https://www.w3.org/TR/image-capture/#dom-imagecapture-setoptions |
125 SetOptions(string source_id, PhotoSettings settings) | 128 SetOptions(string source_id, PhotoSettings settings) |
126 => (bool success); | 129 => (bool success); |
127 | 130 |
128 // Takes a Photo from the given |source_id|, returning it encoded in |blob| | 131 // Takes a Photo from the given |source_id|, returning it encoded in |blob| |
129 // with the format specified in its |mime_type|. | 132 // with the format specified in its |mime_type|. |
130 // https://www.w3.org/TR/image-capture/#dom-imagecapture-takephoto | 133 // https://www.w3.org/TR/image-capture/#dom-imagecapture-takephoto |
131 TakePhoto(string source_id) | 134 TakePhoto(string source_id) |
132 => (Blob blob); | 135 => (Blob blob); |
133 }; | 136 }; |
OLD | NEW |