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

Unified Diff: media/blink/webmediaplayer_impl.h

Issue 2611333003: [Video] Disable bg optimization if avg keyframe distance is >10s (Closed)
Patch Set: Changed to TimeDelta 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
Index: media/blink/webmediaplayer_impl.h
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
index 225bc0adac125f15a3ba3df01d6d46d4240e7f9a..fcc69775df8af737f311b1e73567b64241c1afc3 100644
--- a/media/blink/webmediaplayer_impl.h
+++ b/media/blink/webmediaplayer_impl.h
@@ -19,6 +19,7 @@
#include "base/memory/weak_ptr.h"
#include "base/threading/thread.h"
#include "base/time/default_tick_clock.h"
+#include "base/time/time.h"
#include "base/timer/elapsed_timer.h"
#include "base/timer/timer.h"
#include "build/build_config.h"
@@ -620,6 +621,12 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
// Whether the player is currently in autoplay muted state.
bool autoplay_muted_ = false;
+ // The maximum video keyframe distance that allows triggering background
+ // playback optimizations.
+ // 10 seconds by default but can be overridden by a Finch experiment.
+ base::TimeDelta max_keyframe_distance_for_fast_decode_ =
DaleCurtis 2017/01/11 01:14:51 Replace fast_decode_ terminology like before.
whywhat 2017/01/11 17:17:33 Done.
+ base::TimeDelta::FromSeconds(10);
+
// Whether disabled the video track as an optimization.
bool video_track_disabled_ = false;

Powered by Google App Engine
This is Rietveld 408576698