[vlc-devel] [PATCH v2 5/9] libvlc: player: deprecate will_play()
Romain Vimont
rom1v at videolabs.io
Wed May 15 11:53:13 CEST 2019
This function is meaningless on the new player.
---
include/vlc/deprecated.h | 11 +++++++++++
include/vlc/libvlc_media_player.h | 10 ----------
lib/media_player.c | 11 ++---------
3 files changed, 13 insertions(+), 19 deletions(-)
diff --git a/include/vlc/deprecated.h b/include/vlc/deprecated.h
index 6f433654b4..420ac354cf 100644
--- a/include/vlc/deprecated.h
+++ b/include/vlc/deprecated.h
@@ -111,6 +111,17 @@ LIBVLC_DEPRECATED LIBVLC_API int
LIBVLC_DEPRECATED LIBVLC_API
void libvlc_playlist_play( libvlc_instance_t *p_instance );
+/**
+ * Is the player able to play
+ *
+ * \param p_mi the Media Player
+ * \return boolean
+ *
+ * \libvlc_return_bool
+ */
+LIBVLC_DEPRECATED
+LIBVLC_API int libvlc_media_player_will_play( libvlc_media_player_t *p_mi );
+
/** @}*/
# ifdef __cplusplus
diff --git a/include/vlc/libvlc_media_player.h b/include/vlc/libvlc_media_player.h
index f10fcf7a96..3fc0b6a644 100644
--- a/include/vlc/libvlc_media_player.h
+++ b/include/vlc/libvlc_media_player.h
@@ -1173,16 +1173,6 @@ LIBVLC_API int libvlc_media_player_get_chapter( libvlc_media_player_t *p_mi );
*/
LIBVLC_API int libvlc_media_player_get_chapter_count( libvlc_media_player_t *p_mi );
-/**
- * Is the player able to play
- *
- * \param p_mi the Media Player
- * \return boolean
- *
- * \libvlc_return_bool
- */
-LIBVLC_API int libvlc_media_player_will_play( libvlc_media_player_t *p_mi );
-
/**
* Get title chapter count
*
diff --git a/lib/media_player.c b/lib/media_player.c
index 72095b502e..7c7aa3cc50 100644
--- a/lib/media_player.c
+++ b/lib/media_player.c
@@ -1778,15 +1778,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