diff options
author | Anton Khirnov <anton@khirnov.net> | 2024-01-23 18:24:05 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2024-01-30 09:52:00 +0100 |
commit | 4bdffec8144cacdb1a54180797b07b49e390e8ec (patch) | |
tree | 5e46ee94c9fdec5e6d730356dbe9570db8f21037 /fftools/ffmpeg.h | |
parent | a3a9c4ae66e474c51aa36b9c0b8ee5c1419559f1 (diff) | |
download | ffmpeg-4bdffec8144cacdb1a54180797b07b49e390e8ec.tar.gz |
fftools/ffmpeg_dec: pass hwaccel options to the decoder in a separate struct
Stop reading them from InputStream.
This is a step towards decoupling Decoder and InputStream.
Diffstat (limited to 'fftools/ffmpeg.h')
-rw-r--r-- | fftools/ffmpeg.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/fftools/ffmpeg.h b/fftools/ffmpeg.h index 80c09d1662..abf95f106b 100644 --- a/fftools/ffmpeg.h +++ b/fftools/ffmpeg.h @@ -286,6 +286,14 @@ enum DecoderFlags { DECODER_FLAG_TS_UNRELIABLE = (1 << 1), }; +typedef struct DecoderOpts { + /* hwaccel options */ + enum HWAccelID hwaccel_id; + enum AVHWDeviceType hwaccel_device_type; + char *hwaccel_device; + enum AVPixelFormat hwaccel_output_format; +} DecoderOpts; + typedef struct Decoder { const AVClass *class; @@ -351,12 +359,6 @@ typedef struct InputStream { int nb_outputs; int reinit_filters; - - /* hwaccel options */ - enum HWAccelID hwaccel_id; - enum AVHWDeviceType hwaccel_device_type; - char *hwaccel_device; - enum AVPixelFormat hwaccel_output_format; } InputStream; typedef struct InputFile { @@ -736,7 +738,7 @@ AVBufferRef *hw_device_for_filter(void); * is transferred to the decoder. */ int dec_open(InputStream *ist, Scheduler *sch, unsigned sch_idx, - AVDictionary **dec_opts, int flags); + AVDictionary **dec_opts, int flags, const DecoderOpts *o); void dec_free(Decoder **pdec); int dec_add_filter(Decoder *dec, InputFilter *ifilter); |