[vlc-devel] [PATCH] add libvlc_video_get_deinterlace
Rémi Denis-Courmont
remi at remlab.net
Mon Aug 14 11:35:35 CEST 2017
Le 14 août 2017 12:05:14 GMT+03:00, Valentin Deniaud <valentin.deniaud at inpt.fr> a écrit :
>Apply patch from #12884
>---
> 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..abd62b428e 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..c552573f88 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_GetString ( p_mi, "deinterlace-mode");
>+}
>+
> /* ************** */
> /* module helpers */
> /* ************** */
>--
>2.14.0
>_______________________________________________
>vlc-devel mailing list
>To unsubscribe or modify your subscription options:
>https://mailman.videolan.org/listinfo/vlc-devel
How does the caller know the meaning of the returned value? How does it differentiate memory error from no value?
Bad API design IMO...
--
Rémi Denis-Courmont
Typed on an inconvenient virtual keyboard
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20170814/a495cee3/attachment.html>
More information about the vlc-devel
mailing list