VLC 4.0.0-dev
Loading...
Searching...
No Matches
libvlc_media_track.h
Go to the documentation of this file.
1/*****************************************************************************
2 * libvlc_media_track.h: libvlc external API
3 *****************************************************************************
4 * Copyright (C) 1998-2020 VLC authors and VideoLAN
5 *
6 * Authors: Clément Stenac <zorglub@videolan.org>
7 * Jean-Paul Saman <jpsaman@videolan.org>
8 * Pierre d'Herbemont <pdherbemont@videolan.org>
9 *
10 * This program is free software; you can redistribute it and/or modify it
11 * under the terms of the GNU Lesser General Public License as published by
12 * the Free Software Foundation; either version 2.1 of the License, or
13 * (at your option) any later version.
14 *
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU Lesser General Public License for more details.
19 *
20 * You should have received a copy of the GNU Lesser General Public License
21 * along with this program; if not, write to the Free Software Foundation,
22 * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
24
25#ifndef VLC_LIBVLC_MEDIA_TRACK_H
26#define VLC_LIBVLC_MEDIA_TRACK_H 1
27
28# include "libvlc_video.h"
29
30# ifdef __cplusplus
31extern "C" {
32# else
33# include <stdbool.h>
34# endif
35
36/** \defgroup libvlc_media_track LibVLC media track
37 * \ingroup libvlc
38 * @ref libvlc_media_track_t is an abstract representation of a media track.
39 * @{
40 * \file
41 * LibVLC media track
42 */
43
51
57
58/**
59 * Viewpoint
60 *
61 * \warning allocate using libvlc_video_new_viewpoint()
62 */
64{
65 float f_yaw; /**< view point yaw in degrees ]-180;180] */
66 float f_pitch; /**< view point pitch in degrees ]-90;90] */
67 float f_roll; /**< view point roll in degrees ]-180;180] */
68 float f_field_of_view; /**< field of view in degrees ]0;180[ (default 80.)*/
70
85
90
92{
93 /* Codec fourcc */
94 uint32_t i_codec;
96 int i_id; /* DEPRECATED: use psz_id */
98
99 /* Codec specific */
102
103 union {
107 };
108
109 unsigned int i_bitrate;
112
113 /** String identifier of track, can be used to save the track preference
114 * from an other LibVLC run */
115 const char *psz_id;
116 /** A string identifier is stable when it is certified to be the same
117 * across different playback instances for the same track. */
119 /** Name of the track, only valid when the track is fetch from a
120 * media_player */
121 char *psz_name;
122 /** true if the track is selected, only valid when the track is fetch from
123 * a media_player */
125
127
128/**
129 * Opaque struct containing a list of tracks
130 */
132
133/**
134 * Get the number of tracks in a tracklist
135 *
136 * \version LibVLC 4.0.0 and later.
137 *
138 * \param list valid tracklist
139 *
140 * \return number of tracks, or 0 if the list is empty
141 */
142LIBVLC_API size_t
144
145/**
146 * Get a track at a specific index
147 *
148 * \warning The behaviour is undefined if the index is not valid.
149 *
150 * \version LibVLC 4.0.0 and later.
151 *
152 * \param list valid tracklist
153 * \param index valid index in the range [0; count[
154 *
155 * \return a valid track (can't be NULL if libvlc_media_tracklist_count()
156 * returned a valid count)
157 */
160
161/**
162 * Release a tracklist
163 *
164 * \version LibVLC 4.0.0 and later.
165 *
166 * \see libvlc_media_get_tracklist
167 * \see libvlc_media_player_get_tracklist
168 *
169 * \param list valid tracklist
170 */
171LIBVLC_API void
173
174
175/**
176 * Hold a single track reference
177 *
178 * \version LibVLC 4.0.0 and later.
179 *
180 * This function can be used to hold a track from a tracklist. In that case,
181 * the track can outlive its tracklist.
182 *
183 * \param track valid track
184 * \return the same track, need to be released with libvlc_media_track_release()
185 */
188
189/**
190 * Release a single track
191 *
192 * \version LibVLC 4.0.0 and later.
193 *
194 * \warning Tracks from a tracklist are released alongside the list with
195 * libvlc_media_tracklist_delete().
196 *
197 * \note You only need to release tracks previously held with
198 * libvlc_media_track_hold() or returned by
199 * libvlc_media_player_get_selected_track() and
200 * libvlc_media_player_get_track_from_id()
201 *
202 * \param track valid track
203 */
204LIBVLC_API void
206/** @}*/
207
208# ifdef __cplusplus
209}
210# endif
211
212#endif /* VLC_LIBVLC_MEDIA_TRACK_H */
struct vlc_param ** list
Definition core.c:402
libvlc_track_type_t
Definition libvlc_media_track.h:45
LIBVLC_API void libvlc_media_tracklist_delete(libvlc_media_tracklist_t *list)
Release a tracklist.
LIBVLC_API void libvlc_media_track_release(libvlc_media_track_t *track)
Release a single track.
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_t * libvlc_media_tracklist_at(libvlc_media_tracklist_t *list, size_t index)
Get a track at a specific index.
LIBVLC_API libvlc_media_track_t * libvlc_media_track_hold(libvlc_media_track_t *track)
Hold a single track reference.
@ libvlc_track_video
Definition libvlc_media_track.h:48
@ libvlc_track_unknown
Definition libvlc_media_track.h:46
@ libvlc_track_text
Definition libvlc_media_track.h:49
@ libvlc_track_audio
Definition libvlc_media_track.h:47
#define LIBVLC_API
Definition libvlc.h:42
struct libvlc_media_tracklist_t libvlc_media_tracklist_t
Definition libvlc_media_player.h:42
libvlc_video_orient_t
Definition libvlc_video.h:33
libvlc_video_projection_t
Definition libvlc_video.h:45
libvlc_video_multiview_t
Definition libvlc_video.h:53
Definition libvlc_media_track.h:53
unsigned i_rate
Definition libvlc_media_track.h:55
unsigned i_channels
Definition libvlc_media_track.h:54
Definition libvlc_media_track.h:92
unsigned int i_bitrate
Definition libvlc_media_track.h:109
int i_profile
Definition libvlc_media_track.h:100
uint32_t i_original_fourcc
Definition libvlc_media_track.h:95
libvlc_video_track_t * video
Definition libvlc_media_track.h:105
char * psz_description
Definition libvlc_media_track.h:111
char * psz_language
Definition libvlc_media_track.h:110
char * psz_name
Name of the track, only valid when the track is fetch from a media_player.
Definition libvlc_media_track.h:121
bool id_stable
A string identifier is stable when it is certified to be the same across different playback instances...
Definition libvlc_media_track.h:118
libvlc_audio_track_t * audio
Definition libvlc_media_track.h:104
bool selected
true if the track is selected, only valid when the track is fetch from a media_player
Definition libvlc_media_track.h:124
libvlc_track_type_t i_type
Definition libvlc_media_track.h:97
uint32_t i_codec
Definition libvlc_media_track.h:94
const char * psz_id
String identifier of track, can be used to save the track preference from an other LibVLC run.
Definition libvlc_media_track.h:115
int i_id
Definition libvlc_media_track.h:96
int i_level
Definition libvlc_media_track.h:101
libvlc_subtitle_track_t * subtitle
Definition libvlc_media_track.h:106
Definition libvlc_media_track.h:87
char * psz_encoding
Definition libvlc_media_track.h:88
Definition libvlc_media_track.h:72
libvlc_video_orient_t i_orientation
Definition libvlc_media_track.h:80
unsigned i_width
Definition libvlc_media_track.h:74
unsigned i_height
Definition libvlc_media_track.h:73
libvlc_video_projection_t i_projection
Definition libvlc_media_track.h:81
unsigned i_frame_rate_num
Definition libvlc_media_track.h:77
unsigned i_sar_num
Definition libvlc_media_track.h:75
libvlc_video_viewpoint_t pose
Initial view point.
Definition libvlc_media_track.h:82
unsigned i_frame_rate_den
Definition libvlc_media_track.h:78
libvlc_video_multiview_t i_multiview
Definition libvlc_media_track.h:83
unsigned i_sar_den
Definition libvlc_media_track.h:76
Viewpoint.
Definition libvlc_media_track.h:64
float f_yaw
view point yaw in degrees ]-180;180]
Definition libvlc_media_track.h:65
float f_field_of_view
field of view in degrees ]0;180[ (default 80.)
Definition libvlc_media_track.h:68
float f_roll
view point roll in degrees ]-180;180]
Definition libvlc_media_track.h:67
float f_pitch
view point pitch in degrees ]-90;90]
Definition libvlc_media_track.h:66