[vlc-devel] Re: [RFC] libvlc changes (v2)
Damien Fouilleul
damien.fouilleul at laposte.net
Mon Jun 18 13:14:50 CEST 2007
Pierre d'Herbemont wrote:
> Hello,
>
> I have been discussing a bit my previous RFC (especially with
> Quovodis, thanks!).
>
> Here is the new plan:
>
> Objects:
>
> -------------------------------------------------------------------------
> libvlc_media_descriptor_t : The object that is the
> representation of a mrl.
> -------------------------------------------------------------------------
> ->new_with_mrl(mrl, options)
> ->mrl()
> ->meta(meta_id)
> ->length()
> ->type()
>
> (Could be subclassed with a mutable class)
>
> -------------------------------------------------------------------------
> libvlc_media_instance_t : The object that represents
> the playing media_descriptor.
> (used to be called libvlc_input_t, the name is changed
> because input isn't close enough to the object real
> role)
> -------------------------------------------------------------------------
> -> new_with_media()
> -> play()
> The media_instance request a vout.
> -> stop()
> -> destroy()
> -> set_drawable() (or set_parent())
> -> width()
> -> height()
> -> aspect_ratio()
> -> ... basically all the libvlc_video stuff (appart the
> libvlc_instance stuff)
> -> position()
> -> set_position()
> -> ...
>
might be a good idea to add an api which returns the media_descriptor
from an instance ...
> -------------------------------------------------------------------------
> libvlc_playlist_t : The playlist
> -------------------------------------------------------------------------
> -> play()
> -> pause()
> -> ...
> -> media_instance()
> Returns the libvlc_media_instance_t where the playlist is played
>
> -> root_item()
> Returns the root libvlc_playlist_item_t
>
> -------------------------------------------------------------------------
> libvlc_playlist_item_t: The playlist helper object
> -------------------------------------------------------------------------
>
> -> new()
> Create a new empty item.
>
> -> new_with_media(media)
> Create a new item using the media_descriptor.
>
> -> media_descriptor()
> Returns the libvlc_ media_descriptor_t associated with the item.
>
> -> is_leaf()
> Returns true if there is no child
>
> -> count_subitem()
> Returns the number of child
>
well, is_leaf() is the same as count_subitem() == 0, so i'm not sure if
the former is really needs (outside of a macro that is)
> -> subitem_at_index(i)
> Returns a libvlc_playlist_item_t corresponding to the given index
>
> -> add_subitem_at_index(item, i)
> Returns a libvlc_playlist_item_t corresponding to the given index
>
> -> subitems_iterator()
> Quovodis' libvlc_iterator_t
>
i know i insisted on it but, it is pretty much useless, as it can be
easily implemented by bindings language using subitem_at_index() and
count_subitems(), so it probably should be removed unless the items
indexing is not sequential
>
> Pierre.
>
--
This is the vlc-devel mailing-list, see http://www.videolan.org/vlc/
To unsubscribe, please read http://developers.videolan.org/lists.html
More information about the vlc-devel
mailing list