[vlc-commits] libvlc: remove deprecated video functions

Rémi Denis-Courmont git at videolan.org
Thu May 3 14:28:29 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu May  3 15:11:31 2018 +0300| [0d0d33cae92759fb41785b9a01fd66b4ade69161] | committer: Rémi Denis-Courmont

libvlc: remove deprecated video functions

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=0d0d33cae92759fb41785b9a01fd66b4ade69161
---

 include/vlc/deprecated.h | 68 ----------------------------------------------
 lib/libvlc.sym           |  6 ----
 lib/video.c              | 71 ------------------------------------------------
 3 files changed, 145 deletions(-)

diff --git a/include/vlc/deprecated.h b/include/vlc/deprecated.h
index b2c2da92a8..c214949e44 100644
--- a/include/vlc/deprecated.h
+++ b/include/vlc/deprecated.h
@@ -60,74 +60,6 @@ void libvlc_track_description_release( libvlc_track_description_t *p_track_descr
 /** @}*/
 
 /**
- * \ingroup libvlc libvlc_video
- * @{
- */
-
-/**
- * Get current video height.
- * \deprecated Use libvlc_video_get_size() instead.
- *
- * \param p_mi the media player
- * \return the video pixel height or 0 if not applicable
- */
-LIBVLC_DEPRECATED LIBVLC_API
-int libvlc_video_get_height( libvlc_media_player_t *p_mi );
-
-/**
- * Get current video width.
- * \deprecated Use libvlc_video_get_size() instead.
- *
- * \param p_mi the media player
- * \return the video pixel width or 0 if not applicable
- */
-LIBVLC_DEPRECATED LIBVLC_API
-int libvlc_video_get_width( libvlc_media_player_t *p_mi );
-
-/**
- * Get the description of available titles.
- *
- * \param p_mi the media player
- * \return list containing description of available titles.
- * It must be freed with libvlc_track_description_list_release()
- */
-LIBVLC_DEPRECATED LIBVLC_API libvlc_track_description_t *
-        libvlc_video_get_title_description( libvlc_media_player_t *p_mi );
-
-/**
- * Get the description of available chapters for specific title.
- *
- * \param p_mi the media player
- * \param i_title selected title
- * \return list containing description of available chapter for title i_title.
- * It must be freed with libvlc_track_description_list_release()
- */
-LIBVLC_DEPRECATED LIBVLC_API libvlc_track_description_t *
-        libvlc_video_get_chapter_description( libvlc_media_player_t *p_mi, int i_title );
-
-/**
- * Set new video subtitle file.
- * \deprecated Use libvlc_media_player_add_slave() instead.
- *
- * \param p_mi the media player
- * \param psz_subtitle new video subtitle file
- * \return the success status (boolean)
- */
-LIBVLC_DEPRECATED LIBVLC_API int
-libvlc_video_set_subtitle_file( libvlc_media_player_t *p_mi, const char *psz_subtitle );
-
-/**
- * Toggle teletext transparent status on video output.
- * \deprecated use libvlc_video_set_teletext() instead.
- *
- * \param p_mi the media player
- */
-LIBVLC_DEPRECATED LIBVLC_API void
-libvlc_toggle_teletext( libvlc_media_player_t *p_mi );
-
-/** @}*/
-
-/**
  * \ingroup libvlc libvlc_audio
  * @{
  */
diff --git a/lib/libvlc.sym b/lib/libvlc.sym
index d02f8ae95c..7971ac4041 100644
--- a/lib/libvlc.sym
+++ b/lib/libvlc.sym
@@ -229,16 +229,13 @@ libvlc_set_user_agent
 libvlc_set_app_id
 libvlc_title_descriptions_release
 libvlc_toggle_fullscreen
-libvlc_toggle_teletext
 libvlc_track_description_release
 libvlc_track_description_list_release
 libvlc_video_get_adjust_float
 libvlc_video_get_adjust_int
 libvlc_video_get_aspect_ratio
-libvlc_video_get_chapter_description
 libvlc_video_get_crop_geometry
 libvlc_video_get_size
-libvlc_video_get_height
 libvlc_video_get_cursor
 libvlc_video_get_logo_int
 libvlc_video_get_marquee_int
@@ -249,11 +246,9 @@ libvlc_video_get_spu_count
 libvlc_video_get_spu_delay
 libvlc_video_get_spu_description
 libvlc_video_get_teletext
-libvlc_video_get_title_description
 libvlc_video_get_track
 libvlc_video_get_track_count
 libvlc_video_get_track_description
-libvlc_video_get_width
 libvlc_video_set_adjust_float
 libvlc_video_set_adjust_int
 libvlc_video_set_aspect_ratio
@@ -271,7 +266,6 @@ libvlc_video_set_mouse_input
 libvlc_video_set_scale
 libvlc_video_set_spu
 libvlc_video_set_spu_delay
-libvlc_video_set_subtitle_file
 libvlc_video_set_teletext
 libvlc_video_set_track
 libvlc_video_take_snapshot
diff --git a/lib/video.c b/lib/video.c
index acbba3a30f..f4e8fe22e1 100644
--- a/lib/video.c
+++ b/lib/video.c
@@ -192,24 +192,6 @@ int libvlc_video_get_size( libvlc_media_player_t *p_mi, unsigned num,
     return ret;
 }
 
-int libvlc_video_get_height( libvlc_media_player_t *p_mi )
-{
-    unsigned width, height;
-
-    if (libvlc_video_get_size (p_mi, 0, &width, &height))
-        return 0;
-    return height;
-}
-
-int libvlc_video_get_width( libvlc_media_player_t *p_mi )
-{
-    unsigned width, height;
-
-    if (libvlc_video_get_size (p_mi, 0, &width, &height))
-        return 0;
-    return width;
-}
-
 int libvlc_video_get_cursor( libvlc_media_player_t *mp, unsigned num,
                              int *restrict px, int *restrict py )
 {
@@ -395,27 +377,6 @@ end:
     return i_ret;
 }
 
-int libvlc_video_set_subtitle_file( libvlc_media_player_t *p_mi,
-                                    const char *psz_subtitle )
-{
-    input_thread_t *p_input_thread = libvlc_get_input_thread ( p_mi );
-    bool b_ret = false;
-
-    if( p_input_thread )
-    {
-        char* psz_mrl = vlc_path2uri( psz_subtitle, NULL );
-        if( psz_mrl )
-        {
-            if( !input_AddSlave( p_input_thread, SLAVE_TYPE_SPU, psz_mrl,
-                                 true, false, false ) )
-                b_ret = true;
-            free( psz_mrl );
-        }
-        vlc_object_release( p_input_thread );
-    }
-    return b_ret;
-}
-
 int64_t libvlc_video_get_spu_delay( libvlc_media_player_t *p_mi )
 {
     input_thread_t *p_input_thread = libvlc_get_input_thread( p_mi );
@@ -454,21 +415,6 @@ int libvlc_video_set_spu_delay( libvlc_media_player_t *p_mi,
     return ret;
 }
 
-libvlc_track_description_t *
-        libvlc_video_get_title_description( libvlc_media_player_t *p_mi )
-{
-    return libvlc_get_track_description( p_mi, "title" );
-}
-
-libvlc_track_description_t *
-        libvlc_video_get_chapter_description( libvlc_media_player_t *p_mi,
-                                              int i_title )
-{
-    char psz_title[sizeof ("title ") + 3 * sizeof (int)];
-    sprintf( psz_title,  "title %2u", i_title );
-    return libvlc_get_track_description( p_mi, psz_title );
-}
-
 char *libvlc_video_get_crop_geometry (libvlc_media_player_t *p_mi)
 {
     return var_GetNonEmptyString (p_mi, "crop");
@@ -586,23 +532,6 @@ void libvlc_video_set_teletext( libvlc_media_player_t *p_mi, int i_page )
     vlc_object_release( p_input_thread );
 }
 
-void libvlc_toggle_teletext( libvlc_media_player_t *p_mi )
-{
-    input_thread_t *p_input_thread;
-
-    p_input_thread = libvlc_get_input_thread(p_mi);
-    if( !p_input_thread ) return;
-
-    if( var_CountChoices( p_input_thread, "teletext-es" ) <= 0 )
-    {
-        vlc_object_release( p_input_thread );
-        return;
-    }
-    const bool b_selected = var_GetInteger( p_input_thread, "teletext-es" ) >= 0;
-    teletext_enable( p_input_thread, !b_selected );
-    vlc_object_release( p_input_thread );
-}
-
 int libvlc_video_get_track_count( libvlc_media_player_t *p_mi )
 {
     input_thread_t *p_input_thread = libvlc_get_input_thread( p_mi );



More information about the vlc-commits mailing list