mirror of https://code.videolan.org/videolan/vlc
lib: add libvlc_video_set_spu_text_scale API
Signed-off-by: Thomas Guillem <thomas@gllm.fr>
This commit is contained in:
parent
7fb0bec81e
commit
67c4ffd586
|
@ -1544,6 +1544,25 @@ LIBVLC_API int libvlc_video_set_spu( libvlc_media_player_t *p_mi, int i_spu );
|
|||
*/
|
||||
LIBVLC_API int64_t libvlc_video_get_spu_delay( libvlc_media_player_t *p_mi );
|
||||
|
||||
/**
|
||||
* Set the subtitle text scale.
|
||||
*
|
||||
* The scale factor is expressed as a percentage of the default size, where
|
||||
* 1.0 represents 100 percent.
|
||||
*
|
||||
* A value of 0.5 would result in text half the normal size, and a value of 2.0
|
||||
* would result in text twice the normal size.
|
||||
*
|
||||
* The minimum acceptable value for the scale factor is 0.1.
|
||||
*
|
||||
* The maximum is 5.0 (five times normal size).
|
||||
*
|
||||
* \param p_mi media player
|
||||
* \param f_scale scale factor in the range [0.1;5.0] (default: 1.0)
|
||||
* \version LibVLC 4.0.0 or later
|
||||
*/
|
||||
LIBVLC_API void libvlc_video_set_spu_text_scale( libvlc_media_player_t *p_mi, float f_scale );
|
||||
|
||||
/**
|
||||
* Set the subtitle delay. This affects the timing of when the subtitle will
|
||||
* be displayed. Positive values result in subtitles being displayed later,
|
||||
|
|
|
@ -248,6 +248,7 @@ libvlc_video_set_mouse_input
|
|||
libvlc_video_set_scale
|
||||
libvlc_video_set_spu
|
||||
libvlc_video_set_spu_delay
|
||||
libvlc_video_set_spu_text_scale
|
||||
libvlc_video_set_teletext
|
||||
libvlc_video_set_track
|
||||
libvlc_video_take_snapshot
|
||||
|
|
11
lib/video.c
11
lib/video.c
|
@ -368,6 +368,17 @@ int libvlc_video_set_spu_delay( libvlc_media_player_t *p_mi,
|
|||
return 0;
|
||||
}
|
||||
|
||||
void libvlc_video_set_spu_text_scale( libvlc_media_player_t *p_mi,
|
||||
float f_scale )
|
||||
{
|
||||
vlc_player_t *player = p_mi->player;
|
||||
vlc_player_Lock(player);
|
||||
|
||||
vlc_player_SetSubtitleTextScale(player, lroundf(f_scale * 100.f));
|
||||
|
||||
vlc_player_Unlock(player);
|
||||
}
|
||||
|
||||
static void libvlc_video_set_crop(libvlc_media_player_t *mp,
|
||||
const char *geometry)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue