diff options
-rw-r--r-- | video/out/opengl/cuda_dynamic.h | 2 | ||||
-rw-r--r-- | waftools/fragments/cuda.c | 12 | ||||
-rw-r--r-- | wscript | 5 |
3 files changed, 15 insertions, 4 deletions
diff --git a/video/out/opengl/cuda_dynamic.h b/video/out/opengl/cuda_dynamic.h index d906b6787f..bdac626be5 100644 --- a/video/out/opengl/cuda_dynamic.h +++ b/video/out/opengl/cuda_dynamic.h @@ -19,7 +19,7 @@ * License along with mpv. If not, see <http://www.gnu.org/licenses/>. */ -#if !defined(MPV_CUDA_DYNAMIC_H) && !defined(CUDA_VERSION) +#ifndef MPV_CUDA_DYNAMIC_H #define MPV_CUDA_DYNAMIC_H #include <stdbool.h> diff --git a/waftools/fragments/cuda.c b/waftools/fragments/cuda.c new file mode 100644 index 0000000000..c63ec2945d --- /dev/null +++ b/waftools/fragments/cuda.c @@ -0,0 +1,12 @@ +#define CUDA_VERSION 7050 + +typedef void * CUcontext; + +#include <libavutil/hwcontext.h> +#include <libavutil/hwcontext_cuda.h> + +int main(int argc, char *argv[]) { + enum AVHWDeviceType type = AV_HWDEVICE_TYPE_CUDA; + AVCUDADeviceContextInternal *foo; + return 0; +} @@ -922,9 +922,8 @@ hwaccel_features = [ }, { 'name': '--cuda-hwaccel', 'desc': 'CUDA hwaccel', - 'func': check_statement('libavutil/hwcontext_cuda.h', - 'AVCUDADeviceContextInternal* foo', - use='libav'), + 'func': check_cc(fragment=load_fragment('cuda.c'), + use='libav'), }, { 'name': 'sse4-intrinsics', 'desc': 'GCC SSE4 intrinsics for GPU memcpy', |