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

Unified Diff: media/filters/source_buffer_stream.h

Issue 1089873006: WIP - MSE: Drop non-keyframes that lack keyframe dependency (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Checkpoint of WIP while I work on prereq https://codereview.chromium.org/1091293005/ 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/filters/frame_processor.cc ('k') | media/filters/source_buffer_stream_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/source_buffer_stream.h
diff --git a/media/filters/source_buffer_stream.h b/media/filters/source_buffer_stream.h
index 8a7ac85957087c40d89d42d62a6a3453b8afdea1..7559a443963732bac6db8e2e96a45d6ccf01b659 100644
--- a/media/filters/source_buffer_stream.h
+++ b/media/filters/source_buffer_stream.h
@@ -16,6 +16,7 @@
#include <utility>
#include <vector>
+#include "base/callback_forward.h"
#include "base/memory/ref_counted.h"
#include "media/base/audio_decoder_config.h"
#include "media/base/media_export.h"
@@ -34,6 +35,8 @@ class MEDIA_EXPORT SourceBufferStream {
public:
typedef StreamParser::BufferQueue BufferQueue;
typedef std::list<SourceBufferRange*> RangeList;
+ typedef base::Callback<bool(DecodeTimestamp start_dts,
+ DecodeTimestamp end_dts)> NotifyRangeRemovalCB;
// Status returned by GetNextBuffer().
// kSuccess: Indicates that the next buffer was returned.
@@ -65,6 +68,15 @@ class MEDIA_EXPORT SourceBufferStream {
~SourceBufferStream();
+ // Allows callers to register for notification of range removal. The
+ // registration must be valid during any range removal algorithm execution, as
+ // can result from duration truncation, explicit Remove(), or garbage
+ // collection. Coded frame removals done during Append are not included (nor
+ // should they be according to MSE spec.)
+ void set_range_removal_cb(const NotifyRangeRemovalCB& range_removal_cb) {
+ range_removal_cb_ = range_removal_cb;
+ }
+
// Signals that the next buffers appended are part of a new media segment
// starting at |media_segment_start_time|.
// TODO(acolwell/wolenetz): This should be changed to a presentation
@@ -329,6 +341,11 @@ class MEDIA_EXPORT SourceBufferStream {
// out what is wrong with the content.
LogCB log_cb_;
+ // Callback used to report range removal to support detection and processing
+ // by the MSE Coded Frame Processing Algorithm's of an append discontinuity
+ // that may have been introduced by the range's removal.
+ NotifyRangeRemovalCB range_removal_cb_;
+
// List of disjoint buffered ranges, ordered by start time.
RangeList ranges_;
« no previous file with comments | « media/filters/frame_processor.cc ('k') | media/filters/source_buffer_stream_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698