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

Thomas Guillem thomas at gllm.fr
Mon Jul 15 16:02:53 CEST 2019


Yes we need to make sure that having a submodule of a different category works.

But I don't see why this current patch wouldn't work in that case.

On Mon, Jul 15, 2019, at 16:01, Steve Lhomme wrote:
> On 2019-07-15 14:41, Rémi Denis-Courmont wrote:
> > Hi,
> > 
> > Did you actually test this? I doubt that would work with the plugin cache.
> 
> Yes I did test it. Why wouldn't it work ? I still writes code in the 
> code section between vlc_module_begin() and vlc_module_end(). In the end 
> the same call to set_callbacks() and set_capability() is done.
> 
> > Le 15 juillet 2019 14:55:56 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
> >> ---
> >> include/vlc_codec.h | 9 +++++++++
> >> 1 file changed, 9 insertions(+)
> >>
> >> diff --git a/include/vlc_codec.h b/include/vlc_codec.h
> >> index 86f092c029..087426e7a4 100644
> >> --- a/include/vlc_codec.h
> >> +++ b/include/vlc_codec.h
> >> @@ -534,6 +534,15 @@ typedef int
> >> (*vlc_decoder_device_Open)(vlc_decoder_device *device,
> >> /** "decoder device" module close entry point */
> >> typedef void (*vlc_decoder_device_Close)(vlc_decoder_device *device);
> >>
> >> +#define set_callbacks_dec_device(Activate, Deactivate, priority) \
> >> +    { \
> >> +        vlc_decoder_device_Open open__ = Activate; \
> >> +        vlc_decoder_device_Close close__ = Deactivate; \
> >> +        set_callbacks(open__, close__); \
> >> +    } \
> >> +    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
> > 
> > -- 
> > Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
> > 
> > 
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> > 
> _______________________________________________
> 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