[vlc-commits] decoder device: the D3D9 device needs to store a IDirect3D9 and an adapter

Steve Lhomme git at videolan.org
Wed Sep 18 15:58:24 CEST 2019


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Wed Jul  3 08:10:08 2019 +0200| [716f3ca06e2d7f310c1192377758bb80331e5292] | committer: Steve Lhomme

decoder device: the D3D9 device needs to store a IDirect3D9 and an adapter

So we use a structure for that.

Unlike D3D11, the IDirect3D9 isn't tied to an adapter, but to communicate with
external rendering it can only be done on the same adapter they use. So we need
both information.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=716f3ca06e2d7f310c1192377758bb80331e5292
---

 include/vlc_codec.h             | 2 +-
 modules/video_chroma/d3d9_fmt.h | 6 ++++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/include/vlc_codec.h b/include/vlc_codec.h
index 55e24cb964..06ba7a6910 100644
--- a/include/vlc_codec.h
+++ b/include/vlc_codec.h
@@ -523,7 +523,7 @@ typedef struct vlc_decoder_device
      * The type of pointer will depend of the type:
      * VAAPI: VADisplay
      * VDPAU: vdp_t *
-     * DXVA2: IDirect3DDevice9*
+     * DXVA2: d3d9_decoder_device_t*
      * D3D11VA: ID3D11DeviceContext*
      * AWindow: android AWindowHandler*
      * NVDEC: decoder_device_nvdec_t*
diff --git a/modules/video_chroma/d3d9_fmt.h b/modules/video_chroma/d3d9_fmt.h
index f35e4414c9..94fe506405 100644
--- a/modules/video_chroma/d3d9_fmt.h
+++ b/modules/video_chroma/d3d9_fmt.h
@@ -66,6 +66,12 @@ typedef struct
     D3DCAPS9                caps;
 } d3d9_device_t;
 
+typedef struct
+{
+    IDirect3D9    *device;
+    int            adapter;
+} d3d9_decoder_device_t;
+
 static inline bool is_d3d9_opaque(vlc_fourcc_t chroma)
 {
     switch (chroma)



More information about the vlc-commits mailing list