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

Side by Side Diff: media/mojo/interfaces/demuxer_stream.mojom

Issue 760523008: Switch from a DataPipe per DecoderBuffer to a single one. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Comments. Created 6 years 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 unified diff | Download patch
« no previous file with comments | « media/base/decoder_buffer.cc ('k') | media/mojo/interfaces/media_types.mojom » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 mojo; 5 module mojo;
6 6
7 import "media/mojo/interfaces/media_types.mojom"; 7 import "media/mojo/interfaces/media_types.mojom";
8 8
9 // DemuxerStream is modeled after media::DemuxerStream using mojo in order to 9 // DemuxerStream is modeled after media::DemuxerStream using mojo in order to
10 // enable proxying between a media::Pipeline and media::Renderer living in two 10 // enable proxying between a media::Pipeline and media::Renderer living in two
(...skipping 12 matching lines...) Expand all
23 enum Status { 23 enum Status {
24 OK = 0, 24 OK = 0,
25 ABORTED, 25 ABORTED,
26 CONFIG_CHANGED, 26 CONFIG_CHANGED,
27 }; 27 };
28 28
29 // Request a MediaDecoderBuffer from this stream for decoding and rendering. 29 // Request a MediaDecoderBuffer from this stream for decoding and rendering.
30 // When available, the callback will be invoked with a Status and |response| 30 // When available, the callback will be invoked with a Status and |response|
31 // buffer. See media::DemuxerStream::ReadCB for explanation of fields. 31 // buffer. See media::DemuxerStream::ReadCB for explanation of fields.
32 // 32 //
33 // TODO(tim): Remove this method in favor of initializing the 33 // Upon receipt of the callback, clients must fill out the data section of
34 // DemuxerStreamClient with a DataPipeConsumerHandle once we have a framed 34 // the returned media::DecoderBuffer by reading from the |pipe| provided
35 // DataPipe that we can serialize [|status| | response|]* over directly. 35 // during OnStreamReady().
36 //
37 // TODO(dalecurtis): Remove this method in favor of serializing everything
38 // into the DataPipe given to OnStreamReady() once DataPipe supports framed
39 // data in a nicer fashion.
36 Read() => (Status status, MediaDecoderBuffer response); 40 Read() => (Status status, MediaDecoderBuffer response);
37 }; 41 };
38 42
39 interface DemuxerStreamClient { 43 interface DemuxerStreamClient {
40 // Informs the client that the stream is ready for reading. If |pipe| is 44 // Informs the client that the stream is ready for reading. The client may
41 // present, it means the client should read 45 // then use DemuxerStream::Read() to request buffers. |pipe| will be used to
42 // 46 // fill out the media::DecoderBuffer returned via DemuxerStream::Read().
43 // [ |DemuxerStream::Status| |MediaDecoderBuffer| ] 47 OnStreamReady(handle<data_pipe_consumer> pipe);
44 //
45 // payloads from the DataPipe directly. If |pipe| is NULL, it means the
46 // client needs to use DemuxerStream::Read() directly to obtain buffers.
47 OnStreamReady(handle<data_pipe_consumer>? pipe);
48 48
49 // A new AudioDecoderConfig is available. Will be sent by the DemuxerStream 49 // A new AudioDecoderConfig is available. Will be sent by the DemuxerStream
50 // whenever a DemuxerStream::STATUS_CONFIG_CHANGED is observed (either 50 // whenever a DemuxerStream::STATUS_CONFIG_CHANGED is observed (either
51 // in a Read() callback or over the DataPipe). 51 // in a Read() callback or over the DataPipe).
52 OnAudioDecoderConfigChanged(AudioDecoderConfig config); 52 OnAudioDecoderConfigChanged(AudioDecoderConfig config);
53 53
54 // A new VideoDecoderConfig is available. Will be sent by the DemuxerStream 54 // A new VideoDecoderConfig is available. Will be sent by the DemuxerStream
55 // whenever a DemuxerStream::STATUS_CONFIG_CHANGED is observed (either 55 // whenever a DemuxerStream::STATUS_CONFIG_CHANGED is observed (either
56 // in a Read() callback or over the DataPipe). 56 // in a Read() callback or over the DataPipe).
57 OnVideoDecoderConfigChanged(VideoDecoderConfig config); 57 OnVideoDecoderConfigChanged(VideoDecoderConfig config);
58 }; 58 };
OLDNEW
« no previous file with comments | « media/base/decoder_buffer.cc ('k') | media/mojo/interfaces/media_types.mojom » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698