1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-09 23:17:29 +02:00

added a configuration option to select the dri node in transcoding (#6376)

* added a configuration option to select the dri node in transcoding

* chore: open api

* refactor: get hawrdware device

---------

Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
This commit is contained in:
t4keda
2024-01-30 02:40:02 +01:00
committed by GitHub
parent 68f8525eb1
commit 76f8d030ce
12 changed files with 140 additions and 4 deletions

View File

@@ -17,6 +17,7 @@ Name | Type | Description | Notes
**gopSize** | **int** | |
**maxBitrate** | **String** | |
**npl** | **int** | |
**preferredHwDevice** | **String** | |
**preset** | **String** | |
**refs** | **int** | |
**targetAudioCodec** | [**AudioCodec**](AudioCodec.md) | |

View File

@@ -22,6 +22,7 @@ class SystemConfigFFmpegDto {
required this.gopSize,
required this.maxBitrate,
required this.npl,
required this.preferredHwDevice,
required this.preset,
required this.refs,
required this.targetAudioCodec,
@@ -52,6 +53,8 @@ class SystemConfigFFmpegDto {
int npl;
String preferredHwDevice;
String preset;
int refs;
@@ -83,6 +86,7 @@ class SystemConfigFFmpegDto {
other.gopSize == gopSize &&
other.maxBitrate == maxBitrate &&
other.npl == npl &&
other.preferredHwDevice == preferredHwDevice &&
other.preset == preset &&
other.refs == refs &&
other.targetAudioCodec == targetAudioCodec &&
@@ -106,6 +110,7 @@ class SystemConfigFFmpegDto {
(gopSize.hashCode) +
(maxBitrate.hashCode) +
(npl.hashCode) +
(preferredHwDevice.hashCode) +
(preset.hashCode) +
(refs.hashCode) +
(targetAudioCodec.hashCode) +
@@ -118,7 +123,7 @@ 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, 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, 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>{};
@@ -131,6 +136,7 @@ class SystemConfigFFmpegDto {
json[r'gopSize'] = this.gopSize;
json[r'maxBitrate'] = this.maxBitrate;
json[r'npl'] = this.npl;
json[r'preferredHwDevice'] = this.preferredHwDevice;
json[r'preset'] = this.preset;
json[r'refs'] = this.refs;
json[r'targetAudioCodec'] = this.targetAudioCodec;
@@ -161,6 +167,7 @@ class SystemConfigFFmpegDto {
gopSize: mapValueOfType<int>(json, r'gopSize')!,
maxBitrate: mapValueOfType<String>(json, r'maxBitrate')!,
npl: mapValueOfType<int>(json, r'npl')!,
preferredHwDevice: mapValueOfType<String>(json, r'preferredHwDevice')!,
preset: mapValueOfType<String>(json, r'preset')!,
refs: mapValueOfType<int>(json, r'refs')!,
targetAudioCodec: AudioCodec.fromJson(json[r'targetAudioCodec'])!,
@@ -227,6 +234,7 @@ class SystemConfigFFmpegDto {
'gopSize',
'maxBitrate',
'npl',
'preferredHwDevice',
'preset',
'refs',
'targetAudioCodec',

View File

@@ -61,6 +61,11 @@ void main() {
// TODO
});
// String preferredHwDevice
test('to test the property `preferredHwDevice`', () async {
// TODO
});
// String preset
test('to test the property `preset`', () async {
// TODO