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

Issue 2631633003: [Video] Only start tracking foreground time if the video was resumed. (Closed)

Created:
3 years, 11 months ago by whywhat
Modified:
3 years, 11 months ago
CC:
apacible+watch_chromium.org, chromium-reviews, erickung+watch_chromium.org, feature-media-reviews_chromium.org, miu+watch_chromium.org, xjz+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[Video] Fix the TimeFromForegroundToFirstFrame metric. Only start tracking the foreground time if the video we had or would optimize is playing or will be playing when shown. Thus we don't track the time for paused videos or videos we wouldn't optimize like streams so they don't improve the average results. BUG=670150 TEST=manual Review-Url: https://codereview.chromium.org/2631633003 Cr-Commit-Position: refs/heads/master@{#444816} Committed: https://chromium.googlesource.com/chromium/src/+/cc273ddad35337b82ddfdb77248986fc928d035e

Patch Set 1 #

Total comments: 1

Patch Set 2 : Only set the time when playing or were paused when hidden #

Total comments: 3

Patch Set 3 : Record the metric only for should be optimized videos #

Patch Set 4 : Split the histogram into paused and disabled track #

Total comments: 10

Patch Set 5 : Restored the old histogram #

Patch Set 6 : Pass the time back to WMPI #

Total comments: 10

Patch Set 7 : Clarified code, updated unittests #

Total comments: 2

Patch Set 8 : Added a comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -51 lines) Patch
M media/blink/video_frame_compositor.h View 1 2 3 4 5 6 7 4 chunks +8 lines, -4 lines 0 comments Download
M media/blink/video_frame_compositor.cc View 1 2 3 4 5 4 chunks +7 lines, -10 lines 0 comments Download
M media/blink/webmediaplayer_impl.h View 1 2 3 4 5 6 7 4 chunks +22 lines, -6 lines 0 comments Download
M media/blink/webmediaplayer_impl.cc View 1 2 3 4 5 6 7 8 chunks +75 lines, -24 lines 0 comments Download
M media/blink/webmediaplayer_impl_unittest.cc View 1 2 3 4 5 6 2 chunks +71 lines, -7 lines 0 comments Download
M tools/metrics/histograms/histograms.xml View 1 2 3 4 5 6 7 2 chunks +29 lines, -0 lines 0 comments Download

Messages

