<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body><div><br></div>
<div>On Sat, Jul 1, 2017, at 19:30, Rémi Denis-Courmont wrote:<br></div>
<blockquote type="cite"><div defang_data-gmailquote="yes"><div>Le 1 juillet 2017 18:24:48 GMT+02:00, Victorien Le Couviour--Tuffet <git@videolan.org> a écrit :<br></div>
<blockquote defang_data-gmailquote="yes" 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;"><pre><div>vlc | branch: master | Victorien Le Couviour--Tuffet <victorien.lecouviour.tuffet@gmail.com> | Fri Jun 23 10:24:16 2017 +0200| [40bd2515d996a4b9c47b2199fac61a9fdea310bb] | committer: Thomas Guillem<br></div>
<div><br></div>
<div>filter_chain: uniform filter_chain_Append{Converter,Filter} return type<br></div>
<div><br></div>
<blockquote defang_data-gmailquote="yes" style="margin-top:0pt;margin-right:0pt;margin-bottom:1ex;margin-left:0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(114, 159, 207);padding-left:1ex;"> <a href="http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=40bd2515d996a4b9c47b2199fac61a9fdea310bb">http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=40bd2515d996a4b9c47b2199fac61a9fdea310bb</a><br></blockquote><div>---<br></div>
<div><br></div>
<div> include/vlc_filter.h | 5 ++---<br></div>
<div> modules/stream_out/transcode/video.c | 2 +-<br></div>
<div> modules/video_chroma/chain.c | 10 +++++-----<br></div>
<div> src/misc/filter_chain.c | 4 ++--<br></div>
<div> src/video_output/display.c | 3 ++-<br></div>
<div> src/video_output/video_output.c | 4 ++--<br></div>
<div> 6 files changed, 14 insertions(+), 14 deletions(-)<br></div>
<div><br></div>
<div>diff --git a/include/vlc_filter.h b/include/vlc_filter.h<br></div>
<div>index a3ecc2c1b3..3db7281671 100644<br></div>
<div>--- a/include/vlc_filter.h<br></div>
<div>+++ b/include/vlc_filter.h<br></div>
<div>@@ -330,10 +330,9 @@ VLC_API filter_t *filter_chain_AppendFilter(filter_chain_t *chain,<br></div>
<div> * \param chain filter chain to append a filter to<br></div>
<div> * \param fmt_in filter input format<br></div>
<div> * \param fmt_out filter output format<br></div>
<div>- * \retval 0 on success<br></div>
<div>- * \retval -1 on failure<br></div>
<div>+ * \return a pointer to the filter or NULL on error<br></div>
<div> */<br></div>
<div>-VLC_API int filter_chain_AppendConverter(filter_chain_t *chain,<br></div>
<div>+VLC_API filter_t *filter_chain_AppendConverter(filter_chain_t *chain,<br></div>
<div> const es_format_t *fmt_in, const es_format_t *fmt_out);<br></div>
<div> <br></div>
<div> /**<br></div>
<div>diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c<br></div>
<div>index 50b21bc0ff..b4bc000db3 100644<br></div>
<div>--- a/modules/stream_out/transcode/video.c<br></div>
<div>+++ b/modules/stream_out/transcode/video.c<br></div>
<div>@@ -69,7 +69,7 @@ static int video_update_format_decoder( decoder_t *p_dec )<br></div>
<div> filter_chain_Reset( test_chain, &p_dec->fmt_out, &p_dec->fmt_out );<br></div>
<div> <br></div>
<div> int chain_works = filter_chain_AppendConverter( test_chain, &p_dec->fmt_out,<br></div>
<div>- &id->p_encoder->fmt_in );<br></div>
<div>+ &id->p_encoder->fmt_in ) != NULL ? 0 : -1;<br></div>
<div> filter_chain_Delete( test_chain );<br></div>
<div> msg_Dbg( stream, "Filter chain testing done, input chroma %4.4s seems to be %s for transcode",<br></div>
<div> (char *)&p_dec->fmt_<a href="http://out.video">out.video</a>.i_chroma,<br></div>
<div>diff --git a/modules/video_chroma/chain.c b/modules/video_chroma/chain.c<br></div>
<div>index be4c26e611..eb20daa817 100644<br></div>
<div>--- a/modules/video_chroma/chain.c<br></div>
<div>+++ b/modules/video_chroma/chain.c<br></div>
<div>@@ -310,7 +310,7 @@ static int BuildFilterChain( filter_t *p_filter )<br></div>
<div> video_format_FixRgb(&fmt_<a href="http://mid.video">mid.video</a>);<br></div>
<div> <br></div>
<div> if( filter_chain_AppendConverter( p_filter->p_sys->p_chain,<br></div>
<div>- NULL, &fmt_mid ) == VLC_SUCCESS )<br></div>
<div>+ NULL, &fmt_mid ) )<br></div>
<div> {<br></div>
<div> if( filter_chain_AppendFilter( p_filter->p_sys->p_chain,<br></div>
<div> p_filter->psz_name, p_filter->p_cfg,<br></div>
<div>@@ -355,8 +355,8 @@ static int CreateChain( filter_t *p_parent, es_format_t *p_fmt_mid )<br></div>
<div> }<br></div>
<div> else<br></div>
<div> {<br></div>
<div>- if( filter_chain_AppendConverter( p_parent->p_sys->p_chain,<br></div>
<div>- NULL, p_fmt_mid ) )<br></div>
<div>+ if( !filter_chain_AppendConverter( p_parent->p_sys->p_chain,<br></div>
<div>+ NULL, p_fmt_mid ) )<br></div>
<div> return VLC_EGENERIC;<br></div>
<div> }<br></div>
<div> <br></div>
<div>@@ -368,8 +368,8 @@ static int CreateChain( filter_t *p_parent, es_format_t *p_fmt_mid )<br></div>
<div> }<br></div>
<div> else<br></div>
<div> {<br></div>
<div>- if( filter_chain_AppendConverter( p_parent->p_sys->p_chain,<br></div>
<div>- p_fmt_mid, NULL ) )<br></div>
<div>+ if( !filter_chain_AppendConverter( p_parent->p_sys->p_chain,<br></div>
<div>+ p_fmt_mid, NULL ) )<br></div>
<div> goto error;<br></div>
<div> }<br></div>
<div> return VLC_SUCCESS;<br></div>
<div>diff --git a/src/misc/filter_chain.c b/src/misc/filter_chain.c<br></div>
<div>index 741a63c9ad..7e038dbbb8 100644<br></div>
<div>--- a/src/misc/filter_chain.c<br></div>
<div>+++ b/src/misc/filter_chain.c<br></div>
<div>@@ -274,11 +274,11 @@ filter_t *filter_chain_AppendFilter( filter_chain_t *chain,<br></div>
<div> fmt_in, fmt_out );<br></div>
<div> }<br></div>
<div> <br></div>
<div>-int filter_chain_AppendConverter( filter_chain_t *chain,<br></div>
<div>+filter_t *filter_chain_AppendConverter( filter_chain_t *chain,<br></div>
<div> const es_format_t *fmt_in, const es_format_t *fmt_out )<br></div>
<div> {<br></div>
<div> return filter_chain_AppendInner( chain, NULL, chain->conv_cap, NULL,<br></div>
<div>- fmt_in, fmt_out ) != NULL ? 0 : -1;<br></div>
<div>+ fmt_in, fmt_out );<br></div>
<div> }<br></div>
<div> <br></div>
<div> void filter_chain_DeleteFilter( filter_chain_t *chain, filter_t *filter )<br></div>
<div>diff --git a/src/video_output/display.c b/src/video_output/display.c<br></div>
<div>index aaa24b053d..57210df5fd 100644<br></div>
<div>--- a/src/video_output/display.c<br></div>
<div>+++ b/src/video_output/display.c<br></div>
<div>@@ -462,7 +462,8 @@ static int VoutDisplayCreateRender(vout_display_t *vd)<br></div>
<div> es_format_InitFromVideo(&dst, i == 0 ? &v_dst : &v_dst_cmp);<br></div>
<div> <br></div>
<div> filter_chain_Reset(osys->filters, &src, &dst);<br></div>
<div>- ret = filter_chain_AppendConverter(osys->filters, &src, &dst);<br></div>
<div>+ ret = filter_chain_AppendConverter(osys->filters, &src, &dst)<br></div>
<div>+ != NULL ? 0 : -1;<br></div>
<div> es_format_Clean(&dst);<br></div>
<div> if (ret == 0)<br></div>
<div> break;<br></div>
<div>diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c<br></div>
<div>index c1ddc6a4d5..e46859ddd1 100644<br></div>
<div>--- a/src/video_output/video_output.c<br></div>
<div>+++ b/src/video_output/video_output.c<br></div>
<div>@@ -854,8 +854,8 @@ static void ThreadChangeFilters(vout_thread_t *vout,<br></div>
<div> <br></div>
<div> if (!es_format_IsSimilar(&fmt_current, &fmt_target)) {<br></div>
<div> msg_Dbg(vout, "Adding a filter to compensate for format changes");<br></div>
<div>- if (filter_chain_AppendConverter(vout->p->filter.chain_interactive,<br></div>
<div>- &fmt_current, &fmt_target) != 0) {<br></div>
<div>+ if (!filter_chain_AppendConverter(vout->p->filter.chain_interactive,<br></div>
<div>+ &fmt_current, &fmt_target)) {<br></div>
<div> msg_Err(vout, "Failed to compensate for the format changes, removing all filters");<br></div>
<div> ThreadDelAllFilterCallbacks(vout);<br></div>
<div> filter_chain_Reset(vout->p->filter.chain_static, &fmt_target, &fmt_target);<br></div>
<div><br></div>
<div><hr><br></div>
<div>vlc-commits mailing list<br></div>
<div>vlc-commits@videolan.org<br></div>
<div><a href="https://mailman.videolan.org/listinfo/vlc-commits">https://mailman.videolan.org/listinfo/vlc-commits</a><br></div>
</pre></blockquote></div>
<div><br></div>
<div>Repeating myself but WTF? This is counter-sensical.WTFF will you do with the conversion filter pointer, which can't have variables, and how the heck is this going to work with when the conversion chaining is fixed (like audio already was)?!<br></div>
</blockquote><div><br></div>
<div>Language.</div>
<div><br></div>
<blockquote type="cite"><div> -- <br></div>
<div> Rémi Denis-Courmont<br></div>
<div> Typed on an inconvenient virtual keyboard <br></div>
<div><u>_______________________________________________</u><br></div>
<div>vlc-devel mailing list<br></div>
<div>To unsubscribe or modify your subscription options:<br></div>
<div><a href="https://mailman.videolan.org/listinfo/vlc-devel">https://mailman.videolan.org/listinfo/vlc-devel</a><br></div>
</blockquote></body>
</html>