[vlc-commits] direct3d11: move the Quad texture in d3d11_quad.h

Steve Lhomme git at videolan.org
Wed Oct 17 16:07:12 CEST 2018


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Feb 20 16:22:51 2018 +0100| [0918d4296caaa2a5355ea58a436e16939b7745aa] | committer: Steve Lhomme

direct3d11: move the Quad texture in d3d11_quad.h

(cherry picked from commit b7024bace8eb8dd03a5aa08cf7c02ede442f5c6e)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=0918d4296caaa2a5355ea58a436e16939b7745aa
---

 modules/video_output/Makefile.am        |  3 +-
 modules/video_output/win32/d3d11_quad.h | 55 +++++++++++++++++++++++++++++++++
 modules/video_output/win32/direct3d11.c | 30 +-----------------
 3 files changed, 58 insertions(+), 30 deletions(-)

diff --git a/modules/video_output/Makefile.am b/modules/video_output/Makefile.am
index 3f55fafaba..8345f912f7 100644
--- a/modules/video_output/Makefile.am
+++ b/modules/video_output/Makefile.am
@@ -275,7 +275,8 @@ if !HAVE_WINSTORE
 libdirect3d11_plugin_la_SOURCES += video_output/win32/events.c \
  video_output/win32/events.h \
  video_output/win32/sensors.cpp \
- video_output/win32/win32touch.c video_output/win32/win32touch.h
+ video_output/win32/win32touch.c video_output/win32/win32touch.h \
+ video_output/win32/d3d11_quad.h
 libdirect3d11_plugin_la_LIBADD += -lgdi32
 else
 libdirect3d11_plugin_la_LIBADD += -ld3d11
diff --git a/modules/video_output/win32/d3d11_quad.h b/modules/video_output/win32/d3d11_quad.h
new file mode 100644
index 0000000000..6db34cfb84
--- /dev/null
+++ b/modules/video_output/win32/d3d11_quad.h
@@ -0,0 +1,55 @@
+/*****************************************************************************
+ * d3d11_quad.h: Direct3D11 Quad handling
+ *****************************************************************************
+ * Copyright (C) 2017-2018 VLC authors and VideoLAN
+ *
+ * Authors: Steve Lhomme <robux4 at gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation; either version 2.1 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef VLC_D3D11_QUAD_H
+#define VLC_D3D11_QUAD_H
+
+typedef struct {
+    FLOAT Opacity;
+    FLOAT BoundaryX;
+    FLOAT BoundaryY;
+    FLOAT LuminanceScale;
+} PS_CONSTANT_BUFFER;
+
+/* A Quad is texture that can be displayed in a rectangle */
+typedef struct
+{
+    picture_sys_t             picSys;
+    UINT                      resourceCount;
+    ID3D11Buffer              *pVertexBuffer;
+    UINT                      vertexCount;
+    ID3D11VertexShader        *d3dvertexShader;
+    ID3D11Buffer              *pIndexBuffer;
+    UINT                      indexCount;
+    ID3D11Buffer              *pVertexShaderConstants;
+    ID3D11Buffer              *pPixelShaderConstants[2];
+    UINT                       PSConstantsCount;
+    ID3D11PixelShader         *d3dpixelShader;
+    D3D11_VIEWPORT            cropViewport;
+    unsigned int              i_width;
+    unsigned int              i_height;
+    video_projection_mode_t   projection;
+
+    PS_CONSTANT_BUFFER        shaderConstants;
+} d3d_quad_t;
+
+#endif /* VLC_D3D11_QUAD_H */
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index cc4ca34fa0..a306f9af18 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -51,6 +51,7 @@
 # include <windows.ui.xaml.media.dxinterop.h> */
 
 #include "../../video_chroma/d3d11_fmt.h"
+#include "d3d11_quad.h"
 
 #include "common.h"
 
@@ -92,35 +93,6 @@ vlc_module_begin ()
     set_callbacks(Open, Close)
 vlc_module_end ()
 
-typedef struct {
-    FLOAT Opacity;
-    FLOAT BoundaryX;
-    FLOAT BoundaryY;
-    FLOAT LuminanceScale;
-} PS_CONSTANT_BUFFER;
-
-/* A Quad is texture that can be displayed in a rectangle */
-typedef struct
-{
-    picture_sys_t             picSys;
-    UINT                      resourceCount;
-    ID3D11Buffer              *pVertexBuffer;
-    UINT                      vertexCount;
-    ID3D11VertexShader        *d3dvertexShader;
-    ID3D11Buffer              *pIndexBuffer;
-    UINT                      indexCount;
-    ID3D11Buffer              *pVertexShaderConstants;
-    ID3D11Buffer              *pPixelShaderConstants[2];
-    UINT                       PSConstantsCount;
-    ID3D11PixelShader         *d3dpixelShader;
-    D3D11_VIEWPORT            cropViewport;
-    unsigned int              i_width;
-    unsigned int              i_height;
-    video_projection_mode_t   projection;
-
-    PS_CONSTANT_BUFFER        shaderConstants;
-} d3d_quad_t;
-
 typedef enum video_color_axis {
     COLOR_AXIS_RGB,
     COLOR_AXIS_YCBCR,



More information about the vlc-commits mailing list