<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hey Luis,<div class=""><br class=""></div><div class="">I just wanted to follow up on this. </div><div class="">Did you have time to adjust this patch and address the leak ?</div><div class="">I’d love for this to get merged into master :) </div><div class=""><br class=""></div><div class="">Best,</div><div class="">Caro<br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On May 3, 2018, at 11:26 AM, Thomas Guillem <<a href="mailto:thomas@gllm.fr" class="">thomas@gllm.fr</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class="Apple-interchange-newline"><br class=""></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class=""></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">On Mon, Apr 30, 2018, at 18:29, Luís Miguel Fernandes wrote:<br class=""></div><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div class="">Hi Steve,<br class=""></div><div class=""><br class=""></div><div class="">Thanks for the comments, here's the revised patches.<br class=""></div><div class=""><br class=""></div><div class=""><div class="">From effa894f8231379841f7c387a6931064fcca929d Mon Sep 17 00:00:00 2001<br class=""></div><div class="">From: Luis Fernandes <<a href="mailto:zipleen@gmail.com" class="">zipleen@gmail.com</a>><br class=""></div><div class="">Date: Mon, 30 Apr 2018 14:33:08 +0100<br class=""></div><div class="">Subject: [PATCH] add auto deinterlacer-mode which is also valid<br class=""></div><div class=""><br class=""></div><div class="">---<br class=""></div><div class=""> lib/video.c | 3 ++-<br class=""></div><div class=""> 1 file changed, 2 insertions(+), 1 deletion(-)<br class=""></div><div class=""><br class=""></div><div class="">diff --git a/lib/video.c b/lib/video.c<br class=""></div><div class="">index 035cc0ebf1..a3e5b248e9 100644<br class=""></div><div class="">--- a/lib/video.c<br class=""></div><div class="">+++ b/lib/video.c<br class=""></div><div class="">@@ -675,7 +675,8 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div><div class=""> && strcmp (psz_mode, "discard") && strcmp (psz_mode, "linear")<br class=""></div><div class=""> && strcmp (psz_mode, "mean") && strcmp (psz_mode, "x")<br class=""></div><div class=""> && strcmp (psz_mode, "yadif") && strcmp (psz_mode, "yadif2x")<br class=""></div><div class="">- && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc"))<br class=""></div><div class="">+ && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc")<br class=""></div><div class="">+ && strcmp (psz_mode, "auto"))<br class=""></div><div class=""> return;<br class=""></div><div class=""><br class=""></div><div class=""> if (*psz_mode)<br class=""></div><div class="">--<br class=""></div><div class="">2.14.3 (Apple Git-98)<br class=""></div><div class=""><br class=""></div><div class=""><div class="">From 2b656a5fca5c69e626ac1727d7bc9f3d980f37e6 Mon Sep 17 00:00:00 2001<br class=""></div><div class="">From: Luis Fernandes <<a href="mailto:zipleen@gmail.com" class="">zipleen@gmail.com</a>><br class=""></div><div class="">Date: Mon, 30 Apr 2018 14:43:00 +0100<br class=""></div><div class="">Subject: [PATCH] change function of deinterlace to specify which deinterlace<br class=""></div><div class=""> mode and filter we want to use<br class=""></div><div class=""><br class=""></div><div class="">---<br class=""></div><div class=""> include/vlc/libvlc_media_player.h | 5 ++++-<br class=""></div><div class=""> lib/video.c | 34 ++++++++++++++++++++--------------<br class=""></div><div class=""> 2 files changed, 24 insertions(+), 15 deletions(-)<br class=""></div><div class=""><br class=""></div><div class="">diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h<br class=""></div><div class="">index 20b220448b..a82f70f5e7 100644<br class=""></div><div class="">--- a/include/vlc/libvlc_media_player.h<br class=""></div><div class="">+++ b/include/vlc/libvlc_media_player.h<br class=""></div><div class="">@@ -1419,9 +1419,12 @@ int libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, unsigned num,<br class=""></div><div class=""> * Enable or disable deinterlace filter<br class=""></div><div class=""> *<br class=""></div><div class=""> * \param p_mi libvlc media player<br class=""></div><div class="">- * \param psz_mode type of deinterlace filter, NULL to disable<br class=""></div><div class="">+ * \param deinterlace deinterlace mode -1:auto (default), 0: disabled, 1: enabled<br class=""></div><div class="">+ * \param psz_mode type of deinterlace filter, NULL to default<br class=""></div><div class="">+ * \version LibVLC 4.0.0 and later<br class=""></div><div class=""> */<br class=""></div><div class=""> LIBVLC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div><div class="">+ int deinterlace,<br class=""></div><div class=""> const char *psz_mode );<br class=""></div><div class=""><br class=""></div><div class=""> /**<br class=""></div><div class="">diff --git a/lib/video.c b/lib/video.c<br class=""></div><div class="">index a3e5b248e9..f96fec7a79 100644<br class=""></div><div class="">--- a/lib/video.c<br class=""></div><div class="">+++ b/lib/video.c<br class=""></div><div class="">@@ -663,13 +663,25 @@ end:<br class=""></div><div class=""> }<br class=""></div><div class=""><br class=""></div><div class=""> /******************************************************************************<br class=""></div><div class="">- * libvlc_video_set_deinterlace : enable deinterlace<br class=""></div><div class="">+ * libvlc_video_set_deinterlace : enable/disable/auto deinterlace and filter<br class=""></div><div class=""> *****************************************************************************/<br class=""></div><div class="">-void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div><div class="">+void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi, int deinterlace,<br class=""></div><div class=""> const char *psz_mode )<br class=""></div><div class=""> {<br class=""></div><div class="">+ if (deinterlace != 0 && deinterlace != 1)<br class=""></div><div class="">+ deinterlace = -1;<br class=""></div><div class="">+<br class=""></div><div class="">+ if (psz_mode == NULL)<br class=""></div><div class="">+ {<br class=""></div><div class="">+ psz_mode = var_GetString(p_mi, "deinterlace-mode");<br class=""></div><div class="">+ }<br class=""></div></div></div></blockquote><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class=""></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">You leak psz_mode here.<br class=""></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">But I think it should stay NULL. Just don't set "deinterlace-mode" in that case but only the "deinterlace" int.<br class=""></div><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class=""></div><blockquote type="cite" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><div class=""><div class=""><div class="">+<br class=""></div><div class=""> if (psz_mode == NULL)<br class=""></div><div class="">+ {<br class=""></div><div class=""> psz_mode = "";<br class=""></div><div class="">+ deinterlace = 0;<br class=""></div><div class="">+ }<br class=""></div><div class="">+<br class=""></div><div class=""> if (*psz_mode<br class=""></div><div class=""> && strcmp (psz_mode, "blend") && strcmp (psz_mode, "bob")<br class=""></div><div class=""> && strcmp (psz_mode, "discard") && strcmp (psz_mode, "linear")<br class=""></div><div class="">@@ -679,13 +691,10 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div><div class=""> && strcmp (psz_mode, "auto"))<br class=""></div><div class=""> return;<br class=""></div><div class=""><br class=""></div><div class="">- if (*psz_mode)<br class=""></div><div class="">- {<br class=""></div><div class="">+ if (*psz_mode && deinterlace != 0)<br class=""></div><div class=""> var_SetString (p_mi, "deinterlace-mode", psz_mode);<br class=""></div><div class="">- var_SetInteger (p_mi, "deinterlace", 1);<br class=""></div><div class="">- }<br class=""></div><div class="">- else<br class=""></div><div class="">- var_SetInteger (p_mi, "deinterlace", 0);<br class=""></div><div class="">+<br class=""></div><div class="">+ var_SetInteger (p_mi, "deinterlace", deinterlace);<br class=""></div><div class=""><br class=""></div><div class=""> size_t n;<br class=""></div><div class=""> vout_thread_t **pp_vouts = GetVouts (p_mi, &n);<br class=""></div><div class="">@@ -693,13 +702,10 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,<br class=""></div><div class=""> {<br class=""></div><div class=""> vout_thread_t *p_vout = pp_vouts[i];<br class=""></div><div class=""><br class=""></div><div class="">- if (*psz_mode)<br class=""></div><div class="">- {<br class=""></div><div class="">+ if (*psz_mode && deinterlace != 0)<br class=""></div><div class=""> var_SetString (p_vout, "deinterlace-mode", psz_mode);<br class=""></div><div class="">- var_SetInteger (p_vout, "deinterlace", 1);<br class=""></div><div class="">- }<br class=""></div><div class="">- else<br class=""></div><div class="">- var_SetInteger (p_vout, "deinterlace", 0);<br class=""></div><div class="">+<br class=""></div><div class="">+ var_SetInteger (p_vout, "deinterlace", deinterlace);<br class=""></div><div class=""> vlc_object_release (p_vout);<br class=""></div><div class=""> }<br class=""></div><div class=""> free (pp_vouts);<br class=""></div><div class="">--<br class=""></div><div class="">2.14.3 (Apple Git-98)<br class=""></div></div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class=""><div class=""><br class=""></div><div class=""><br class=""></div></div><div class=""><div class=""><br class=""></div><div class=""><br class=""></div><div class="">Regards,<br class=""></div><div class="">Luís<br class=""></div><div class=""><div class=""><br class=""></div><blockquote type="cite" class=""><div class="">On 30 Apr 2018, at 07:55, Steve Lhomme <<a href="mailto:robux4@ycbcr.xyz" class="">robux4@ycbcr.xyz</a>> wrote:<br class=""></div><div class=""><br class=""></div><div class=""><div bgcolor="#FFFFFF" class=""><p class="">Please post your patches inline, it's easier to comment<br class=""></p><p class=""><br class=""></p><div class=""><br class="webkit-block-placeholder"></div><div class="">+ if (deinterlace < -1 || deinterlace > 1)<br class=""></div><div class="">+ deinterlace = -1;<br class=""></div><div class="">To make it more clear what you're doing maybe check if the value is neither 0 nor 1.<br class=""></div><div class=""><br class="webkit-block-placeholder"></div><p class=""><br class=""></p><div class=""><br class="webkit-block-placeholder"></div><div class="">+ module_config_t *config = config_FindConfig("deinterlace-mode");<br class=""></div><div class="">This should be var_GetString<br class=""></div><div class=""><br class="webkit-block-placeholder"></div><p class=""><br class=""></p><div class=""><br class="webkit-block-placeholder"></div><div class="">+ && strcmp (psz_mode, "auto"))<br class=""></div><div class="">It seems that should go in another patch before this one.<br class=""></div><div class=""><br class="webkit-block-placeholder"></div><p class=""><br class=""></p><div class=""><br class="webkit-block-placeholder"></div><div class="">- var_SetInteger (p_mi, "deinterlace", 1);<br class=""></div><div class="">+ var_SetInteger (p_mi, "deinterlace", deinterlace);<br class=""></div><div class=""> }<br class=""></div><div class=""> else<br class=""></div><div class="">- var_SetInteger (p_mi, "deinterlace", 0);<br class=""></div><div class="">+ var_SetInteger (p_mi, "deinterlace", deinterlace);<br class=""></div><div class=""><br class="webkit-block-placeholder"></div><p class="">In both cases of the else you do the same call. So don't do it in the else.<br class=""></p><div class=""><br class=""></div><div class="">Le 28/04/2018 à 20:13, Luís Fernandes a écrit :<br class=""></div><blockquote type="cite" cite="mid:0CDA4F63-9E9E-4BD1-BB9C-9F8253B33E18@gmail.com" class=""><pre class="">Hi all,
I’ve reworked the patch to change the method signature, and thus break compatibility with 3.0.
I’ve added a \version annotation to the .h of the function, but I have no idea if I need to do anything else to signal that this is for libvlc4.
Please advice on what I need to add more for the patch to be accepted.
Some notes on the patch:
- I had to add "auto" because the default deinterlace-mode for VLCKit is normally "auto", so without it the mode would never get triggered
- default mode is "auto" (-1) - which seems to be the default mode for vlc as well
Regards,
Luís
<br class=""></pre><div class=""><br class=""></div><div class=""><br class=""></div><pre class=""><br class=""></pre><blockquote type="cite" class=""><pre class="">On 22 Apr 2018, at 11:13, Jean-Baptiste Kempf <a href="mailto:jb@videolan.org" class=""><jb@videolan.org></a> wrote:
Hello,
On Sun, 22 Apr 2018, at 09:37, Rémi Denis-Courmont wrote:
<br class=""></pre><blockquote type="cite" class=""><pre class="">IMO, an API clean-up and thus an ABI break is well overdue in general, and
with that, I'd do 1. But that's just my own personal opinion.
<br class=""></pre></blockquote><pre class="">Yes. Break API and ABI for 4.0. libvlc6. Go ahead.
But if anyone breaks ABI for 3.0, I'll break his neck. (in a soft fashion) :D
--
Jean-Baptiste Kempf - President
+33 672 704 734
_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
<a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a>
<br class=""></pre></blockquote><pre class=""><br class=""></pre><div class=""><br class=""></div><div class=""><br class=""></div><pre class="">_______________________________________________
vlc-devel mailing list
To unsubscribe or modify your subscription options:
<a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a><br class=""></pre></blockquote><div class=""><br class=""></div></div><div class="">_______________________________________________<br class=""></div><div class="">vlc-devel mailing list<br class=""></div><div class="">To unsubscribe or modify your subscription options:<br class=""></div><div class=""><a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a><br class=""></div></div></blockquote></div></div><div class=""><u class="">_______________________________________________</u><br class=""></div><div class="">vlc-devel mailing list<br class=""></div><div class="">To unsubscribe or modify your subscription options:<br class=""></div><div class=""><a href="https://mailman.videolan.org/listinfo/vlc-devel" class="">https://mailman.videolan.org/listinfo/vlc-devel</a><br class=""></div><p class="">Email had 2 attachments:<br class=""></p><ul class=""><li class=""><div class=""><code class="">auto_deinterlace.patch</code><br class=""></div><div class=""> 1k (text/plain)<br class=""></div></li><li class=""><div class=""><code class="">set_filter_auto_deinterlace.patch</code><br class=""></div><div class=""> 5k (text/plain)<br class=""></div></li></ul></blockquote><div style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br class=""></div><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">vlc-devel mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">To unsubscribe or modify your subscription options:</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><a href="https://mailman.videolan.org/listinfo/vlc-devel" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">https://mailman.videolan.org/listinfo/vlc-devel</a></div></blockquote></div><br class=""></div></body></html>