[vlc-devel] [PATCH 26/40] playlist: add playlist_ViewPlay() convenience wrapper

RĂ©mi Denis-Courmont remi at remlab.net
Sun May 14 17:45:56 CEST 2017


This wraps playlist_Control() with type safety, and enforces
playlist locking.
---
 include/vlc_playlist.h | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/include/vlc_playlist.h b/include/vlc_playlist.h
index 0c401a9224..a487cdfd62 100644
--- a/include/vlc_playlist.h
+++ b/include/vlc_playlist.h
@@ -306,6 +306,12 @@ VLC_API void playlist_Deactivate( playlist_t * );
  */
 VLC_API void playlist_Control( playlist_t *p_playlist, int i_query, bool b_locked, ...  );
 
+static inline void playlist_ViewPlay(playlist_t *pl, playlist_item_t *node,
+                                     playlist_item_t *item)
+{
+    playlist_Control(pl, PLAYLIST_VIEWPLAY, pl_Locked, node, item);
+}
+
 /** Get current playing input. The object is retained.
  */
 VLC_API input_thread_t * playlist_CurrentInput( playlist_t *p_playlist ) VLC_USED;
-- 
2.11.0



More information about the vlc-devel mailing list