20 #ifndef AVUTIL_CUDA_CHECK_H 21 #define AVUTIL_CUDA_CHECK_H 32 void *cuGetErrorName_fn,
void *cuGetErrorString_fn,
33 CUresult err,
const char *
func)
36 const char *err_string;
40 if (err == CUDA_SUCCESS)
47 if (err_name && err_string)
58 #define FF_CUDA_CHECK(avclass, x) ff_cuda_check(avclass, cuGetErrorName, cuGetErrorString, (x), #x) 64 #define FF_CUDA_CHECK_DL(avclass, cudl, x) ff_cuda_check(avclass, cudl->cuGetErrorName, cudl->cuGetErrorString, (x), #x) static void error(const char *err)
CUresult CUDAAPI cuda_check_GetErrorName(CUresult error, const char **pstr)
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
CUresult CUDAAPI cuda_check_GetErrorString(CUresult error, const char **pstr)
int(* func)(AVBPrint *dst, const char *in, const char *arg)
static int ff_cuda_check(void *avctx, void *cuGetErrorName_fn, void *cuGetErrorString_fn, CUresult err, const char *func)
Wrap a CUDA function call and print error information if it fails.
#define AVERROR_EXTERNAL
Generic error in an external library.