OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 module media.mojom; |
| 6 |
| 7 // Equivalent to idl MediaSettingsRange, arbitrary range representing the |
| 8 // allowed variations of a Capability or an Option. |
| 9 // http://w3c.github.io/mediacapture-image/#mediasettingsrange |
| 10 struct Range { |
| 11 uint32 max; |
| 12 uint32 min; |
| 13 uint32 current; |
| 14 }; |
| 15 |
| 16 // Equivalent to idl PhotoCapabilities, |
| 17 // http://w3c.github.io/mediacapture-image/#photocapabilities |
| 18 struct PhotoCapabilities { |
| 19 Range zoom; |
| 20 }; |
| 21 |
| 22 // |source_id| is the renderer-side UUID identifier of the image capture device. |
| 23 interface ImageCapture |
| 24 { |
| 25 // Retrieves the image capture device capabilities and current settings. |
| 26 // http://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-getP
hotoCapabilities-Promise-PhotoCapabilities |
| 27 GetCapabilities(string source_id) |
| 28 => (PhotoCapabilities capabilities); |
| 29 |
| 30 // Takes a Photo from the given |source_id|, returning it encoded in |data| |
| 31 // with the format specified in |mime_type|. |
| 32 // http://w3c.github.io/mediacapture-image/index.html#widl-ImageCapture-take
Photo-Promise-Blob |
| 33 TakePhoto(string source_id) |
| 34 => (string mime_type, array<uint8> data); |
| 35 }; |
OLD | NEW |