Index: media/filters/chunk_demuxer.h |
diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h |
index be0f9dbc38be5283202b297eb17167414d6be383..9dfc1ecb0c0a1bed5d8f498ec85a3d1eb71b9383 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" |
@@ -32,7 +33,9 @@ class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream { |
public: |
typedef std::deque<scoped_refptr<StreamParserBuffer> > BufferQueue; |
- ChunkDemuxerStream(Type type, bool splice_frames_enabled); |
+ ChunkDemuxerStream(Type type, |
+ bool splice_frames_enabled, |
+ MediaTrack::Id media_track_id); |
~ChunkDemuxerStream() override; |
// ChunkDemuxerStream control methods. |
@@ -118,6 +121,8 @@ class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream { |
void SetLiveness(Liveness liveness); |
+ MediaTrack::Id media_track_id() const { return media_track_id_; } |
+ |
private: |
enum State { |
UNINITIALIZED, |
@@ -138,6 +143,8 @@ class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream { |
std::unique_ptr<SourceBufferStream> stream_; |
+ const MediaTrack::Id media_track_id_; |
+ |
mutable base::Lock lock_; |
State state_; |
ReadCB read_cb_; |
@@ -355,6 +362,9 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer { |
// Seeks all SourceBufferStreams to |seek_time|. |
void SeekAllSources(base::TimeDelta seek_time); |
+ // Generates and returns a unique media track id. |
+ static MediaTrack::Id GenerateMediaTrackId(); |
+ |
// Shuts down all DemuxerStreams by calling Shutdown() on |
// all objects in |source_state_map_|. |
void ShutdownAllStreams(); |