<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="">Hi again,<div class=""><br class=""></div><div class="">Sorry about the spam, I just noticed that there could be a small adjustment for coding standards. Here’s the patch again!</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Luís</div><div class=""><br class=""></div><div class=""><div class="">From effa894f8231379841f7c387a6931064fcca929d Mon Sep 17 00:00:00 2001</div><div class="">From: Luis Fernandes <<a href="mailto:zipleen@gmail.com" class="">zipleen@gmail.com</a>></div><div class="">Date: Mon, 30 Apr 2018 14:33:08 +0100</div><div class="">Subject: [PATCH] add auto deinterlacer-mode which is also valid</div><div class=""><br class=""></div><div class="">---</div><div class=""> lib/video.c | 3 ++-</div><div class=""> 1 file changed, 2 insertions(+), 1 deletion(-)</div><div class=""><br class=""></div><div class="">diff --git a/lib/video.c b/lib/video.c</div><div class="">index 035cc0ebf1..a3e5b248e9 100644</div><div class="">--- a/lib/video.c</div><div class="">+++ b/lib/video.c</div><div class="">@@ -675,7 +675,8 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,</div><div class="">      && strcmp (psz_mode, "discard")  && strcmp (psz_mode, "linear")</div><div class="">      && strcmp (psz_mode, "mean")     && strcmp (psz_mode, "x")</div><div class="">      && strcmp (psz_mode, "yadif")    && strcmp (psz_mode, "yadif2x")</div><div class="">-     && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc"))</div><div class="">+     && strcmp (psz_mode, "phosphor") && strcmp (psz_mode, "ivtc")</div><div class="">+     && strcmp (psz_mode, "auto"))</div><div class="">         return;</div><div class=""><br class=""></div><div class="">     if (*psz_mode)</div><div class="">--</div><div class="">2.14.3 (Apple Git-98)</div><div class=""><br class=""></div><div class=""><div class="">From 5c22fd918af94a6390ae49cd2a976b3990794b01 Mon Sep 17 00:00:00 2001</div><div class="">From: Luis Fernandes <<a href="mailto:zipleen@gmail.com" class="">zipleen@gmail.com</a>></div><div class="">Date: Sat, 5 May 2018 17:34:14 +0100</div><div class="">Subject: [PATCH] change function of deinterlace to specify which deinterlace</div><div class=""> mode and filter we want to use</div><div class=""><br class=""></div><div class="">---</div><div class=""> include/vlc/libvlc_media_player.h |  5 ++++-</div><div class=""> lib/video.c                       | 26 ++++++++++++--------------</div><div class=""> 2 files changed, 16 insertions(+), 15 deletions(-)</div><div class=""><br class=""></div><div class="">diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h</div><div class="">index 20b220448b..cbb5ec251a 100644</div><div class="">--- a/include/vlc/libvlc_media_player.h</div><div class="">+++ b/include/vlc/libvlc_media_player.h</div><div class="">@@ -1419,9 +1419,12 @@ int libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, unsigned num,</div><div class="">  * Enable or disable deinterlace filter</div><div class="">  *</div><div class="">  * \param p_mi libvlc media player</div><div class="">- * \param psz_mode type of deinterlace filter, NULL to disable</div><div class="">+ * \param deinterlace deinterlace mode -1:auto (default), 0: disabled, 1: enabled</div><div class="">+ * \param psz_mode type of deinterlace filter, NULL for current/default filter</div><div class="">+ * \version LibVLC 4.0.0 and later</div><div class="">  */</div><div class=""> LIBVLC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,</div><div class="">+                                                  int deinterlace,</div><div class="">                                                   const char *psz_mode );</div><div class=""> </div><div class=""> /**</div><div class="">diff --git a/lib/video.c b/lib/video.c</div><div class="">index a3e5b248e9..4a5c737218 100644</div><div class="">--- a/lib/video.c</div><div class="">+++ b/lib/video.c</div><div class="">@@ -663,13 +663,17 @@ end:</div><div class=""> }</div><div class=""> </div><div class=""> /******************************************************************************</div><div class="">- * libvlc_video_set_deinterlace : enable deinterlace</div><div class="">+ * libvlc_video_set_deinterlace : enable/disable/auto deinterlace and filter</div><div class="">  *****************************************************************************/</div><div class="">-void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,</div><div class="">+void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi, int deinterlace,</div><div class="">                                    const char *psz_mode )</div><div class=""> {</div><div class="">+    if (deinterlace != 0 && deinterlace != 1)</div><div class="">+        deinterlace = -1;</div><div class="">+</div><div class="">     if (psz_mode == NULL)</div><div class="">         psz_mode = "";</div><div class="">+</div><div class="">     if (*psz_mode</div><div class="">      && strcmp (psz_mode, "blend")    && strcmp (psz_mode, "bob")</div><div class="">      && strcmp (psz_mode, "discard")  && strcmp (psz_mode, "linear")</div><div class="">@@ -679,13 +683,10 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,</div><div class="">      && strcmp (psz_mode, "auto"))</div><div class="">         return;</div><div class=""> </div><div class="">-    if (*psz_mode)</div><div class="">-    {</div><div class="">+    if (*psz_mode && deinterlace != 0)</div><div class="">         var_SetString (p_mi, "deinterlace-mode", psz_mode);</div><div class="">-        var_SetInteger (p_mi, "deinterlace", 1);</div><div class="">-    }</div><div class="">-    else</div><div class="">-        var_SetInteger (p_mi, "deinterlace", 0);</div><div class="">+</div><div class="">+    var_SetInteger (p_mi, "deinterlace", deinterlace);</div><div class=""> </div><div class="">     size_t n;</div><div class="">     vout_thread_t **pp_vouts = GetVouts (p_mi, &n);</div><div class="">@@ -693,13 +694,10 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,</div><div class="">     {</div><div class="">         vout_thread_t *p_vout = pp_vouts[i];</div><div class=""> </div><div class="">-        if (*psz_mode)</div><div class="">-        {</div><div class="">+        if (*psz_mode && deinterlace != 0)</div><div class="">             var_SetString (p_vout, "deinterlace-mode", psz_mode);</div><div class="">-            var_SetInteger (p_vout, "deinterlace", 1);</div><div class="">-        }</div><div class="">-        else</div><div class="">-            var_SetInteger (p_vout, "deinterlace", 0);</div><div class="">+</div><div class="">+        var_SetInteger (p_vout, "deinterlace", deinterlace);</div><div class="">         vlc_object_release (p_vout);</div><div class="">     }</div><div class="">     free (pp_vouts);</div><div class="">-- </div><div class="">2.15.1 (Apple Git-101)</div><div class=""></div></div></div></body></html>