Duration equals to -1

This forum is about all development around libVLC.
Idsa
Blank Cone
Blank Cone
Posts: 78
Joined: 22 Oct 2009 10:59

Duration equals to -1

Postby Idsa » 24 Jun 2010 13:23

libvlc_media_get_duration return -1. But if I play the file using VlcPlayer it's duration is shown okay. Is there any way to get file duration without playing it?

ivoire
Cone that earned his stripes
Cone that earned his stripes
Posts: 413
Joined: 20 Aug 2008 11:29
VLC version: trunk
Operating System: linux (debian sid)
Contact:

Re: Duration equals to -1

Postby ivoire » 24 Jun 2010 13:33

This is due to the fact that the item is not parsed by default.
You can for libvlc to parse it with libvlc_media_parse or libvlc_media_parse_async (asynchronous call). You can check if a media is parsed with libvlc_media_is_parsed.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 12 guests