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

Rémi Denis-Courmont remi at remlab.net
Mon Jul 15 16:02:15 CEST 2019


Hi,

I don't remember the details but this does not look compatible with the stringification trick.

Le 15 juillet 2019 17:00:41 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>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

-- 
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20190715/4148d340/attachment.html>


More information about the vlc-devel mailing list