Total messages: 49 (16 generated)
whywhat
PTaL I based it off the refactoring CL Dan is submitting.
3 years, 11 months ago (2017-01-13 21:37:02 UTC) #2
DaleCurtis
https://codereview.chromium.org/2631633003/diff/1/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2631633003/diff/1/media/blink/webmediaplayer_impl.cc#newcode1455 media/blink/webmediaplayer_impl.cc:1455: if (!paused_) { This is going to race with ...
3 years, 11 months ago (2017-01-13 21:52:19 UTC) #3
whywhat
On 2017/01/13 at 21:52:19, dalecurtis wrote: > https://codereview.chromium.org/2631633003/diff/1/media/blink/webmediaplayer_impl.cc > File media/blink/webmediaplayer_impl.cc (right): > > https://codereview.chromium.org/2631633003/diff/1/media/blink/webmediaplayer_impl.cc#newcode1455 ...
3 years, 11 months ago (2017-01-18 00:13:20 UTC) #4
DaleCurtis
That seems okay for now. The OnPlay() is the only thing that might cause the ...
3 years, 11 months ago (2017-01-18 18:23:22 UTC) #5
whywhat
Only set the time when playing or were paused when hidden
3 years, 11 months ago (2017-01-18 19:34:33 UTC) #6
whywhat
PTAL
3 years, 11 months ago (2017-01-18 20:43:23 UTC) #10
DaleCurtis
lgtm
3 years, 11 months ago (2017-01-18 20:57:11 UTC) #11
sandersd (OOO until July 31)
lgtm https://codereview.chromium.org/2631633003/diff/20001/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2631633003/diff/20001/media/blink/webmediaplayer_impl.cc#newcode1446 media/blink/webmediaplayer_impl.cc:1446: if (!paused_ || paused_when_hidden_) { Quick check: Is ...
3 years, 11 months ago (2017-01-18 21:30:04 UTC) #12
whywhat
https://codereview.chromium.org/2631633003/diff/20001/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2631633003/diff/20001/media/blink/webmediaplayer_impl.cc#newcode1446 media/blink/webmediaplayer_impl.cc:1446: if (!paused_ || paused_when_hidden_) { On 2017/01/18 at 21:30:04, ...
3 years, 11 months ago (2017-01-18 21:57:40 UTC) #13
DaleCurtis
https://codereview.chromium.org/2631633003/diff/20001/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2631633003/diff/20001/media/blink/webmediaplayer_impl.cc#newcode1446 media/blink/webmediaplayer_impl.cc:1446: if (!paused_ || paused_when_hidden_) { On 2017/01/18 at 21:57:40, ...
3 years, 11 months ago (2017-01-18 22:10:01 UTC) #14
DaleCurtis
https://codereview.chromium.org/2631633003/diff/20001/media/blink/webmediaplayer_impl.cc File media/blink/webmediaplayer_impl.cc (right): https://codereview.chromium.org/2631633003/diff/20001/media/blink/webmediaplayer_impl.cc#newcode1446 media/blink/webmediaplayer_impl.cc:1446: if (!paused_ || paused_when_hidden_) { On 2017/01/18 at 21:57:40, ...
3 years, 11 months ago (2017-01-18 22:10:01 UTC) #15
whywhat
Record the metric only for should be optimized videos
3 years, 11 months ago (2017-01-18 22:14:42 UTC) #16
whywhat
On 2017/01/18 at 22:10:01, dalecurtis wrote: > https://codereview.chromium.org/2631633003/diff/20001/media/blink/webmediaplayer_impl.cc > File media/blink/webmediaplayer_impl.cc (right): > > https://codereview.chromium.org/2631633003/diff/20001/media/blink/webmediaplayer_impl.cc#newcode1446 ...
3 years, 11 months ago (2017-01-18 22:23:47 UTC) #18
DaleCurtis
That probably fine too. For paused videos the play time would be the full resume ...
3 years, 11 months ago (2017-01-18 22:26:19 UTC) #19
whywhat
Split the histogram into paused and disabled track
3 years, 11 months ago (2017-01-18 23:30:50 UTC) #22
whywhat
+Ilya for histograms.xml Dale, Dan, one more look after I split the metrics, please? :)
3 years, 11 months ago (2017-01-18 23:33:19 UTC) #24
DaleCurtis
https://codereview.chromium.org/2631633003/diff/60001/media/blink/video_frame_compositor.cc File media/blink/video_frame_compositor.cc (right): https://codereview.chromium.org/2631633003/diff/60001/media/blink/video_frame_compositor.cc#newcode194 media/blink/video_frame_compositor.cc:194: BackgroundVideoOptimization optimization) { This is polluting VFC with knowledge ...
3 years, 11 months ago (2017-01-18 23:39:02 UTC) #25
Ilya Sherman
Metrics LGTM % comments https://codereview.chromium.org/2631633003/diff/60001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2631633003/diff/60001/tools/metrics/histograms/histograms.xml#newcode26207 tools/metrics/histograms/histograms.xml:26207: +<histogram name="Media.Video.TimeFromForegroundToFirstFrame.DisabledTrack" On 2017/01/18 23:39:02, ...
3 years, 11 months ago (2017-01-19 02:03:39 UTC) #26
whywhat
Restored the old histogram
3 years, 11 months ago (2017-01-19 02:04:49 UTC) #27
whywhat
https://codereview.chromium.org/2631633003/diff/60001/media/blink/video_frame_compositor.cc File media/blink/video_frame_compositor.cc (right): https://codereview.chromium.org/2631633003/diff/60001/media/blink/video_frame_compositor.cc#newcode194 media/blink/video_frame_compositor.cc:194: BackgroundVideoOptimization optimization) { On 2017/01/18 at 23:39:01, DaleCurtis wrote: ...
3 years, 11 months ago (2017-01-19 02:33:58 UTC) #28
Ilya Sherman
https://codereview.chromium.org/2631633003/diff/60001/tools/metrics/histograms/histograms.xml File tools/metrics/histograms/histograms.xml (right): https://codereview.chromium.org/2631633003/diff/60001/tools/metrics/histograms/histograms.xml#newcode26223 tools/metrics/histograms/histograms.xml:26223: + be paused in the background is brought to ...
3 years, 11 months ago (2017-01-19 02:39:58 UTC) #29
whywhat
Pass the time back to WMPI
3 years, 11 months ago (2017-01-19 03:14:02 UTC) #30
whywhat
PTAL https://codereview.chromium.org/2631633003/diff/60001/media/blink/video_frame_compositor.cc File media/blink/video_frame_compositor.cc (right): https://codereview.chromium.org/2631633003/diff/60001/media/blink/video_frame_compositor.cc#newcode194 media/blink/video_frame_compositor.cc:194: BackgroundVideoOptimization optimization) { On 2017/01/19 at 02:33:58, whywhat ...
3 years, 11 months ago (2017-01-19 03:23:12 UTC) #31
DaleCurtis
Logic is getting hard to follow here. Do the existing tests pass without modification? https://codereview.chromium.org/2631633003/diff/100001/media/blink/video_frame_compositor.h ...
3 years, 11 months ago (2017-01-19 03:37:20 UTC) #32
whywhat
Clarified code, updated unittests
3 years, 11 months ago (2017-01-19 05:04:06 UTC) #33
whywhat
https://codereview.chromium.org/2631633003/diff/100001/media/blink/video_frame_compositor.h File media/blink/video_frame_compositor.h (right): https://codereview.chromium.org/2631633003/diff/100001/media/blink/video_frame_compositor.h#newcode62 media/blink/video_frame_compositor.h:62: using OnNewProcessedFrameCB = base::Callback<void(base::TimeTicks)>; On 2017/01/19 at 03:37:19, DaleCurtis ...
3 years, 11 months ago (2017-01-19 05:10:21 UTC) #34
Ilya Sherman
Thanks, the updated wording is clearer and very helpful. (Still LGTM)
3 years, 11 months ago (2017-01-19 08:05:31 UTC) #39
DaleCurtis
lgtm, thanks for the test. https://codereview.chromium.org/2631633003/diff/120001/media/blink/video_frame_compositor.h File media/blink/video_frame_compositor.h (right): https://codereview.chromium.org/2631633003/diff/120001/media/blink/video_frame_compositor.h#newcode110 media/blink/video_frame_compositor.h:110: // Sets the callback ...
3 years, 11 months ago (2017-01-19 17:32:07 UTC) #40
whywhat
Added a comment
3 years, 11 months ago (2017-01-19 17:54:28 UTC) #41
whywhat
I wonder if there're plans to be able to mock pipeline_ in WMPI in tests ...
3 years, 11 months ago (2017-01-19 17:55:42 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2631633003/140001
3 years, 11 months ago (2017-01-19 17:56:14 UTC) #45
DaleCurtis
There's already a MockPipeline IIRC, just need a way to inject it instead of creating ...
3 years, 11 months ago (2017-01-19 18:06:02 UTC) #46
commit-bot: I haz the power
3 years, 11 months ago (2017-01-19 19:36:03 UTC) #49
Message was sent while issue was closed.
Committed patchset #8 (id:140001) as
https://chromium.googlesource.com/chromium/src/+/cc273ddad35337b82ddfdb772489...

Powered by Google App Engine
This is Rietveld 408576698