[vlc-commits] media library: add playlist media helpers
Hamza Parnica
git at videolan.org
Mon Nov 12 17:12:28 CET 2018
vlc | branch: master | Hamza Parnica <hparnica at gmail.com> | Sun Oct 28 11:44:28 2018 +0100| [8cc75269372d91650b8564a28651bef5894241cd] | committer: Hugo Beauzée-Luyssen
media library: add playlist media helpers
Signed-off-by: Hugo Beauzée-Luyssen <hugo at beauzee.fr>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8cc75269372d91650b8564a28651bef5894241cd
---
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 b6d65548f0..1e33576297 100644
--- a/include/vlc_media_library.h
+++ b/include/vlc_media_library.h
@@ -1248,6 +1248,24 @@ static inline size_t vlc_ml_count_playlists( vlc_medialibrary_t* p_ml, const vlc
return count;
}
+static inline vlc_ml_media_list_t* vlc_ml_list_playlist_media( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params, int64_t i_playlist_id )
+{
+ vlc_assert( p_ml != NULL );
+ vlc_ml_media_list_t* res;
+ if ( vlc_ml_list( p_ml, VLC_ML_LIST_PLAYLIST_MEDIA, params, i_playlist_id, &res ) != VLC_SUCCESS )
+ return NULL;
+ return res;
+}
+
+static inline size_t vlc_ml_count_playlist_media( vlc_medialibrary_t* p_ml, const vlc_ml_query_params_t* params, int64_t i_playlist_id )
+{
+ vlc_assert( p_ml != NULL );
+ size_t count;
+ if ( vlc_ml_list( p_ml, VLC_ML_COUNT_PLAYLIST_MEDIA, params, i_playlist_id, &count ) != VLC_SUCCESS )
+ return 0;
+ return count;
+}
+
#ifdef __cplusplus
}
#endif /* C++ */
More information about the vlc-commits
mailing list