| Index: media/filters/chunk_demuxer.h
|
| diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h
|
| index be0f9dbc38be5283202b297eb17167414d6be383..a27222ac3d34d003d3e33d86dd12bebbf21b901c 100644
|
| --- a/media/filters/chunk_demuxer.h
|
| +++ b/media/filters/chunk_demuxer.h
|
| @@ -19,6 +19,7 @@
|
| #include "media/base/byte_queue.h"
|
| #include "media/base/demuxer.h"
|
| #include "media/base/demuxer_stream.h"
|
| +#include "media/base/media_tracks.h"
|
| #include "media/base/ranges.h"
|
| #include "media/base/stream_parser.h"
|
| #include "media/filters/media_source_state.h"
|
| @@ -208,6 +209,15 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
|
| void SetTracksWatcher(const std::string& id,
|
| const MediaTracksUpdatedCB& tracks_updated_cb);
|
|
|
| + // Notifies the demuxer that track ids has been assigned to a media tracks.
|
| + void OnTrackIdsAssigned(const MediaTracks& tracks,
|
| + const std::vector<unsigned>& track_ids) override;
|
| +
|
| + // Finds a DemuxerStream corresponding to the given blink |track_id|. Note
|
| + // that the input track id is blink track id and not bytestream track id.
|
| + const DemuxerStream* GetDemuxerStreamByTrackId(
|
| + unsigned track_id) const override;
|
| +
|
| // Removed an ID & associated resources that were previously added with
|
| // AddId().
|
| void RemoveId(const std::string& id);
|
| @@ -318,10 +328,10 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
|
| // MediaSourceState callbacks.
|
| void OnSourceInitDone(const StreamParser::InitParameters& params);
|
|
|
| - // Creates a DemuxerStream for the specified |type|.
|
| - // Returns a new ChunkDemuxerStream instance if a stream of this type
|
| + // Creates a DemuxerStream for the specified |media_track|.
|
| + // Returns a new ChunkDemuxerStream instance if a stream of this track's type
|
| // has not been created before. Returns NULL otherwise.
|
| - ChunkDemuxerStream* CreateDemuxerStream(DemuxerStream::Type type);
|
| + ChunkDemuxerStream* CreateDemuxerStream(const MediaTrack& media_track);
|
|
|
| void OnNewTextTrack(ChunkDemuxerStream* text_stream,
|
| const TextTrackConfig& config);
|
| @@ -385,6 +395,8 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
|
| // Incremented in AddId(), decremented in OnSourceInitDone().
|
| int pending_source_init_done_count_;
|
|
|
| + MediaTracks::TrackIdToDemuxStreamMap track_id_to_demux_stream_;
|
| +
|
| base::TimeDelta duration_;
|
|
|
| // The duration passed to the last SetDuration(). If
|
|
|