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

Unified Diff: media/filters/chunk_demuxer.h

Issue 2050043002: Generate and assign media track ids in demuxers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use-streamparser-trackid
Patch Set: rebase to ToT Created 4 years, 6 months 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/blink/websourcebuffer_impl.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « media/blink/websourcebuffer_impl.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698