[vlc-devel] [PATCH v2] add libvlc_video_get_deinterlace

Valentin Deniaud valentin.deniaud at inpt.fr
Mon Aug 14 13:39:15 CEST 2017


Apply patch from #12884
---
Replace var_GetString by var_GetNonEmptyString and fix indent

 include/vlc/libvlc_media_player.h | 7 +++++++
 lib/video.c                       | 8 ++++++++
 2 files changed, 15 insertions(+)

diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index 78caed03ff..8a13b18992 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -1424,6 +1424,13 @@ int libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, unsigned num,
 LIBVLC_API void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,
                                                   const char *psz_mode );
 
+/**
+ * Get deinterlace filter mode
+ *
+ * \param p_mi libvlc media player
+ */
+LIBVLC_API char *libvlc_video_get_deinterlace( libvlc_media_player_t *p_mi );
+
 /**
  * Get an integer marquee option value
  *
diff --git a/lib/video.c b/lib/video.c
index f6e16ba601..824bbd57b5 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -697,6 +697,14 @@ void libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi,
     free (pp_vouts);
 }
 
+/******************************************************************************
+ * libvlc_video_get_deinterlace : get deinterlace mode
+ *****************************************************************************/
+char *libvlc_video_get_deinterlace( libvlc_media_player_t *p_mi )
+{
+    return var_GetNonEmptyString (p_mi, "deinterlace-mode");
+}
+
 /* ************** */
 /* module helpers */
 /* ************** */
-- 
2.14.0


More information about the vlc-devel mailing list