[vlc-commits] media library: Add playlist helpers

Hamza Parnica git at videolan.org
Wed Jul 25 13:13:14 CEST 2018


vlc | branch: master | Hamza Parnica <hparnica at gmail.com> | Tue Jul 24 17:38:01 2018 +0200| [0c6c73371cedd077e0895b2e666d715b289200f3] | committer: Hugo Beauzée-Luyssen

media library: Add playlist helpers

Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>

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

 include/vlc_media_library.h | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/include/vlc_media_library.h b/include/vlc_media_library.h
index 244c37651f..b9f395c143 100644
--- a/include/vlc_media_library.h
+++ b/include/vlc_media_library.h
@@ -981,6 +981,24 @@ static inline vlc_ml_media_list_t* vlc_ml_list_stream_history( vlc_medialibrary_
     return res;
 }
 
+static inline vlc_ml_playlist_list_t* vlc_ml_list_playlists( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params )
+{
+    vlc_assert( p_ml != NULL );
+    vlc_ml_playlist_list_t* res;
+    if ( p_ml->pf_list( p_ml, VLC_ML_LIST_PLAYLISTS, params, &res ) != VLC_SUCCESS )
+        return NULL;
+    return res;
+}
+
+static inline size_t vlc_ml_count_playlists( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params )
+{
+    vlc_assert( p_ml != NULL );
+    size_t count;
+    if ( p_ml->pf_list( p_ml, VLC_ML_COUNT_PLAYLISTS, params, &count ) != VLC_SUCCESS )
+        return 0;
+    return count;
+}
+
 #ifdef __cplusplus
 }
 #endif /* C++ */



More information about the vlc-commits mailing list