summaryrefslogtreecommitdiff
path: root/libavcodec/nvenc.h
diff options
context:
space:
mode:
Diffstat (limited to 'libavcodec/nvenc.h')
-rw-r--r--libavcodec/nvenc.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h
index 8cd5991f4c..e7e6182196 100644
--- a/libavcodec/nvenc.h
+++ b/libavcodec/nvenc.h
@@ -19,7 +19,6 @@
#ifndef AVCODEC_NVENC_H
#define AVCODEC_NVENC_H
-#include <cuda.h>
#include <nvEncodeAPI.h>
#include "config.h"
@@ -29,6 +28,24 @@
#include "avcodec.h"
+#if CONFIG_CUDA
+#include <cuda.h>
+#else
+
+#if defined(_WIN32)
+#define CUDAAPI __stdcall
+#else
+#define CUDAAPI
+#endif
+
+typedef enum cudaError_enum {
+ CUDA_SUCCESS = 0
+} CUresult;
+typedef int CUdevice;
+typedef void* CUcontext;
+typedef void* CUdeviceptr;
+#endif
+
#define MAX_REGISTERED_FRAMES 64
typedef struct NVENCFrame {