Get track+media position when playing m3u
Posted: 03 Oct 2019 20:24
Hi VideoLAN Forum, I hope this is the right place for my topic.
I wrote some code using libvlc that plays m3u files.
Everything worked like a charm, until I decided to introduce feature to save state when the media is stopped.
I got familiar with functions like which correctly returns the position along the track from the m3u currently being played. This is part of the information I need to "save state on stop".
The other part is the current track being played. Is that possible at all when playing m3u?
Functions I tried: always returns -1
always returns 1
It looks like the m3u is a single thing in the media list, still functions like and work as expected.
I'm not sure whether I call the api wrong or playing m3u has some sort of limitation.
Thus writing this post to exclude the latter and maybe get some advice.
I wrote some code using libvlc that plays m3u files.
Everything worked like a charm, until I decided to introduce feature to save state when the media is stopped.
I got familiar with functions like
Code: Select all
libvlc_media_player_get_position
The other part is the current track being played. Is that possible at all when playing m3u?
Functions I tried:
Code: Select all
libvlc_media_list_index_of_item
Code: Select all
libvlc_media_list_count
It looks like the m3u is a single thing in the media list, still functions like
Code: Select all
libvlc_media_list_player_previous
Code: Select all
libvlc_media_list_player_next
I'm not sure whether I call the api wrong or playing m3u has some sort of limitation.
Thus writing this post to exclude the latter and maybe get some advice.