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

Unified Diff: media/mojo/interfaces/demuxer_stream.mojom

Issue 981423002: Remove mojo::DemuxerStreamObserver. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | media/mojo/services/mojo_demuxer_stream_adapter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/interfaces/demuxer_stream.mojom
diff --git a/media/mojo/interfaces/demuxer_stream.mojom b/media/mojo/interfaces/demuxer_stream.mojom
index d1af859724abca5f24656352b56ca39b6268391e..24386964d3e5f6324a60401b807617a35fa5b6c7 100644
--- a/media/mojo/interfaces/demuxer_stream.mojom
+++ b/media/mojo/interfaces/demuxer_stream.mojom
@@ -25,35 +25,32 @@ interface DemuxerStream {
CONFIG_CHANGED,
};
- // Tells the DemuxerStream which DemuxerStreamObserver to interact with. Must
- // be called before any other methods. Upon receipt of the callback, clients
- // may call DemuxerStream::Read() to request buffers. The returned |pipe| will
- // be used to fill out the data section of the media::DecoderBuffer returned
- // via DemuxerStream::Read().
- Initialize(DemuxerStreamObserver observer)
- => (handle<data_pipe_consumer> pipe);
-
- // Request a MediaDecoderBuffer from this stream for decoding and rendering.
- // See media::DemuxerStream::ReadCB for an explanation of the fields.
+ // Initializes the DemuxerStream. Read() can only be called after the callback
+ // is received. The returned |pipe| will be used to fill out the data section
+ // of the media::DecoderBuffer returned via DemuxerStream::Read(). Only the
+ // config for |type| should be non-null, which is the initial config of the
+ // stream.
+ Initialize() => (Type type,
+ handle<data_pipe_consumer> pipe,
+ AudioDecoderConfig? audio_config,
+ VideoDecoderConfig? video_config);
+
+ // Requests a MediaDecoderBuffer from this stream for decoding and rendering.
+ // See media::DemuxerStream::ReadCB for a general explanation of the fields.
//
- // Upon receipt of the callback, clients must fill out the data section of
- // the returned media::DecoderBuffer by reading from the |pipe| provided
- // during Initialize().
+ // Notes on the callback:
+ // - If |status| is OK, |buffer| should be non-null and clients must fill out
+ // the data section of the returned media::DecoderBuffer by reading from
+ // the |pipe| provided during Initialize().
+ // - If |status| is ABORTED, all other fields should be null.
+ // - If |status| is CONFIG_CHANGED, the config for the stream type should be
+ // non-null.
//
// TODO(dalecurtis): Remove this method in favor of serializing everything
// into the DataPipe given to Initialize() once DataPipe supports framed data
// in a nicer fashion.
- Read() => (Status status, MediaDecoderBuffer? buffer);
-};
-
-interface DemuxerStreamObserver {
- // A new AudioDecoderConfig is available. Will be sent by the DemuxerStream
- // whenever a DemuxerStream::STATUS_CONFIG_CHANGED is observed (either
- // in a Read() callback or over the DataPipe).
- OnAudioDecoderConfigChanged(AudioDecoderConfig config);
-
- // A new VideoDecoderConfig is available. Will be sent by the DemuxerStream
- // whenever a DemuxerStream::STATUS_CONFIG_CHANGED is observed (either
- // in a Read() callback or over the DataPipe).
- OnVideoDecoderConfigChanged(VideoDecoderConfig config);
+ Read() => (Status status,
+ MediaDecoderBuffer? buffer,
+ AudioDecoderConfig? audio_config,
+ VideoDecoderConfig? video_config);
};
« no previous file with comments | « no previous file | media/mojo/services/mojo_demuxer_stream_adapter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698