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

Unified Diff: media/filters/chunk_demuxer.cc

Issue 231283005: Add live mode detection in WebM MediaSource parser. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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
Index: media/filters/chunk_demuxer.cc
diff --git a/media/filters/chunk_demuxer.cc b/media/filters/chunk_demuxer.cc
index 4bcfe28a55c06be40c42328d376728a61262496d..f476602d613798146566fb20c20a1619d0f5237d 100644
--- a/media/filters/chunk_demuxer.cc
+++ b/media/filters/chunk_demuxer.cc
@@ -975,6 +975,7 @@ ChunkDemuxer::ChunkDemuxer(const base::Closure& open_cb,
log_cb_(log_cb),
duration_(kNoTimestamp()),
user_specified_duration_(-1),
+ live_mode_(false),
splice_frames_enabled_(splice_frames_enabled) {
DCHECK(!open_cb_.is_null());
DCHECK(!need_key_cb_.is_null());
@@ -1065,6 +1066,10 @@ base::Time ChunkDemuxer::GetTimelineOffset() const {
return timeline_offset_;
}
+bool ChunkDemuxer::IsLiveMode() const {
+ return live_mode_;
+}
+
void ChunkDemuxer::StartWaitingForSeek(TimeDelta seek_time) {
DVLOG(1) << "StartWaitingForSeek()";
base::AutoLock auto_lock(lock_);
@@ -1509,6 +1514,8 @@ void ChunkDemuxer::OnSourceInitDone(
timeline_offset_ = params.timeline_offset;
}
+ live_mode_ |= params.live_mode;
acolwell GONE FROM CHROMIUM 2014/04/24 21:14:16 I feel like we should enforce an all the same or e
Sergey Ulanov 2014/04/24 23:17:45 Done.
+
// Wait until all streams have initialized.
if ((!source_id_audio_.empty() && !audio_) ||
(!source_id_video_.empty() && !video_)) {

Powered by Google App Engine
This is Rietveld 408576698