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

Issue 2007463005: Paint first frame faster, don't crash with no frames during EOS. (Closed)

Created:
4 years, 7 months ago by DaleCurtis
Modified:
4 years, 6 months ago
CC:
chromium-reviews, feature-media-reviews_chromium.org, posciak+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Paint first frame faster, don't crash with no frames during EOS. Since we're no longer using the sink to paint the first frame, it's easier to start painting the first frame as soon as we know it's "a sure thing." Which is when we (1) have at least two frames queued, or (2) the first frame has a timestamp >= start timestamp, or (3) know that no more frames are coming. As part of this, fixes a nullptr crash caused by deciding if EOS should be triggered before removing frames for underflow, which leaves painting with no frames. Additionally adds a unique identifier to VideoFrames to resolve incorrect caching issues that the above changes exposed. BUG=614099 TEST=new unittest CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Committed: https://crrev.com/046faf603abbd7886bd01bc99078d716145d3680 Cr-Commit-Position: refs/heads/master@{#397468}

Patch Set 1 #

Total comments: 6

Patch Set 2 : Comment. Also consider start timestamp. #

Patch Set 3 : Remove DCHECK. #

Total comments: 6

Patch Set 4 : Add unique id to VideoFrame. #

Total comments: 7

Patch Set 5 : Remove frame_ptr. #

Total comments: 4

Patch Set 6 : Sanitize PlaneResource. #

Patch Set 7 : Add comments. #

Total comments: 6

Patch Set 8 : Comments. #

Total comments: 2

Patch Set 9 : Drop whitespace. #

Patch Set 10 : Check ref count instead. #

Total comments: 2

Patch Set 11 : Whoops, fix comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+180 lines, -190 lines) Patch
M cc/resources/video_resource_updater.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +38 lines, -37 lines 0 comments Download
M cc/resources/video_resource_updater.cc View 1 2 3 4 5 6 7 8 9 20 chunks +60 lines, -134 lines 0 comments Download
M media/base/null_video_sink.cc View 1 chunk +3 lines, -0 lines 0 comments Download
M media/base/null_video_sink_unittest.cc View 2 chunks +4 lines, -4 lines 0 comments Download
M media/base/video_frame.h View 1 2 3 2 chunks +7 lines, -0 lines 0 comments Download
M media/base/video_frame.cc View 1 2 3 3 chunks +6 lines, -1 line 0 comments Download
M media/renderers/video_renderer_impl.cc View 1 2 3 4 5 6 7 2 chunks +16 lines, -10 lines 0 comments Download
M media/renderers/video_renderer_impl_unittest.cc View 1 2 3 4 5 6 7 4 chunks +46 lines, -4 lines 0 comments Download

Messages

