Commit 71e01e17 authored by Pierre d'Herbemont's avatar Pierre d'Herbemont

MacOSX/Framework/VLCMediaLibrary.m: Rework -allMedia, and remove -sublists.

parent e617d8be
......@@ -35,5 +35,4 @@
+ (id)sharedMediaLibrary;
- (VLCMediaList *)allMedia;
- (NSArray *)playlists;
@end
......@@ -71,22 +71,10 @@ static VLCMediaLibrary * sharedMediaLibrary = nil;
{
if (!allMedia)
{
// libvlc_media_list_t *p_mlist = libvlc_media_library_media_list(mlib, NULL);
// libvlc_media_list_t * p_flat_mlist = libvlc_media_list_flat_media_list(p_mlist, NULL);
// allMedia = [[VLCMediaList medialistWithLibVLCMediaList: p_flat_mlist] retain];
// libvlc_media_list_release(p_flat_mlist);
// libvlc_media_list_release(p_mlist);
libvlc_media_list_t *p_mlist = libvlc_media_library_media_list(mlib, NULL);
allMedia = [[VLCMediaList medialistWithLibVLCMediaList: p_mlist] retain];
libvlc_media_list_release(p_mlist);
}
return allMedia;
}
- (NSArray *)playlists
{
libvlc_media_list_t *p_mlist = libvlc_media_library_media_list( mlib, NULL );
VLCMediaList *medialist = [VLCMediaList medialistWithLibVLCMediaList:p_mlist];
libvlc_media_list_release( p_mlist );
NSArray *ret = [medialist sublists];
return ret;
}
@end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment