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

Unified Diff: media/filters/decoder_stream_traits.cc

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: Feedback 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_traits.cc
diff --git a/media/filters/decoder_stream_traits.cc b/media/filters/decoder_stream_traits.cc
index 131fc2d8eabcd4ba692877b5de34bf564d62e196..3dc29e1c8d2523ec632d0ff8fc3a1394d2c1c1df 100644
--- a/media/filters/decoder_stream_traits.cc
+++ b/media/filters/decoder_stream_traits.cc
@@ -81,4 +81,40 @@ scoped_refptr<DecoderStreamTraits<DemuxerStream::VIDEO>::OutputType>
return OutputType::CreateEOSFrame();
}
+DecoderStreamTraits<DemuxerStream::AUDIO>::DecoderStreamTraits(
+ const scoped_refptr<MediaLog>& media_log)
+ : media_log_(media_log) {}
+
+void DecoderStreamTraits<DemuxerStream::AUDIO>::OnStreamReset(
+ ConfigType config) {
+ // Stream is likely being seeked to a new timestamp, so make new validator to
+ // build new timestamp expectations.
+ audio_ts_validator_.reset(new AudioTimestampValidator(config, media_log_));
+}
+
+void DecoderStreamTraits<DemuxerStream::AUDIO>::OnDecode(
+ const scoped_refptr<DecoderBuffer>& buffer) {
+ audio_ts_validator_->CheckForTimestampGap(buffer);
+}
+
+void DecoderStreamTraits<DemuxerStream::AUDIO>::OnDecodeDone(
+ const scoped_refptr<OutputType>& buffer) {
+ audio_ts_validator_->RecordOutputDuration(buffer);
+}
+
+DecoderStreamTraits<DemuxerStream::VIDEO>::DecoderStreamTraits(
+ const scoped_refptr<MediaLog>& media_log) {}
+
+void DecoderStreamTraits<DemuxerStream::VIDEO>::OnStreamReset(
+ ConfigType config) {}
+
+void DecoderStreamTraits<DemuxerStream::VIDEO>::OnDecode(
+ const scoped_refptr<DecoderBuffer>& buffer) {}
+
+void DecoderStreamTraits<DemuxerStream::VIDEO>::OnDecodeDone(
+ const scoped_refptr<OutputType>& buffer) {}
+
+template class DecoderStreamTraits<DemuxerStream::VIDEO>;
+template class DecoderStreamTraits<DemuxerStream::AUDIO>;
+
} // namespace media

Powered by Google App Engine
This is Rietveld 408576698