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

Unified Diff: media/filters/decoder_stream.h

Issue 1954633002: MEDIA_LOG for large encoded timestamp gaps in decoder stream. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 6 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/decoder_stream.h
diff --git a/media/filters/decoder_stream.h b/media/filters/decoder_stream.h
index 3f82c2c97b68b2b2d52e3ebebea7f6cc0ead0eda..1c2f60d388a311d71a2879312b2fbc6a30688b19 100644
--- a/media/filters/decoder_stream.h
+++ b/media/filters/decoder_stream.h
@@ -7,6 +7,7 @@
#include <deque>
#include <list>
+#include <memory>
#include "base/callback.h"
#include "base/compiler_specific.h"
@@ -14,12 +15,14 @@
#include "base/memory/scoped_vector.h"
#include "base/memory/weak_ptr.h"
#include "media/base/audio_decoder.h"
+#include "media/base/audio_timestamp_helper.h"
#include "media/base/demuxer_stream.h"
#include "media/base/media_export.h"
#include "media/base/media_log.h"
#include "media/base/moving_average.h"
#include "media/base/pipeline_status.h"
#include "media/base/timestamp_constants.h"
+#include "media/filters/audio_timestamp_validator.h"
#include "media/filters/decoder_selector.h"
#include "media/filters/decoder_stream_traits.h"
@@ -40,6 +43,7 @@ class MEDIA_EXPORT DecoderStream {
typedef DecoderStreamTraits<StreamType> StreamTraits;
typedef typename StreamTraits::DecoderType Decoder;
typedef typename StreamTraits::OutputType Output;
+ typedef typename StreamTraits::ConfigType Config;
enum Status {
OK, // Everything went as planned.
@@ -192,6 +196,8 @@ class MEDIA_EXPORT DecoderStream {
void ResetDecoder();
void OnDecoderReset();
+ DecoderStreamTraits<StreamType> traits_;
+
scoped_refptr<base::SingleThreadTaskRunner> task_runner_;
scoped_refptr<MediaLog> media_log_;
@@ -257,6 +263,11 @@ class MEDIA_EXPORT DecoderStream {
// overwritten by an error.
bool pending_demuxer_read_;
+ // Validates encoded timestamps match decoded output duration. MEDIA_LOG warns
DaleCurtis 2016/06/20 18:40:33 Delete now?
chcunningham 2016/06/21 00:31:59 Whoops, definitely!
+ // if timestamp gaps are detected. Sufficiently large gaps can lead to AV sync
+ // drift.
+ std::unique_ptr<AudioTimestampValidator> audio_ts_validator_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<DecoderStream<StreamType>> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698