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

Unified Diff: media/filters/chunk_demuxer.h

Issue 1935873002: Implement disabling and enabling media tracks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@track-control2
Patch Set: Check track ids via track_id_to_demux_stream_map_ 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
Index: media/filters/chunk_demuxer.h
diff --git a/media/filters/chunk_demuxer.h b/media/filters/chunk_demuxer.h
index 8893b01b07a3dff19e917f13d2b0186dd4850a23..1a667d92b1f6ba660535dbd67d02713a54e9e74c 100644
--- a/media/filters/chunk_demuxer.h
+++ b/media/filters/chunk_demuxer.h
@@ -107,6 +107,9 @@ class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream {
VideoDecoderConfig video_decoder_config() override;
bool SupportsConfigChanges() override;
VideoRotation video_rotation() override;
+ bool enabled() const override;
+ void set_enabled(bool enabled, base::TimeDelta timestamp) override;
+ void SetStreamRestartedCB(const StreamRestartedCB& cb) override;
// Returns the text track configuration. It is an error to call this method
// if type() != TEXT.
@@ -150,6 +153,8 @@ class MEDIA_EXPORT ChunkDemuxerStream : public DemuxerStream {
ReadCB read_cb_;
bool splice_frames_enabled_;
bool partial_append_window_trimming_enabled_;
+ bool is_enabled_;
+ StreamRestartedCB stream_restarted_cb_;
DISALLOW_IMPLICIT_CONSTRUCTORS(ChunkDemuxerStream);
};
@@ -222,6 +227,12 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
// Gets the currently buffered ranges for the specified ID.
Ranges<base::TimeDelta> GetBufferedRanges(const std::string& id) const;
+ void OnEnabledAudioTracksChanged(const std::vector<MediaTrack::Id>& track_ids,
+ base::TimeDelta currTime) override;
+ // |track_ids| is either empty or contains a single video track id.
+ void OnSelectedVideoTrackChanged(const std::vector<MediaTrack::Id>& track_ids,
+ base::TimeDelta currTime) override;
+
// Appends media data to the source buffer associated with |id|, applying
// and possibly updating |*timestamp_offset| during coded frame processing.
// |append_window_start| and |append_window_end| correspond to the MSE spec's
@@ -425,6 +436,8 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
int detected_video_track_count_;
int detected_text_track_count_;
+ std::map<MediaTrack::Id, const DemuxerStream*> track_id_to_demux_stream_map_;
+
DISALLOW_COPY_AND_ASSIGN(ChunkDemuxer);
};

Powered by Google App Engine
This is Rietveld 408576698