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

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: rebase Created 4 years, 9 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
Index: media/filters/ffmpeg_demuxer.h
diff --git a/media/filters/ffmpeg_demuxer.h b/media/filters/ffmpeg_demuxer.h
index b89196d4a940866fe551a193ceb2aeea51550f51..5dff81188b021fae2a71d475d4bb1b5cddc11645 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>
@@ -223,6 +224,15 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer {
// timeline.
base::TimeDelta start_time() const { return start_time_; }
+ // Notifies the demuxer that a track id has been assigned to a media track.
+ // If |track| is null the association for this |track_id| is removed.
+ void OnTrackIdAssigned(unsigned track_id, const MediaTrack* track) 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 +344,9 @@ class MEDIA_EXPORT FFmpegDemuxer : public Demuxer {
const MediaTracksUpdatedCB media_tracks_updated_cb_;
+ std::map<unsigned, const MediaTrack*> track_id_to_track_map_;
+ std::map<const MediaTrack*, const DemuxerStream*> track_to_stream_map_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<FFmpegDemuxer> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698