Page 1 of 1

delay between play and is_playing

Posted: 13 Aug 2013 20:01
by micfort
I'm working on an application where libvlc is used as player.
In this application I have to wait for libvlc to finish playing some kind of media and then take some action.
For example start playing a new media file.

But I have noticed that if I call libvlc_media_player_play and then check libvlc_media_player_is_playing that the player is not yet playing. After a while (not really an specific amount of time) it will start to play and libvlc_media_player_is_playing returns true.
My application already thinks that the file is finished, because the first time libvlc_media_player_is_playing is called it returns false.
Is there a possibility that there is a call in the library where it waits for actually starts playing the media file?

Re: delay between play and is_playing

Posted: 14 Aug 2013 01:08
by Jean-Baptiste Kempf
Well; this is normal, because VLC must buffer before starting. Please look at the events.

Re: delay between play and is_playing

Posted: 14 Aug 2013 12:05
by micfort
Hey,

thx, I don't know how i could have missed that in the documentation. This makes my code a lot easier.