mirror of
https://github.com/samsonjs/media.git
synced 2026-03-25 09:25:53 +00:00
Use FEATURE_HlgEditing to determine HDR support
PiperOrigin-RevId: 657174992
This commit is contained in:
parent
f1ed195c10
commit
7d784d4067
1 changed files with 13 additions and 3 deletions
|
|
@ -96,9 +96,19 @@ public final class EncoderUtil {
|
|||
ImmutableList.Builder<MediaCodecInfo> resultBuilder = new ImmutableList.Builder<>();
|
||||
for (int i = 0; i < encoders.size(); i++) {
|
||||
MediaCodecInfo mediaCodecInfo = encoders.get(i);
|
||||
if (mediaCodecInfo.isAlias()
|
||||
|| !isFeatureSupported(
|
||||
mediaCodecInfo, mimeType, MediaCodecInfo.CodecCapabilities.FEATURE_HdrEditing)) {
|
||||
if (mediaCodecInfo.isAlias()) {
|
||||
continue;
|
||||
}
|
||||
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;
|
||||
}
|
||||
for (MediaCodecInfo.CodecProfileLevel codecProfileLevel :
|
||||
|
|
|
|||
Loading…
Reference in a new issue