track_description help / bug?

This forum is about all development around libVLC.
Kairos
Blank Cone
Blank Cone
Posts: 45
Joined: 01 Mar 2008 01:49
Operating System: Windows
Location: Scottsdale, Az
Contact:

track_description help / bug?

Postby Kairos » 22 Jul 2009 07:53

I'm implementing the track descriptions into my wrapper. I'm planing on caching the descriptions whenever possible. To do that I need to know, can the tracks change? See this is what I was thinking, if you change to a different title, then all the video/audio/subtitle/chapter tracks change. Is this true, and if so do the tracks only change when the title changes?
Last edited by Kairos on 23 Jul 2009 05:32, edited 1 time in total.

Kairos
Blank Cone
Blank Cone
Posts: 45
Joined: 01 Mar 2008 01:49
Operating System: Windows
Location: Scottsdale, Az
Contact:

Re: track_description help

Postby Kairos » 22 Jul 2009 09:07

I've also noticed and inconsistency. libvlc_video_get_track_description returns 2 tracks,
-1 : Disabled
0 : Track_1

libvlc_video_get_track returns 1. This errors out in my code because no track with ID=1 exists. Track_1 should have an ID of 1, not 0.

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: track_description help

Postby Jean-Baptiste Kempf » 22 Jul 2009 09:24

Arrays in C start at 0, which is why.
0 is the first element
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.

Kairos
Blank Cone
Blank Cone
Posts: 45
Joined: 01 Mar 2008 01:49
Operating System: Windows
Location: Scottsdale, Az
Contact:

Re: track_description help

Postby Kairos » 22 Jul 2009 09:36

Well the audio returns 1, not 0

libvlc_audio_get_track_description returns 2 tracks,
-1 : Disabled
1 : Track_1

libvlc_audio_get_track returns 1.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 8 guests