Get the current time of a track and print it

This forum is about all development around libVLC.
Thib_760
New Cone
New Cone
Posts: 1
Joined: 18 Jun 2017 00:24

Get the current time of a track and print it

Postby Thib_760 » 18 Jun 2017 00:31

Hello, iam new into the libVLC developement, and iam actualy writing an audio reader using gtk+ and libvlc.
My actual problème is how can i catch the time of the music track iam playing and how can i print it on my mainwindow's program.

i get the time of the track by using libvlc_clock() function, but i dunno how can i print it in my mainwindow.i also wonder how to get the total music time of the track.
I searched in the doc of libvlc but iam a bit lost, so anyone can give me some help, that will be nice.

Thanks !

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: Get the current time of a track and print it

Postby Jean-Baptiste Kempf » 27 Jul 2017 10:09

libvlc_media_player_get_length and libvlc_media_player_get_time
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.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 6 guests