2022-12-09 22:51:42 +02:00
|
|
|
//
|
|
|
|
// AUTO-GENERATED FILE, DO NOT MODIFY!
|
|
|
|
//
|
2024-05-15 23:52:52 +02:00
|
|
|
// @dart=2.18
|
2022-12-09 22:51:42 +02:00
|
|
|
|
|
|
|
// 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-05-16 19:30:26 +02:00
|
|
|
required this.accelDecode,
|
2024-01-26 19:02:56 +02:00
|
|
|
this.acceptedAudioCodecs = const [],
|
2024-07-21 23:14:23 +02:00
|
|
|
this.acceptedContainers = const [],
|
2024-01-26 19:02:56 +02:00
|
|
|
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,
|
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-05-16 19:30:26 +02:00
|
|
|
bool accelDecode;
|
|
|
|
|
2024-01-26 19:02:56 +02:00
|
|
|
List<AudioCodec> acceptedAudioCodecs;
|
|
|
|
|
2024-07-21 23:14:23 +02:00
|
|
|
List<VideoContainer> acceptedContainers;
|
|
|
|
|
2024-01-26 19:02:56 +02:00
|
|
|
List<VideoCodec> acceptedVideoCodecs;
|
|
|
|
|
2024-04-23 00:13:44 +02:00
|
|
|
/// Minimum value: -1
|
|
|
|
/// Maximum value: 16
|
2023-09-03 03:22:42 +02:00
|
|
|
int bframes;
|
|
|
|
|
|
|
|
CQMode cqMode;
|
|
|
|
|
2024-04-23 00:13:44 +02:00
|
|
|
/// Minimum value: 0
|
|
|
|
/// Maximum value: 51
|
2023-05-22 20:07:43 +02:00
|
|
|
int crf;
|
|
|
|
|
2024-04-23 00:13:44 +02:00
|
|
|
/// Minimum value: 0
|
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
|
|
|
|
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
|
|
|
|
2024-04-23 00:13:44 +02:00
|
|
|
/// Minimum value: 0
|
|
|
|
/// Maximum value: 6
|
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;
|
|
|
|
|
2024-04-23 00:13:44 +02:00
|
|
|
/// Minimum value: 0
|
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-05-16 19:30:26 +02:00
|
|
|
other.accelDecode == accelDecode &&
|
2024-01-26 19:02:56 +02:00
|
|
|
_deepEquality.equals(other.acceptedAudioCodecs, acceptedAudioCodecs) &&
|
2024-07-21 23:14:23 +02:00
|
|
|
_deepEquality.equals(other.acceptedContainers, acceptedContainers) &&
|
2024-01-26 19:02:56 +02:00
|
|
|
_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 &&
|
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-05-16 19:30:26 +02:00
|
|
|
(accelDecode.hashCode) +
|
2024-01-26 19:02:56 +02:00
|
|
|
(acceptedAudioCodecs.hashCode) +
|
2024-07-21 23:14:23 +02:00
|
|
|
(acceptedContainers.hashCode) +
|
2024-01-26 19:02:56 +02:00
|
|
|
(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) +
|
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-11-01 02:48:23 +02:00
|
|
|
String toString() => 'SystemConfigFFmpegDto[accel=$accel, accelDecode=$accelDecode, acceptedAudioCodecs=$acceptedAudioCodecs, acceptedContainers=$acceptedContainers, acceptedVideoCodecs=$acceptedVideoCodecs, bframes=$bframes, cqMode=$cqMode, crf=$crf, gopSize=$gopSize, maxBitrate=$maxBitrate, 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-05-16 19:30:26 +02:00
|
|
|
json[r'accelDecode'] = this.accelDecode;
|
2024-01-26 19:02:56 +02:00
|
|
|
json[r'acceptedAudioCodecs'] = this.acceptedAudioCodecs;
|
2024-07-21 23:14:23 +02:00
|
|
|
json[r'acceptedContainers'] = this.acceptedContainers;
|
2024-01-26 19:02:56 +02:00
|
|
|
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;
|
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) {
|
2024-09-23 21:41:41 +02:00
|
|
|
upgradeDto(value, "SystemConfigFFmpegDto");
|
2022-12-09 22:51:42 +02:00
|
|
|
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-05-16 19:30:26 +02:00
|
|
|
accelDecode: mapValueOfType<bool>(json, r'accelDecode')!,
|
2024-01-26 19:02:56 +02:00
|
|
|
acceptedAudioCodecs: AudioCodec.listFromJson(json[r'acceptedAudioCodecs']),
|
2024-07-21 23:14:23 +02:00
|
|
|
acceptedContainers: VideoContainer.listFromJson(json[r'acceptedContainers']),
|
2024-01-26 19:02:56 +02:00
|
|
|
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')!,
|
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-05-16 19:30:26 +02:00
|
|
|
'accelDecode',
|
2024-01-26 19:02:56 +02:00
|
|
|
'acceptedAudioCodecs',
|
2024-07-21 23:14:23 +02:00
|
|
|
'acceptedContainers',
|
2024-01-26 19:02:56 +02:00
|
|
|
'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',
|
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
|
|
|
};
|
|
|
|
}
|
|
|
|
|