0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-01-21 00:52:43 -05:00

update api

This commit is contained in:
mertalev 2024-05-14 20:13:46 -04:00
parent b6808c1675
commit 4db0717a08
No known key found for this signature in database
GPG key ID: 13C97EF14A338984
5 changed files with 20 additions and 1 deletions

View file

@ -9,6 +9,7 @@ import 'package:openapi/api.dart';
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**accel** | [**TranscodeHWAccel**](TranscodeHWAccel.md) | |
**accelDecode** | **bool** | |
**acceptedAudioCodecs** | [**List<AudioCodec>**](AudioCodec.md) | | [default to const []]
**acceptedVideoCodecs** | [**List<VideoCodec>**](VideoCodec.md) | | [default to const []]
**bframes** | **int** | |

View file

@ -14,6 +14,7 @@ class SystemConfigFFmpegDto {
/// Returns a new [SystemConfigFFmpegDto] instance.
SystemConfigFFmpegDto({
required this.accel,
required this.accelDecode,
this.acceptedAudioCodecs = const [],
this.acceptedVideoCodecs = const [],
required this.bframes,
@ -37,6 +38,8 @@ class SystemConfigFFmpegDto {
TranscodeHWAccel accel;
bool accelDecode;
List<AudioCodec> acceptedAudioCodecs;
List<VideoCodec> acceptedVideoCodecs;
@ -87,6 +90,7 @@ class SystemConfigFFmpegDto {
@override
bool operator ==(Object other) => identical(this, other) || other is SystemConfigFFmpegDto &&
other.accel == accel &&
other.accelDecode == accelDecode &&
_deepEquality.equals(other.acceptedAudioCodecs, acceptedAudioCodecs) &&
_deepEquality.equals(other.acceptedVideoCodecs, acceptedVideoCodecs) &&
other.bframes == bframes &&
@ -111,6 +115,7 @@ class SystemConfigFFmpegDto {
int get hashCode =>
// ignore: unnecessary_parenthesis
(accel.hashCode) +
(accelDecode.hashCode) +
(acceptedAudioCodecs.hashCode) +
(acceptedVideoCodecs.hashCode) +
(bframes.hashCode) +
@ -132,11 +137,12 @@ class SystemConfigFFmpegDto {
(twoPass.hashCode);
@override
String toString() => 'SystemConfigFFmpegDto[accel=$accel, acceptedAudioCodecs=$acceptedAudioCodecs, acceptedVideoCodecs=$acceptedVideoCodecs, bframes=$bframes, cqMode=$cqMode, crf=$crf, gopSize=$gopSize, maxBitrate=$maxBitrate, npl=$npl, preferredHwDevice=$preferredHwDevice, preset=$preset, refs=$refs, targetAudioCodec=$targetAudioCodec, targetResolution=$targetResolution, targetVideoCodec=$targetVideoCodec, temporalAQ=$temporalAQ, threads=$threads, tonemap=$tonemap, transcode=$transcode, twoPass=$twoPass]';
String toString() => 'SystemConfigFFmpegDto[accel=$accel, accelDecode=$accelDecode, acceptedAudioCodecs=$acceptedAudioCodecs, acceptedVideoCodecs=$acceptedVideoCodecs, bframes=$bframes, cqMode=$cqMode, crf=$crf, gopSize=$gopSize, maxBitrate=$maxBitrate, npl=$npl, preferredHwDevice=$preferredHwDevice, preset=$preset, refs=$refs, targetAudioCodec=$targetAudioCodec, targetResolution=$targetResolution, targetVideoCodec=$targetVideoCodec, temporalAQ=$temporalAQ, threads=$threads, tonemap=$tonemap, transcode=$transcode, twoPass=$twoPass]';
Map<String, dynamic> toJson() {
final json = <String, dynamic>{};
json[r'accel'] = this.accel;
json[r'accelDecode'] = this.accelDecode;
json[r'acceptedAudioCodecs'] = this.acceptedAudioCodecs;
json[r'acceptedVideoCodecs'] = this.acceptedVideoCodecs;
json[r'bframes'] = this.bframes;
@ -168,6 +174,7 @@ class SystemConfigFFmpegDto {
return SystemConfigFFmpegDto(
accel: TranscodeHWAccel.fromJson(json[r'accel'])!,
accelDecode: mapValueOfType<bool>(json, r'accelDecode')!,
acceptedAudioCodecs: AudioCodec.listFromJson(json[r'acceptedAudioCodecs']),
acceptedVideoCodecs: VideoCodec.listFromJson(json[r'acceptedVideoCodecs']),
bframes: mapValueOfType<int>(json, r'bframes')!,
@ -235,6 +242,7 @@ class SystemConfigFFmpegDto {
/// The list of required keys that must be present in a JSON.
static const requiredKeys = <String>{
'accel',
'accelDecode',
'acceptedAudioCodecs',
'acceptedVideoCodecs',
'bframes',

View file

@ -21,6 +21,11 @@ void main() {
// TODO
});
// bool accelDecode
test('to test the property `accelDecode`', () async {
// TODO
});
// List<AudioCodec> acceptedAudioCodecs (default value: const [])
test('to test the property `acceptedAudioCodecs`', () async {
// TODO

View file

@ -10002,6 +10002,9 @@
"accel": {
"$ref": "#/components/schemas/TranscodeHWAccel"
},
"accelDecode": {
"type": "boolean"
},
"acceptedAudioCodecs": {
"items": {
"$ref": "#/components/schemas/AudioCodec"
@ -10077,6 +10080,7 @@
},
"required": [
"accel",
"accelDecode",
"acceptedAudioCodecs",
"acceptedVideoCodecs",
"bframes",

View file

@ -863,6 +863,7 @@ export type AssetFullSyncDto = {
};
export type SystemConfigFFmpegDto = {
accel: TranscodeHWAccel;
accelDecode: boolean;
acceptedAudioCodecs: AudioCodec[];
acceptedVideoCodecs: VideoCodec[];
bframes: number;