[vlc-devel] [PATCH 1/3] decoder device: add a helper macro to set the module (typed) callback/priority

Steve Lhomme robux4 at ycbcr.xyz
Fri Jul 19 15:37:58 CEST 2019


Updated version of the last patch after the removal of the deactivate 
callback.

On 2019-07-19 15:34, Steve Lhomme wrote:
> ---
>   include/vlc_codec.h | 9 +++++++++
>   1 file changed, 9 insertions(+)
> 
> diff --git a/include/vlc_codec.h b/include/vlc_codec.h
> index aa45f36f36..8ecdcadb39 100644
> --- a/include/vlc_codec.h
> +++ b/include/vlc_codec.h
> @@ -539,6 +539,15 @@ typedef struct vlc_decoder_device
>   typedef int (*vlc_decoder_device_Open)(vlc_decoder_device *device,
>                                           vout_window_t *window);
>   
> +#define set_callback_dec_device(activate, priority) \
> +    { \
> +        vlc_decoder_device_Open open__ = activate; \
> +        (void) open__; \
> +        set_callback(activate) \
> +    } \
> +    set_capability( "decoder device", priority )
> +
> +
>   /**
>    * Create a decoder device from a window
>    *
> -- 
> 2.17.1
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel
> 


More information about the vlc-devel mailing list