Total messages: 75 (23 generated)
DaleCurtis
4 years, 7 months ago (2016-05-23 23:11:30 UTC) #2
xhwang
LGTM with nits https://chromiumcodereview.appspot.com/2007463005/diff/1/media/renderers/video_renderer_impl.cc File media/renderers/video_renderer_impl.cc (right): https://chromiumcodereview.appspot.com/2007463005/diff/1/media/renderers/video_renderer_impl.cc#newcode405 media/renderers/video_renderer_impl.cc:405: // enough frames to know it's ...
4 years, 7 months ago (2016-05-24 21:46:29 UTC) #3
DaleCurtis
Thanks for review! https://chromiumcodereview.appspot.com/2007463005/diff/1/media/renderers/video_renderer_impl.cc File media/renderers/video_renderer_impl.cc (right): https://chromiumcodereview.appspot.com/2007463005/diff/1/media/renderers/video_renderer_impl.cc#newcode405 media/renderers/video_renderer_impl.cc:405: // enough frames to know it's ...
4 years, 7 months ago (2016-05-24 22:58:25 UTC) #6
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2007463005/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2007463005/20001
4 years, 7 months ago (2016-05-24 22:58:55 UTC) #8
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/219078)
4 years, 7 months ago (2016-05-25 01:55:04 UTC) #10
DaleCurtis
Hmm, this is a bit scary looking. Looks like the faster painting might be exposing ...
4 years, 7 months ago (2016-05-25 04:49:22 UTC) #12
DaleCurtis
Whoops actually cc dcastagna this time.
4 years, 7 months ago (2016-05-25 16:03:44 UTC) #14
Daniele Castagna
On 2016/05/25 at 16:03:44, dalecurtis wrote: > Whoops actually cc dcastagna this time. When a ...
4 years, 7 months ago (2016-05-25 16:22:26 UTC) #15
xjz
On 2016/05/25 16:22:26, Daniele Castagna wrote: > On 2016/05/25 at 16:03:44, dalecurtis wrote: > > ...
4 years, 7 months ago (2016-05-25 18:01:22 UTC) #16
DaleCurtis
Given that this is only happening with a theora video, it's likely the timestamps are ...
4 years, 7 months ago (2016-05-25 20:00:20 UTC) #17
Daniele Castagna
On 2016/05/25 at 20:00:20, dalecurtis wrote: > Given that this is only happening with a ...
4 years, 7 months ago (2016-05-26 17:07:03 UTC) #18
DaleCurtis
No luck on Linux w/o GMB, checking Windows.
4 years, 7 months ago (2016-05-26 18:35:50 UTC) #19
DaleCurtis
Hmm can't repro on Windows locally with ia32 or x64. Will retry failures on bot ...
4 years, 7 months ago (2016-05-26 21:10:17 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2007463005/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2007463005/20001
4 years, 7 months ago (2016-05-26 21:51:19 UTC) #22
DaleCurtis
Passed this time, but I think the media needs to be reencoded, the last 6 ...
4 years, 7 months ago (2016-05-26 21:56:17 UTC) #23
DaleCurtis
Ah actually that's expected since the test plays until end and then seeks back a ...
4 years, 7 months ago (2016-05-26 23:45:43 UTC) #25
Daniele Castagna
On 2016/05/26 at 23:45:43, dalecurtis wrote: > Ah actually that's expected since the test plays ...
4 years, 7 months ago (2016-05-26 23:49:18 UTC) #26
DaleCurtis
On 2016/05/26 at 23:49:18, dcastagna wrote: > On 2016/05/26 at 23:45:43, dalecurtis wrote: > > ...
4 years, 7 months ago (2016-05-26 23:53:34 UTC) #27
DaleCurtis
Hmm, there's no easy way to invalidate the cache from WMPI short of some gnarly ...
4 years, 7 months ago (2016-05-27 00:05:02 UTC) #30
danakj
https://codereview.chromium.org/2007463005/diff/40001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/2007463005/diff/40001/cc/resources/video_resource_updater.cc#newcode166 cc/resources/video_resource_updater.cc:166: // This can't be a DCHECK() because there are ...
4 years, 7 months ago (2016-05-27 00:12:10 UTC) #31
xjz
https://codereview.chromium.org/2007463005/diff/40001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/2007463005/diff/40001/cc/resources/video_resource_updater.cc#newcode169 cc/resources/video_resource_updater.cc:169: // few milliseconds into the past can trip this ...
4 years, 6 months ago (2016-05-27 00:19:44 UTC) #32
DaleCurtis
https://codereview.chromium.org/2007463005/diff/40001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/2007463005/diff/40001/cc/resources/video_resource_updater.cc#newcode166 cc/resources/video_resource_updater.cc:166: // This can't be a DCHECK() because there are ...
4 years, 6 months ago (2016-05-27 02:39:12 UTC) #33
xjz
https://codereview.chromium.org/2007463005/diff/40001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/2007463005/diff/40001/cc/resources/video_resource_updater.cc#newcode169 cc/resources/video_resource_updater.cc:169: // few milliseconds into the past can trip this ...
4 years, 6 months ago (2016-05-27 16:08:40 UTC) #34
DaleCurtis
PTAL. Switched to using a real unique (per-process) identifier. https://codereview.chromium.org/2007463005/diff/40001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/2007463005/diff/40001/cc/resources/video_resource_updater.cc#newcode169 cc/resources/video_resource_updater.cc:169: ...
4 years, 6 months ago (2016-05-27 20:46:09 UTC) #35
Daniele Castagna
https://codereview.chromium.org/2007463005/diff/60001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/2007463005/diff/60001/cc/resources/video_resource_updater.cc#newcode177 cc/resources/video_resource_updater.cc:177: plane_resource->frame_ptr = video_frame; Is frame_ptr still necessary anywhere else?
4 years, 6 months ago (2016-05-27 20:53:53 UTC) #36
DaleCurtis
https://codereview.chromium.org/2007463005/diff/60001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/2007463005/diff/60001/cc/resources/video_resource_updater.cc#newcode177 cc/resources/video_resource_updater.cc:177: plane_resource->frame_ptr = video_frame; On 2016/05/27 at 20:53:53, Daniele Castagna ...
4 years, 6 months ago (2016-05-27 21:04:10 UTC) #37
xjz
This LGTM. nits: https://codereview.chromium.org/2007463005/diff/60001/cc/resources/video_resource_updater.h File cc/resources/video_resource_updater.h (right): https://codereview.chromium.org/2007463005/diff/60001/cc/resources/video_resource_updater.h#newcode97 cc/resources/video_resource_updater.h:97: // These last three members will ...
4 years, 6 months ago (2016-05-27 21:04:32 UTC) #38
xjz
https://codereview.chromium.org/2007463005/diff/80001/cc/resources/video_resource_updater.cc File cc/resources/video_resource_updater.cc (right): https://codereview.chromium.org/2007463005/diff/80001/cc/resources/video_resource_updater.cc#newcode150 cc/resources/video_resource_updater.cc:150: unique_frame_id(0), Can we have a valid |VideoFrame| with 0 ...
4 years, 6 months ago (2016-05-27 21:21:53 UTC) #39
DaleCurtis
All done. Given the fragility of these resource identifiers I opted to convert PlaneResource to ...
4 years, 6 months ago (2016-05-27 22:08:35 UTC) #41
xjz
LGTM. Thanks!
4 years, 6 months ago (2016-05-27 23:12:01 UTC) #42
danakj
https://codereview.chromium.org/2007463005/diff/120001/cc/resources/video_resource_updater.h File cc/resources/video_resource_updater.h (right): https://codereview.chromium.org/2007463005/diff/120001/cc/resources/video_resource_updater.h#newcode97 cc/resources/video_resource_updater.h:97: // Returns true if this resource matches the unique ...
4 years, 6 months ago (2016-05-31 20:35:58 UTC) #43
danakj
I like the changes tho.
4 years, 6 months ago (2016-05-31 21:09:05 UTC) #44
DaleCurtis
https://codereview.chromium.org/2007463005/diff/120001/cc/resources/video_resource_updater.h File cc/resources/video_resource_updater.h (right): https://codereview.chromium.org/2007463005/diff/120001/cc/resources/video_resource_updater.h#newcode104 cc/resources/video_resource_updater.h:104: const unsigned resource_id; On 2016/05/31 at 20:35:58, danakj wrote: ...
4 years, 6 months ago (2016-06-01 20:46:48 UTC) #45
danakj
https://codereview.chromium.org/2007463005/diff/120001/cc/resources/video_resource_updater.h File cc/resources/video_resource_updater.h (right): https://codereview.chromium.org/2007463005/diff/120001/cc/resources/video_resource_updater.h#newcode104 cc/resources/video_resource_updater.h:104: const unsigned resource_id; On 2016/06/01 20:46:48, DaleCurtis wrote: > ...
4 years, 6 months ago (2016-06-01 21:02:02 UTC) #46
DaleCurtis
All cleaned up. https://codereview.chromium.org/2007463005/diff/120001/cc/resources/video_resource_updater.h File cc/resources/video_resource_updater.h (right): https://codereview.chromium.org/2007463005/diff/120001/cc/resources/video_resource_updater.h#newcode97 cc/resources/video_resource_updater.h:97: // Returns true if this resource ...
4 years, 6 months ago (2016-06-01 21:38:58 UTC) #48
danakj
LGTM https://codereview.chromium.org/2007463005/diff/160001/cc/resources/video_resource_updater.h File cc/resources/video_resource_updater.h (right): https://codereview.chromium.org/2007463005/diff/160001/cc/resources/video_resource_updater.h#newcode125 cc/resources/video_resource_updater.h:125: nit: drop this whitespace to discourage people adding ...
4 years, 6 months ago (2016-06-01 21:46:55 UTC) #49
DaleCurtis
Thanks for review! https://codereview.chromium.org/2007463005/diff/160001/cc/resources/video_resource_updater.h File cc/resources/video_resource_updater.h (right): https://codereview.chromium.org/2007463005/diff/160001/cc/resources/video_resource_updater.h#newcode125 cc/resources/video_resource_updater.h:125: On 2016/06/01 at 21:46:55, danakj wrote: ...
4 years, 6 months ago (2016-06-01 21:54:59 UTC) #51
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2007463005/180001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2007463005/180001
4 years, 6 months ago (2016-06-01 21:55:46 UTC) #53
DaleCurtis
Hmm, something is calling SetUniqueId twice, looking.
4 years, 6 months ago (2016-06-01 23:28:11 UTC) #54
DaleCurtis
Ah, looks like that can happen when a resource of the same size is reused. ...
4 years, 6 months ago (2016-06-01 23:34:39 UTC) #55
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel_ng on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_ng/builds/237301)
4 years, 6 months ago (2016-06-01 23:35:23 UTC) #57
danakj
On Wed, Jun 1, 2016 at 4:34 PM, <dalecurtis@chromium.org> wrote: > Ah, looks like that ...
4 years, 6 months ago (2016-06-01 23:39:19 UTC) #58
DaleCurtis
Actually that doesn't work either, the best solution to keep the check I can come ...
4 years, 6 months ago (2016-06-02 00:27:50 UTC) #59
danakj
LGTM https://codereview.chromium.org/2007463005/diff/200001/cc/resources/video_resource_updater.h File cc/resources/video_resource_updater.h (right): https://codereview.chromium.org/2007463005/diff/200001/cc/resources/video_resource_updater.h#newcode102 cc/resources/video_resource_updater.h:102: // there is a single reference to the ...
4 years, 6 months ago (2016-06-02 00:31:59 UTC) #60
DaleCurtis
https://codereview.chromium.org/2007463005/diff/200001/cc/resources/video_resource_updater.h File cc/resources/video_resource_updater.h (right): https://codereview.chromium.org/2007463005/diff/200001/cc/resources/video_resource_updater.h#newcode102 cc/resources/video_resource_updater.h:102: // there is a single reference to the resource ...
4 years, 6 months ago (2016-06-02 00:35:55 UTC) #62
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2007463005/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2007463005/220001
4 years, 6 months ago (2016-06-02 00:37:34 UTC) #64
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/170968) linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, ...
4 years, 6 months ago (2016-06-02 02:10:31 UTC) #66
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2007463005/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2007463005/220001
4 years, 6 months ago (2016-06-02 03:38:16 UTC) #68
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_ozone_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_ozone_rel_ng/builds/179566)
4 years, 6 months ago (2016-06-02 03:56:35 UTC) #70
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2007463005/220001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/2007463005/220001
4 years, 6 months ago (2016-06-02 16:21:43 UTC) #72
commit-bot: I haz the power
Committed patchset #11 (id:220001)
4 years, 6 months ago (2016-06-02 18:14:41 UTC) #73
commit-bot: I haz the power
4 years, 6 months ago (2016-06-02 18:16:44 UTC) #75
Message was sent while issue was closed.
Patchset 11 (id:??) landed as
https://crrev.com/046faf603abbd7886bd01bc99078d716145d3680
Cr-Commit-Position: refs/heads/master@{#397468}

Powered by Google App Engine
This is Rietveld 408576698