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

Unified Diff: mojo/services/media/common/interfaces/media_pipe.mojom

Issue 1694963002: Change who allocated the MediaPipe's shared buffer. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Fix android trybots Created 4 years, 10 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
Index: mojo/services/media/common/interfaces/media_pipe.mojom
diff --git a/mojo/services/media/common/interfaces/media_pipe.mojom b/mojo/services/media/common/interfaces/media_pipe.mojom
index ca5e400ef54bef9563b52f70b89ed4fe99fc59a6..7efbd2fd7a6851d9df2474c3e99f52d1525f7ab5 100644
--- a/mojo/services/media/common/interfaces/media_pipe.mojom
+++ b/mojo/services/media/common/interfaces/media_pipe.mojom
@@ -61,25 +61,6 @@ struct MediaPacket {
// packet?
};
-// MediaPipeState
-//
-// A small structure used by the user of a media pipe to fetch the shared buffer
-// used by the media pipe to move bulk data.
-//
-// TODO(johngro): Right now, the only real purpose for this struture is to
-// bundle the size of the buffer with the buffer handle itself. When buffer
-// handles can have their properties queried directly, it can go away. See
-// domokit/mojo issue #501
-struct MediaPipeState {
- const uint64 kMaxPayloadLen = 0x3FFFFFFFFFFFFFFF;
-
- handle<shared_buffer> payload_buffer;
-
- // TODO(johngro) : Why do I have to send this? Why can't I just query the
- // shared_buffer handle for its length?
- uint64 payload_buffer_len;
-};
-
// MediaPipe
//
// An interface exposed by consumers of media which provides the means for
@@ -90,6 +71,8 @@ struct MediaPipeState {
// the media has been consumed via the SendPacket callback they provide.
// Finally, the pipeline may be flushed using the Flush method.
interface MediaPipe {
+ const uint64 kMaxBufferLen = 0x3FFFFFFFFFFFFFFF;
+
// An enumeration used to indicate the ultimate fate of packets sent across
// the pipe using the SendPacket method.
enum SendResult {
@@ -97,9 +80,8 @@ interface MediaPipe {
FLUSHED, // Some or all of the media was flushed before being consumed.
};
- // Request that a reference to the pipe's state be sent to the caller via
- // callback.
- GetState() => (MediaPipeState state);
+ // Sets the shared buffer in which sent Packet payloads will be located.
+ SetBuffer(handle<shared_buffer> buffer, uint64 size);
// Place a media packet into the pipeline to be consumed. When the consumer
// is finished with the packet, it will invoke the supplied callback to
« no previous file with comments | « mojo/services/media/common/cpp/circular_buffer_media_pipe_adapter.cc ('k') | services/media/audio/audio_track_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698