[vlc-devel] libvlc status?

Pierre d'Herbemont pdherbemont at free.fr
Wed Mar 26 16:19:40 CET 2008


On Mar 26, 2008, at 3:35 PM, Tanguy Krotoff wrote:

> Hi everybody
> Here is the code of the VLC Phonon backend (under GPL):
> http://smplayer.svn.sourceforge.net/viewvc/smplayer/experimental/phonon-vlc/
>
> So i've been using libvlc-git-0.9 for a full week (holidays,
> holidays... :p) and I found the API "unworking" and "confusing"

I'll take that for me ;)

> The biggest problem is that there isn't a working program not too
> complex/not too simple:
>
> http://wiki.videolan.org/LibVLC_Media_List_Management -> does not  
> compile

Could you fix it?

> http://wiki.videolan.org/LibVLC_Tutorial -> too simple
> vlc-git/src/control/testapi.c -> too simple
> So I checked the Java binding but VlcClient.java is too simple :/
>
> What is the status of libvlc-0.9? unstable/pretty stable/tested?

Stabilizing.

> Which part of the API should I used and that is known to be tested?

You are supposed to fix what isn't working too, or report here.

> Should I go for libvlc-0.8.6 instead?

Certainly not.

> I would like to know if there is a simple application that uses libvlc
> that works. By who/where is used libvlc?
> Is it possible to use the same API as the qtvlc?
>
> Here is the bugs/strange things/questions that I got:
>
> * libvlc_audio_get_volume( libvlc_instance_t *, libvlc_exception_t * )
> does not work (-> exception) if there is no libvlc_media_instance_t
> instantiated.
> But still the function does not required a libvlc_media_instance_t  
> parameter

I'll have to check that, but it worked fine in vlc_app.

But I agreed. This has to be deprecated and replaced by something  
else. Basically all the libvlc_audio_* and libvlc_video_* are from the  
old API.

> + getting the volume should of course not depend from a  
> libvlc_media_instance_t

Of course it should depend on a media_instance. Imagine you have two  
media_instance and you want one to cross fade the two.

> * libvlc_media_instance_set_drawable()
> does not work, I have to use libvlc_video_set_parent()

Works here. What is your system?

> * libvlc_media_descriptor_get_meta()
> does not work, impossible to get artist name... even while playing the
> file or checking for the libvlc_MediaDescriptorMetaChanged event
> I tried with different mp3 files with tags

Works here. (See the Mac OS X Framework).

> * libvlc_MediaDescriptorPreparsedChanged
> event unknown, still present inside libvlc_structures.h

I'll address that ASAP.

> * libvlc_media_list_player_stop() and libvlc_media_instance_stop()
> crash with different snapshots

Backtrace. Known that it could be buggy.

> * no event libvlc_MediaInstanceStopped
> but there is libvlc_MediaInstancePlayed, libvlc_MediaInstancePaused,
> and even libvlc_MediaInstanceReachedEnd... strange...

Feel free to add.

> + libvlc_MediaInstancePlayed vs libvlc_MediaListPlayerPlayed is very  
> confusing

Hum. Yes, we need to do proper subclassing.

> * no libvlc.lib and libvlc.pdb
> There is no SDK, so I load the libvlc.dll at runtime
> I already sent an email about this to vlc-devel
> code is here if it can help somebody:
> http://smplayer.svn.sourceforge.net/viewvc/smplayer/experimental/phonon-vlc/vlc_symbols.h?view=markup
> problem is that without the .pdb file I cannot go debug inside  
> libvlc code.

That's windows, I don't know.

>
> * How do I deactivate the double-click on the vlc video window?
> minor problem for the moment

Change the vout.

> * How do I set the audio device to use if I have several?
> there is no libvlc_audio_set_device(int deviceId) + qtvlc does not
> provide this functionality
> (I guess this will be for the future...)

Use libvlc options when creating the instance. I guess you could look  
forward for it.

> * Also there is no event like libvlc_AudioDeviceFailed

Feel free to add.

> * There is no event like libvlc_BufferStatus with a %
> this is really minor

I don't see what would be the use of that, could you elaborate?
libvlc_MediaInstancePositionChanged is what you need I think.

> * found it strange that qtvlc does not use libvlc + Qt4 is compiled
> statically, but this is another subject.. :p

Don't get it. libvlc is only used by external application. That's why  
it is so poor and untested.

> The libvlc API is quite confusing (ok this is only my opinion): a lot
> of stuffs: media_list, media_list_player, media_list_view +
> depreceated API...

Why is this confusing? Don't use the media_list stuff if you don't  
need it. I'll move the media_list_* in a separate header and the  
deprecated stuff too. That will help new comers.

The media_list is useful to use some VLC services such as the media  
discoverer, the youtube demuxer and so on. It's also a full rewrite of  
VLC playlist which is used in the VLC_app (VLC/Mac OS X rewrite)

> Sometimes I wonder why there is media_list, media_view... since libvlc
> users will probably create a new "media list/playlist" stuff in their
> own code if needed.

Well, my hope is that VLC will use that for its own one day.

> About events, you have to attach each category to a callback. I think
> a simple switch() from the user side would have been ok + one and only
> one callback registration and all events going to the same callback.

This is a nice idea.

> And still there is no char * libvlc_get_version(), you have to go with
> the old API to get this.
>
> I would have seen a simple:
>
> register_callback(callback);
> int mid = media_new("myvideo.avi");
> media_load(mid); //send load event + meta data, duration... working,
> don't have to run media_play() to get this...

Appart duration, I think (VLC core limitation), you get the meta  
without playing.

> So a bit like the old API but without the playlist and with the  
> callback system.


I have a concern about merging media_descriptor and media_instance. I  
am not sure the separation is that confusing, especially when using  
bindings with object oriented languages. Also, the media instance  
allow you to register the event you like once, set up the playing  
environment once, and plays all the media descriptor you want in it.  
Which is I think the more practical cases (From the vlc_app rewrite).

However to ease the understanding of the API, we may want to change  
the media_descriptor name to media, and media_instance to  
media_player. (That's the original name I wanted). Would that be less  
confusing to you? Basically we would expose:

- libvlc_media
- libvlc_media_player

And we need to find a way to properly integrate the old:
- libvlc_video_*
- libvlc_audio_ *

That's nice to have an external point of view.

Pierre.



More information about the vlc-devel mailing list