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

Unified Diff: media/filters/source_buffer_stream.h

Issue 276573002: Add gapless playback support for AAC playback. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix msvc error. Created 6 years, 7 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/legacy_frame_processor.cc ('k') | media/filters/source_buffer_stream.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 dfdc363c9387c3e8f7ab43e1142a310c002b8c83..95b2e0970b16ecbde8e60307e9bdc5d3e07625f8 100644
--- a/media/filters/source_buffer_stream.h
+++ b/media/filters/source_buffer_stream.h
@@ -302,9 +302,19 @@ class MEDIA_EXPORT SourceBufferStream {
Type GetType() const;
+ // See GetNextBuffer() for additional details. This method handles splice
+ // frame processing.
+ Status HandleNextBufferWithSplice(
+ scoped_refptr<StreamParserBuffer>* out_buffer);
+
+ // See GetNextBuffer() for additional details. This method handles preroll
+ // frame processing.
+ Status HandleNextBufferWithPreroll(
+ scoped_refptr<StreamParserBuffer>* out_buffer);
+
// See GetNextBuffer() for additional details. The internal method hands out
- // buffers from the |track_buffer_| and |selected_range_| without additional
- // processing for splice frame buffers; which is handled by GetNextBuffer().
+ // single buffers from the |track_buffer_| and |selected_range_| without
+ // additional processing for splice frame or preroll buffers.
Status GetNextBufferInternal(scoped_refptr<StreamParserBuffer>* out_buffer);
// Called by PrepareRangesForNextAppend() before pruning overlapped buffers to
@@ -313,6 +323,10 @@ class MEDIA_EXPORT SourceBufferStream {
// its timestamps, duration, and fade out preroll updated.
void GenerateSpliceFrame(const BufferQueue& new_buffers);
+ // If |out_buffer| has splice buffers or preroll, sets |pending_buffer_|
+ // appropriately and returns true. Otherwise returns false.
+ bool SetPendingBuffer(scoped_refptr<StreamParserBuffer>* out_buffer);
+
// Callback used to report error strings that can help the web developer
// figure out what is wrong with the content.
LogCB log_cb_;
@@ -389,17 +403,17 @@ class MEDIA_EXPORT SourceBufferStream {
// GetCurrentXXXDecoderConfig() has been called.
bool config_change_pending_;
- // Used by GetNextBuffer() when a buffer with fade out is returned from
- // GetNextBufferInternal(). Will be set to the returned buffer and will be
- // destroyed after the splice_buffers() section has been exhausted.
- scoped_refptr<StreamParserBuffer> splice_buffer_;
+ // Used by HandleNextBufferWithSplice() or HandleNextBufferWithPreroll() when
+ // a splice frame buffer or buffer with preroll is returned from
+ // GetNextBufferInternal().
+ scoped_refptr<StreamParserBuffer> pending_buffer_;
// Indicates which of the splice buffers in |splice_buffer_| should be
// handled out next.
size_t splice_buffers_index_;
- // Indicates that all pre splice buffers have been handed out.
- bool pre_splice_complete_;
+ // Indicates that all buffers before |pending_buffer_| have been handed out.
+ bool pending_buffers_complete_;
// Indicates that splice frame generation is enabled.
const bool splice_frames_enabled_;
« no previous file with comments | « media/filters/legacy_frame_processor.cc ('k') | media/filters/source_buffer_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698