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

Unified Diff: content/common/video_capture.mojom

Issue 2407623002: VideoCapture: migrate last Renderer-->Host msg and start Host-->Renderer migration (Closed)
Patch Set: chfremer@ comments Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/media/video_capture_messages.h ('k') | content/renderer/media/video_capture_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « content/common/media/video_capture_messages.h ('k') | content/renderer/media/video_capture_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698