| Index: media/capture/mojo/image_capture.mojom
|
| diff --git a/media/capture/mojo/image_capture.mojom b/media/capture/mojo/image_capture.mojom
|
| index 50504c8e04a788b9db9125de3404eec2eec8e174..d5706b0fc8bfd3e15f7de5c9a5fdb6a393938732 100644
|
| --- a/media/capture/mojo/image_capture.mojom
|
| +++ b/media/capture/mojo/image_capture.mojom
|
| @@ -6,7 +6,7 @@ module media.mojom;
|
|
|
| // Equivalent to idl MediaSettingsRange, arbitrary range representing the
|
| // allowed variations of a Capability or an Option.
|
| -// https://www.w3.org/TR/image-capture/#MediaSettingsRange
|
| +// https://w3c.github.io/mediacapture-image/#mediasettingsrange-section
|
| struct Range {
|
| double max;
|
| double min;
|
| @@ -14,59 +14,69 @@ struct Range {
|
| double step;
|
| };
|
|
|
| -// https://www.w3.org/TR/image-capture/#MeteringMode
|
| +// https://w3c.github.io/mediacapture-image/#mediasettingsrange-section
|
| enum MeteringMode { NONE, MANUAL, SINGLE_SHOT, CONTINUOUS };
|
|
|
| -// https://www.w3.org/TR/image-capture/#FillLightMode
|
| -enum FillLightMode { NONE, OFF, AUTO, FLASH, TORCH };
|
| +// https://w3c.github.io/mediacapture-image/#redeyereduction-section
|
| +enum RedEyeReduction { NEVER, ALWAYS, CONTROLLABLE };
|
|
|
| -// Equivalent to idl PhotoCapabilities,
|
| -// https://www.w3.org/TR/image-capture/#PhotoCapabilities
|
| +// https://www.w3.org/TR/image-capture/#FillLightMode
|
| +enum FillLightMode { OFF, AUTO, FLASH };
|
| +
|
| +// Equivalent to idl's MediaTrackCapabilities plus PhotoCapabilities.
|
| struct PhotoCapabilities {
|
| + // https://w3c.github.io/mediacapture-image/#mediatrackcapabilities-section
|
| MeteringMode white_balance_mode;
|
| - Range color_temperature;
|
| MeteringMode exposure_mode;
|
| + MeteringMode focus_mode;
|
| +
|
| Range exposure_compensation;
|
| + Range color_temperature;
|
| Range iso;
|
| - bool red_eye_reduction;
|
| - MeteringMode focus_mode;
|
|
|
| Range brightness;
|
| Range contrast;
|
| Range saturation;
|
| Range sharpness;
|
| +
|
| + Range zoom;
|
| +
|
| + bool torch;
|
| +
|
| + // https://w3c.github.io/mediacapture-image/##photocapabilities-section
|
| + RedEyeReduction red_eye_reduction;
|
| Range height;
|
| Range width;
|
| - Range zoom;
|
| - FillLightMode fill_light_mode;
|
| + array<FillLightMode> fill_light_mode;
|
| };
|
|
|
| // Equivalent to idl Point2D.
|
| +// https://w3c.github.io/mediacapture-image/#point2d-section
|
| // TODO(mcasas): use gfx::mojom::PointF after https://crbug.com/640049.
|
| struct Point2D {
|
| float x;
|
| float y;
|
| };
|
|
|
| -// Equivalent to idl PhotoSettings,
|
| -// https://www.w3.org/TR/image-capture/#PhotoSettings
|
| +// Equivalent to idl PhotoSettings + MediaTrackSettings/MediaTrackConstraintSet.
|
| +// PODs cannot be nullable, i.e. uint32? bla doesn't work, use |has_bla| flags.
|
| struct PhotoSettings {
|
| - // uint32 cannot be nullable, i.e. uint32? does not work, use instead a flag.
|
| + // https://w3c.github.io/mediacapture-image/#mediatracksettings-section and
|
| + // https://w3c.github.io/mediacapture-image/#mediatrackconstraintset-section
|
| bool has_white_balance_mode;
|
| MeteringMode white_balance_mode;
|
| - bool has_color_temperature;
|
| - double color_temperature;
|
| bool has_exposure_mode;
|
| MeteringMode exposure_mode;
|
| + bool has_focus_mode;
|
| + MeteringMode focus_mode;
|
| + array<Point2D> points_of_interest;
|
| +
|
| bool has_exposure_compensation;
|
| double exposure_compensation;
|
| + bool has_color_temperature;
|
| + double color_temperature;
|
| bool has_iso;
|
| double iso;
|
| - bool has_red_eye_reduction;
|
| - bool red_eye_reduction;
|
| - bool has_focus_mode;
|
| - MeteringMode focus_mode;
|
| - array<Point2D> points_of_interest;
|
|
|
| bool has_brightness;
|
| double brightness;
|
| @@ -76,14 +86,22 @@ struct PhotoSettings {
|
| double saturation;
|
| bool has_sharpness;
|
| double sharpness;
|
| +
|
| bool has_zoom;
|
| double zoom;
|
| +
|
| + bool has_torch;
|
| + bool torch;
|
| +
|
| + // https://w3c.github.io/mediacapture-image/##photosettings-section
|
| + bool has_fill_light_mode;
|
| + FillLightMode fill_light_mode;
|
| bool has_width;
|
| double width;
|
| bool has_height;
|
| double height;
|
| - bool has_fill_light_mode;
|
| - FillLightMode fill_light_mode;
|
| + bool has_red_eye_reduction;
|
| + bool red_eye_reduction;
|
| };
|
|
|
| // This is a mojo move-only equivalent of a Blob, i.e. MIME type and Data.
|
|
|