diff options
author | wm4 <wm4@nowhere> | 2017-02-20 08:39:08 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-02-20 08:39:08 +0100 |
commit | 6e2d3d991912f230ee66448307e8e2657237ffd2 (patch) | |
tree | 9b3642b6cdb53bf563e660d081cf3c9dc7cfabe8 /video | |
parent | 4f74b935468fd8b39d4cf974892fa242bb059248 (diff) | |
download | mpv-6e2d3d991912f230ee66448307e8e2657237ffd2.tar.bz2 mpv-6e2d3d991912f230ee66448307e8e2657237ffd2.tar.xz |
vo_opengl: remove dxva2 dummy hwdec backend
This was a hack to let libmpv API users pass a d3d device to mpv. It's
not needed anymore for 2 reasons:
1. ANGLE does not have this problem
2. Even native GL via nVidia (where this failed) seems to not require
this anymore
Diffstat (limited to 'video')
-rw-r--r-- | video/out/opengl/hwdec.c | 1 | ||||
-rw-r--r-- | video/out/opengl/hwdec_dxva2.c | 68 |
2 files changed, 0 insertions, 69 deletions
diff --git a/video/out/opengl/hwdec.c b/video/out/opengl/hwdec.c index e80d5c4fe5..60a6ee82a9 100644 --- a/video/out/opengl/hwdec.c +++ b/video/out/opengl/hwdec.c @@ -59,7 +59,6 @@ static const struct gl_hwdec_driver *const mpgl_hwdec_drivers[] = { #if HAVE_GL_DXINTEROP &gl_hwdec_dxva2gldx, #endif - &gl_hwdec_dxva2, #endif #if HAVE_CUDA_HWACCEL &gl_hwdec_cuda, diff --git a/video/out/opengl/hwdec_dxva2.c b/video/out/opengl/hwdec_dxva2.c deleted file mode 100644 index d832bb4c68..0000000000 --- a/video/out/opengl/hwdec_dxva2.c +++ /dev/null @@ -1,68 +0,0 @@ -#include <d3d9.h> - -#include "common/common.h" - -#include "hwdec.h" -#include "utils.h" -#include "video/hwdec.h" - -// This does not provide real (zero-copy) interop - it merely exists for -// making sure the same D3D device is used for decoding and display, which -// may help with OpenGL fullscreen mode. - -struct priv { - struct mp_hwdec_ctx hwctx; -}; - -static void destroy(struct gl_hwdec *hw) -{ - struct priv *p = hw->priv; - hwdec_devices_remove(hw->devs, &p->hwctx); - if (p->hwctx.ctx) - IDirect3DDevice9_Release((IDirect3DDevice9 *)p->hwctx.ctx); -} - -static int create(struct gl_hwdec *hw) -{ - GL *gl = hw->gl; - if (!gl->MPGetNativeDisplay) - return -1; - - struct priv *p = talloc_zero(hw, struct priv); - hw->priv = p; - - IDirect3DDevice9 *d3d = gl->MPGetNativeDisplay("IDirect3DDevice9"); - if (!d3d) - return -1; - - MP_VERBOSE(hw, "Using libmpv supplied device %p.\n", d3d); - - p->hwctx = (struct mp_hwdec_ctx){ - .type = HWDEC_DXVA2_COPY, - .driver_name = hw->driver->name, - .ctx = d3d, - }; - hwdec_devices_add(hw->devs, &p->hwctx); - return 0; -} - -static int reinit(struct gl_hwdec *hw, struct mp_image_params *params) -{ - return -1; -} - -static int map_frame(struct gl_hwdec *hw, struct mp_image *hw_image, - struct gl_hwdec_frame *out_frame) -{ - return -1; -} - -const struct gl_hwdec_driver gl_hwdec_dxva2 = { - .name = "dxva2-dummy", - .api = HWDEC_DXVA2_COPY, - .imgfmt = -1, - .create = create, - .reinit = reinit, - .map_frame = map_frame, - .destroy = destroy, -}; |