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

Unified Diff: media/filters/decoder_stream.h

Issue 240123004: Simplify AudioSplicer logic which slots buffers before or after a splice point. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Comments. Created 6 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/audio_renderer_impl_unittest.cc ('k') | media/filters/decoder_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decoder_stream.h
diff --git a/media/filters/decoder_stream.h b/media/filters/decoder_stream.h
index 2fd2a552d2706395f748630aa4746a324dcfbd0d..4992141443b3410d71c050318fb2b160807a870b 100644
--- a/media/filters/decoder_stream.h
+++ b/media/filters/decoder_stream.h
@@ -89,6 +89,9 @@ class MEDIA_EXPORT DecoderStream {
// Allows callers to register for notification of splice buffers from the
// demuxer. I.e., DecoderBuffer::splice_timestamp() is not kNoTimestamp().
+ //
+ // The observer will be notified of all buffers with a splice_timestamp() and
+ // the first buffer after which has a splice_timestamp() of kNoTimestamp().
typedef base::Callback<void(base::TimeDelta)> SpliceObserverCB;
void set_splice_observer(const SpliceObserverCB& splice_observer) {
splice_observer_cb_ = splice_observer;
@@ -180,6 +183,10 @@ class MEDIA_EXPORT DecoderStream {
SpliceObserverCB splice_observer_cb_;
ConfigChangeObserverCB config_change_observer_cb_;
+ // If a splice_timestamp() has been seen, this is true until a
+ // splice_timestamp() of kNoTimestamp() is encountered.
+ bool active_splice_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<DecoderStream<StreamType> > weak_factory_;
« no previous file with comments | « media/filters/audio_renderer_impl_unittest.cc ('k') | media/filters/decoder_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698