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

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: Adding limited media log (10 times max) for WebM duration estimates. Created 5 years, 9 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/source_buffer_range.h
diff --git a/media/filters/source_buffer_range.h b/media/filters/source_buffer_range.h
index 24f88fb10ac286e233f644041a731aeb76774d97..a00cee54a0ec91ed26392671ca9de5e79711f9e3 100644
--- a/media/filters/source_buffer_range.h
+++ b/media/filters/source_buffer_range.h
@@ -207,6 +207,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|.
@@ -226,7 +232,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_|.

Powered by Google App Engine
This is Rietveld 408576698