Commit 4438cdb2 by bachinger Committed by Oliver Woodman

return lg specific mime type as codec supported type for OMX.lge.alac.decoder

ISSUE: #5938
PiperOrigin-RevId: 261097045
parent 309d043c
......@@ -346,6 +346,13 @@ public final class MediaCodecUtil {
boolean secureDecodersExplicit,
String requestedMimeType) {
if (isCodecUsableDecoder(info, name, secureDecodersExplicit, requestedMimeType)) {
String[] supportedTypes = info.getSupportedTypes();
for (String supportedType : supportedTypes) {
if (supportedType.equalsIgnoreCase(requestedMimeType)) {
return supportedType;
}
}
if (requestedMimeType.equals(MimeTypes.VIDEO_DOLBY_VISION)) {
// Handle decoders that declare support for DV via MIME types that aren't
// video/dolby-vision.
......@@ -355,13 +362,12 @@ public final class MediaCodecUtil {
|| "OMX.realtek.video.decoder.tunneled".equals(name)) {
return "video/dv_hevc";
}
}
String[] supportedTypes = info.getSupportedTypes();
for (String supportedType : supportedTypes) {
if (supportedType.equalsIgnoreCase(requestedMimeType)) {
return supportedType;
}
} else if (requestedMimeType.equals(MimeTypes.AUDIO_ALAC)
&& "OMX.lge.alac.decoder".equals(name)) {
return "audio/x-lg-alac";
} else if (requestedMimeType.equals(MimeTypes.AUDIO_FLAC)
&& "OMX.lge.flac.decoder".equals(name)) {
return "audio/x-lg-flac";
}
}
return null;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment