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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 2199913002: Notify demux stream clients when a stream is disabled. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Don't pass DemuxerStream into the status callback Created 4 years, 4 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.h ('k') | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/chunk_demuxer.cc
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index 31f3de143316a2699938256f6ce6a044197db188..526cafee5e7b244a8a3dc5f0c5d342a0eca7ad72 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -300,18 +300,19 @@ void ChunkDemuxerStream::set_enabled(bool enabled, base::TimeDelta timestamp) {
if (enabled) {
DCHECK(stream_);
stream_->Seek(timestamp);
- if (!stream_restarted_cb_.is_null())
- stream_restarted_cb_.Run(this, timestamp);
} else if (!read_cb_.is_null()) {
DVLOG(1) << "Read from disabled stream, returning EOS";
base::ResetAndReturn(&read_cb_).Run(kOk,
StreamParserBuffer::CreateEOSBuffer());
}
+ if (!stream_status_change_cb_.is_null())
+ stream_status_change_cb_.Run(is_enabled_, timestamp);
}
-void ChunkDemuxerStream::SetStreamRestartedCB(const StreamRestartedCB& cb) {
+void ChunkDemuxerStream::SetStreamStatusChangeCB(
+ const StreamStatusChangeCB& cb) {
DCHECK(!cb.is_null());
- stream_restarted_cb_ = BindToCurrentLoop(cb);
+ stream_status_change_cb_ = BindToCurrentLoop(cb);
}
TextTrackConfig ChunkDemuxerStream::text_track_config() {
« no previous file with comments | « media/filters/chunk_demuxer.h ('k') | media/filters/chunk_demuxer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698