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

Unified Diff: media/filters/decoder_stream_traits.h

Issue 2611333003: [Video] Disable bg optimization if avg keyframe distance is >10s (Closed)
Patch Set: Rebase the test Created 3 years, 11 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/decoder_stream.cc ('k') | media/filters/decoder_stream_traits.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/filters/decoder_stream_traits.h
diff --git a/media/filters/decoder_stream_traits.h b/media/filters/decoder_stream_traits.h
index b415d11ea544ecd1d766498532dd32afa0581e81..477d36449f0fb3d77e72e72b4cd59a1623e69ef1 100644
--- a/media/filters/decoder_stream_traits.h
+++ b/media/filters/decoder_stream_traits.h
@@ -8,6 +8,7 @@
#include "base/time/time.h"
#include "media/base/cdm_context.h"
#include "media/base/demuxer_stream.h"
+#include "media/base/moving_average.h"
#include "media/base/pipeline_status.h"
#include "media/base/video_decoder_config.h"
#include "media/filters/audio_timestamp_validator.h"
@@ -37,12 +38,11 @@ class MEDIA_EXPORT DecoderStreamTraits<DemuxerStream::AUDIO> {
static std::string ToString();
static bool NeedsBitstreamConversion(DecoderType* decoder);
- static void ReportStatistics(const StatisticsCB& statistics_cb,
- int bytes_decoded);
static scoped_refptr<OutputType> CreateEOSOutput();
explicit DecoderStreamTraits(const scoped_refptr<MediaLog>& media_log);
+ void ReportStatistics(const StatisticsCB& statistics_cb, int bytes_decoded);
void InitializeDecoder(DecoderType* decoder,
DemuxerStream* stream,
CdmContext* cdm_context,
@@ -72,12 +72,11 @@ class MEDIA_EXPORT DecoderStreamTraits<DemuxerStream::VIDEO> {
static std::string ToString();
static bool NeedsBitstreamConversion(DecoderType* decoder);
- static void ReportStatistics(const StatisticsCB& statistics_cb,
- int bytes_decoded);
static scoped_refptr<OutputType> CreateEOSOutput();
- explicit DecoderStreamTraits(const scoped_refptr<MediaLog>& media_log) {}
+ explicit DecoderStreamTraits(const scoped_refptr<MediaLog>& media_log);
+ void ReportStatistics(const StatisticsCB& statistics_cb, int bytes_decoded);
void InitializeDecoder(DecoderType* decoder,
DemuxerStream* stream,
CdmContext* cdm_context,
@@ -89,6 +88,7 @@ class MEDIA_EXPORT DecoderStreamTraits<DemuxerStream::VIDEO> {
private:
base::TimeDelta last_keyframe_timestamp_;
+ MovingAverage keyframe_distance_average_;
};
} // namespace media
« no previous file with comments | « media/filters/decoder_stream.cc ('k') | media/filters/decoder_stream_traits.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698