@@ -13,6 +13,65 @@ import android.media.MediaCodecInfo.CodecProfileLevel.AACObjectMain
1313import android.media.MediaCodecInfo.CodecProfileLevel.AACObjectSSR
1414import android.media.MediaCodecInfo.CodecProfileLevel.AACObjectScalable
1515import android.media.MediaCodecInfo.CodecProfileLevel.AACObjectXHE
16+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel11Band0
17+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel11Band1
18+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel11Band2
19+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel11Band3
20+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel1Band0
21+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel1Band1
22+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel1Band2
23+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel1Band3
24+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel21Band0
25+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel21Band1
26+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel21Band2
27+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel21Band3
28+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel2Band0
29+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel2Band1
30+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel2Band2
31+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel2Band3
32+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel31Band0
33+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel31Band1
34+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel31Band2
35+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel31Band3
36+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel3Band0
37+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel3Band1
38+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel3Band2
39+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel3Band3
40+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel41Band0
41+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel41Band1
42+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel41Band2
43+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel41Band3
44+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel4Band0
45+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel4Band1
46+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel4Band2
47+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel4Band3
48+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel51Band0
49+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel51Band1
50+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel51Band2
51+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel51Band3
52+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel5Band0
53+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel5Band1
54+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel5Band2
55+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel5Band3
56+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel61Band0
57+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel61Band1
58+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel61Band2
59+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel61Band3
60+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel6Band0
61+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel6Band1
62+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel6Band2
63+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel6Band3
64+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel71Band0
65+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel71Band1
66+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel71Band2
67+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel71Band3
68+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel7Band0
69+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel7Band1
70+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel7Band2
71+ import android.media.MediaCodecInfo.CodecProfileLevel.APVLevel7Band3
72+ import android.media.MediaCodecInfo.CodecProfileLevel.APVProfile422_10
73+ import android.media.MediaCodecInfo.CodecProfileLevel.APVProfile422_10HDR10
74+ import android.media.MediaCodecInfo.CodecProfileLevel.APVProfile422_10HDR10Plus
1675import android.media.MediaCodecInfo.CodecProfileLevel.AV1Level2
1776import android.media.MediaCodecInfo.CodecProfileLevel.AV1Level21
1877import android.media.MediaCodecInfo.CodecProfileLevel.AV1Level22
@@ -254,6 +313,18 @@ class ProfileLevelDisplay(private val context: Context) {
254313 }
255314 }
256315
316+ private val apvProfileNameMap =
317+ mutableMapOf<Int , String >().apply {
318+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .BAKLAVA ) {
319+ put(APVProfile422_10 , context.getString(R .string.video_profile_main10))
320+ put(APVProfile422_10HDR10 , context.getString(R .string.video_profile_main10_hdr10))
321+ put(
322+ APVProfile422_10HDR10Plus ,
323+ context.getString(R .string.video_profile_main10_hdr10_plus)
324+ )
325+ }
326+ }
327+
257328 private val h263LevelNameMap =
258329 mutableMapOf (
259330 H263Level10 to context.getString(R .string.video_level_10),
@@ -392,6 +463,72 @@ class ProfileLevelDisplay(private val context: Context) {
392463 }
393464 }
394465
466+ private val apvLevelNameMap =
467+ mutableMapOf<Int , String >().apply {
468+ if (Build .VERSION .SDK_INT >= Build .VERSION_CODES .BAKLAVA ) {
469+ putAll(
470+ mapOf (
471+ APVLevel11Band0 to " ${context.getString(R .string.video_level_11)} Band 0" ,
472+ APVLevel11Band1 to " ${context.getString(R .string.video_level_11)} Band 1" ,
473+ APVLevel11Band2 to " ${context.getString(R .string.video_level_11)} Band 2" ,
474+ APVLevel11Band3 to " ${context.getString(R .string.video_level_11)} Band 3" ,
475+ APVLevel1Band0 to " ${context.getString(R .string.video_level_1)} Band 0" ,
476+ APVLevel1Band1 to " ${context.getString(R .string.video_level_1)} Band 1" ,
477+ APVLevel1Band2 to " ${context.getString(R .string.video_level_1)} Band 2" ,
478+ APVLevel1Band3 to " ${context.getString(R .string.video_level_1)} Band 3" ,
479+ APVLevel21Band0 to " ${context.getString(R .string.video_level_21)} Band 0" ,
480+ APVLevel21Band1 to " ${context.getString(R .string.video_level_21)} Band 1" ,
481+ APVLevel21Band2 to " ${context.getString(R .string.video_level_21)} Band 2" ,
482+ APVLevel21Band3 to " ${context.getString(R .string.video_level_21)} Band 3" ,
483+ APVLevel2Band0 to " ${context.getString(R .string.video_level_2)} Band 0" ,
484+ APVLevel2Band1 to " ${context.getString(R .string.video_level_2)} Band 1" ,
485+ APVLevel2Band2 to " ${context.getString(R .string.video_level_2)} Band 2" ,
486+ APVLevel2Band3 to " ${context.getString(R .string.video_level_2)} Band 3" ,
487+ APVLevel31Band0 to " ${context.getString(R .string.video_level_31)} Band 0" ,
488+ APVLevel31Band1 to " ${context.getString(R .string.video_level_31)} Band 1" ,
489+ APVLevel31Band2 to " ${context.getString(R .string.video_level_31)} Band 2" ,
490+ APVLevel31Band3 to " ${context.getString(R .string.video_level_31)} Band 3" ,
491+ APVLevel3Band0 to " ${context.getString(R .string.video_level_3)} Band 0" ,
492+ APVLevel3Band1 to " ${context.getString(R .string.video_level_3)} Band 1" ,
493+ APVLevel3Band2 to " ${context.getString(R .string.video_level_3)} Band 2" ,
494+ APVLevel3Band3 to " ${context.getString(R .string.video_level_3)} Band 3" ,
495+ APVLevel41Band0 to " ${context.getString(R .string.video_level_41)} Band 0" ,
496+ APVLevel41Band1 to " ${context.getString(R .string.video_level_41)} Band 1" ,
497+ APVLevel41Band2 to " ${context.getString(R .string.video_level_41)} Band 2" ,
498+ APVLevel41Band3 to " ${context.getString(R .string.video_level_41)} Band 3" ,
499+ APVLevel4Band0 to " ${context.getString(R .string.video_level_4)} Band 0" ,
500+ APVLevel4Band1 to " ${context.getString(R .string.video_level_4)} Band 1" ,
501+ APVLevel4Band2 to " ${context.getString(R .string.video_level_4)} Band 2" ,
502+ APVLevel4Band3 to " ${context.getString(R .string.video_level_4)} Band 3" ,
503+ APVLevel51Band0 to " ${context.getString(R .string.video_level_51)} Band 0" ,
504+ APVLevel51Band1 to " ${context.getString(R .string.video_level_51)} Band 1" ,
505+ APVLevel51Band2 to " ${context.getString(R .string.video_level_51)} Band 2" ,
506+ APVLevel51Band3 to " ${context.getString(R .string.video_level_51)} Band 3" ,
507+ APVLevel5Band0 to " ${context.getString(R .string.video_level_5)} Band 0" ,
508+ APVLevel5Band1 to " ${context.getString(R .string.video_level_5)} Band 1" ,
509+ APVLevel5Band2 to " ${context.getString(R .string.video_level_5)} Band 2" ,
510+ APVLevel5Band3 to " ${context.getString(R .string.video_level_5)} Band 3" ,
511+ APVLevel61Band0 to " ${context.getString(R .string.video_level_61)} Band 0" ,
512+ APVLevel61Band1 to " ${context.getString(R .string.video_level_61)} Band 1" ,
513+ APVLevel61Band2 to " ${context.getString(R .string.video_level_61)} Band 2" ,
514+ APVLevel61Band3 to " ${context.getString(R .string.video_level_61)} Band 3" ,
515+ APVLevel6Band0 to " ${context.getString(R .string.video_level_6)} Band 0" ,
516+ APVLevel6Band1 to " ${context.getString(R .string.video_level_6)} Band 1" ,
517+ APVLevel6Band2 to " ${context.getString(R .string.video_level_6)} Band 2" ,
518+ APVLevel6Band3 to " ${context.getString(R .string.video_level_6)} Band 3" ,
519+ APVLevel71Band0 to " ${context.getString(R .string.video_level_71)} Band 0" ,
520+ APVLevel71Band1 to " ${context.getString(R .string.video_level_71)} Band 1" ,
521+ APVLevel71Band2 to " ${context.getString(R .string.video_level_71)} Band 2" ,
522+ APVLevel71Band3 to " ${context.getString(R .string.video_level_71)} Band 3" ,
523+ APVLevel7Band0 to " ${context.getString(R .string.video_level_7)} Band 0" ,
524+ APVLevel7Band1 to " ${context.getString(R .string.video_level_7)} Band 1" ,
525+ APVLevel7Band2 to " ${context.getString(R .string.video_level_7)} Band 2" ,
526+ APVLevel7Band3 to " ${context.getString(R .string.video_level_7)} Band 3" ,
527+ )
528+ )
529+ }
530+ }
531+
395532 private fun getProfileMap (mimeType : String ) = when (mimeType) {
396533 MediaFormat .MIMETYPE_AUDIO_AAC -> aacProfileNameMap
397534 MediaFormat .MIMETYPE_VIDEO_H263 -> h263ProfileNameMap
@@ -400,6 +537,7 @@ class ProfileLevelDisplay(private val context: Context) {
400537 MediaFormat .MIMETYPE_VIDEO_VP9 -> vp9ProfileNameMap
401538 MediaFormat .MIMETYPE_VIDEO_VP8 -> vp8ProfileNameMap
402539 MediaFormat .MIMETYPE_VIDEO_AV1 -> av1ProfileNameMap
540+ MediaFormat .MIMETYPE_VIDEO_APV -> apvProfileNameMap
403541 else -> emptyMap()
404542 }
405543
@@ -424,6 +562,7 @@ class ProfileLevelDisplay(private val context: Context) {
424562 MediaFormat .MIMETYPE_VIDEO_VP9 -> vp9LevelNameMap
425563 MediaFormat .MIMETYPE_VIDEO_VP8 -> vp8LevelNameMap
426564 MediaFormat .MIMETYPE_VIDEO_AV1 -> av1LevelNameMap
565+ MediaFormat .MIMETYPE_VIDEO_APV -> apvLevelNameMap
427566 else -> emptyMap()
428567 }
429568
0 commit comments