mirror of
https://github.com/HChaZZY/PiliPlus.git
synced 2025-12-26 03:56:45 +08:00
feat: support dynaudnorm & webp (#1186)
* feat: support dynaudnorm & webp
* Revert "remove audio_normalization"
This reverts commit 477b59ce89.
* feat: save webp
* mod: strokeWidth
* feat: webp preset
* feat: save webp select qa
* upgrade volume_controller
This commit is contained in:
committed by
GitHub
parent
f0828ea18c
commit
e8a674ca2a
@@ -1,34 +1,19 @@
|
||||
// ignore_for_file: constant_identifier_names
|
||||
|
||||
enum VideoDecodeFormatType {
|
||||
DVH1,
|
||||
AV1,
|
||||
HEVC,
|
||||
AVC,
|
||||
}
|
||||
|
||||
extension VideoDecodeFormatTypeExt on VideoDecodeFormatType {
|
||||
String get description => const ['DVH1', 'AV1', 'HEVC', 'AVC'][index];
|
||||
|
||||
static const List<String> _codeList = ['dvh1', 'av01', 'hev1', 'avc1'];
|
||||
String get code => _codeList[index];
|
||||
|
||||
static VideoDecodeFormatType? fromCode(String code) {
|
||||
final index = _codeList.indexOf(code);
|
||||
if (index != -1) {
|
||||
return VideoDecodeFormatType.values[index];
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
static VideoDecodeFormatType? fromString(String val) {
|
||||
var result = VideoDecodeFormatType.values.first;
|
||||
for (var i in _codeList) {
|
||||
if (val.startsWith(i)) {
|
||||
result = VideoDecodeFormatType.values[_codeList.indexOf(i)];
|
||||
break;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
DVH1('dvh1'),
|
||||
AV1('av01'),
|
||||
HEVC('hev1'),
|
||||
AVC('avc1');
|
||||
|
||||
String get description => name;
|
||||
final String code;
|
||||
|
||||
const VideoDecodeFormatType(this.code);
|
||||
|
||||
static VideoDecodeFormatType fromCode(String code) =>
|
||||
values.firstWhere((i) => i.code == code);
|
||||
|
||||
static VideoDecodeFormatType fromString(String val) =>
|
||||
values.firstWhere((i) => val.startsWith(i.code));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user