[vlc-devel] [PATCH 4/5] libvlc: player: deprecate will_play()

Romain Vimont rom1v at videolabs.io
Thu May 9 17:56:57 CEST 2019


This function is meaningless on the new player.
---
 include/vlc/libvlc_media_player.h |  1 +
 lib/media_player.c                | 11 ++---------
 2 files changed, 3 insertions(+), 9 deletions(-)

diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index ca72a550d3..f831eefcff 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -946,6 +946,7 @@ LIBVLC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *p_m
  *
  * \libvlc_return_bool
  */
+LIBVLC_DEPRECATED
 LIBVLC_API int libvlc_media_player_will_play( libvlc_media_player_t *p_mi );
 
 /**
diff --git a/lib/media_player.c b/lib/media_player.c
index c348ebdd26..12941fdb53 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -1669,15 +1669,8 @@ void libvlc_media_player_previous_chapter( libvlc_media_player_t *p_mi )
 
 int libvlc_media_player_will_play( libvlc_media_player_t *p_mi )
 {
-    input_thread_t *p_input_thread =
-                            libvlc_get_input_thread ( p_mi );
-    if ( !p_input_thread )
-        return false;
-
-    int state = var_GetInteger( p_input_thread, "state" );
-    input_Release(p_input_thread);
-
-    return state != END_S && state != ERROR_S;
+    (void) p_mi;
+    return true;
 }
 
 int libvlc_media_player_set_rate( libvlc_media_player_t *p_mi, float rate )
-- 
2.20.1



More information about the vlc-devel mailing list