avutil/hwcontext_cuda: use dynamically loaded CUDA

This commit is contained in:
Timo Rothenpieler 2016-10-10 12:52:40 +02:00
parent 5c02d2827b
commit e6464a44ed
5 changed files with 120 additions and 25 deletions

View file

@ -20,7 +20,9 @@
#ifndef AVUTIL_HWCONTEXT_CUDA_H
#define AVUTIL_HWCONTEXT_CUDA_H
#ifndef CUDA_VERSION
#include <cuda.h>
#endif
#include "pixfmt.h"
@ -32,11 +34,14 @@
* AVBufferRefs whose data pointer is a CUdeviceptr.
*/
typedef struct AVCUDADeviceContextInternal AVCUDADeviceContextInternal;
/**
* This struct is allocated as AVHWDeviceContext.hwctx
*/
typedef struct AVCUDADeviceContext {
CUcontext cuda_ctx;
AVCUDADeviceContextInternal *internal;
} AVCUDADeviceContext;
/**