<html><head></head><body>Hi,<br><br>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.<br><br><div class="gmail_quote">Le 18 septembre 2019 09:00:41 GMT+03:00, Steve Lhomme <robux4@ycbcr.xyz> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<pre class="k9mail">On 2019-09-17 17:32, Rémi Denis-Courmont wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;">Le tiistaina 17. syyskuuta 2019, 17.22.33 EEST Steve Lhomme a écrit :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;"> In this case we just allocate a picture from the filter output format.<hr>   include/vlc_filter.h | 7 ++++++-<br>   1 file changed, 6 insertions(+), 1 deletion(-)<br><br> diff --git a/include/vlc_filter.h b/include/vlc_filter.h<br> index 0c756ce10ec..0bc10e91997 100644<br> --- a/include/vlc_filter.h<br> +++ b/include/vlc_filter.h<br> @@ -26,6 +26,7 @@<br>   #define VLC_FILTER_H 1<br><br>   #include <vlc_es.h><br> +#include <vlc_picture.h><br><br>   /**<br>    * \defgroup filter Filters<br> @@ -160,7 +161,11 @@ struct filter_t<br>    */<br>   static inline picture_t *filter_NewPicture( filter_t *p_filter )<br>   {<br> -    picture_t *pic = p_filter->owner.video->buffer_new( p_filter );<br> +    picture_t *pic;<br> +    if ( p_filter->owner.video != NULL && p_filter->owner.video->buffer_new<br> != NULL)<br></blockquote>Two checks look redundant, though anyway this callback should go away<br>altogether eventually.<br></blockquote><br>Yes, it will go away.<br><br>The owner will have the "get_device" callback so it's possible at some <br>point in the code to have one callback and not the other. But in the end <br>this code won't be there anymore.<br><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #729fcf; padding-left: 1ex;"><blockquote class="gmail_quote" style="margin: 0pt 0pt 1ex 0.8ex; border-left: 1px solid #ad7fa8; padding-left: 1ex;">+        pic = p_filter->owner.video->buffer_new( p_filter );<br>+    else<br>+        pic = picture_NewFromFormat( &p_filter->fmt_out.video );<br>      if( pic == NULL )<br>          msg_Warn( p_filter, "can't get output picture" );<br>      return pic;<br></blockquote><br>-- <br>Rémi Denis-Courmont<br><a href="http://www.remlab.net/">http://www.remlab.net/</a><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br><br></blockquote><hr>vlc-devel mailing list<br>To unsubscribe or modify your subscription options:<br><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a></pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>