Commit 594e6e22 authored by Tanguy Krotoff's avatar Tanguy Krotoff Committed by Jean-Paul Saman

libvlc: add subtitle file (*.srt...) handling

Signed-off-by: default avatarJean-Paul Saman <jpsaman@videolan.org>
parent 48a985ec
......@@ -516,6 +516,16 @@ VLC_PUBLIC_API int libvlc_video_get_spu( libvlc_media_player_t *, libvlc_excepti
*/
VLC_PUBLIC_API void libvlc_video_set_spu( libvlc_media_player_t *, int , libvlc_exception_t * );
/**
* Set new video subtitle file.
*
* \param p_mediaplayer the media player
* \param psz_subtitle new video subtitle file
* \param p_e an initialized exception pointer
* \return the success status (boolean)
*/
VLC_PUBLIC_API int libvlc_video_set_subtitle_file( libvlc_media_player_t *, char *, libvlc_exception_t * );
/**
* Get current crop filter geometry.
*
......
......@@ -450,6 +450,22 @@ void libvlc_video_set_spu( libvlc_media_player_t *p_mi, int i_spu,
vlc_object_release( p_input_thread );
}
int libvlc_video_set_subtitle_file( libvlc_media_player_t *p_mi,
char *psz_subtitle,
libvlc_exception_t *p_e )
{
input_thread_t *p_input_thread = libvlc_get_input_thread ( p_mi, p_e );
bool b_ret = false;
if( p_input_thread )
{
if( input_AddSubtitles( p_input_thread, psz_subtitle, true ) )
b_ret = true;
vlc_object_release( p_input_thread );
}
return b_ret;
}
char *libvlc_video_get_crop_geometry( libvlc_media_player_t *p_mi,
libvlc_exception_t *p_e )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment