delay between play and is_playing

This forum is about all development around libVLC.
micfort
New Cone
New Cone
Posts: 5
Joined: 19 Mar 2011 20:33

delay between play and is_playing

Postby micfort » 13 Aug 2013 20:01

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?

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37523
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: delay between play and is_playing

Postby Jean-Baptiste Kempf » 14 Aug 2013 01:08

Well; this is normal, because VLC must buffer before starting. Please look at the events.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

micfort
New Cone
New Cone
Posts: 5
Joined: 19 Mar 2011 20:33

Re: delay between play and is_playing

Postby micfort » 14 Aug 2013 12:05

Hey,

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


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 7 guests