vlc | branch: master | Thomas Guillem <[email protected]> | Thu Jun 4 19:56:54 2020 +0200| [18a67a845cb4fb02484d72886815ae2f7c7a167e] | committer: Thomas Guillem
lib: media_track: add new members That will be used by player tracks. > http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=18a67a845cb4fb02484d72886815ae2f7c7a167e --- include/vlc/libvlc_media_track.h | 15 +++++++++++++++ lib/media_track.c | 4 ++++ 2 files changed, 19 insertions(+) diff --git a/include/vlc/libvlc_media_track.h b/include/vlc/libvlc_media_track.h index 59f12f1d04..d34d5a251d 100644 --- a/include/vlc/libvlc_media_track.h +++ b/include/vlc/libvlc_media_track.h @@ -139,6 +139,21 @@ typedef struct libvlc_media_track_t char *psz_language; char *psz_description; + /** String identifier of track, can be used to save the track preference + * from an other LibVLC run, only valid when the track is fetch from a + * media_player */ + const char *psz_id; + /** A string identifier is stable when it is certified to be the same + * across different playback instances for the same track, only valid when + * the track is fetch from a media_player */ + bool id_stable; + /** Name of the track, only valid when the track is fetch from a + * media_player */ + char *psz_name; + /** true if the track is selected, only valid when the track is fetch from + * a media_player */ + bool selected; + } libvlc_media_track_t; /** diff --git a/lib/media_track.c b/lib/media_track.c index c6bb90e14d..bab8537c04 100644 --- a/lib/media_track.c +++ b/lib/media_track.c @@ -55,6 +55,9 @@ libvlc_media_trackpriv_from_es( libvlc_media_trackpriv_t *trackpriv, track->i_bitrate = es->i_bitrate; track->psz_language = es->psz_language != NULL ? strdup(es->psz_language) : NULL; track->psz_description = es->psz_description != NULL ? strdup(es->psz_description) : NULL; + track->psz_id = NULL; + track->psz_name = NULL; + track->selected = false; switch( es->i_cat ) { @@ -110,6 +113,7 @@ libvlc_media_track_clean( libvlc_media_track_t *track ) { free( track->psz_language ); free( track->psz_description ); + free( track->psz_name ); switch( track->i_type ) { case libvlc_track_audio: _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
