[vlc-devel] [RFC] (libvlc) playlist changes

Pierre d'Herbemont pdherbemont at free.fr
Mon Aug 6 13:32:43 CEST 2007


I have been struggling a bit in getting playlist to work seemlessly  
in libvlc, and the Mac OS X Framework goal, but without much success.  
I wanted to get a clean separation from the playlist data (item code)  
and the playlist player (engine code).

My conclusion was, it is easier to implement playlist management on  
top of libvlc. So I poke around and re-implemented a simple  
hierarchical playlist management within libvlc. And I came to the  
conclusion that hierarchical playlist was the wrong way to go: It  
makes the code more hack-ish, and doesn't bring much features.

So far, we can regain hierarchical advantages (that is sorting) using  
tags. We can even implement hierarchy on top of tags easily.

Also, jb pointed that it is hard to implement a nice playlist  
interface from gui code. What is wanted here, is a clean interface  
for media library, playlists, and service discovery.

Here is one interface proposition:




	_default() (returns the default media library)

	_default() (returns the default service discoverer)

	_name() (Such as "SAP", "Bonjour", depending on the plugin)

* (hierarchical) Playlist support would come right away from tags,  
something like
	media_list_sublist_width_tags(media_library_media_list(), "Cool tag");
would be enough.

* Item addition/removal/changing could be easily tracked through the  
new libvlc_event system.

* it's not said in the proposition, but media_list_player won't run  
in a dedicated thread

This is not a perfect solution:
- We have to merge libvlc-control.so back into libvlc.so
- We might loose some cool abilities we currently have (If one come  
to your mind, please point it out)

Thanks for the reading,

vlc-devel mailing list
vlc-devel at videolan.org

More information about the vlc-devel mailing list