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

Unified Diff: media/blink/webmediaplayer_impl.h

Issue 2713883003: Merge M57: "Remove Media.UnderflowCount, add Media.UnderflowDuration for MSE." (Closed)
Patch Set: Created 3 years, 10 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 | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.h
diff --git a/media/blink/webmediaplayer_impl.h b/media/blink/webmediaplayer_impl.h
index 5cb175768c3fbeea9e593bb50ea11d3947a7970f..6f0e802e5cf4f21e9ac46c5a618357e378e567a3 100644
--- a/media/blink/webmediaplayer_impl.h
+++ b/media/blink/webmediaplayer_impl.h
@@ -441,6 +441,10 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
void ReportTimeFromForegroundToFirstFrame(base::TimeTicks foreground_time,
base::TimeTicks new_frame_time);
+ // Records |duration| to the appropriate metric based on whether we're
+ // handling a src= or MSE based playback.
+ void RecordUnderflowDuration(base::TimeDelta duration);
+
blink::WebLocalFrame* frame_;
// The playback state last reported to |delegate_|, to avoid setting duplicate
@@ -650,8 +654,7 @@ class MEDIA_BLINK_EXPORT WebMediaPlayerImpl
std::unique_ptr<WatchTimeReporter> watch_time_reporter_;
bool is_encrypted_;
- // Number of times we've reached BUFFERING_HAVE_NOTHING during playback.
- int underflow_count_;
+ // Elapsed time since we've last reached BUFFERING_HAVE_NOTHING.
std::unique_ptr<base::ElapsedTimer> underflow_timer_;
// Used to track loading progress, used by IsPrerollAttemptNeeded().
« no previous file with comments | « no previous file | media/blink/webmediaplayer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698