Skip to content
Commit a0b72a6c authored by Chong Zhang's avatar Chong Zhang
Browse files

fix slow get caps -- DO NOT MERGE

When get caps is called on an MediaCodec object, try to
use the codec info for that MediaCodec first as it should
be available during codec construction. Only when that
somehow failed go and initialize the full MediaCodecList,
as building the entire list could be very slow.

And when cloning the CodecCapabilities from MediaCodecInfo,
copy the fields directly and the fields (other than the ones
modifiable by client) are immutable after construction.

bug: 74073607

Test:
CTS media post submit:
cts-tradefed run cts-dev --module CtsMediaTestCases --compatibility:module-arg CtsMediaTestCases:include-annotation:android.platform.test.annotations.RequiresDevice

Change-Id: I4ae5f2431da8528e1eca093c5cfb98abcb4a5bbf
(cherry picked from commit 90d7304a)
parent dbeb6bc3
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment