VLC 4.0.0-dev
Loading...
Searching...
No Matches
LibVLC media track

libvlc_media_track_t is an abstract representation of a media track. More...

Collaboration diagram for LibVLC media track:

Files

file  libvlc_media_track.h
 LibVLC media track.
 

Data Structures

struct  libvlc_audio_track_t
 
struct  libvlc_video_viewpoint_t
 Viewpoint. More...
 
struct  libvlc_video_track_t
 
struct  libvlc_subtitle_track_t
 
struct  libvlc_media_track_t
 

Typedefs

typedef enum libvlc_track_type_t libvlc_track_type_t
 
typedef struct libvlc_audio_track_t libvlc_audio_track_t
 
typedef struct libvlc_video_viewpoint_t libvlc_video_viewpoint_t
 Viewpoint.
 
typedef struct libvlc_video_track_t libvlc_video_track_t
 
typedef struct libvlc_subtitle_track_t libvlc_subtitle_track_t
 
typedef struct libvlc_media_track_t libvlc_media_track_t
 
typedef struct libvlc_media_tracklist_t libvlc_media_tracklist_t
 Opaque struct containing a list of tracks.
 

Enumerations

enum  libvlc_track_type_t { libvlc_track_unknown = -1 , libvlc_track_audio = 0 , libvlc_track_video = 1 , libvlc_track_text = 2 }
 

Functions

LIBVLC_API size_t libvlc_media_tracklist_count (const libvlc_media_tracklist_t *list)
 Get the number of tracks in a tracklist.
 
LIBVLC_API libvlc_media_track_tlibvlc_media_tracklist_at (libvlc_media_tracklist_t *list, size_t index)
 Get a track at a specific index.
 
LIBVLC_API void libvlc_media_tracklist_delete (libvlc_media_tracklist_t *list)
 Release a tracklist.
 
LIBVLC_API libvlc_media_track_tlibvlc_media_track_hold (libvlc_media_track_t *track)
 Hold a single track reference.
 
LIBVLC_API void libvlc_media_track_release (libvlc_media_track_t *track)
 Release a single track.
 

Detailed Description

libvlc_media_track_t is an abstract representation of a media track.

Typedef Documentation

◆ libvlc_audio_track_t

◆ libvlc_media_track_t

◆ libvlc_media_tracklist_t

Opaque struct containing a list of tracks.

◆ libvlc_subtitle_track_t

◆ libvlc_track_type_t

◆ libvlc_video_track_t

◆ libvlc_video_viewpoint_t

Viewpoint.

Warning
allocate using libvlc_video_new_viewpoint()

Enumeration Type Documentation

◆ libvlc_track_type_t

Enumerator
libvlc_track_unknown 
libvlc_track_audio 
libvlc_track_video 
libvlc_track_text 

Function Documentation

◆ libvlc_media_track_hold()

LIBVLC_API libvlc_media_track_t * libvlc_media_track_hold ( libvlc_media_track_t track)

Hold a single track reference.

Version
LibVLC 4.0.0 and later.

This function can be used to hold a track from a tracklist. In that case, the track can outlive its tracklist.

Parameters
trackvalid track
Returns
the same track, need to be released with libvlc_media_track_release()

◆ libvlc_media_track_release()

LIBVLC_API void libvlc_media_track_release ( libvlc_media_track_t track)

Release a single track.

Version
LibVLC 4.0.0 and later.
Warning
Tracks from a tracklist are released alongside the list with libvlc_media_tracklist_delete().
Note
You only need to release tracks previously held with libvlc_media_track_hold() or returned by libvlc_media_player_get_selected_track() and libvlc_media_player_get_track_from_id()
Parameters
trackvalid track

◆ libvlc_media_tracklist_at()

LIBVLC_API libvlc_media_track_t * libvlc_media_tracklist_at ( libvlc_media_tracklist_t list,
size_t  index 
)

Get a track at a specific index.

Warning
The behaviour is undefined if the index is not valid.
Version
LibVLC 4.0.0 and later.
Parameters
listvalid tracklist
indexvalid index in the range [0; count[
Returns
a valid track (can't be NULL if libvlc_media_tracklist_count() returned a valid count)

◆ libvlc_media_tracklist_count()

LIBVLC_API size_t libvlc_media_tracklist_count ( const libvlc_media_tracklist_t list)

Get the number of tracks in a tracklist.

Version
LibVLC 4.0.0 and later.
Parameters
listvalid tracklist
Returns
number of tracks, or 0 if the list is empty

◆ libvlc_media_tracklist_delete()

LIBVLC_API void libvlc_media_tracklist_delete ( libvlc_media_tracklist_t list)

Release a tracklist.

Version
LibVLC 4.0.0 and later.
See also
libvlc_media_get_tracklist
libvlc_media_player_get_tracklist
Parameters
listvalid tracklist