[vlc-devel] [PATCH 1/3] display: add a macro to set the callbacks and check type of the Open callback

Steve Lhomme robux4 at ycbcr.xyz
Tue Jul 9 14:58:55 CEST 2019


On 2019-07-09 14:35, Thomas Guillem wrote:
> OK for this set (but I can live without it).
> 
> Do we plan to do that for every modules capabilities ? (or new ones)

If the feedback is good, yes. We may get some suprises (like the caca one).

> On Tue, Jul 9, 2019, at 14:14, Steve Lhomme wrote:
>> It will emit a warning if the type doesn't match.
>> It can be turned into an error with -Werror=incompatible-pointer-types
>>
>> On 2019-07-09 14:10, Steve Lhomme wrote:
>>> ---
>>>    include/vlc_vout_display.h | 6 ++++++
>>>    1 file changed, 6 insertions(+)
>>>
>>> diff --git a/include/vlc_vout_display.h b/include/vlc_vout_display.h
>>> index aa00003c8e0..a02bf676c98 100644
>>> --- a/include/vlc_vout_display.h
>>> +++ b/include/vlc_vout_display.h
>>> @@ -208,6 +208,12 @@ typedef int (*vout_display_open_cb)(vout_display_t *vd,
>>>                                        video_format_t *fmtp,
>>>                                        vlc_video_context *context);
>>>    
>>> +#define set_callbacks_display(Activate, Deactivate) \
>>> +    { \
>>> +      vout_display_open_cb open__ = Activate; \
>>> +      set_callbacks( open__, Deactivate ) \
>>> +    }
>>> +
>>>    /**
>>>     * "vout display" close callback
>>>     *
>>> -- 
>>> 2.17.1
>>>
>>> _______________________________________________
>>> 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
> _______________________________________________
> 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