Browse Source

video: add libvlc_video_get_deinterlace()

Fixes #12884.
pull/188/head
Rémi Denis-Courmont 10 months ago
committed by Felix Paul Kühne
parent
commit
acad78c260
  1. 18
      include/vlc/libvlc_media_player.h
  2. 1
      lib/libvlc.sym
  3. 14
      lib/video.c

18
include/vlc/libvlc_media_player.h

@ -2386,6 +2386,24 @@ int libvlc_video_take_snapshot( libvlc_media_player_t *p_mi, unsigned num,
const char *psz_filepath, unsigned int i_width,
unsigned int i_height );
/**
* Gets the deinterlacing parameters.
*
* If \p modep is not NULL, it will be set to a heap-allocated nul-terminated
* character string indicating the current deinterlacing algorithm name.
* If no algorithm is selected or if allocation fails, it be set to NULL.
* The value should be freed with the C run-time's free() function to avoid
* leaking.
*
* \param mpi media player instance
* \param modep storage space for hold the mode name (or NULL) [OUT]
* \retval -1 deinterlacing is selected automatically
* \retval 0 deinterlacing is forcefully disabled
* \retval 1 deinterlacing is forcefully enabled
*/
LIBVLC_API int libvlc_video_get_deinterlace(libvlc_media_player_t *mp,
char **modep);
/**
* Enable or disable deinterlace filter
*

1
lib/libvlc.sym

@ -243,6 +243,7 @@ libvlc_video_get_adjust_int
libvlc_video_get_aspect_ratio
libvlc_video_get_size
libvlc_video_get_cursor
libvlc_video_get_deinterlace
libvlc_video_get_logo_int
libvlc_video_get_marquee_int
libvlc_video_get_scale

14
lib/video.c

@ -536,6 +536,20 @@ int libvlc_video_set_deinterlace( libvlc_media_player_t *p_mi, int deinterlace,
return 0;
}
int libvlc_video_get_deinterlace(libvlc_media_player_t *mp, char **modep)
{
int tristate = var_GetInteger(mp, "deinterlace");
if (modep != NULL) {
if (tristate != 0)
*modep = var_GetString(mp, "deinterlace-mode");
else
*modep = NULL;
}
return tristate;
}
/* ************** */
/* module helpers */
/* ************** */

Loading…
Cancel
Save