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

Unified Diff: media/filters/chunk_demuxer.h

Issue 10829108: Cap sourceBuffered() on duration and truncate duration on EoS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase ToT 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
« no previous file with comments | « media/base/ranges.h ('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 fb53bca5596dc83392bb362a440151f4376f21be..fe8e671fddb47a4796c3bad3750427e2ba7a6eba 100644
--- a/media/filters/chunk_demuxer.h
+++ b/media/filters/chunk_demuxer.h
@@ -143,9 +143,16 @@ class MEDIA_EXPORT ChunkDemuxer : public Demuxer {
const StreamParser::BufferQueue& buffers,
const scoped_refptr<ChunkDemuxerStream>& stream);
+ // Decreases |duration_| if the buffered region is less than |duration_| when
+ // EndOfStream() is called.
+ void DecreaseDurationIfNecessary();
+
// Sets |duration_| to |new_duration| and notifies |host_|.
void UpdateDuration(base::TimeDelta new_duration);
+ // Returns the ranges representing the buffered data in the demuxer.
+ Ranges<base::TimeDelta> GetBufferedRanges() const;
+
mutable base::Lock lock_;
State state_;
« no previous file with comments | « media/base/ranges.h ('k') | media/filters/chunk_demuxer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698