[vlc-devel] [PATCH] vout: allow creating a pool of D3D9 GPU surfaces picture_t

Jean-Baptiste Kempf jb at videolan.org
Tue Apr 28 16:45:46 CEST 2015


Missing git add ? :)

On 28 Apr, Steve Lhomme wrote :
> ---
>  src/Makefile.am                 |  9 +++++++++
>  src/video_output/vout_wrapper.c | 15 +++++++++++----
>  2 files changed, 20 insertions(+), 4 deletions(-)
> 
> diff --git a/src/Makefile.am b/src/Makefile.am
> index 1f02494..a5dba6a 100644
> --- a/src/Makefile.am
> +++ b/src/Makefile.am
> @@ -301,6 +301,15 @@ SOURCES_libvlc_win32 = \
>  	win32/rand.c \
>  	$(NULL)
>  
> +if HAVE_DIRECTX
> +if !HAVE_WINSTORE
> +SOURCES_libvlc_win32 += \
> +	win32/direct3d9_pool.c \
> +	win32/direct3d9_pool.h \
> +	$(NULL)
> +endif
> +endif
> +
>  SOURCES_libvlc_symbian = \
>  	symbian/path.cpp \
>  	symbian/dirs.c \
> diff --git a/src/video_output/vout_wrapper.c b/src/video_output/vout_wrapper.c
> index dbaae78..c6fbb87 100644
> --- a/src/video_output/vout_wrapper.c
> +++ b/src/video_output/vout_wrapper.c
> @@ -35,6 +35,9 @@
>  #include <assert.h>
>  #include "vout_internal.h"
>  #include "display.h"
> +#if defined(_WIN32) && defined(HAVE_D3D9_H)
> +#include "../win32/direct3d9_pool.h"
> +#endif
>  
>  /*****************************************************************************
>   * Local prototypes
> @@ -145,10 +148,14 @@ int vout_InitWrapper(vout_thread_t *vout)
>          sys->decoder_pool = display_pool;
>          sys->display_pool = display_pool;
>      } else if (!sys->decoder_pool) {
> -        sys->decoder_pool =
> -            picture_pool_NewFromFormat(&source,
> -                                       __MAX(VOUT_MAX_PICTURES,
> -                                             reserved_picture + decoder_picture - DISPLAY_PICTURE_COUNT));
> +        const unsigned decoder_pool_size = __MAX(VOUT_MAX_PICTURES,
> +                                                 reserved_picture + decoder_picture - DISPLAY_PICTURE_COUNT);
> +#if defined(_WIN32) && defined(HAVE_D3D9_H)
> +        if (source.i_chroma == VLC_CODEC_D3D9_OPAQUE)
> +            sys->decoder_pool = AllocPoolD3D9( VLC_OBJECT(vout), &source, decoder_pool_size );
> +        else
> +#endif
> +            sys->decoder_pool = picture_pool_NewFromFormat( &source, decoder_pool_size );
>          if (!sys->decoder_pool)
>              return VLC_EGENERIC;
>          if (allow_dr) {
> -- 
> 2.3.2
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list