2022-12-09 22:51:42 +02:00
|
|
|
//
|
|
|
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
|
|
//
|
|
|
|
// @dart=2.12
|
|
|
|
|
|
|
|
// ignore_for_file: unused_element, unused_import
|
|
|
|
// ignore_for_file: always_put_required_named_parameters_first
|
|
|
|
// ignore_for_file: constant_identifier_names
|
|
|
|
// ignore_for_file: lines_longer_than_80_chars
|
|
|
|
|
|
|
|
part of openapi.api;
|
|
|
|
|
|
|
|
class SystemConfigFFmpegDto {
|
|
|
|
/// Returns a new [SystemConfigFFmpegDto] instance.
|
|
|
|
SystemConfigFFmpegDto({
|
2023-08-02 03:56:10 +02:00
|
|
|
required this.accel,
|
2022-12-09 22:51:42 +02:00
|
|
|
required this.crf,
|
2023-08-01 18:49:18 +02:00
|
|
|
required this.maxBitrate,
|
2023-07-09 04:43:11 +02:00
|
|
|
required this.preset,
|
2023-08-01 18:49:18 +02:00
|
|
|
required this.targetAudioCodec,
|
2023-04-04 03:42:53 +02:00
|
|
|
required this.targetResolution,
|
2023-08-01 18:49:18 +02:00
|
|
|
required this.targetVideoCodec,
|
|
|
|
required this.threads,
|
|
|
|
required this.transcode,
|
2023-05-22 20:07:43 +02:00
|
|
|
required this.twoPass,
|
2022-12-09 22:51:42 +02:00
|
|
|
});
|
|
|
|
|
2023-08-02 03:56:10 +02:00
|
|
|
TranscodeHWAccel accel;
|
|
|
|
|
2023-05-22 20:07:43 +02:00
|
|
|
int crf;
|
|
|
|
|
2023-08-01 18:49:18 +02:00
|
|
|
String maxBitrate;
|
2022-12-09 22:51:42 +02:00
|
|
|
|
2023-08-01 18:49:18 +02:00
|
|
|
String preset;
|
2023-07-09 04:43:11 +02:00
|
|
|
|
|
|
|
AudioCodec targetAudioCodec;
|
2022-12-09 22:51:42 +02:00
|
|
|
|
2023-08-01 18:49:18 +02:00
|
|
|
String targetResolution;
|
2022-12-09 22:51:42 +02:00
|
|
|
|
2023-08-01 18:49:18 +02:00
|
|
|
VideoCodec targetVideoCodec;
|
2022-12-09 22:51:42 +02:00
|
|
|
|
2023-08-01 18:49:18 +02:00
|
|
|
int threads;
|
2022-12-09 22:51:42 +02:00
|
|
|
|
2023-08-01 18:49:18 +02:00
|
|
|
TranscodePolicy transcode;
|
2023-05-22 20:07:43 +02:00
|
|
|
|
|
|
|
bool twoPass;
|
|
|
|
|
2022-12-09 22:51:42 +02:00
|
|
|
@override
|
|
|
|
bool operator ==(Object other) => identical(this, other) || other is SystemConfigFFmpegDto &&
|
2023-08-06 21:48:25 +02:00
|
|
|
other.accel == accel &&
|
|
|
|
other.crf == crf &&
|
|
|
|
other.maxBitrate == maxBitrate &&
|
|
|
|
other.preset == preset &&
|
|
|
|
other.targetAudioCodec == targetAudioCodec &&
|
|
|
|
other.targetResolution == targetResolution &&
|
|
|
|
other.targetVideoCodec == targetVideoCodec &&
|
|
|
|
other.threads == threads &&
|
|
|
|
other.transcode == transcode &&
|
|
|
|
other.twoPass == twoPass;
|
2022-12-09 22:51:42 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
int get hashCode =>
|
|
|
|
// ignore: unnecessary_parenthesis
|
2023-08-02 03:56:10 +02:00
|
|
|
(accel.hashCode) +
|
2022-12-09 22:51:42 +02:00
|
|
|
(crf.hashCode) +
|
2023-08-01 18:49:18 +02:00
|
|
|
(maxBitrate.hashCode) +
|
2023-07-09 04:43:11 +02:00
|
|
|
(preset.hashCode) +
|
2023-08-01 18:49:18 +02:00
|
|
|
(targetAudioCodec.hashCode) +
|
2023-04-04 03:42:53 +02:00
|
|
|
(targetResolution.hashCode) +
|
2023-08-01 18:49:18 +02:00
|
|
|
(targetVideoCodec.hashCode) +
|
|
|
|
(threads.hashCode) +
|
|
|
|
(transcode.hashCode) +
|
2023-07-09 04:43:11 +02:00
|
|
|
(twoPass.hashCode);
|
2022-12-09 22:51:42 +02:00
|
|
|
|
|
|
|
@override
|
2023-08-02 03:56:10 +02:00
|
|
|
String toString() => 'SystemConfigFFmpegDto[accel=$accel, crf=$crf, maxBitrate=$maxBitrate, preset=$preset, targetAudioCodec=$targetAudioCodec, targetResolution=$targetResolution, targetVideoCodec=$targetVideoCodec, threads=$threads, transcode=$transcode, twoPass=$twoPass]';
|
2022-12-09 22:51:42 +02:00
|
|
|
|
|
|
|
Map<String, dynamic> toJson() {
|
2023-01-10 06:08:45 +02:00
|
|
|
final json = <String, dynamic>{};
|
2023-08-02 03:56:10 +02:00
|
|
|
json[r'accel'] = this.accel;
|
2023-01-10 06:08:45 +02:00
|
|
|
json[r'crf'] = this.crf;
|
2023-08-01 18:49:18 +02:00
|
|
|
json[r'maxBitrate'] = this.maxBitrate;
|
2023-07-09 04:43:11 +02:00
|
|
|
json[r'preset'] = this.preset;
|
2023-08-01 18:49:18 +02:00
|
|
|
json[r'targetAudioCodec'] = this.targetAudioCodec;
|
2023-04-04 03:42:53 +02:00
|
|
|
json[r'targetResolution'] = this.targetResolution;
|
2023-08-01 18:49:18 +02:00
|
|
|
json[r'targetVideoCodec'] = this.targetVideoCodec;
|
|
|
|
json[r'threads'] = this.threads;
|
|
|
|
json[r'transcode'] = this.transcode;
|
2023-05-22 20:07:43 +02:00
|
|
|
json[r'twoPass'] = this.twoPass;
|
2023-01-10 06:08:45 +02:00
|
|
|
return json;
|
2022-12-09 22:51:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/// Returns a new [SystemConfigFFmpegDto] instance and imports its values from
|
|
|
|
/// [value] if it's a [Map], null otherwise.
|
|
|
|
// ignore: prefer_constructors_over_static_methods
|
|
|
|
static SystemConfigFFmpegDto? fromJson(dynamic value) {
|
|
|
|
if (value is Map) {
|
|
|
|
final json = value.cast<String, dynamic>();
|
|
|
|
|
|
|
|
return SystemConfigFFmpegDto(
|
2023-08-02 03:56:10 +02:00
|
|
|
accel: TranscodeHWAccel.fromJson(json[r'accel'])!,
|
2023-05-22 20:07:43 +02:00
|
|
|
crf: mapValueOfType<int>(json, r'crf')!,
|
2023-08-01 18:49:18 +02:00
|
|
|
maxBitrate: mapValueOfType<String>(json, r'maxBitrate')!,
|
2022-12-09 22:51:42 +02:00
|
|
|
preset: mapValueOfType<String>(json, r'preset')!,
|
2023-08-01 18:49:18 +02:00
|
|
|
targetAudioCodec: AudioCodec.fromJson(json[r'targetAudioCodec'])!,
|
2023-04-04 03:42:53 +02:00
|
|
|
targetResolution: mapValueOfType<String>(json, r'targetResolution')!,
|
2023-08-01 18:49:18 +02:00
|
|
|
targetVideoCodec: VideoCodec.fromJson(json[r'targetVideoCodec'])!,
|
|
|
|
threads: mapValueOfType<int>(json, r'threads')!,
|
|
|
|
transcode: TranscodePolicy.fromJson(json[r'transcode'])!,
|
2023-05-22 20:07:43 +02:00
|
|
|
twoPass: mapValueOfType<bool>(json, r'twoPass')!,
|
2022-12-09 22:51:42 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
2023-05-03 21:27:57 +02:00
|
|
|
static List<SystemConfigFFmpegDto> listFromJson(dynamic json, {bool growable = false,}) {
|
2022-12-09 22:51:42 +02:00
|
|
|
final result = <SystemConfigFFmpegDto>[];
|
|
|
|
if (json is List && json.isNotEmpty) {
|
|
|
|
for (final row in json) {
|
|
|
|
final value = SystemConfigFFmpegDto.fromJson(row);
|
|
|
|
if (value != null) {
|
|
|
|
result.add(value);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return result.toList(growable: growable);
|
|
|
|
}
|
|
|
|
|
|
|
|
static Map<String, SystemConfigFFmpegDto> mapFromJson(dynamic json) {
|
|
|
|
final map = <String, SystemConfigFFmpegDto>{};
|
|
|
|
if (json is Map && json.isNotEmpty) {
|
|
|
|
json = json.cast<String, dynamic>(); // ignore: parameter_assignments
|
|
|
|
for (final entry in json.entries) {
|
|
|
|
final value = SystemConfigFFmpegDto.fromJson(entry.value);
|
|
|
|
if (value != null) {
|
|
|
|
map[entry.key] = value;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
|
|
|
// maps a json object with a list of SystemConfigFFmpegDto-objects as value to a dart map
|
|
|
|
static Map<String, List<SystemConfigFFmpegDto>> mapListFromJson(dynamic json, {bool growable = false,}) {
|
|
|
|
final map = <String, List<SystemConfigFFmpegDto>>{};
|
|
|
|
if (json is Map && json.isNotEmpty) {
|
2023-05-03 21:27:57 +02:00
|
|
|
// ignore: parameter_assignments
|
|
|
|
json = json.cast<String, dynamic>();
|
2022-12-09 22:51:42 +02:00
|
|
|
for (final entry in json.entries) {
|
2023-05-03 21:27:57 +02:00
|
|
|
map[entry.key] = SystemConfigFFmpegDto.listFromJson(entry.value, growable: growable,);
|
2022-12-09 22:51:42 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
return map;
|
|
|
|
}
|
|
|
|
|
|
|
|
/// The list of required keys that must be present in a JSON.
|
|
|
|
static const requiredKeys = <String>{
|
2023-08-02 03:56:10 +02:00
|
|
|
'accel',
|
2022-12-09 22:51:42 +02:00
|
|
|
'crf',
|
2023-08-01 18:49:18 +02:00
|
|
|
'maxBitrate',
|
2023-07-09 04:43:11 +02:00
|
|
|
'preset',
|
2023-08-01 18:49:18 +02:00
|
|
|
'targetAudioCodec',
|
2023-04-04 03:42:53 +02:00
|
|
|
'targetResolution',
|
2023-08-01 18:49:18 +02:00
|
|
|
'targetVideoCodec',
|
|
|
|
'threads',
|
|
|
|
'transcode',
|
2023-05-22 20:07:43 +02:00
|
|
|
'twoPass',
|
2022-12-09 22:51:42 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|