forked from crosswalk-project/chromium-crosswalk
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Check that MediaCodec sends FORMAT_CHANGED before decoded buffers.
It looks like MediaCodec erroneously returns decoded frames before sending an OUTPUT_FORMAT_CHANGED notification. This will cause us to SendDecodedFrameToClient, then crashes when it tries to get a picture buffer to use. MediaCodec is not supposed to do that, see EncodeDecodeTest.java line 617 in the android cts tests. Once it does, it's unclear what state it's in. We post an error and stop decoding. I do not have a local repro, so this is my best guess about what is causing some reported crashes. They seem to happen only on JB with Adreno 330 GPUs (Snapdragon 800 series), driver version 45. This combination has been added to the blacklist for accelerated video decoding (AVDA). This CL also adds a metric for how often this occurs, to help to identify other affected devices. BUG=585963 CQ_INCLUDE_TRYBOTS=tryserver.chromium.win:win_optional_gpu_tests_rel;tryserver.chromium.mac:mac_optional_gpu_tests_rel Review URL: https://codereview.chromium.org/1685303004 Cr-Commit-Position: refs/heads/master@{#378340}
- Loading branch information
1 parent
542f9e5
commit 46e95bb
Showing
3 changed files
with
60 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19372,6 +19372,16 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. | |
</summary> | ||
</histogram> | ||
|
||
<histogram name="Media.AVDA.MissingFormatChanged" enum="BooleanFormatChanged"> | ||
<owner>[email protected]</owner> | ||
<summary> | ||
Number of times that AVDA stopped decoding because MediaCodec failed to | ||
provide a FORMAT_CHANGED message before sending decoded frames back. True | ||
counts indicate instances where FORMAT_CHANGE was missed, while false | ||
instances indicate any MediaCodec initialization by AVDA. | ||
</summary> | ||
</histogram> | ||
|
||
<histogram name="Media.AvdaCodecImage.WaitTimeForFrame" units="ms"> | ||
<owner>[email protected]</owner> | ||
<summary> | ||
|
@@ -59755,6 +59765,11 @@ http://cs/file:chrome/histograms.xml - but prefer this file for new entries. | |
<int value="1" label="Force Disabled"/> | ||
</enum> | ||
|
||
<enum name="BooleanFormatChanged" type="int"> | ||
<int value="0" label="Any Codec Initialized"/> | ||
<int value="1" label="Missing FORMAT_CHANGED message"/> | ||
</enum> | ||
|
||
<enum name="BooleanFormManager" type="int"> | ||
<int value="0" label="Has Form Manager"/> | ||
<int value="1" label="Lacks Form Manager"/> | ||
|