mirror of
https://github.com/samsonjs/media.git
synced 2026-03-30 10:15:48 +00: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
309d043cee
commit
4438cdb282
1 changed files with 13 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue