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

Side by Side Diff: media/mojo/interfaces/image_capture.mojom

Issue 2375543004: ImageCapture: wire |colorTemperature| set/get for Linux/Cros (Closed)
Patch Set: Created 4 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 unified diff | Download patch
OLDNEW
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://www.w3.org/TR/image-capture/#MediaSettingsRange 9 // https://www.w3.org/TR/image-capture/#MediaSettingsRange
10 struct Range { 10 struct Range {
11 int32 max; 11 int32 max;
12 int32 min; 12 int32 min;
13 int32 current; 13 int32 current;
14 }; 14 };
15 15
16 // https://www.w3.org/TR/image-capture/#MeteringMode 16 // https://www.w3.org/TR/image-capture/#MeteringMode
17 enum MeteringMode { NONE, MANUAL, SINGLE_SHOT, CONTINUOUS }; 17 enum MeteringMode { NONE, MANUAL, SINGLE_SHOT, CONTINUOUS };
18 18
19 // https://www.w3.org/TR/image-capture/#FillLightMode 19 // https://www.w3.org/TR/image-capture/#FillLightMode
20 enum FillLightMode { NONE, OFF, AUTO, FLASH, TORCH }; 20 enum FillLightMode { NONE, OFF, AUTO, FLASH, TORCH };
21 21
22 // Equivalent to idl PhotoCapabilities, 22 // Equivalent to idl PhotoCapabilities,
23 // https://www.w3.org/TR/image-capture/#PhotoCapabilities 23 // https://www.w3.org/TR/image-capture/#PhotoCapabilities
24 struct PhotoCapabilities { 24 struct PhotoCapabilities {
25 MeteringMode white_balance_mode;
26 Range color_temperature;
27 MeteringMode exposure_mode;
28 Range exposure_compensation;
25 Range iso; 29 Range iso;
30 bool red_eye_reduction;
31 MeteringMode focus_mode;
32
26 Range height; 33 Range height;
27 Range width; 34 Range width;
28 Range zoom; 35 Range zoom;
29 MeteringMode focus_mode;
30 MeteringMode exposure_mode;
31 Range exposure_compensation;
32 MeteringMode white_balance_mode;
33 FillLightMode fill_light_mode; 36 FillLightMode fill_light_mode;
34 bool red_eye_reduction;
35 }; 37 };
36 38
37 // Equivalent to idl Point2D. 39 // Equivalent to idl Point2D.
38 // TODO(mcasas): use gfx::mojom::PointF after https://crbug.com/640049. 40 // TODO(mcasas): use gfx::mojom::PointF after https://crbug.com/640049.
39 struct Point2D { 41 struct Point2D {
40 float x; 42 float x;
41 float y; 43 float y;
42 }; 44 };
43 45
44 // Equivalent to idl PhotoSettings, 46 // Equivalent to idl PhotoSettings,
45 // https://www.w3.org/TR/image-capture/#PhotoSettings 47 // https://www.w3.org/TR/image-capture/#PhotoSettings
46 struct PhotoSettings { 48 struct PhotoSettings {
47 // uint32 cannot be nullable, i.e. uint32? does not work, use instead a flag. 49 // uint32 cannot be nullable, i.e. uint32? does not work, use instead a flag.
50 bool has_white_balance_mode;
51 MeteringMode white_balance_mode;
52 bool has_color_temperature;
53 uint32 color_temperature;
54 bool has_exposure_mode;
55 MeteringMode exposure_mode;
56 bool has_exposure_compensation;
57 uint32 exposure_compensation;
58 bool has_iso;
59 uint32 iso;
60 bool has_red_eye_reduction;
61 bool red_eye_reduction;
62 bool has_focus_mode;
63 MeteringMode focus_mode;
64 array<Point2D> points_of_interest;
65
48 bool has_zoom; 66 bool has_zoom;
49 uint32 zoom; 67 uint32 zoom;
50 bool has_width; 68 bool has_width;
51 uint32 width; 69 uint32 width;
52 bool has_height; 70 bool has_height;
53 uint32 height; 71 uint32 height;
54 bool has_focus_mode;
55 MeteringMode focus_mode;
56 bool has_exposure_mode;
57 MeteringMode exposure_mode;
58 bool has_exposure_compensation;
59 uint32 exposure_compensation;
60 bool has_white_balance_mode;
61 MeteringMode white_balance_mode;
62 bool has_iso;
63 uint32 iso;
64 bool has_red_eye_reduction;
65 bool red_eye_reduction;
66 bool has_fill_light_mode; 72 bool has_fill_light_mode;
67 FillLightMode fill_light_mode; 73 FillLightMode fill_light_mode;
68 array<Point2D> points_of_interest;
69 }; 74 };
70 75
71 // This is a mojo move-only equivalent of a Blob, i.e. MIME type and Data. 76 // This is a mojo move-only equivalent of a Blob, i.e. MIME type and Data.
72 struct Blob { 77 struct Blob {
73 string mime_type; 78 string mime_type;
74 array<uint8> data; 79 array<uint8> data;
75 }; 80 };
76 81
77 // |source_id| is the renderer-side UUID identifier of the image capture device. 82 // |source_id| is the renderer-side UUID identifier of the image capture device.
78 interface ImageCapture 83 interface ImageCapture
79 { 84 {
80 // Retrieves the image capture device capabilities and current settings. 85 // Retrieves the image capture device capabilities and current settings.
81 // https://www.w3.org/TR/image-capture/#dom-imagecapture-getphotocapabilitie s 86 // https://www.w3.org/TR/image-capture/#dom-imagecapture-getphotocapabilitie s
82 GetCapabilities(string source_id) 87 GetCapabilities(string source_id)
83 => (PhotoCapabilities capabilities); 88 => (PhotoCapabilities capabilities);
84 89
85 // Sets the |settings| on the associated video capture device. 90 // Sets the |settings| on the associated video capture device.
86 // https://www.w3.org/TR/image-capture/#dom-imagecapture-setoptions 91 // https://www.w3.org/TR/image-capture/#dom-imagecapture-setoptions
87 SetOptions(string source_id, PhotoSettings settings) 92 SetOptions(string source_id, PhotoSettings settings)
88 => (bool success); 93 => (bool success);
89 94
90 // Takes a Photo from the given |source_id|, returning it encoded in |blob| 95 // Takes a Photo from the given |source_id|, returning it encoded in |blob|
91 // with the format specified in its |mime_type|. 96 // with the format specified in its |mime_type|.
92 // https://www.w3.org/TR/image-capture/#dom-imagecapture-takephoto 97 // https://www.w3.org/TR/image-capture/#dom-imagecapture-takephoto
93 TakePhoto(string source_id) 98 TakePhoto(string source_id)
94 => (Blob blob); 99 => (Blob blob);
95 }; 100 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698