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

Issue 2106133003: [M52] Make AVDA fall back to software decoding if needed. (Closed)

Created:
4 years, 5 months ago by liberato (no reviews please)
Modified:
4 years, 5 months ago
Reviewers:
DaleCurtis
CC:
chromium-reviews, posciak+watch_chromium.org, feature-media-reviews_chromium.org, avayvod+watch_chromium.org, mlamouri+watch-media_chromium.org, piman+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@2743
Target Ref:
refs/pending/branch-heads/2743
Project:
chromium
Visibility:
Public.

Description

[M52] Make AVDA fall back to software decoding if needed. This is a merge to M52 of: https://codereview.chromium.org/2084143002 https://codereview.chromium.org/2091253003 Android MediaCodec creation will sometimes never come back. On a N7 (2013) with Lollipop, this can happens when an attempt to allocate a hardware codec fails, and falls back to a software codec. Once mediaserver gets into a bad state, future attempts to create a hardware codec will hang. As a result, no additional AVDA instances will get codecs. Further, destroying any of them will hang the gpu process when it tries to join the thread that handles construction. This CL does several things: - Don't join the construction thread if there are outstanding MediaCodec creations on it. While this may sometimes not shut down the thread if the AVDA is destroyed while the creation is pending (and would return if we just waited a bit longer), the thread will be shut down the next time an AVDA instance is destroyed. It isn't leaked permanently. - Fall back to requesting a software codec if we believe that construction of a hardware codec is hung. We don't attempt to salvage the AVDA instance(s) that have pending HW codecs, but future AVDA instances will fall back to software. If those HW codecs are eventually allocated, then we will start requesting HW codecs again. For example, if we simply time out too quickly, or if mediaserver is restarted, then we can try for hardware codecs for future AVDA instances. - Release hardware codecs on a separate thread, since that can hang too if mediaserver is in a bad state. BUG=613238, 622927 TBR=dalecurtis@chromium.org NOPRESUBMIT=true NOTRY=true

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+206 lines, -42 lines) Patch
M media/base/android/java/src/org/chromium/media/MediaCodecBridge.java View 4 chunks +19 lines, -3 lines 0 comments Download
M media/base/android/java/src/org/chromium/media/MediaCodecUtil.java View 6 chunks +34 lines, -6 lines 0 comments Download
M media/base/android/media_codec_bridge.h View 1 chunk +3 lines, -0 lines 0 comments Download
M media/base/android/media_codec_util.cc View 2 chunks +6 lines, -3 lines 0 comments Download
M media/base/android/ndk_media_codec_bridge.h View 1 chunk +1 line, -0 lines 0 comments Download
M media/base/android/ndk_media_codec_bridge.cc View 1 chunk +6 lines, -0 lines 0 comments Download
M media/base/android/sdk_media_codec_bridge.h View 3 chunks +7 lines, -4 lines 0 comments Download
M media/base/android/sdk_media_codec_bridge.cc View 7 chunks +23 lines, -16 lines 0 comments Download
M media/gpu/android_video_decode_accelerator.h View 1 chunk +8 lines, -0 lines 0 comments Download
M media/gpu/android_video_decode_accelerator.cc View 9 chunks +99 lines, -10 lines 0 comments Download

Messages

Total messages: 4 (1 generated)
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/2106133003/1
4 years, 5 months ago (2016-06-29 15:22:23 UTC) #2
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-06-29 15:25:16 UTC) #3
commit-bot: I haz the power
4 years, 5 months ago (2016-06-29 15:25:29 UTC) #4
Message was sent while issue was closed.
CQ bit was unchecked.

Powered by Google App Engine
This is Rietveld 408576698