1 /*****************************************************************************
2 * libvlc.h: libvlc_* new external API structures
3 *****************************************************************************
4 * Copyright (C) 1998-2008 the VideoLAN team
7 * Authors: Filippo Carone <littlejohn@videolan.org>
9 * This program is free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 * GNU General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22 *****************************************************************************/
24 #ifndef LIBVLC_STRUCTURES_H
25 #define LIBVLC_STRUCTURES_H 1
29 * This file defines libvlc_* new external API structures
38 /** This structure is opaque. It represents a libvlc instance */
39 typedef struct libvlc_instance_t libvlc_instance_t;
41 /*****************************************************************************
43 *****************************************************************************/
45 /** \defgroup libvlc_exception libvlc_exception
46 * \ingroup libvlc_core
47 * LibVLC Exceptions handling
51 typedef struct libvlc_exception_t
60 /*****************************************************************************
62 *****************************************************************************/
63 /** \defgroup libvlc_time libvlc_time
64 * \ingroup libvlc_core
65 * LibVLC Time support in libvlc
69 typedef int64_t libvlc_time_t;
73 /*****************************************************************************
75 *****************************************************************************/
76 /** \defgroup libvlc_media libvlc_media
78 * LibVLC Media Descriptor handling
83 /** defgroup libvlc_meta libvlc_meta
84 * \ingroup libvlc_media
89 typedef enum libvlc_meta_t {
93 libvlc_meta_Copyright,
95 libvlc_meta_TrackNumber,
96 libvlc_meta_Description,
101 libvlc_meta_Language,
102 libvlc_meta_NowPlaying,
103 libvlc_meta_Publisher,
104 libvlc_meta_EncodedBy,
105 libvlc_meta_ArtworkURL,
107 /* Add new meta types HERE */
112 typedef struct libvlc_media_t libvlc_media_t;
117 /*****************************************************************************
119 *****************************************************************************/
120 /** \defgroup libvlc_media_player libvlc_media_player
122 * LibVLC Media Instance handling
126 typedef struct libvlc_media_player_t libvlc_media_player_t;
129 * Note the order of libvlc_state_t enum must match exactly the order of
130 * @see mediacontrol_PlayerStatus and @see input_state_e enums.
132 * Expected states by web plugins are:
133 * IDLE/CLOSE=0, OPENING=1, BUFFERING=2, PLAYING=3, PAUSED=4,
134 * STOPPING=5, ENDED=6, ERROR=7
136 typedef enum libvlc_state_t
138 libvlc_NothingSpecial=0,
150 /*****************************************************************************
152 *****************************************************************************/
153 /** \defgroup libvlc_media_list libvlc_media_list
155 * LibVLC Media List handling
159 typedef struct libvlc_media_list_t libvlc_media_list_t;
160 typedef struct libvlc_media_list_view_t libvlc_media_list_view_t;
163 /*****************************************************************************
165 *****************************************************************************/
166 /** \defgroup libvlc_media_list_player libvlc_media_list_player
167 * \ingroup libvlc_media_list
168 * LibVLC Media List Player handling
172 typedef struct libvlc_media_list_player_t libvlc_media_list_player_t;
174 /**@} libvlc_media_list_player */
176 /**@} libvlc_media_list */
178 /*****************************************************************************
180 *****************************************************************************/
181 /** \defgroup libvlc_media_library libvlc_media_library
183 * LibVLC Media Library
187 typedef struct libvlc_media_library_t libvlc_media_library_t;
191 /*****************************************************************************
193 *****************************************************************************/
194 /** \defgroup libvlc_playlist libvlc_playlist (Deprecated)
196 * LibVLC Playlist handling (Deprecated)
197 * @deprecated Use media_list
201 typedef struct libvlc_playlist_item_t
207 } libvlc_playlist_item_t;
211 /*****************************************************************************
213 *****************************************************************************/
214 /** \defgroup libvlc_media_player libvlc_media_player
216 * LibVLC Media Player, object that let you play a media
222 * Description for video, audio tracks and subtitles. It contains
223 * id, name (description string) and pointer to next record.
225 typedef struct libvlc_track_description_t
229 struct libvlc_track_description_t *p_next;
231 } libvlc_track_description_t;
235 /*****************************************************************************
237 *****************************************************************************/
238 /** \defgroup libvlc_audio libvlc_audio
239 * \ingroup libvlc_media_player
240 * LibVLC Audio handling
245 * Description for audio output. It contains
246 * name, description and pointer to next record.
248 typedef struct libvlc_audio_output_t
251 char *psz_description;
252 struct libvlc_audio_output_t *p_next;
254 } libvlc_audio_output_t;
259 /*****************************************************************************
261 *****************************************************************************/
262 /** \defgroup libvlc_video libvlc_video
263 * \ingroup libvlc_media_player
264 * LibVLC Video handling
269 * Downcast to this general type as placeholder for a platform specific one, such as:
271 * CGrafPort on MacOSX,
274 typedef int libvlc_drawable_t;
277 * Rectangle type for video geometry
279 typedef struct libvlc_rectangle_t
289 /*****************************************************************************
290 * Services/Media Discovery
291 *****************************************************************************/
292 /** \defgroup libvlc_media_discoverer libvlc_media_discoverer
294 * LibVLC Media Discoverer
298 typedef struct libvlc_media_discoverer_t libvlc_media_discoverer_t;
302 /*****************************************************************************
303 * Message log handling
304 *****************************************************************************/
306 /** \defgroup libvlc_log libvlc_log
307 * \ingroup libvlc_core
308 * LibVLC Message Logging
312 /** This structure is opaque. It represents a libvlc log instance */
313 typedef struct libvlc_log_t libvlc_log_t;
315 /** This structure is opaque. It represents a libvlc log iterator */
316 typedef struct libvlc_log_iterator_t libvlc_log_iterator_t;
318 typedef struct libvlc_log_message_t
320 unsigned sizeof_msg; /* sizeof() of message structure, must be filled in by user */
321 int i_severity; /* 0=INFO, 1=ERR, 2=WARN, 3=DBG */
322 const char *psz_type; /* module type */
323 const char *psz_name; /* module name */
324 const char *psz_header; /* optional header */
325 const char *psz_message; /* message */
326 } libvlc_log_message_t;