Set profile for DV profile 10 AV1

PiperOrigin-RevId: 612918953
This commit is contained in:
andrewlewis 2024-03-05 11:50:49 -08:00 committed by Copybara-Service
parent 9abe9e2a97
commit 11b14d7594
2 changed files with 11 additions and 0 deletions

View file

@ -1342,6 +1342,8 @@ public final class MediaCodecUtil {
return CodecProfileLevel.DolbyVisionProfileDvheSt; return CodecProfileLevel.DolbyVisionProfileDvheSt;
case "09": case "09":
return CodecProfileLevel.DolbyVisionProfileDvavSe; return CodecProfileLevel.DolbyVisionProfileDvavSe;
case "10":
return CodecProfileLevel.DolbyVisionProfileDvav110;
default: default:
return null; return null;
} }

View file

@ -69,6 +69,15 @@ public final class MediaCodecUtilTest {
MediaCodecInfo.CodecProfileLevel.DolbyVisionLevelFhd60); MediaCodecInfo.CodecProfileLevel.DolbyVisionLevelFhd60);
} }
@Test
public void getCodecProfileAndLevel_handlesDolbyVisionProfile10CodecString() {
assertCodecProfileAndLevelForCodecsString(
MimeTypes.VIDEO_DOLBY_VISION,
"dav1.10.09",
MediaCodecInfo.CodecProfileLevel.DolbyVisionProfileDvav110,
MediaCodecInfo.CodecProfileLevel.DolbyVisionLevelUhd60);
}
@Test @Test
public void getCodecProfileAndLevel_handlesAv1ProfileMain8CodecString() { public void getCodecProfileAndLevel_handlesAv1ProfileMain8CodecString() {
assertCodecProfileAndLevelForCodecsString( assertCodecProfileAndLevelForCodecsString(