X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=ffmpeg.h;h=f09d33bdcf0ca2ee1ae8f7d90ed0a8986bb1789b;hb=0a065694877e7fc37aa68d37cdfa2dee3823ad76;hp=403b0986870ca438b9b5f71c0a211246d8e67915;hpb=5db920bcb60596d170df3ffbd5ce7cb7a9de3e79;p=ffmpeg diff --git a/ffmpeg.h b/ffmpeg.h index 403b0986870..f09d33bdcf0 100644 --- a/ffmpeg.h +++ b/ffmpeg.h @@ -65,6 +65,8 @@ enum HWAccelID { HWACCEL_VDA, HWACCEL_VIDEOTOOLBOX, HWACCEL_QSV, + HWACCEL_VAAPI, + HWACCEL_CUVID, }; typedef struct HWAccel { @@ -126,6 +128,8 @@ typedef struct OptionsContext { int nb_hwaccels; SpecifierOpt *hwaccel_devices; int nb_hwaccel_devices; + SpecifierOpt *hwaccel_output_formats; + int nb_hwaccel_output_formats; SpecifierOpt *autorotate; int nb_autorotate; @@ -325,6 +329,7 @@ typedef struct InputStream { /* hwaccel options */ enum HWAccelID hwaccel_id; char *hwaccel_device; + enum AVPixelFormat hwaccel_output_format; /* hwaccel context */ enum HWAccelID active_hwaccel_id; @@ -334,6 +339,7 @@ typedef struct InputStream { int (*hwaccel_retrieve_data)(AVCodecContext *s, AVFrame *frame); enum AVPixelFormat hwaccel_pix_fmt; enum AVPixelFormat hwaccel_retrieved_pix_fmt; + AVBufferRef *hw_frames_ctx; /* stats */ // combined size of all the packets read @@ -544,6 +550,8 @@ extern const AVIOInterruptCB int_cb; extern const OptionDef options[]; extern const HWAccel hwaccels[]; +extern int hwaccel_lax_profile_check; +extern AVBufferRef *hw_device_ctx; void term_init(void); @@ -576,5 +584,9 @@ int vda_init(AVCodecContext *s); int videotoolbox_init(AVCodecContext *s); int qsv_init(AVCodecContext *s); int qsv_transcode_init(OutputStream *ost); +int vaapi_decode_init(AVCodecContext *avctx); +int vaapi_device_init(const char *device); +int cuvid_init(AVCodecContext *s); +int cuvid_transcode_init(OutputStream *ost); #endif /* FFMPEG_H */