Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2017-11-11 18:51:58 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2017-11-15 12:35:44 +0300
commitbff6d98ba3e70bb27249579df600e2c845264b2c (patch)
treef9b116d04c0c1a5238d1813551301eff4ad2b4e8 /libavcodec/nvenc.h
parent6fcbf39f9ec7dc21829577dd2b1906c7740d3fd1 (diff)
nvenc: support d3d11 surface input
Diffstat (limited to 'libavcodec/nvenc.h')
-rw-r--r--libavcodec/nvenc.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/libavcodec/nvenc.h b/libavcodec/nvenc.h
index afb93cc22c..55ac5f220d 100644
--- a/libavcodec/nvenc.h
+++ b/libavcodec/nvenc.h
@@ -27,6 +27,13 @@
#include "libavutil/fifo.h"
#include "libavutil/opt.h"
+#if CONFIG_D3D11VA
+#define COBJMACROS
+#include "libavutil/hwcontext_d3d11va.h"
+#else
+typedef void ID3D11Device;
+#endif
+
#include "avcodec.h"
#define MAX_REGISTERED_FRAMES 64
@@ -107,6 +114,7 @@ typedef struct NvencContext
NV_ENC_CONFIG encode_config;
CUcontext cu_context;
CUcontext cu_context_internal;
+ ID3D11Device *d3d11_device;
int nb_surfaces;
NvencSurface *surfaces;
@@ -119,7 +127,8 @@ typedef struct NvencContext
int encoder_flushing;
struct {
- CUdeviceptr ptr;
+ void *ptr;
+ int ptr_index;
NV_ENC_REGISTERED_PTR regptr;
int mapped;
} registered_frames[MAX_REGISTERED_FRAMES];