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

Unified Diff: media/filters/ffmpeg_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/filters/chunk_demuxer_unittest.cc ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/ffmpeg_demuxer.h
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
index b89196d4a940866fe551a193ceb2aeea51550f51..73aded71b40d19fd48765c24bcce1157b853f944 100644
--- a/media/filters/ffmpeg_demuxer.h
+++ b/media/filters/ffmpeg_demuxer.h
@@ -25,6 +25,7 @@
#include <stddef.h>
#include <stdint.h>
+#include <map>
#include <string>
#include <utility>
#include <vector>
@@ -38,6 +39,7 @@
#include "media/base/decoder_buffer.h"
#include "media/base/decoder_buffer_queue.h"
#include "media/base/demuxer.h"
+#include "media/base/media_tracks.h"
#include "media/base/pipeline_status.h"
#include "media/base/text_track_config.h"
#include "media/base/video_decoder_config.h"
@@ -223,6 +225,15 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer {
// timeline.
base::TimeDelta start_time() const { return start_time_; }
+ // 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;
+
private:
// To allow tests access to privates.
friend class FFmpegDemuxerTest;
@@ -334,6 +345,8 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer {
const MediaTracksUpdatedCB media_tracks_updated_cb_;
+ MediaTracks::TrackIdToDemuxStreamMap track_id_to_demux_stream_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<FFmpegDemuxer> weak_factory_;
« no previous file with comments | « media/filters/chunk_demuxer_unittest.cc ('k') | media/filters/ffmpeg_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698