| OLD | NEW |
| 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 content.mojom; | 5 module content.mojom; |
| 6 | 6 |
| 7 import "gpu/ipc/common/sync_token.mojom"; | 7 import "gpu/ipc/common/sync_token.mojom"; |
| 8 import "media/mojo/interfaces/media_types.mojom"; | 8 import "media/mojo/interfaces/media_types.mojom"; |
| 9 import "mojo/common/common_custom_types.mojom"; | 9 import "mojo/common/common_custom_types.mojom"; |
| 10 import "services/video_capture/public/interfaces/video_capture_device_proxy.mojo
m"; | |
| 11 import "services/video_capture/public/interfaces/video_capture_format.mojom"; | |
| 12 import "ui/gfx/geometry/mojo/geometry.mojom"; | 10 import "ui/gfx/geometry/mojo/geometry.mojom"; |
| 13 | 11 |
| 14 struct VideoCaptureParams { | |
| 15 video_capture.mojom.VideoCaptureFormat requested_format; | |
| 16 video_capture.mojom.ResolutionChangePolicy resolution_change_policy; | |
| 17 video_capture.mojom.PowerLineFrequency power_line_frequency; | |
| 18 }; | |
| 19 | |
| 20 struct VideoFrameInfo{ | 12 struct VideoFrameInfo{ |
| 21 mojo.common.mojom.TimeDelta timestamp; | 13 mojo.common.mojom.TimeDelta timestamp; |
| 22 mojo.common.mojom.DictionaryValue metadata; | 14 mojo.common.mojom.DictionaryValue metadata; |
| 23 media.mojom.VideoFormat pixel_format; | 15 media.mojom.VideoFormat pixel_format; |
| 24 video_capture.mojom.VideoPixelStorage storage_type; | 16 media.mojom.VideoPixelStorage storage_type; |
| 25 gfx.mojom.Size coded_size; | 17 gfx.mojom.Size coded_size; |
| 26 gfx.mojom.Rect visible_rect; | 18 gfx.mojom.Rect visible_rect; |
| 27 }; | 19 }; |
| 28 | 20 |
| 29 enum VideoCaptureState { | 21 enum VideoCaptureState { |
| 30 STARTED, | 22 STARTED, |
| 31 PAUSED, | 23 PAUSED, |
| 32 RESUMED, | 24 RESUMED, |
| 33 STOPPED, | 25 STOPPED, |
| 34 FAILED, | 26 FAILED, |
| (...skipping 13 matching lines...) Expand all Loading... |
| 48 // |buffer_id| has been released by VideoCaptureHost and must not be used. | 40 // |buffer_id| has been released by VideoCaptureHost and must not be used. |
| 49 OnBufferDestroyed(int32 buffer_id); | 41 OnBufferDestroyed(int32 buffer_id); |
| 50 | 42 |
| 51 // TODO(mcasas): Migrate the rest of the messages, https://crbug.com/651897. | 43 // TODO(mcasas): Migrate the rest of the messages, https://crbug.com/651897. |
| 52 }; | 44 }; |
| 53 | 45 |
| 54 interface VideoCaptureHost { | 46 interface VideoCaptureHost { |
| 55 // Start the |session_id| session with |params|. The video capture will be | 47 // Start the |session_id| session with |params|. The video capture will be |
| 56 // identified as |device_id|, a new id picked by the renderer process. | 48 // identified as |device_id|, a new id picked by the renderer process. |
| 57 // |observer| will be used for notifications. | 49 // |observer| will be used for notifications. |
| 58 Start(int32 device_id, int32 session_id, VideoCaptureParams params, | 50 Start(int32 device_id, int32 session_id, media.mojom.VideoCaptureParams params
, |
| 59 VideoCaptureObserver observer); | 51 VideoCaptureObserver observer); |
| 60 | 52 |
| 61 // Closes the video capture specified by |device_id|. | 53 // Closes the video capture specified by |device_id|. |
| 62 Stop(int32 device_id); | 54 Stop(int32 device_id); |
| 63 | 55 |
| 64 // Pauses the video capture specified by |device_id|. | 56 // Pauses the video capture specified by |device_id|. |
| 65 Pause(int32 device_id); | 57 Pause(int32 device_id); |
| 66 | 58 |
| 67 // Resume |device_id| video capture, in |session_id| and with |params|. | 59 // Resume |device_id| video capture, in |session_id| and with |params|. |
| 68 Resume(int32 device_id, int32 session_id, VideoCaptureParams params); | 60 Resume(int32 device_id, int32 session_id, media.mojom.VideoCaptureParams param
s); |
| 69 | 61 |
| 70 // Requests that the video capturer send a frame "soon" (e.g., to resolve | 62 // Requests that the video capturer send a frame "soon" (e.g., to resolve |
| 71 // picture loss or quality issues). | 63 // picture loss or quality issues). |
| 72 RequestRefreshFrame(int32 device_id); | 64 RequestRefreshFrame(int32 device_id); |
| 73 | 65 |
| 74 // Indicates that a renderer has finished using a previously shared buffer. | 66 // Indicates that a renderer has finished using a previously shared buffer. |
| 75 ReleaseBuffer(int32 device_id, int32 buffer_id, | 67 ReleaseBuffer(int32 device_id, int32 buffer_id, |
| 76 gpu.mojom.SyncToken sync_token, | 68 gpu.mojom.SyncToken sync_token, |
| 77 double consumer_resource_utilization); | 69 double consumer_resource_utilization); |
| 78 | 70 |
| 79 // Get the formats supported by a device referenced by |session_id|. | 71 // Get the formats supported by a device referenced by |session_id|. |
| 80 GetDeviceSupportedFormats(int32 device_id, int32 session_id) | 72 GetDeviceSupportedFormats(int32 device_id, int32 session_id) |
| 81 => (array<video_capture.mojom.VideoCaptureFormat> formats_supported); | 73 => (array<media.mojom.VideoCaptureFormat> formats_supported); |
| 82 | 74 |
| 83 // Get the format(s) in use by a device referenced by |session_id|. | 75 // Get the format(s) in use by a device referenced by |session_id|. |
| 84 GetDeviceFormatsInUse(int32 device_id, int32 session_id) | 76 GetDeviceFormatsInUse(int32 device_id, int32 session_id) |
| 85 => (array<video_capture.mojom.VideoCaptureFormat> formats_in_use); | 77 => (array<media.mojom.VideoCaptureFormat> formats_in_use); |
| 86 }; | 78 }; |
| OLD | NEW |