[vlc-devel] [PATCH] direct3d11: fix compilation when direct rendering cannot be used
Steve Lhomme
robux4 at gmail.com
Tue Jun 16 15:57:33 CEST 2015
---
modules/video_output/msw/direct3d11.c | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/modules/video_output/msw/direct3d11.c b/modules/video_output/msw/direct3d11.c
index 7b2ed90..aa90ede 100644
--- a/modules/video_output/msw/direct3d11.c
+++ b/modules/video_output/msw/direct3d11.c
@@ -103,6 +103,7 @@ static const d3d_format_t d3d_formats[] = {
{ NULL, 0, 0, 0, 0}
};
+#ifdef HAVE_ID3D11VIDEODECODER
/* VLC_CODEC_D3D11_OPAQUE */
struct picture_sys_t
{
@@ -110,6 +111,7 @@ struct picture_sys_t
ID3D11Texture2D *texture;
ID3D11DeviceContext *context;
};
+#endif
/* internal picture_t pool */
typedef struct
@@ -514,6 +516,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned pool_size)
if ( vd->sys->pool != NULL )
return vd->sys->pool;
+#ifdef HAVE_ID3D11VIDEODECODER
picture_t** pictures = NULL;
unsigned picture_count = 0;
HRESULT hr;
@@ -587,9 +590,11 @@ error:
DestroyDisplayPoolPicture(pictures[i]);
free(pictures);
}
+#endif
return vd->sys->pool;
}
+#ifdef HAVE_ID3D11VIDEODECODER
static void DestroyDisplayPoolPicture(picture_t *picture)
{
picture_sys_t *p_sys = (picture_sys_t*) picture->p_sys;
@@ -600,7 +605,7 @@ static void DestroyDisplayPoolPicture(picture_t *picture)
free(p_sys);
free(picture);
}
-
+#endif
static void DestroyDisplayPicture(picture_t *picture)
{
@@ -717,6 +722,7 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
{
vout_display_sys_t *sys = vd->sys;
+#ifdef HAVE_ID3D11VIDEODECODER
if (picture->format.i_chroma == VLC_CODEC_D3D11_OPAQUE) {
D3D11_BOX box;
box.left = 0;
@@ -733,6 +739,7 @@ static void Prepare(vout_display_t *vd, picture_t *picture, subpicture_t *subpic
(ID3D11Resource*) p_sys->texture,
0, &box);
}
+#endif
#if VLC_WINSTORE_APP /* TODO: Choose the WinRT app background clear color */
float ClearColor[4] = { 1.0f, 0.125f, 0.3f, 1.0f };
--
2.4.3
More information about the vlc-devel
mailing list