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

Unified Diff: media/mojo/services/mojo_demuxer_stream_adapter.h

Issue 684963003: Add support for external video renderers in mojo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@mojo_config
Patch Set: More MSVC... Created 6 years, 1 month 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 | « media/mojo/services/media_type_converters.cc ('k') | media/mojo/services/mojo_demuxer_stream_adapter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/mojo/services/mojo_demuxer_stream_adapter.h
diff --git a/media/mojo/services/mojo_demuxer_stream_adapter.h b/media/mojo/services/mojo_demuxer_stream_adapter.h
index 60b4a387c801d1a38eac1269e31c9553d11a9531..213222afd7d23f3a21c4978e9dac34ff7ef71eff 100644
--- a/media/mojo/services/mojo_demuxer_stream_adapter.h
+++ b/media/mojo/services/mojo_demuxer_stream_adapter.h
@@ -15,11 +15,11 @@
namespace media {
-// This class acts as a MojoRendererService-side stub for a real
-// media::DemuxerStream that is part of a media::Pipeline in a remote
-// application. Roughly speaking, it takes a mojo::DemuxerStreamPtr and exposes
-// it as a media::DemuxerStream for use by media components.
-class MojoDemuxerStreamAdapter : public media::DemuxerStream,
+// This class acts as a MojoRendererService-side stub for a real DemuxerStream
+// that is part of a Pipeline in a remote application. Roughly speaking, it
+// takes a mojo::DemuxerStreamPtr and exposes it as a DemuxerStream for use by
+// media components.
+class MojoDemuxerStreamAdapter : public DemuxerStream,
public mojo::DemuxerStreamClient {
public:
// |demuxer_stream| is connected to the mojo::DemuxerStream that |this| will
@@ -31,7 +31,7 @@ class MojoDemuxerStreamAdapter : public media::DemuxerStream,
const base::Closure& stream_ready_cb);
~MojoDemuxerStreamAdapter() override;
- // media::DemuxerStream implementation.
+ // DemuxerStream implementation.
void Read(const ReadCB& read_cb) override;
AudioDecoderConfig audio_decoder_config() override;
VideoDecoderConfig video_decoder_config() override;
@@ -43,6 +43,7 @@ class MojoDemuxerStreamAdapter : public media::DemuxerStream,
// mojo::DemuxerStreamClient implementation.
void OnStreamReady(mojo::ScopedDataPipeConsumerHandle pipe) override;
void OnAudioDecoderConfigChanged(mojo::AudioDecoderConfigPtr config) override;
+ void OnVideoDecoderConfigChanged(mojo::VideoDecoderConfigPtr config) override;
private:
// The callback from |demuxer_stream_| that a read operation has completed.
@@ -63,7 +64,10 @@ class MojoDemuxerStreamAdapter : public media::DemuxerStream,
// The front of the queue is the current config. We pop when we observe
// DemuxerStatus::CONFIG_CHANGED.
- std::queue<media::AudioDecoderConfig> config_queue_;
+ std::queue<AudioDecoderConfig> audio_config_queue_;
+ std::queue<VideoDecoderConfig> video_config_queue_;
+
+ DemuxerStream::Type type_;
base::WeakPtrFactory<MojoDemuxerStreamAdapter> weak_factory_;
DISALLOW_COPY_AND_ASSIGN(MojoDemuxerStreamAdapter);
« no previous file with comments | « media/mojo/services/media_type_converters.cc ('k') | media/mojo/services/mojo_demuxer_stream_adapter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698