mirror of
https://github.com/androidx/media.git
synced 2025-05-03 21:57:46 +08:00
return lg specific mime type as codec supported type for OMX.lge.alac.decoder
ISSUE: #5938 PiperOrigin-RevId: 261097045
This commit is contained in:
parent
b2c71e8b3f
commit
1bb0703f2b
@ -370,6 +370,13 @@ public final class MediaCodecUtil {
|
|||||||
boolean secureDecodersExplicit,
|
boolean secureDecodersExplicit,
|
||||||
String requestedMimeType) {
|
String requestedMimeType) {
|
||||||
if (isCodecUsableDecoder(info, name, secureDecodersExplicit, 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)) {
|
if (requestedMimeType.equals(MimeTypes.VIDEO_DOLBY_VISION)) {
|
||||||
// Handle decoders that declare support for DV via MIME types that aren't
|
// Handle decoders that declare support for DV via MIME types that aren't
|
||||||
// video/dolby-vision.
|
// video/dolby-vision.
|
||||||
@ -379,13 +386,12 @@ public final class MediaCodecUtil {
|
|||||||
|| "OMX.realtek.video.decoder.tunneled".equals(name)) {
|
|| "OMX.realtek.video.decoder.tunneled".equals(name)) {
|
||||||
return "video/dv_hevc";
|
return "video/dv_hevc";
|
||||||
}
|
}
|
||||||
}
|
} else if (requestedMimeType.equals(MimeTypes.AUDIO_ALAC)
|
||||||
|
&& "OMX.lge.alac.decoder".equals(name)) {
|
||||||
String[] supportedTypes = info.getSupportedTypes();
|
return "audio/x-lg-alac";
|
||||||
for (String supportedType : supportedTypes) {
|
} else if (requestedMimeType.equals(MimeTypes.AUDIO_FLAC)
|
||||||
if (supportedType.equalsIgnoreCase(requestedMimeType)) {
|
&& "OMX.lge.flac.decoder".equals(name)) {
|
||||||
return supportedType;
|
return "audio/x-lg-flac";
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user