[vlc-devel] [PATCH 4/7] d3d11_surface: better debugging of surface issues

Steve Lhomme robux4 at videolabs.io
Thu Oct 15 19:04:59 CEST 2015


From: Steve Lhomme <robux4 at gmail.com>

---
 modules/video_chroma/Makefile.am     | 1 +
 modules/video_chroma/d3d11_surface.c | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/modules/video_chroma/Makefile.am b/modules/video_chroma/Makefile.am
index fde545d..1b0f7b6 100644
--- a/modules/video_chroma/Makefile.am
+++ b/modules/video_chroma/Makefile.am
@@ -109,6 +109,7 @@ endif
 
 # D3D11VA
 libd3d11_surface_plugin_la_SOURCES = video_chroma/d3d11_surface.c \
+	video_chroma/dxgi_fmt.c video_chroma/dxgi_fmt.h \
 	video_chroma/copy.c video_chroma/copy.h
 
 if HAVE_AVCODEC_D3D11VA
diff --git a/modules/video_chroma/d3d11_surface.c b/modules/video_chroma/d3d11_surface.c
index eb2041f..3fbf4bf 100644
--- a/modules/video_chroma/d3d11_surface.c
+++ b/modules/video_chroma/d3d11_surface.c
@@ -33,6 +33,7 @@
 #include <vlc_filter.h>
 
 #include "copy.h"
+#include "dxgi_fmt.h"
 
 static int  OpenConverter( vlc_object_t * );
 static void CloseConverter( vlc_object_t * );
@@ -90,7 +91,7 @@ static int assert_staging(filter_t *p_filter, picture_sys_t *p_sys)
     hr = ID3D11Device_CreateTexture2D( p_device, &texDesc, NULL, &sys->staging);
     ID3D11Device_Release(p_device);
     if (FAILED(hr)) {
-        msg_Err(p_filter, "Failed to create a staging texture to extract surface pixels (hr=0x%0lx)", hr );
+        msg_Err(p_filter, "Failed to create a %s staging texture to extract surface pixels (hr=0x%0lx)", DxgiFormatToStr(texDesc.Format), hr );
         return VLC_EGENERIC;
     }
 ok:
-- 
2.6.0



More information about the vlc-devel mailing list