[vlc-devel] [PATCH 05/14] filter: allow the owner not to provide a buffer callback
Rémi Denis-Courmont
remi at remlab.net
Wed Sep 18 10:39:06 CEST 2019
Hi,
I am not sure how hardware should be exposed to filters/converters. I don't recall covering that part of the puzzle at the February workshop.
Le 18 septembre 2019 09:00:41 GMT+03:00, Steve Lhomme <robux4 at ycbcr.xyz> a écrit :
>On 2019-09-17 17:32, Rémi Denis-Courmont wrote:
>> Le tiistaina 17. syyskuuta 2019, 17.22.33 EEST Steve Lhomme a écrit :
>>> In this case we just allocate a picture from the filter output
>format.
>>> ---
>>> include/vlc_filter.h | 7 ++++++-
>>> 1 file changed, 6 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/include/vlc_filter.h b/include/vlc_filter.h
>>> index 0c756ce10ec..0bc10e91997 100644
>>> --- a/include/vlc_filter.h
>>> +++ b/include/vlc_filter.h
>>> @@ -26,6 +26,7 @@
>>> #define VLC_FILTER_H 1
>>>
>>> #include <vlc_es.h>
>>> +#include <vlc_picture.h>
>>>
>>> /**
>>> * \defgroup filter Filters
>>> @@ -160,7 +161,11 @@ struct filter_t
>>> */
>>> static inline picture_t *filter_NewPicture( filter_t *p_filter )
>>> {
>>> - picture_t *pic = p_filter->owner.video->buffer_new( p_filter );
>>> + picture_t *pic;
>>> + if ( p_filter->owner.video != NULL &&
>p_filter->owner.video->buffer_new
>>> != NULL)
>>
>> Two checks look redundant, though anyway this callback should go away
>> altogether eventually.
>
>Yes, it will go away.
>
>The owner will have the "get_device" callback so it's possible at some
>point in the code to have one callback and not the other. But in the
>end
>this code won't be there anymore.
>
>>> + pic = p_filter->owner.video->buffer_new( p_filter );
>>> + else
>>> + pic = picture_NewFromFormat( &p_filter->fmt_out.video );
>>> if( pic == NULL )
>>> msg_Warn( p_filter, "can't get output picture" );
>>> return pic;
>>
>>
>> --
>> Rémi Denis-Courmont
>> http://www.remlab.net/
>>
>>
>>
>> _______________________________________________
>> 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/20190918/b696a566/attachment.html>
More information about the vlc-devel
mailing list