<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=""><div class="">Hi,</div><div class=""><br class=""></div><div class="">Here’s the patch without fetching the config.</div><div class=""><br class=""></div><div class="">@Thomas as a side note, I did only add the "fetching of the default deinterlace value" on your suggestion in the VLCKit mailing list ;)</div><div class=""><br class=""></div><div class="">@Caro as soon as this is accepted I’ll update the VLCKit patch!</div><div class=""><br class=""></div><div class="">Cheers,</div><div class="">Luís</div><div class=""><br class=""></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><div class=""><br class=""></div><div class=""><br class=""></div><div class=""><div class="">From 71ea2190622c64e4adfe03a4131a17861f0ffe8f 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: Fri, 4 May 2018 15:42:56 +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 | 29 +++++++++++++++--------------</div><div class=""> 2 files changed, 19 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..a82f70f5e7 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 to default</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=""><br class=""></div><div class=""> /**</div><div class="">diff --git a/lib/video.c b/lib/video.c</div><div class="">index a3e5b248e9..f23320a528 100644</div><div class="">--- a/lib/video.c</div><div class="">+++ b/lib/video.c</div><div class="">@@ -663,13 +663,20 @@ end:</div><div class=""> }</div><div class=""><br 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="">+ {</div><div class=""> psz_mode = "";</div><div class="">+ deinterlace = 0;</div><div class="">+ }</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 +686,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=""><br 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=""><br class=""></div><div class=""> size_t n;</div><div class=""> vout_thread_t **pp_vouts = GetVouts (p_mi, &n);</div><div class="">@@ -693,13 +697,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=""><br 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><br class=""><div></div></body></html>