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

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

Issue 2124363003: ImageCapture: Implement focus mode for Android and Fake Video Capture Devices (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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://w3c.github.io/mediacapture-image/#mediasettingsrange 9 // https://w3c.github.io/mediacapture-image/#mediasettingsrange
10 struct Range { 10 struct Range {
11 uint32 max; 11 uint32 max;
12 uint32 min; 12 uint32 min;
13 uint32 current; 13 uint32 current;
14 }; 14 };
15 15
16 enum FocusMode { UNAVAILABLE, AUTO, MANUAL };
17
16 // Equivalent to idl PhotoCapabilities, 18 // Equivalent to idl PhotoCapabilities,
17 // https://w3c.github.io/mediacapture-image/#photocapabilities 19 // https://w3c.github.io/mediacapture-image/#photocapabilities
18 struct PhotoCapabilities { 20 struct PhotoCapabilities {
19 Range zoom; 21 Range zoom;
22 FocusMode focus_mode;
20 }; 23 };
21 24
22 // Equivalent to idl PhotoSettings, 25 // Equivalent to idl PhotoSettings,
23 // https://w3c.github.io/mediacapture-image/index.html#photosettings 26 // https://w3c.github.io/mediacapture-image/index.html#photosettings
24 struct PhotoSettings { 27 struct PhotoSettings {
25 // uint32 cannot be nullable, i.e. uint32? does not work, use instead a flag. 28 // uint32 cannot be nullable, i.e. uint32? does not work, use instead a flag.
26 bool has_zoom; 29 bool has_zoom;
27 uint32 zoom; 30 uint32 zoom;
28 }; 31 };
29 32
30 // |source_id| is the renderer-side UUID identifier of the image capture device. 33 // |source_id| is the renderer-side UUID identifier of the image capture device.
31 interface ImageCapture 34 interface ImageCapture
32 { 35 {
33 // Retrieves the image capture device capabilities and current settings. 36 // Retrieves the image capture device capabilities and current settings.
34 // https://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-get PhotoCapabilities-Promise-PhotoCapabilities 37 // https://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-get PhotoCapabilities-Promise-PhotoCapabilities
35 GetCapabilities(string source_id) 38 GetCapabilities(string source_id)
36 => (PhotoCapabilities capabilities); 39 => (PhotoCapabilities capabilities);
37 40
38 // Sets the |settings| on the associated video capture device. 41 // Sets the |settings| on the associated video capture device.
39 // https://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-set Options-Promise-void--PhotoSettings-photoSettings 42 // https://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-set Options-Promise-void--PhotoSettings-photoSettings
40 SetOptions(string source_id, PhotoSettings settings) 43 SetOptions(string source_id, PhotoSettings settings)
41 => (bool success); 44 => (bool success);
42 45
43 // Takes a Photo from the given |source_id|, returning it encoded in |data| 46 // Takes a Photo from the given |source_id|, returning it encoded in |data|
44 // with the format specified in |mime_type|. 47 // with the format specified in |mime_type|.
45 // https://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-tak ePhoto-Promise-Blob 48 // https://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-tak ePhoto-Promise-Blob
46 TakePhoto(string source_id) 49 TakePhoto(string source_id)
47 => (string mime_type, array<uint8> data); 50 => (string mime_type, array<uint8> data);
48 }; 51 };
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698