#pragma once #include #include "../codec.h" #if defined CAMU_TRY_HWACCEL && !defined CAMU_SINK_NO_VIDEO #define CAMU_FF_DECODER_HWACCEL #endif struct camu_ff_decoder { struct camu_decoder dec; AVCodecParameters *codecpar; AVCodecContext *codec_context; s32 thread_count; #ifdef CAMU_FF_DECODER_HWACCEL struct camu_renderer *renderer; const AVCodec *sw_codec; array(const AVCodec *) supported_hw_codecs; array(enum AVHWDeviceType) supported_hw_devices; AVBufferRef *hw_context; enum AVHWDeviceType hw_device_type; enum AVPixelFormat hw_pix_fmt; bool use_frames_context; AVCodecContext *errored_hw_context; #endif void (*callback)(void *, struct camu_codec_frame *); void *userdata; }; struct camu_decoder *camu_ff_decoder_create(void);