Ignore secure decoders. They shouldn't be explicitly listed.

This commit is contained in:
Oliver Woodman 2014-10-27 11:00:04 +00:00
parent 067422a491
commit 192cdc66a2

View file

@ -76,7 +76,7 @@ public class MediaCodecUtil {
for (int i = 0; i < numberOfCodecs; i++) {
MediaCodecInfo info = MediaCodecList.getCodecInfoAt(i);
String codecName = info.getName();
if (!info.isEncoder() && isOmxCodec(codecName)) {
if (!info.isEncoder() && codecName.startsWith("OMX.") && !codecName.endsWith(".secure")) {
String[] supportedTypes = info.getSupportedTypes();
for (int j = 0; j < supportedTypes.length; j++) {
String supportedType = supportedTypes[j];
@ -91,10 +91,6 @@ public class MediaCodecUtil {
return null;
}
private static boolean isOmxCodec(String name) {
return name.startsWith("OMX.");
}
private static boolean isAdaptive(CodecCapabilities capabilities) {
if (Util.SDK_INT >= 19) {
return isAdaptiveV19(capabilities);