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

Issue 2147843002: Drop idle MediaCodec instances after a few seconds within AVDA. (Closed)

Created:
4 years, 5 months ago by DaleCurtis
Modified:
4 years, 1 month ago
CC:
chromium-reviews, feature-media-reviews_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

Drop idle MediaCodec instances after a few seconds within AVDA. Idle in this case means we have not seen a Decode() call from the renderer yet. These cases are not caught by our normal suspend pipeline in WMPI because the rendere has not reached the "have future data" state. I.e. a site has appended just initialization segments to the demuxer, but is stalled waiting for the first frame. BUG=612909 TEST=idle codecs release fast enough to prevent device fallover.

Patch Set 1 #

Total comments: 7

Patch Set 2 : Reduce to 1 second. Make const. #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -2 lines) Patch
M media/gpu/android_video_decode_accelerator.h View 1 2 chunks +9 lines, -0 lines 0 comments Download
M media/gpu/android_video_decode_accelerator.cc View 1 6 chunks +20 lines, -2 lines 2 comments Download

Messages

Total messages: 11 (5 generated)
DaleCurtis
4 years, 5 months ago (2016-07-13 00:02:53 UTC) #2
liberato (no reviews please)
nice. https://codereview.chromium.org/2147843002/diff/1/media/gpu/android_video_decode_accelerator.cc File media/gpu/android_video_decode_accelerator.cc (right): https://codereview.chromium.org/2147843002/diff/1/media/gpu/android_video_decode_accelerator.cc#newcode966 media/gpu/android_video_decode_accelerator.cc:966: no_decode_timeout_.Stop(); i think that you also need to ...
4 years, 5 months ago (2016-07-13 05:25:55 UTC) #3
DaleCurtis
watk@ can you test this again on your device? I reduced the timeout to 1 ...
4 years, 5 months ago (2016-07-13 21:12:21 UTC) #4
liberato (no reviews please)
lgtm
4 years, 5 months ago (2016-07-13 21:16:21 UTC) #5
watk
Title still says "few seconds". lgtm if you want to land this. The crash is ...
4 years, 5 months ago (2016-07-13 22:38:25 UTC) #10
liberato (no reviews please)
4 years, 5 months ago (2016-07-14 15:33:57 UTC) #11
https://codereview.chromium.org/2147843002/diff/20001/media/gpu/android_video...
File media/gpu/android_video_decode_accelerator.cc (right):

https://codereview.chromium.org/2147843002/diff/20001/media/gpu/android_video...
media/gpu/android_video_decode_accelerator.cc:1804: codec_needs_reset_ = true;
On 2016/07/13 22:38:25, watk wrote:
> Do we need to call strategy_->CodecChanged(nullptr)?
> 
> I feel like the answer is no, but just wanted to double check you'd thought
> about it.

i don't think that we do, since no decode has been issued => no frames
outstanding.  however, it's probably a good idea since it's safe to call
CodecChanged here, and more robust.

good catch.

Powered by Google App Engine
This is Rietveld 408576698