[vlc-devel] [RFC] (libvlc) playlist changes
Pierre d'Herbemont
pdherbemont at free.fr
Mon Aug 6 13:32:43 CEST 2007
Hello,
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:
media_descriptor
_add_tag()
_tags_count()
_tag_at_index()
_event_manager()
media_list
_new()
_retain()
_release()
_add_media_descriptor()
_insert_media_descriptor()
_media_descriptor_at_index()
_media_descriptor_count()
_sublist_with_tags()
_tags_count()
_tags_at_index()
_event_manager()
media_list_player
_new_from_media_list()
_set_media_instance()
_play()
_pause()
_stop()
_event_manager()
media_library
_default() (returns the default media library)
_media_list()
_event_manager()
service_discoverer
_default() (returns the default service discoverer)
_media_discoverer_at_index()
_media_discoverer_count()
_event_manager()
media_discoverer
_name() (Such as "SAP", "Bonjour", depending on the plugin)
_media_list()
_event_manager()
* (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,
Pierre.
_______________________________________________
vlc-devel mailing list
vlc-devel at videolan.org
http://mailman.videolan.org/listinfo/vlc-devel
More information about the vlc-devel
mailing list