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,
|
2024-01-26 19:02:56 +02:00
|
|
|
this.acceptedAudioCodecs = const [],
|
|
|
|
this.acceptedVideoCodecs = const [],
|
2023-09-03 03:22:42 +02:00
|
|
|
required this.bframes,
|
|
|
|
required this.cqMode,
|
2022-12-09 22:51:42 +02:00
|
|
|
required this.crf,
|
2023-09-03 03:22:42 +02:00
|
|
|
required this.gopSize,
|
2023-08-01 18:49:18 +02:00
|
|
|
required this.maxBitrate,
|
2023-09-03 03:22:42 +02:00
|
|
|
required this.npl,
|
2024-01-30 03:40:02 +02:00
|
|
|
required this.preferredHwDevice,
|
2023-07-09 04:43:11 +02:00
|
|
|
required this.preset,
|
2023-09-03 03:22:42 +02:00
|
|
|
required this.refs,
|
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,
|
2023-09-03 03:22:42 +02:00
|
|
|
required this.temporalAQ,
|
2023-08-01 18:49:18 +02:00
|
|
|
required this.threads,
|
2023-08-07 22:35:25 +02:00
|
|
|
required this.tonemap,
|
2023-08-01 18:49:18 +02:00
|
|
|
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;
|
|
|
|
|
2024-01-26 19:02:56 +02:00
|
|
|
List<AudioCodec> acceptedAudioCodecs;
|
|
|
|
|
|
|
|
List<VideoCodec> acceptedVideoCodecs;
|
|
|
|
|
2023-09-03 03:22:42 +02:00
|
|
|
int bframes;
|
|
|
|
|
|
|
|
CQMode cqMode;
|
|
|
|
|
2023-05-22 20:07:43 +02:00
|
|
|
int crf;
|
|
|
|
|
2023-09-03 03:22:42 +02:00
|
|
|
int gopSize;
|
|
|
|
|
2023-08-01 18:49:18 +02:00
|
|
|
String maxBitrate;
|
2022-12-09 22:51:42 +02:00
|
|
|
|
2023-09-03 03:22:42 +02:00
|
|
|
int npl;
|
|
|
|
|
2024-01-30 03:40:02 +02:00
|
|
|
String preferredHwDevice;
|
|
|
|
|
2023-08-01 18:49:18 +02:00
|
|
|
String preset;
|
2023-07-09 04:43:11 +02:00
|
|
|
|
2023-09-03 03:22:42 +02:00
|
|
|
int refs;
|
|
|
|
|
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-09-03 03:22:42 +02:00
|
|
|
bool temporalAQ;
|
|
|
|
|
2023-08-01 18:49:18 +02:00
|
|
|
int threads;
|
2022-12-09 22:51:42 +02:00
|
|
|
|
2023-08-07 22:35:25 +02:00
|
|
|
ToneMapping tonemap;
|
|
|
|
|
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 &&
|
2024-01-26 18:40:28 +02:00
|
|
|
other.accel == accel &&
|
2024-01-26 19:02:56 +02:00
|
|
|
_deepEquality.equals(other.acceptedAudioCodecs, acceptedAudioCodecs) &&
|
|
|
|
_deepEquality.equals(other.acceptedVideoCodecs, acceptedVideoCodecs) &&
|
2024-01-26 18:40:28 +02:00
|
|
|
other.bframes == bframes &&
|
|
|
|
other.cqMode == cqMode &&
|
|
|
|
other.crf == crf &&
|
|
|
|
other.gopSize == gopSize &&
|
|
|
|
other.maxBitrate == maxBitrate &&
|
|
|
|
other.npl == npl &&
|
2024-01-30 03:40:02 +02:00
|
|
|
other.preferredHwDevice == preferredHwDevice &&
|
2024-01-26 18:40:28 +02:00
|
|
|
other.preset == preset &&
|
|
|
|
other.refs == refs &&
|
|
|
|
other.targetAudioCodec == targetAudioCodec &&
|
|
|
|
other.targetResolution == targetResolution &&
|
|
|
|
other.targetVideoCodec == targetVideoCodec &&
|
|
|
|
other.temporalAQ == temporalAQ &&
|
|
|
|
other.threads == threads &&
|
|
|
|
other.tonemap == tonemap &&
|
|
|
|
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) +
|
2024-01-26 19:02:56 +02:00
|
|
|
(acceptedAudioCodecs.hashCode) +
|
|
|
|
(acceptedVideoCodecs.hashCode) +
|
2023-09-03 03:22:42 +02:00
|
|
|
(bframes.hashCode) +
|
|
|
|
(cqMode.hashCode) +
|
2022-12-09 22:51:42 +02:00
|
|
|
(crf.hashCode) +
|
2023-09-03 03:22:42 +02:00
|
|
|
(gopSize.hashCode) +
|
2023-08-01 18:49:18 +02:00
|
|
|
(maxBitrate.hashCode) +
|
2023-09-03 03:22:42 +02:00
|
|
|
(npl.hashCode) +
|
2024-01-30 03:40:02 +02:00
|
|
|
(preferredHwDevice.hashCode) +
|
2023-07-09 04:43:11 +02:00
|
|
|
(preset.hashCode) +
|
2023-09-03 03:22:42 +02:00
|
|
|
(refs.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) +
|
2023-09-03 03:22:42 +02:00
|
|
|
(temporalAQ.hashCode) +
|
2023-08-01 18:49:18 +02:00
|
|
|
(threads.hashCode) +
|
2023-08-07 22:35:25 +02:00
|
|
|
(tonemap.hashCode) +
|
2023-08-01 18:49:18 +02:00
|
|
|
(transcode.hashCode) +
|
2023-07-09 04:43:11 +02:00
|
|
|
(twoPass.hashCode);
|
2022-12-09 22:51:42 +02:00
|
|
|
|
|
|
|
@override
|
2024-01-30 03:40:02 +02:00
|
|
|
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]';
|
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;
|
2024-01-26 19:02:56 +02:00
|
|
|
json[r'acceptedAudioCodecs'] = this.acceptedAudioCodecs;
|
|
|
|
json[r'acceptedVideoCodecs'] = this.acceptedVideoCodecs;
|
2023-09-03 03:22:42 +02:00
|
|
|
json[r'bframes'] = this.bframes;
|
|
|
|
json[r'cqMode'] = this.cqMode;
|
2023-01-10 06:08:45 +02:00
|
|
|
json[r'crf'] = this.crf;
|
2023-09-03 03:22:42 +02:00
|
|
|
json[r'gopSize'] = this.gopSize;
|
2023-08-01 18:49:18 +02:00
|
|
|
json[r'maxBitrate'] = this.maxBitrate;
|
2023-09-03 03:22:42 +02:00
|
|
|
json[r'npl'] = this.npl;
|
2024-01-30 03:40:02 +02:00
|
|
|
json[r'preferredHwDevice'] = this.preferredHwDevice;
|
2023-07-09 04:43:11 +02:00
|
|
|
json[r'preset'] = this.preset;
|
2023-09-03 03:22:42 +02:00
|
|
|
json[r'refs'] = this.refs;
|
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;
|
2023-09-03 03:22:42 +02:00
|
|
|
json[r'temporalAQ'] = this.temporalAQ;
|
2023-08-01 18:49:18 +02:00
|
|
|
json[r'threads'] = this.threads;
|
2023-08-07 22:35:25 +02:00
|
|
|
json[r'tonemap'] = this.tonemap;
|
2023-08-01 18:49:18 +02:00
|
|
|
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'])!,
|
2024-01-26 19:02:56 +02:00
|
|
|
acceptedAudioCodecs: AudioCodec.listFromJson(json[r'acceptedAudioCodecs']),
|
|
|
|
acceptedVideoCodecs: VideoCodec.listFromJson(json[r'acceptedVideoCodecs']),
|
2023-09-03 03:22:42 +02:00
|
|
|
bframes: mapValueOfType<int>(json, r'bframes')!,
|
|
|
|
cqMode: CQMode.fromJson(json[r'cqMode'])!,
|
2023-05-22 20:07:43 +02:00
|
|
|
crf: mapValueOfType<int>(json, r'crf')!,
|
2023-09-03 03:22:42 +02:00
|
|
|
gopSize: mapValueOfType<int>(json, r'gopSize')!,
|
2023-08-01 18:49:18 +02:00
|
|
|
maxBitrate: mapValueOfType<String>(json, r'maxBitrate')!,
|
2023-09-03 03:22:42 +02:00
|
|
|
npl: mapValueOfType<int>(json, r'npl')!,
|
2024-01-30 03:40:02 +02:00
|
|
|
preferredHwDevice: mapValueOfType<String>(json, r'preferredHwDevice')!,
|
2022-12-09 22:51:42 +02:00
|
|
|
preset: mapValueOfType<String>(json, r'preset')!,
|
2023-09-03 03:22:42 +02:00
|
|
|
refs: mapValueOfType<int>(json, r'refs')!,
|
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'])!,
|
2023-09-03 03:22:42 +02:00
|
|
|
temporalAQ: mapValueOfType<bool>(json, r'temporalAQ')!,
|
2023-08-01 18:49:18 +02:00
|
|
|
threads: mapValueOfType<int>(json, r'threads')!,
|
2023-08-07 22:35:25 +02:00
|
|
|
tonemap: ToneMapping.fromJson(json[r'tonemap'])!,
|
2023-08-01 18:49:18 +02:00
|
|
|
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',
|
2024-01-26 19:02:56 +02:00
|
|
|
'acceptedAudioCodecs',
|
|
|
|
'acceptedVideoCodecs',
|
2023-09-03 03:22:42 +02:00
|
|
|
'bframes',
|
|
|
|
'cqMode',
|
2022-12-09 22:51:42 +02:00
|
|
|
'crf',
|
2023-09-03 03:22:42 +02:00
|
|
|
'gopSize',
|
2023-08-01 18:49:18 +02:00
|
|
|
'maxBitrate',
|
2023-09-03 03:22:42 +02:00
|
|
|
'npl',
|
2024-01-30 03:40:02 +02:00
|
|
|
'preferredHwDevice',
|
2023-07-09 04:43:11 +02:00
|
|
|
'preset',
|
2023-09-03 03:22:42 +02:00
|
|
|
'refs',
|
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',
|
2023-09-03 03:22:42 +02:00
|
|
|
'temporalAQ',
|
2023-08-01 18:49:18 +02:00
|
|
|
'threads',
|
2023-08-07 22:35:25 +02:00
|
|
|
'tonemap',
|
2023-08-01 18:49:18 +02:00
|
|
|
'transcode',
|
2023-05-22 20:07:43 +02:00
|
|
|
'twoPass',
|
2022-12-09 22:51:42 +02:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|