<!DOCTYPE html><html><head><title></title><style type="text/css">p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div><br></div><div><br></div><div>On Thu, Feb 28, 2019, at 20:08, Rémi Denis-Courmont wrote:<br></div><blockquote type="cite" id="fastmail-quoted"><div>Hi,<br></div><div><br></div><div>This requires that callbacks are all serialized, which I don't think that's a good idea for extensibility and generality.<br></div><div><br></div><div>And then I don't think filters should be allowed to fail after initialisation, as it won't typically be possible or reasonable to handle errors.<br></div></blockquote><div><br></div><div><div>My last patch of the set really need to make sure we handle filters fails, but yes those fail are very unlikely:<br></div><div>Few filters check external API returns and fail accordingly.  I guess these checks could be replaced by asserts and make extra precaution it won't fail from the open CB.<br></div><div>And what about alloc fail ? I guess if it happens for a small block, we are screwed anyway.<br></div></div><div><br></div><div><br></div><blockquote type="cite" id="fastmail-quoted"><div><br></div><div class="fastmail-quoted-gmail_quote"><div>Le 28 février 2019 17:59:50 GMT+02:00, Thomas Guillem <thomas@gllm.fr> a écrit :<br></div><blockquote style="margin-top:0pt;margin-right:0pt;margin-bottom:0pt;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204, 204, 204);padding-left:1ex;" class="fastmail-quoted-gmail_quote"><pre class="fastmail-quoted-k9mail"><div>TODO:<br></div><div> - document for video/spu<br></div><div> - Check if all filters are loaded with error = false<hr> include/vlc_filter.h | 9 ++++++++-<br></div><div> src/misc/filter.c    | 1 +<br></div><div> 2 files changed, 9 insertions(+), 1 deletion(-)<br></div><div><br></div><div>diff --git a/include/vlc_filter.h b/include/vlc_filter.h<br></div><div>index b2a8f871a4..4822de7771 100644<br></div><div>--- a/include/vlc_filter.h<br></div><div>+++ b/include/vlc_filter.h<br></div><div>@@ -83,12 +83,19 @@ struct filter_t<br></div><div>     /* Filter configuration */<br></div><div>     config_chain_t *    p_cfg;<br></div><div> <br></div><div>+    /** Set to true to signal an error from any callbacks */<br></div><div>+    bool                error;<br></div><div>+<br></div><div>     union<br></div><div>     {<br></div><div>         /** Filter a picture (video filter) */<br></div><div>         picture_t * (*pf_video_filter)( filter_t *, picture_t * );<br></div><div> <br></div><div>-        /** Filter an audio block (audio filter) */<br></div><div>+        /**<br></div><div>+         * Filter an audio block (audio filter)A<br></div><div>+         * @return a valid output block or NULL (if the module need more data<br></div><div>+         * to output a block). Set filter_t.error to true to signal an error.<br></div><div>+         */<br></div><div>         block_t * (*pf_audio_filter)( filter_t *, block_t * );<br></div><div> <br></div><div>         /** Blend a subpicture onto a picture (blend) */<br></div><div>diff --git a/src/misc/filter.c b/src/misc/filter.c<br></div><div>index 465677a12f..678b88965e 100644<br></div><div>--- a/src/misc/filter.c<br></div><div>+++ b/src/misc/filter.c<br></div><div>@@ -148,6 +148,7 @@ int filter_ConfigureBlend( filter_t *p_blend,<br></div><div>     p_blend->fmt_out.video.i_visible_width  = i_dst_width;<br></div><div>     p_blend->fmt_out.video.i_height         =<br></div><div>     p_blend->fmt_out.video.i_visible_height = i_dst_height;<br></div><div>+    p_blend->error = false;<br></div><div> <br></div><div>     /* */<br></div><div>     if( !p_blend->p_module )<br></div></pre></blockquote></div><div><br></div><div>-- <br></div><div>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté. <br></div><div>_______________________________________________<br></div><div>vlc-devel mailing list<br></div><div>To unsubscribe or modify your subscription options:<br></div><div>https://mailman.videolan.org/listinfo/vlc-devel<br></div></blockquote><div><br></div></body></html>