libvlc: add API to get/set teletext transparency

This commit is contained in:
Fabian Huber 2024-05-07 13:19:08 +02:00
parent 7b98948bbe
commit 0d584fca0d
3 changed files with 43 additions and 0 deletions

View File

@ -2153,6 +2153,25 @@ LIBVLC_API int libvlc_video_get_teletext( libvlc_media_player_t *p_mi );
*/
LIBVLC_API void libvlc_video_set_teletext( libvlc_media_player_t *p_mi, int i_page );
/**
* Set teletext background transparency.
*
* \param p_mi the media player
* \param transparent whether background should be transparent.
* \version LibVLC 4.0.0 or later
*/
LIBVLC_API void libvlc_video_set_teletext_transparency( libvlc_media_player_t *p_mi, bool transparent );
/**
* Get teletext background transparency.
*
* \param p_mi the media player
* \retval true teletext has transparent background
* \retval false teletext has opaque background
* \version LibVLC 4.0.0 or later
*/
LIBVLC_API bool libvlc_video_get_teletext_transparency( libvlc_media_player_t *p_mi );
/**
* Take a snapshot of the current video window.
*

View File

@ -244,6 +244,7 @@ libvlc_video_get_scale
libvlc_video_get_spu_delay
libvlc_video_get_spu_text_scale
libvlc_video_get_teletext
libvlc_video_get_teletext_transparency
libvlc_video_set_adjust_float
libvlc_video_set_adjust_int
libvlc_video_set_aspect_ratio
@ -267,6 +268,7 @@ libvlc_video_set_scale
libvlc_video_set_spu_delay
libvlc_video_set_spu_text_scale
libvlc_video_set_teletext
libvlc_video_set_teletext_transparency
libvlc_video_take_snapshot
libvlc_video_new_viewpoint
libvlc_video_update_viewpoint

View File

@ -446,6 +446,28 @@ void libvlc_video_set_teletext( libvlc_media_player_t *p_mi, int i_page )
vlc_player_Unlock(player);
}
void libvlc_video_set_teletext_transparency( libvlc_media_player_t *p_mi, bool transparent )
{
vlc_player_t *player = p_mi->player;
vlc_player_Lock(player);
vlc_player_SetTeletextTransparency(player, transparent);
vlc_player_Unlock(player);
}
bool libvlc_video_get_teletext_transparency( libvlc_media_player_t *p_mi )
{
vlc_player_t *player = p_mi->player;
vlc_player_Lock(player);
bool transparent = vlc_player_IsTeletextTransparent(player);
vlc_player_Unlock(player);
return transparent;
}
/******************************************************************************
* libvlc_video_set_deinterlace : enable/disable/auto deinterlace and filter
*****************************************************************************/