How To Shutdown

This forum is about all development around libVLC.
d3x0r
Blank Cone
Blank Cone
Posts: 38
Joined: 01 Dec 2008 22:38

How To Shutdown

Postby d3x0r » 05 Dec 2008 09:46

I'm using simple media players...

a unique inst, media_new, player_new_from_media, event_manager, media_release, player_play...

the event is libvlc_MediaPlayerEndReached

when I get the event, I add my structure which contains all the above references to a list to later be deleted, and mark the current time.

A timer event later fires, and checks the list of expired players. (I did this, because releasing within the callback event is bad).

the later event sequence is
player_stop, event_detach, player_release, libvlc_release, after which I will release the drawable that was passed as the vmem options to the instance.

the last libvlc_release hangs. I didn't see a release for the event manager.


Does the instance have to be released by exactly the same thread that created it? that will be tough, since the one that created it no longer exists.

d3x0r
Blank Cone
Blank Cone
Posts: 38
Joined: 01 Dec 2008 22:38

Re: How To Shutdown

Postby d3x0r » 06 Dec 2008 22:11

I solved this by creating a thread that in turn created the player and surface, started playing, and goes to sleep until the event fires, wakes up and cleans up everything it created. Apparently releasing an instance from all but the creating thread locks in libvlc_release(inst);


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 38 guests