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

Unified Diff: media/filters/chunk_demuxer.h

Issue 10800041: Update media duration if data is appended after the previous duration (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 5 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 773f1d52a6b5b18fef7237f561d7f6603334ab08..fb53bca5596dc83392bb362a440151f4376f21be 100644
--- a/media/filters/chunk_demuxer.h
+++ b/media/filters/chunk_demuxer.h
@@ -136,6 +136,16 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
// Returns true if |source_id| is valid, false otherwise.
bool IsValidId(const std::string& source_id) const;
+ // Increases |duration_| if the newly appended |buffers| exceed the current
+ // |duration_|. The |duration_| is set to the end buffered timestamp of
+ // |stream|.
+ void IncreaseDurationIfNecessary(
+ const StreamParser::BufferQueue& buffers,
+ const scoped_refptr<ChunkDemuxerStream>& stream);
+
+ // Sets |duration_| to |new_duration| and notifies |host_|.
+ void UpdateDuration(base::TimeDelta new_duration);
+
mutable base::Lock lock_;
State state_;

Powered by Google App Engine
This is Rietveld 408576698