[vlc-commits] d3d9_fmt: add a function to create a d3d9_handle_t from an existing IDirect3D9
Steve Lhomme
git at videolan.org
Wed Jun 26 15:48:33 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Jun 11 14:49:21 2019 +0200| [ebd49de301a2935411f57baa9b5460c6dba40b13] | committer: Steve Lhomme
d3d9_fmt: add a function to create a d3d9_handle_t from an existing IDirect3D9
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=ebd49de301a2935411f57baa9b5460c6dba40b13
---
modules/video_chroma/d3d9_fmt.c | 8 ++++++++
modules/video_chroma/d3d9_fmt.h | 1 +
2 files changed, 9 insertions(+)
diff --git a/modules/video_chroma/d3d9_fmt.c b/modules/video_chroma/d3d9_fmt.c
index 1fa46deef4..9e00a5cd17 100644
--- a/modules/video_chroma/d3d9_fmt.c
+++ b/modules/video_chroma/d3d9_fmt.c
@@ -263,3 +263,11 @@ int D3D9_CreateExternal(vlc_object_t *o, d3d9_handle_t *hd3d, IDirect3DDevice9 *
hd3d->use_ex = false; /* we don't care */
return VLC_SUCCESS;
}
+
+void D3D9_CloneExternal(d3d9_handle_t *hd3d, IDirect3D9 *dev)
+{
+ hd3d->obj = dev;
+ IDirect3D9_AddRef( hd3d->obj );
+ hd3d->hdll = NULL;
+ hd3d->use_ex = false; /* we don't care */
+}
diff --git a/modules/video_chroma/d3d9_fmt.h b/modules/video_chroma/d3d9_fmt.h
index d9184fdaf4..c2ac3098d4 100644
--- a/modules/video_chroma/d3d9_fmt.h
+++ b/modules/video_chroma/d3d9_fmt.h
@@ -106,6 +106,7 @@ int D3D9_Create(vlc_object_t *, d3d9_handle_t *);
#define D3D9_Create(a,b) D3D9_Create( VLC_OBJECT(a), b )
int D3D9_CreateExternal(vlc_object_t *, d3d9_handle_t *, IDirect3DDevice9 *);
#define D3D9_CreateExternal(a,b,c) D3D9_CreateExternal( VLC_OBJECT(a), b, c )
+void D3D9_CloneExternal(d3d9_handle_t *, IDirect3D9 *);
void D3D9_Destroy(d3d9_handle_t *);
More information about the vlc-commits
mailing list