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

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: rebase 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/webmediaplayer_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 a12bba8d4c2c7aaea26fcd74512f03c63ece3fbc..9065829d2ae54d1b28087f09173e3a81f19a5cbf 100644
--- a/media/filters/chunk_demuxer.h
+++ b/media/filters/chunk_demuxer.h
@@ -111,6 +111,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.
@@ -154,6 +157,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);
};
@@ -230,6 +235,12 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
// buffered, returns base::TimeDelta().
base::TimeDelta GetHighestPresentationTimestamp(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
@@ -433,6 +444,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);
};
« no previous file with comments | « media/blink/webmediaplayer_impl.cc ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698