[vlc-devel] VLC Lib Media Descriptor Additional Callbacks

Enrique Osuna enrique.osuna at gmail.com
Tue Oct 16 02:42:42 CEST 2007


For all that are interested, attached is a patch to add a few functions that
I've found very useful to the media descriptor objects.

1. Store user data in the descritpor - this current application allows for
the VLC.framework (MacOSX bindings) to create native objects and associate
the objects with media descriptor objects, otherwise the integrity of the
data is lost (or the VLC.framework would have to maintain a local copy of
all the media descriptors it creates).
libvlc_media_descriptor_[gs]et_user_data.

2. Can now retrieve the duration of a media object's input, versus
retrieving the information from the playlist or a media instance.
libvlc_media_descriptor_get_duration.

3. Can now retrieve the preparsed state of a media object's input.  This
information is useful when attempt to trap key data, for instance one of my
applications is that the program can't continue until it's discovered what
duration of a media object is.  It keeps polling the length and the
preparsed state, if the length is not set and the preparsed state is true,
then that means the duration is not available so it errors out.

4. Added associated callbacks for duration and preparsed states.  When these
values are changed
libvlc_MediaDescriptorDurationChanged/vlc_InputItemDurationChanged and
libvlc_MediaDescriptorPreparsedChanged/vlc_InputItemPreparsedChanged events
are invoked.

Thanks for the feedback.

Enrique
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20071016/ab4abf7d/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vlc-core-new-callbacks+hacks.patch
Type: application/octet-stream
Size: 13516 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20071016/ab4abf7d/attachment.obj>


More information about the vlc-devel mailing list