19 #ifndef AVCODEC_NVENC_H
20 #define AVCODEC_NVENC_H
22 #include <nvEncodeAPI.h>
36 #define CUDAAPI __stdcall
41 typedef enum cudaError_enum {
49 #define MAX_REGISTERED_FRAMES 64
enum AVPixelFormat ff_nvenc_pix_fmts[]
NV_ENC_BUFFER_FORMAT format
int ff_nvenc_encode_init(AVCodecContext *avctx)
This structure describes decoded (raw) audio or video data.
AVFifoBuffer * timestamp_list
NV_ENC_MAP_INPUT_RESOURCE in_map
PCUCTXDESTROY cu_ctx_destroy
NV_ENCODE_API_FUNCTION_LIST nvenc_funcs
NvencDynLoadFunctions nvenc_dload_funcs
PCUDEVICEGETNAME cu_device_get_name
NV_ENC_INPUT_PTR input_surface
PCUDEVICEGETCOUNT cu_device_get_count
PCUDEVICECOMPUTECAPABILITY cu_device_compute_capability
CUresult(CUDAAPI * PCUCTXCREATE)(CUcontext *pctx, unsigned int flags, CUdevice dev)
int ff_nvenc_encode_close(AVCodecContext *avctx)
CUresult(CUDAAPI * PCUDEVICECOMPUTECAPABILITY)(int *major, int *minor, CUdevice dev)
NV_ENC_INITIALIZE_PARAMS init_encode_params
#define MAX_REGISTERED_FRAMES
AVFifoBuffer * output_surface_ready_queue
CUcontext cu_context_internal
An API-specific header for AV_HWDEVICE_TYPE_CUDA.
NVENCSTATUS(NVENCAPI * PNVENCODEAPICREATEINSTANCE)(NV_ENCODE_API_FUNCTION_LIST *functionList)
PCUDEVICEGET cu_device_get
CUresult(CUDAAPI * PCUDEVICEGET)(CUdevice *device, int ordinal)
int ff_nvenc_encode_frame(AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet)
NV_ENC_REGISTERED_PTR regptr
CUresult(CUDAAPI * PCUDEVICEGETCOUNT)(int *count)
AVFifoBuffer * output_surface_queue
enum AVPixelFormat data_pix_fmt
PCUCTXCREATE cu_ctx_create
NV_ENC_CONFIG encode_config
Libavcodec external API header.
main external API structure.
a very simple circular buffer FIFO implementation
CUresult(CUDAAPI * PCUCTXDESTROY)(CUcontext ctx)
Describe the class of an AVClass context structure.
struct NvencContext::@85 registered_frames[MAX_REGISTERED_FRAMES]
CUresult(CUDAAPI * PCUINIT)(unsigned int Flags)
PCUCTXPOPCURRENT cu_ctx_pop_current
CUresult(CUDAAPI * PCUCTXPOPCURRENT)(CUcontext *pctx)
AVPixelFormat
Pixel format.
This structure stores compressed data.
NV_ENC_OUTPUT_PTR output_surface
CUresult(CUDAAPI * PCUDEVICEGETNAME)(char *name, int len, CUdevice dev)