[vlc-commits] lib: remove deprecated libvlc_media_player_get_fps()

Rémi Denis-Courmont git at videolan.org
Sun Jul 15 14:16:33 CEST 2018


vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Jul 12 19:34:15 2018 +0300| [6219f774329758c4f54913a4cd572eb238def1bc] | committer: Rémi Denis-Courmont

lib: remove deprecated libvlc_media_player_get_fps()

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

 include/vlc/deprecated.h | 17 -----------------
 lib/libvlc.sym           |  1 -
 lib/media_player.c       | 24 ------------------------
 3 files changed, 42 deletions(-)

diff --git a/include/vlc/deprecated.h b/include/vlc/deprecated.h
index bb7141f684..5168f451f9 100644
--- a/include/vlc/deprecated.h
+++ b/include/vlc/deprecated.h
@@ -35,23 +35,6 @@ extern "C" {
  */
 
 /**
- * Get movie fps rate
- *
- * This function is provided for backward compatibility. It cannot deal with
- * multiple video tracks. In LibVLC versions prior to 3.0, it would also fail
- * if the file format did not convey the frame rate explicitly.
- *
- * \deprecated Consider using libvlc_media_tracks_get() instead.
- *
- * \param p_mi the Media Player
- * \return frames per second (fps) for this playing movie, or 0 if unspecified
- */
-LIBVLC_DEPRECATED
-LIBVLC_API float libvlc_media_player_get_fps( libvlc_media_player_t *p_mi );
-
-/** end bug */
-
-/**
  * \deprecated Use libvlc_track_description_list_release() instead
  */
 LIBVLC_DEPRECATED LIBVLC_API
diff --git a/lib/libvlc.sym b/lib/libvlc.sym
index 74d188a05a..07de61fcc7 100644
--- a/lib/libvlc.sym
+++ b/lib/libvlc.sym
@@ -139,7 +139,6 @@ libvlc_media_player_event_manager
 libvlc_media_player_get_chapter
 libvlc_media_player_get_chapter_count
 libvlc_media_player_get_chapter_count_for_title
-libvlc_media_player_get_fps
 libvlc_media_player_get_full_chapter_descriptions
 libvlc_media_player_get_full_title_descriptions
 libvlc_media_player_get_hwnd
diff --git a/lib/media_player.c b/lib/media_player.c
index 270d3b858d..4c23e10aae 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -1673,30 +1673,6 @@ void libvlc_media_player_previous_chapter( libvlc_media_player_t *p_mi )
     vlc_object_release( p_input_thread );
 }
 
-float libvlc_media_player_get_fps( libvlc_media_player_t *p_mi )
-{
-    libvlc_media_t *media = libvlc_media_player_get_media( p_mi );
-    if( media == NULL )
-        return 0.f;
-
-    input_item_t *item = media->p_input_item;
-    float fps = 0.f;
-
-    vlc_mutex_lock( &item->lock );
-    for( int i = 0; i < item->i_es; i++ )
-    {
-        const es_format_t *fmt = item->es[i];
-
-        if( fmt->i_cat == VIDEO_ES && fmt->video.i_frame_rate_base > 0 )
-            fps = (float)fmt->video.i_frame_rate
-                  / (float)fmt->video.i_frame_rate_base;
-    }
-    vlc_mutex_unlock( &item->lock );
-    libvlc_media_release( media );
-
-    return fps;
-}
-
 int libvlc_media_player_will_play( libvlc_media_player_t *p_mi )
 {
     input_thread_t *p_input_thread =



More information about the vlc-commits mailing list