Chromium Code Reviews| Index: media/base/demuxer_stream_provider.h |
| diff --git a/media/base/demuxer_stream_provider.h b/media/base/demuxer_stream_provider.h |
| index e5289f3da45f8201879a873faa54b88e288c8277..ab4698f82a4d39eb5985a5261c58fc793c45e2b3 100644 |
| --- a/media/base/demuxer_stream_provider.h |
| +++ b/media/base/demuxer_stream_provider.h |
| @@ -8,9 +8,23 @@ |
| #include "base/macros.h" |
| #include "media/base/demuxer_stream.h" |
| #include "media/base/media_export.h" |
| +#include "url/gurl.h" |
| namespace media { |
| +// Interface that defines how to retrieve "media sources" in DemuxerStream form |
| +// (for most cases) or URL form (for the MediaPlayerRenderer case). |
| +// |
| +// The sub-classes do not stricly provide demuxer streams, but because all |
| +// sub-classes are for the moment Demuxers, this class has not been renamed to |
| +// "MediaProvider". This interface would be a good candidate for renaming, if |
| +// ever Pipeline were to use this interface directly, instead of the Demuxer |
| +// interface. |
| +// |
| +// The derived classes must return a non-null value for either of the getter |
| +// methods, and return a null value for the other. |
| +// Ex: A Demuxer should return the DemuxerStreams it supports, but return a |
| +// empty URL. |
| class MEDIA_EXPORT DemuxerStreamProvider { |
| public: |
| DemuxerStreamProvider(); |
| @@ -18,8 +32,14 @@ class MEDIA_EXPORT DemuxerStreamProvider { |
|
DaleCurtis
2016/06/24 00:42:30
Should we have a type() or something that says whi
tguilbert
2016/06/24 03:13:20
This sounds good to me.
However, I have been flip
|
| // Returns the first stream of the given stream type (which is not allowed |
| // to be DemuxerStream::TEXT), or NULL if that type of stream is not present. |
| + // Returns a null value if we are using a URL instead. |
| virtual DemuxerStream* GetStream(DemuxerStream::Type type) = 0; |
|
DaleCurtis
2016/06/24 00:42:30
Did you consider implementing DemuxerStream instea
tguilbert
2016/06/24 03:13:20
I did, and that is how I originally implemented it
|
| + // Returns the URL of the media to play. To be used when DemuxerStreams are |
| + // not relevant (e.g. in the MediaPlayerRender case). |
| + // Returns nullptr if we are using DemuxerStreams instead. |
| + virtual GURL* GetUrl() = 0; |
|
DaleCurtis
2016/06/24 00:42:30
I think this is gnarly enough that we should make
tguilbert
2016/06/24 03:13:20
I am fine with this if you are.
|
| + |
| private: |
| DISALLOW_COPY_AND_ASSIGN(DemuxerStreamProvider); |
| }; |