[vlc-commits] [Git][videolan/vlc][master] libvlc: add API to set/toggle teletext transparency

Jean-Baptiste Kempf (@jbk) gitlab at videolan.org
Sat May 11 07:27:46 UTC 2024



Jean-Baptiste Kempf pushed to branch master at VideoLAN / VLC


Commits:
11569530 by Fabian Huber at 2024-05-11T07:27:32+00:00
libvlc: add API to set/toggle teletext transparency

- - - - -


3 changed files:

- include/vlc/libvlc_media_player.h
- lib/libvlc.sym
- lib/video.c


Changes:

=====================================
include/vlc/libvlc_media_player.h
=====================================
@@ -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.
  *


=====================================
lib/libvlc.sym
=====================================
@@ -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


=====================================
lib/video.c
=====================================
@@ -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
  *****************************************************************************/



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/115695305e6ba715f2e8e4d61da9327bdf4c5e91

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/115695305e6ba715f2e8e4d61da9327bdf4c5e91
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list