| Index: content/common/video_capture.mojom
|
| diff --git a/content/common/video_capture.mojom b/content/common/video_capture.mojom
|
| index bd89d463b02d5fd46f4855f214520c7a6a722779..7179248dacf494420bf73d79a3757f0a555946d5 100644
|
| --- a/content/common/video_capture.mojom
|
| +++ b/content/common/video_capture.mojom
|
| @@ -4,6 +4,7 @@
|
|
|
| module content.mojom;
|
|
|
| +import "gpu/ipc/common/sync_token.mojom";
|
| import "services/video_capture/public/interfaces/video_capture_device_proxy.mojom";
|
| import "services/video_capture/public/interfaces/video_capture_format.mojom";
|
|
|
| @@ -13,12 +14,30 @@ struct VideoCaptureParams {
|
| video_capture.mojom.PowerLineFrequency power_line_frequency;
|
| };
|
|
|
| -interface VideoCaptureHost {
|
| - // TODO(mcasas): Migrate the rest of the messages, https://crbug.com/651897.
|
| +enum VideoCaptureState {
|
| + STARTED,
|
| + PAUSED,
|
| + RESUMED,
|
| + STOPPED,
|
| + FAILED,
|
| + ENDED,
|
| +};
|
|
|
| +// Interface for notifications from Browser/Host back to Renderer/Client. This
|
| +// interface is used between VideoCaptureHost.Start() and Stop().
|
| +interface VideoCaptureObserver {
|
| + // Gets notigied about a VideoCaptureState update.
|
| + OnStateChanged(VideoCaptureState state);
|
| +
|
| +// TODO(mcasas): Migrate the rest of the messages, https://crbug.com/651897.
|
| +};
|
| +
|
| +interface VideoCaptureHost {
|
| // Start the |session_id| session with |params|. The video capture will be
|
| // identified as |device_id|, a new id picked by the renderer process.
|
| - Start(int32 device_id, int32 session_id, VideoCaptureParams params);
|
| + // |observer| will be used for notifications.
|
| + Start(int32 device_id, int32 session_id, VideoCaptureParams params,
|
| + VideoCaptureObserver observer);
|
|
|
| // Closes the video capture specified by |device_id|.
|
| Stop(int32 device_id);
|
| @@ -33,6 +52,11 @@ interface VideoCaptureHost {
|
| // picture loss or quality issues).
|
| RequestRefreshFrame(int32 device_id);
|
|
|
| + // Indicates that a renderer has finished using a previously shared buffer.
|
| + ReleaseBuffer(int32 device_id, int32 buffer_id,
|
| + gpu.mojom.SyncToken sync_token,
|
| + double consumer_resource_utilization);
|
| +
|
| // Get the formats supported by a device referenced by |session_id|.
|
| GetDeviceSupportedFormats(int32 device_id, int32 session_id)
|
| => (array<video_capture.mojom.VideoCaptureFormat> formats_supported);
|
|
|