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

Unified Diff: media/filters/source_buffer_range.h

Issue 1018373003: Improving WebM video duration estimation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing try failure, remove unused variable for some builds. Created 5 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
« no previous file with comments | « media/base/stream_parser_buffer.cc ('k') | media/filters/source_buffer_range.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/source_buffer_range.h
diff --git a/media/filters/source_buffer_range.h b/media/filters/source_buffer_range.h
index 94917436c26479c30bbe55d5893081b9ee167923..0c6a8b36f343ef9da993a854d1963d0e59840343 100644
--- a/media/filters/source_buffer_range.h
+++ b/media/filters/source_buffer_range.h
@@ -206,6 +206,12 @@ class SourceBufferRange {
private:
typedef std::map<DecodeTimestamp, int> KeyframeMap;
+ // Called during AppendBuffersToEnd to adjust estimated duration at the
+ // end of the last append to match the delta in timestamps between
+ // the last append and the upcoming append. This is a workaround for
+ // WebM media where a duration is not always specified.
+ void AdjustEstimatedDurationForNewAppend(const BufferQueue& new_buffers);
+
// Seeks the range to the next keyframe after |timestamp|. If
// |skip_given_timestamp| is true, the seek will go to a keyframe with a
// timestamp strictly greater than |timestamp|.
@@ -225,7 +231,7 @@ class SourceBufferRange {
// Returns an iterator in |keyframe_map_| pointing to the first keyframe
// before or at |timestamp|.
- KeyframeMap::iterator GetFirstKeyframeBefore(DecodeTimestamp timestamp);
+ KeyframeMap::iterator GetFirstKeyframeAtOrBefore(DecodeTimestamp timestamp);
// Helper method to delete buffers in |buffers_| starting at
// |starting_point|, an iterator in |buffers_|.
« no previous file with comments | « media/base/stream_parser_buffer.cc ('k') | media/filters/source_buffer_range.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698