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

Issue 1862303002: Delay actual flush and reset in AVDA (Closed)

Created:
4 years, 8 months ago by Tima Vaisburd
Modified:
4 years, 8 months ago
CC:
chromium-reviews, darin-cc_chromium.org, feature-media-reviews_chromium.org, jam, mcasas+watch_chromium.org, piman+watch_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

Delay actual flush and release in AVDA Postpone the actual call to MediaCodec.flush() and .release() to let the AVDA drain the MediaCodec. This seems necessary to at least one VP8 file, otherwise .flash() and .release() hangs. The CL attempts to generalize the codec draining mechanism and uses it in 2 additional places: Reset() for Vp8 and Destroy() for Vp8. This CL also release all pending output buffer in Release() and Destroy() for all codecs. BUG=598963 Committed: https://crrev.com/e69b434c2d5c6fd5415a772cda5e5de2f140996c Cr-Commit-Position: refs/heads/master@{#389273}

Patch Set 1 #

Patch Set 2 : Drain decoder before both flush() and release() #

Patch Set 3 : Uses drain with EOS instead of abitrary delay #

Total comments: 16

Patch Set 4 : Addressed comments #

Patch Set 5 : Removed an empty line #

Total comments: 6

Patch Set 6 : More comments addressed #

Patch Set 7 : Notifications are now set with BindToCurrentLoop() #

Total comments: 21

Patch Set 8 : Addressed comments, rebased #

Patch Set 9 : Kept OUTPUT_FORMAT_CHANGED processing while draining, rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+198 lines, -48 lines) Patch
M content/common/gpu/media/android_deferred_rendering_backing_strategy.h View 1 2 3 4 5 6 7 8 1 chunk +2 lines, -0 lines 0 comments Download
M content/common/gpu/media/android_deferred_rendering_backing_strategy.cc View 1 2 3 4 5 6 7 8 3 chunks +12 lines, -1 line 0 comments Download
M content/common/gpu/media/android_video_decode_accelerator.h View 1 2 3 4 5 6 7 8 5 chunks +36 lines, -3 lines 0 comments Download
M content/common/gpu/media/android_video_decode_accelerator.cc View 1 2 3 4 5 6 7 8 15 chunks +148 lines, -44 lines 0 comments Download

Messages

