<html><head></head><body>Hi,<br><br>This requires that callbacks are all serialized, which I don't think that's a good idea for extensibility and generality.<br><br>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><br><div class="gmail_quote">Le 28 février 2019 17:59:50 GMT+02:00, Thomas Guillem <thomas@gllm.fr> 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">TODO:<br> - document for video/spu<br> - Check if all filters are loaded with error = false<hr> include/vlc_filter.h | 9 ++++++++-<br> src/misc/filter.c | 1 +<br> 2 files changed, 9 insertions(+), 1 deletion(-)<br><br>diff --git a/include/vlc_filter.h b/include/vlc_filter.h<br>index b2a8f871a4..4822de7771 100644<br>--- a/include/vlc_filter.h<br>+++ b/include/vlc_filter.h<br>@@ -83,12 +83,19 @@ struct filter_t<br> /* Filter configuration */<br> config_chain_t * p_cfg;<br> <br>+ /** Set to true to signal an error from any callbacks */<br>+ bool error;<br>+<br> union<br> {<br> /** Filter a picture (video filter) */<br> picture_t * (*pf_video_filter)( filter_t *, picture_t * );<br> <br>- /** Filter an audio block (audio filter) */<br>+ /**<br>+ * Filter an audio block (audio filter)A<br>+ * @return a valid output block or NULL (if the module need more data<br>+ * to output a block). Set filter_t.error to true to signal an error.<br>+ */<br> block_t * (*pf_audio_filter)( filter_t *, block_t * );<br> <br> /** Blend a subpicture onto a picture (blend) */<br>diff --git a/src/misc/filter.c b/src/misc/filter.c<br>index 465677a12f..678b88965e 100644<br>--- a/src/misc/filter.c<br>+++ b/src/misc/filter.c<br>@@ -148,6 +148,7 @@ int filter_ConfigureBlend( filter_t *p_blend,<br> p_blend->fmt_out.video.i_visible_width = i_dst_width;<br> p_blend->fmt_out.video.i_height =<br> p_blend->fmt_out.video.i_visible_height = i_dst_height;<br>+ p_blend->error = false;<br> <br> /* */<br> if( !p_blend->p_module )</pre></blockquote></div><br>-- <br>Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.</body></html>