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

Unified Diff: media/blink/webmediaplayer_impl.cc

Issue 2822543006: Start reporting watch time if ABR adapts above 200p. (Closed)
Patch Set: Simplify Created 3 years, 8 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/blink/watch_time_reporter_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/blink/webmediaplayer_impl.cc
diff --git a/media/blink/webmediaplayer_impl.cc b/media/blink/webmediaplayer_impl.cc
index 20796d389172f5ac853bef2b1ce8fe03faed70a3..172541b83589e380d6e5e3fc661da93561247df7 100644
--- a/media/blink/webmediaplayer_impl.cc
+++ b/media/blink/webmediaplayer_impl.cc
@@ -1421,13 +1421,13 @@ void WebMediaPlayerImpl::OnVideoNaturalSizeChange(const gfx::Size& size) {
if (overlay_enabled_ && surface_manager_)
surface_manager_->NaturalSizeChanged(rotated_size);
- gfx::Size old_size = pipeline_metadata_.natural_size;
pipeline_metadata_.natural_size = rotated_size;
- if (old_size.IsEmpty()) {
- // WatchTimeReporter doesn't report metrics for empty videos. Re-create
- // |watch_time_reporter_| if we didn't originally know the video size.
+
+ // Re-create |watch_time_reporter_| if we didn't originally know the video
+ // size or the previous size was too small for reporting.
+ if (!watch_time_reporter_->IsSizeLargeEnoughToReportWatchTime())
CreateWatchTimeReporter();
- }
+
client_->SizeChanged();
if (observer_)
« no previous file with comments | « media/blink/watch_time_reporter_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698