fix: supportFormats codecs match dvh1

This commit is contained in:
guozhigq
2023-08-26 15:23:22 +08:00
parent a0e51c86fc
commit a928c575ef
3 changed files with 34 additions and 21 deletions

View File

@ -93,26 +93,19 @@ extension AudioQualityDesc on AudioQuality {
}
enum VideoDecodeFormats {
DVH1,
AV1,
HEVC,
AVC,
}
extension VideoDecodeFormatsDesc on VideoDecodeFormats {
static final List<String> _descList = [
'AV1',
'HEVC',
'AVC',
];
static final List<String> _descList = ['DVH1', 'AV1', 'HEVC', 'AVC'];
get description => _descList[index];
}
extension VideoDecodeFormatsCode on VideoDecodeFormats {
static final List<String> _codeList = [
'av01',
'hev1',
'avc1',
];
static final List<String> _codeList = ['dvh1', 'av01', 'hev1', 'avc1'];
get code => _codeList[index];
static VideoDecodeFormats? fromCode(String code) {