1 /*****************************************************************************
2 * libvlc.h: libvlc_* new external API structures
3 *****************************************************************************
4 * Copyright (C) 1998-2007 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
33 /** This structure is opaque. It represents a libvlc instance */
34 typedef struct libvlc_instance_t libvlc_instance_t;
36 /*****************************************************************************
38 *****************************************************************************/
40 /** defgroup libvlc_exception Exceptions
42 * LibVLC Exceptions handling
46 typedef struct libvlc_exception_t
55 /*****************************************************************************
57 *****************************************************************************/
58 /** defgroup libvlc_tag Tag
60 * LibVLC Tag support in media descriptor
64 typedef struct libvlc_tag_query_t libvlc_tag_query_t;
65 typedef char * libvlc_tag_t;
69 /*****************************************************************************
71 *****************************************************************************/
72 /** defgroup libvlc_media_descriptor MediaDescriptor
74 * LibVLC Media Descriptor handling
79 /** defgroup libvlc_meta Meta
80 * \ingroup libvlc_media_descriptor
85 typedef enum libvlc_meta_t {
89 libvlc_meta_Copyright,
91 libvlc_meta_TrackNumber,
92 libvlc_meta_Description,
98 libvlc_meta_NowPlaying,
99 libvlc_meta_Publisher,
100 libvlc_meta_EncodedBy,
101 libvlc_meta_ArtworkURL,
107 typedef struct libvlc_media_descriptor_t libvlc_media_descriptor_t;
112 /*****************************************************************************
114 *****************************************************************************/
115 /** defgroup libvlc_media_instance MediaInstance
117 * LibVLC Media Instance handling
121 typedef struct libvlc_media_instance_t libvlc_media_instance_t;
125 /*****************************************************************************
127 *****************************************************************************/
128 /** defgroup libvlc_media_list MediaList
130 * LibVLC Media List handling
134 typedef struct libvlc_media_list_t libvlc_media_list_t;
135 typedef struct libvlc_media_list_view_t libvlc_media_list_view_t;
139 /*****************************************************************************
141 *****************************************************************************/
142 /** defgroup libvlc_media_list MediaList
144 * LibVLC Dynamic Media list: Media list with content synchronized with
149 typedef struct libvlc_dynamic_media_list_t libvlc_dynamic_media_list_t;
153 /*****************************************************************************
155 *****************************************************************************/
156 /** defgroup libvlc_media_list_player MediaListPlayer
158 * LibVLC Media List Player handling
162 typedef struct libvlc_media_list_player_t libvlc_media_list_player_t;
166 /*****************************************************************************
168 *****************************************************************************/
169 /** defgroup libvlc_media_library Media Library
171 * LibVLC Media Library
175 typedef struct libvlc_media_library_t libvlc_media_library_t;
179 /*****************************************************************************
181 *****************************************************************************/
182 /** defgroup libvlc_playlist Playlist
184 * LibVLC Playlist handling
188 typedef struct libvlc_playlist_item_t
194 } libvlc_playlist_item_t;
199 /*****************************************************************************
201 *****************************************************************************/
202 /** defgroup libvlc_video Video
204 * LibVLC Video handling
209 * Downcast to this general type as placeholder for a platform specific one, such as:
211 * CGrafPort on MacOSX,
214 typedef int libvlc_drawable_t;
217 * Rectangle type for video geometry
219 typedef struct libvlc_rectangle_t
229 /*****************************************************************************
230 * Services/Media Discovery
231 *****************************************************************************/
232 /** defgroup libvlc_media_discoverer Media Discoverer
234 * LibVLC Media Discoverer
238 typedef struct libvlc_media_discoverer_t libvlc_media_discoverer_t;
242 /*****************************************************************************
243 * Message log handling
244 *****************************************************************************/
246 /** defgroup libvlc_log Log
248 * LibVLC Message Logging
252 /** This structure is opaque. It represents a libvlc log instance */
253 typedef struct libvlc_log_t libvlc_log_t;
255 /** This structure is opaque. It represents a libvlc log iterator */
256 typedef struct libvlc_log_iterator_t libvlc_log_iterator_t;
258 typedef struct libvlc_log_message_t
260 unsigned sizeof_msg; /* sizeof() of message structure, must be filled in by user */
261 int i_severity; /* 0=INFO, 1=ERR, 2=WARN, 3=DBG */
262 const char *psz_type; /* module type */
263 const char *psz_name; /* module name */
264 const char *psz_header; /* optional header */
265 const char *psz_message; /* message */
266 } libvlc_log_message_t;
270 /*****************************************************************************
272 *****************************************************************************/
274 /** defgroup libvlc_callbacks Callbacks
276 * LibVLC Event Callbacks
281 * Available events: (XXX: being reworked)
282 * - libvlc_MediaInstanceReachedEnd
285 typedef enum libvlc_event_type_t {
286 libvlc_MediaDescriptorMetaChanged,
287 libvlc_MediaDescriptorSubItemAdded,
289 libvlc_MediaInstancePlayed,
290 libvlc_MediaInstancePaused,
291 libvlc_MediaInstanceReachedEnd,
292 libvlc_MediaInstancePositionChanged,
294 libvlc_MediaListItemAdded,
295 libvlc_MediaListItemDeleted,
297 libvlc_MediaListPlayerPlayed,
298 libvlc_MediaListPlayerNextItemSet,
299 libvlc_MediaListPlayerStopped,
301 } libvlc_event_type_t;
305 * \param type the even type
306 * \param p_obj the sender object
307 * \param u Event dependent content
310 typedef struct libvlc_event_t
312 libvlc_event_type_t type;
314 union event_type_specific
316 /* media descriptor */
319 libvlc_meta_t meta_type;
320 } media_descriptor_meta_changed;
323 libvlc_media_descriptor_t * new_child;
324 } media_descriptor_subitem_added;
329 long int new_position;
330 } media_instance_position_changed;
335 libvlc_media_descriptor_t * item;
337 } media_list_item_added;
340 libvlc_media_descriptor_t * item;
342 } media_list_item_deleted;
347 * Event manager that belongs to a libvlc object, and from whom events can
351 typedef struct libvlc_event_manager_t libvlc_event_manager_t;
354 * Callback function notification
355 * \param p_event the event triggering the callback
358 typedef void ( *libvlc_callback_t )( const libvlc_event_t *, void * );