Total messages: 43 (13 generated)
DaleCurtis
FWIW, you can't delay destroy like this since it deletes |this| -- which in your ...
4 years, 8 months ago (2016-04-11 21:42:02 UTC) #5
Tima Vaisburd
Thank you for taking a look! > - If we got his route, we'll want ...
4 years, 8 months ago (2016-04-11 22:02:46 UTC) #6
DaleCurtis
On 2016/04/11 at 22:02:46, timav wrote: > Thank you for taking a look! > > ...
4 years, 8 months ago (2016-04-11 22:07:58 UTC) #7
Tima Vaisburd
Hi, this is the next attempt at the Vp8 hanging bug. I tried to follow ...
4 years, 8 months ago (2016-04-16 02:09:58 UTC) #10
liberato (no reviews please)
On 2016/04/16 02:09:58, Tima Vaisburd wrote: > Hi, this is the next attempt at the ...
4 years, 8 months ago (2016-04-18 08:56:04 UTC) #11
liberato (no reviews please)
On 2016/04/18 08:56:04, liberato-ooo wrote: > On 2016/04/16 02:09:58, Tima Vaisburd wrote: > > Hi, ...
4 years, 8 months ago (2016-04-18 09:41:13 UTC) #12
watk
Nice. I agree with Frank that the drain type should probably be merged into state. ...
4 years, 8 months ago (2016-04-18 21:12:19 UTC) #13
liberato (no reviews please)
On 2016/04/18 21:12:19, watk wrote: > Nice. I agree with Frank that the drain type ...
4 years, 8 months ago (2016-04-20 01:21:19 UTC) #14
Tima Vaisburd
liberato> Why is drain type not part of |state_|? Could you elaborate? I had the ...
4 years, 8 months ago (2016-04-20 01:54:19 UTC) #15
Tima Vaisburd
On 2016/04/20 01:21:19, liberato-ooo wrote: > I have two other requests. Would you mind updating ...
4 years, 8 months ago (2016-04-20 01:59:46 UTC) #16
watk
https://codereview.chromium.org/1862303002/diff/80001/content/common/gpu/media/android_video_decode_accelerator.cc File content/common/gpu/media/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1862303002/diff/80001/content/common/gpu/media/android_video_decode_accelerator.cc#newcode1007 content/common/gpu/media/android_video_decode_accelerator.cc:1007: void AndroidVideoDecodeAccelerator::StartCodecDrain(DrainType drain_type) { Since we have thread checkers ...
4 years, 8 months ago (2016-04-20 18:13:45 UTC) #17
Tima Vaisburd
https://codereview.chromium.org/1862303002/diff/80001/content/common/gpu/media/android_video_decode_accelerator.cc File content/common/gpu/media/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1862303002/diff/80001/content/common/gpu/media/android_video_decode_accelerator.cc#newcode1007 content/common/gpu/media/android_video_decode_accelerator.cc:1007: void AndroidVideoDecodeAccelerator::StartCodecDrain(DrainType drain_type) { On 2016/04/20 18:13:45, watk wrote: ...
4 years, 8 months ago (2016-04-20 20:07:52 UTC) #18
Tima Vaisburd
watk@> I don't think you need BindToCurrentLoop because this is all single threaded right? I ...
4 years, 8 months ago (2016-04-20 23:39:42 UTC) #19
Tima Vaisburd
On 2016/04/20 23:39:42, Tima Vaisburd wrote: > Otherwise NotifyResetDone() might go to the renderer before ...
4 years, 8 months ago (2016-04-20 23:42:10 UTC) #20
watk
On 2016/04/20 23:39:42, Tima Vaisburd wrote: > watk@> I don't think you need BindToCurrentLoop because ...
4 years, 8 months ago (2016-04-20 23:53:24 UTC) #21
Tima Vaisburd
On 2016/04/20 23:53:24, watk wrote: > We could do the BindToCurrentLoop thing for now and ...
4 years, 8 months ago (2016-04-20 23:56:27 UTC) #22
watk
On 2016/04/20 23:56:27, Tima Vaisburd wrote: > On 2016/04/20 23:53:24, watk wrote: > > We ...
4 years, 8 months ago (2016-04-21 00:07:36 UTC) #23
DaleCurtis
https://codereview.chromium.org/1862303002/diff/120001/content/common/gpu/media/android_video_decode_accelerator.cc File content/common/gpu/media/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1862303002/diff/120001/content/common/gpu/media/android_video_decode_accelerator.cc#newcode857 content/common/gpu/media/android_video_decode_accelerator.cc:857: if (client_) { Why this? https://codereview.chromium.org/1862303002/diff/120001/content/common/gpu/media/android_video_decode_accelerator.cc#newcode1014 content/common/gpu/media/android_video_decode_accelerator.cc:1014: DCHECK(drain_type != ...
4 years, 8 months ago (2016-04-21 00:16:07 UTC) #24
Tima Vaisburd
Just the explanations, will do fixes later. https://codereview.chromium.org/1862303002/diff/120001/content/common/gpu/media/android_video_decode_accelerator.cc File content/common/gpu/media/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1862303002/diff/120001/content/common/gpu/media/android_video_decode_accelerator.cc#newcode857 content/common/gpu/media/android_video_decode_accelerator.cc:857: if (client_) ...
4 years, 8 months ago (2016-04-21 00:28:45 UTC) #25
DaleCurtis
Seems fine then after other nits are fixed. https://codereview.chromium.org/1862303002/diff/120001/content/common/gpu/media/android_video_decode_accelerator.cc File content/common/gpu/media/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1862303002/diff/120001/content/common/gpu/media/android_video_decode_accelerator.cc#newcode1177 content/common/gpu/media/android_video_decode_accelerator.cc:1177: client_ ...
4 years, 8 months ago (2016-04-21 00:32:36 UTC) #26
Tima Vaisburd
https://codereview.chromium.org/1862303002/diff/120001/content/common/gpu/media/android_video_decode_accelerator.cc File content/common/gpu/media/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/1862303002/diff/120001/content/common/gpu/media/android_video_decode_accelerator.cc#newcode1014 content/common/gpu/media/android_video_decode_accelerator.cc:1014: DCHECK(drain_type != DRAIN_TYPE_NONE); On 2016/04/21 00:16:07, DaleCurtis wrote: > ...
4 years, 8 months ago (2016-04-21 21:38:22 UTC) #27
DaleCurtis
lgtm
4 years, 8 months ago (2016-04-21 22:53:15 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1862303002/140001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1862303002/140001
4 years, 8 months ago (2016-04-21 22:56:03 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: linux_android_rel_ng on tryserver.chromium.android (JOB_FAILED, https://build.chromium.org/p/tryserver.chromium.android/builders/linux_android_rel_ng/builds/58308)
4 years, 8 months ago (2016-04-22 00:30:50 UTC) #33
DaleCurtis
Hey! Our tests caught bugs :)
4 years, 8 months ago (2016-04-22 00:34:35 UTC) #34
DaleCurtis
On 2016/04/22 at 00:34:35, DaleCurtis wrote: > Hey! Our tests caught bugs :) Also, sorry ...
4 years, 8 months ago (2016-04-22 00:34:51 UTC) #35
liberato (no reviews please)
On 2016/04/20 01:54:19, Tima Vaisburd wrote: > liberato> Why is drain type not part of ...
4 years, 8 months ago (2016-04-22 01:10:14 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1862303002/160001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1862303002/160001
4 years, 8 months ago (2016-04-22 22:21:19 UTC) #39
commit-bot: I haz the power
Committed patchset #9 (id:160001)
4 years, 8 months ago (2016-04-22 22:30:58 UTC) #41
commit-bot: I haz the power
4 years, 8 months ago (2016-04-22 22:32:37 UTC) #43
Message was sent while issue was closed.
Patchset 9 (id:??) landed as
https://crrev.com/e69b434c2d5c6fd5415a772cda5e5de2f140996c
Cr-Commit-Position: refs/heads/master@{#389273}

Powered by Google App Engine
This is Rietveld 408576698