[vlc-devel] Problem using libvlc
andrea at puntualmenteinritardo.com
Fri May 29 23:12:57 CEST 2009
Andrea Visinoni ha scritto:
> Pierre d'Herbemont ha scritto:
>> On Thu, May 21, 2009 at 2:14 PM, Andrea Visinoni
>> <andrea at puntualmenteinritardo.com> wrote:
>>> Rémi Denis-Courmont ha scritto:
>>>> Le mardi 19 mai 2009 20:13:54 Andrea Visinoni, vous avez écrit :
>>>>> Hi there,
>>>>> i've got some problem using libvlc in a C program under linux.
>>>>> In attachment there is bunch of lines of code i use to initialize
>>>>> in order to play some videos in a playlist.
>>>>> I start with "libvlc_media_list_player_play"
>>>>> My problem is that once the first video stops my app freeze and don't
>>>>> jump to the next video, i can't even restart playing the first video.
>>>>> Also using "libvlc_media_list_player_next" my app freeze.
>>>> The media list stuff in libvlc is just crap throw away code.
>>>> Yeah, it does not work. At all.
>>> So it's better to have a custom playlist outside libvlc?
>>> (using play, catch video stop with an event, play the next video erc...)
>>> Or there is a patch or a workaround to apply to the existing code?
>> I may end up fixing it. There are some vlc core limitation that needs
>> to be addressed first.
>> Yet, you just basically want to use a media_list (or even your
>> preferred way to store a list of media) and a media_player. There
>> should be enough here to do what you want to achieve.
> I'm trying to implement this, i've attached the endreached event and i
> correctly go into the callback when the event appens.
> Inside the callback i'm trying to:
> 1) get the next media
> 2) set the new media using libvlc_media_player_set_media
> setting the new media i get:
>  main input warning: joining the active thread (VLC might crash)
>  main input debug: thread 2998487952 joined
> LibVLC fatal error destroying mutex in thread 2998487952 at
> misc/events.c:151: 16
> Error message: Dispositivo o risorsa occupata at:
> I'm using always the same media_player instance.
> Do i have to force a stop?
I've tried playing all the medias using
libvlc_media_player_new_from_media (thus creating a new media player for
every media in my playlist) and this times seems to work, except that
the previous media remains (do i have to force a stop?) and a new
windows for media reproduction is opened.
Is this the correct behaviour or can i reuse the same media_player for
all my playlist?
More information about the vlc-devel