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

Unified Diff: media/filters/chunk_demuxer.h

Issue 1812543003: Allow muting/unmuting audio through media track API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@blink-sb-tracks6
Patch Set: Avoid ChunkDemuxer/PipelineImpl deadlock Created 4 years, 8 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 969afb22239ec0aa4fd240b781064ece24321651..bd08a8e2edd4a38c3dbe8e7c5f3a46ae262a98a7 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|.
+ // Creates a DemuxerStream for the specified |media_track|.
// Returns a new ChunkDemuxerStream instance if a stream of this 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
« 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