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

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

Issue 2482983002: MediaSettingsRange: s/long/double/ in MediaSettingsRange.idl and PhotoCapabilities.idl (Closed)
Patch Set: s/float/double/ in fake_video_capture_device.* 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 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 double max;
12 int32 min; 12 double min;
13 int32 current; 13 double current;
14 int32 step; 14 double step;
15 }; 15 };
16 16
17 // https://www.w3.org/TR/image-capture/#MeteringMode 17 // https://www.w3.org/TR/image-capture/#MeteringMode
18 enum MeteringMode { NONE, MANUAL, SINGLE_SHOT, CONTINUOUS }; 18 enum MeteringMode { NONE, MANUAL, SINGLE_SHOT, CONTINUOUS };
19 19
20 // https://www.w3.org/TR/image-capture/#FillLightMode 20 // https://www.w3.org/TR/image-capture/#FillLightMode
21 enum FillLightMode { NONE, OFF, AUTO, FLASH, TORCH }; 21 enum FillLightMode { NONE, OFF, AUTO, FLASH, TORCH };
22 22
23 // Equivalent to idl PhotoCapabilities, 23 // Equivalent to idl PhotoCapabilities,
24 // https://www.w3.org/TR/image-capture/#PhotoCapabilities 24 // https://www.w3.org/TR/image-capture/#PhotoCapabilities
(...skipping 23 matching lines...) Expand all
48 float y; 48 float y;
49 }; 49 };
50 50
51 // Equivalent to idl PhotoSettings, 51 // Equivalent to idl PhotoSettings,
52 // https://www.w3.org/TR/image-capture/#PhotoSettings 52 // https://www.w3.org/TR/image-capture/#PhotoSettings
53 struct PhotoSettings { 53 struct PhotoSettings {
54 // uint32 cannot be nullable, i.e. uint32? does not work, use instead a flag. 54 // uint32 cannot be nullable, i.e. uint32? does not work, use instead a flag.
55 bool has_white_balance_mode; 55 bool has_white_balance_mode;
56 MeteringMode white_balance_mode; 56 MeteringMode white_balance_mode;
57 bool has_color_temperature; 57 bool has_color_temperature;
58 uint32 color_temperature; 58 double color_temperature;
59 bool has_exposure_mode; 59 bool has_exposure_mode;
60 MeteringMode exposure_mode; 60 MeteringMode exposure_mode;
61 bool has_exposure_compensation; 61 bool has_exposure_compensation;
62 uint32 exposure_compensation; 62 double exposure_compensation;
63 bool has_iso; 63 bool has_iso;
64 uint32 iso; 64 double iso;
65 bool has_red_eye_reduction; 65 bool has_red_eye_reduction;
66 bool red_eye_reduction; 66 bool red_eye_reduction;
67 bool has_focus_mode; 67 bool has_focus_mode;
68 MeteringMode focus_mode; 68 MeteringMode focus_mode;
69 array<Point2D> points_of_interest; 69 array<Point2D> points_of_interest;
70 70
71 bool has_brightness; 71 bool has_brightness;
72 uint32 brightness; 72 double brightness;
73 bool has_contrast; 73 bool has_contrast;
74 uint32 contrast; 74 double contrast;
75 bool has_saturation; 75 bool has_saturation;
76 uint32 saturation; 76 double saturation;
77 bool has_sharpness; 77 bool has_sharpness;
78 uint32 sharpness; 78 double sharpness;
79 bool has_zoom; 79 bool has_zoom;
80 uint32 zoom; 80 double zoom;
81 bool has_width; 81 bool has_width;
82 uint32 width; 82 double width;
83 bool has_height; 83 bool has_height;
84 uint32 height; 84 double height;
85 bool has_fill_light_mode; 85 bool has_fill_light_mode;
86 FillLightMode fill_light_mode; 86 FillLightMode fill_light_mode;
87 }; 87 };
88 88
89 // This is a mojo move-only equivalent of a Blob, i.e. MIME type and Data. 89 // This is a mojo move-only equivalent of a Blob, i.e. MIME type and Data.
90 struct Blob { 90 struct Blob {
91 string mime_type; 91 string mime_type;
92 array<uint8> data; 92 array<uint8> data;
93 }; 93 };
94 94
95 // |source_id| is the renderer-side UUID identifier of the image capture device. 95 // |source_id| is the renderer-side UUID identifier of the image capture device.
96 interface ImageCapture 96 interface ImageCapture
97 { 97 {
98 // Retrieves the image capture device capabilities and current settings. 98 // Retrieves the image capture device capabilities and current settings.
99 // https://www.w3.org/TR/image-capture/#dom-imagecapture-getphotocapabilitie s 99 // https://www.w3.org/TR/image-capture/#dom-imagecapture-getphotocapabilitie s
100 GetCapabilities(string source_id) 100 GetCapabilities(string source_id)
101 => (PhotoCapabilities capabilities); 101 => (PhotoCapabilities capabilities);
102 102
103 // Sets the |settings| on the associated video capture device. 103 // Sets the |settings| on the associated video capture device.
104 // https://www.w3.org/TR/image-capture/#dom-imagecapture-setoptions 104 // https://www.w3.org/TR/image-capture/#dom-imagecapture-setoptions
105 SetOptions(string source_id, PhotoSettings settings) 105 SetOptions(string source_id, PhotoSettings settings)
106 => (bool success); 106 => (bool success);
107 107
108 // Takes a Photo from the given |source_id|, returning it encoded in |blob| 108 // Takes a Photo from the given |source_id|, returning it encoded in |blob|
109 // with the format specified in its |mime_type|. 109 // with the format specified in its |mime_type|.
110 // https://www.w3.org/TR/image-capture/#dom-imagecapture-takephoto 110 // https://www.w3.org/TR/image-capture/#dom-imagecapture-takephoto
111 TakePhoto(string source_id) 111 TakePhoto(string source_id)
112 => (Blob blob); 112 => (Blob blob);
113 }; 113 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698