mirror of
https://github.com/androidx/media.git
synced 2025-04-30 06:46:50 +08:00
Use FEATURE_HlgEditing to determine HDR support
PiperOrigin-RevId: 657174992
This commit is contained in:
parent
f1ed195c10
commit
7d784d4067
@ -96,9 +96,19 @@ public final class EncoderUtil {
|
|||||||
ImmutableList.Builder<MediaCodecInfo> resultBuilder = new ImmutableList.Builder<>();
|
ImmutableList.Builder<MediaCodecInfo> resultBuilder = new ImmutableList.Builder<>();
|
||||||
for (int i = 0; i < encoders.size(); i++) {
|
for (int i = 0; i < encoders.size(); i++) {
|
||||||
MediaCodecInfo mediaCodecInfo = encoders.get(i);
|
MediaCodecInfo mediaCodecInfo = encoders.get(i);
|
||||||
if (mediaCodecInfo.isAlias()
|
if (mediaCodecInfo.isAlias()) {
|
||||||
|| !isFeatureSupported(
|
continue;
|
||||||
mediaCodecInfo, mimeType, MediaCodecInfo.CodecCapabilities.FEATURE_HdrEditing)) {
|
}
|
||||||
|
boolean hasNeededHdrSupport =
|
||||||
|
isFeatureSupported(
|
||||||
|
mediaCodecInfo, mimeType, MediaCodecInfo.CodecCapabilities.FEATURE_HdrEditing)
|
||||||
|
|| (colorInfo.colorTransfer == C.COLOR_TRANSFER_HLG
|
||||||
|
&& Util.SDK_INT >= 35
|
||||||
|
&& isFeatureSupported(
|
||||||
|
mediaCodecInfo,
|
||||||
|
mimeType,
|
||||||
|
MediaCodecInfo.CodecCapabilities.FEATURE_HlgEditing));
|
||||||
|
if (!hasNeededHdrSupport) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
for (MediaCodecInfo.CodecProfileLevel codecProfileLevel :
|
for (MediaCodecInfo.CodecProfileLevel codecProfileLevel :
|
||||||
|
Loading…
x
Reference in New Issue
Block a user