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_query Tag Query
60 * LibVLC Tag Query support in media descriptor
64 typedef struct libvlc_tag_query_t libvlc_tag_query_t;
68 /*****************************************************************************
70 *****************************************************************************/
71 /** defgroup libvlc_media_descriptor MediaDescriptor
73 * LibVLC Media Descriptor handling
78 /** defgroup libvlc_meta Meta
79 * \ingroup libvlc_media_descriptor
84 typedef enum libvlc_meta_t {
91 typedef struct libvlc_media_descriptor_t libvlc_media_descriptor_t;
96 /*****************************************************************************
98 *****************************************************************************/
99 /** defgroup libvlc_media_instance MediaInstance
101 * LibVLC Media Instance handling
105 typedef struct libvlc_media_instance_t libvlc_media_instance_t;
109 /*****************************************************************************
111 *****************************************************************************/
112 /** defgroup libvlc_media_list MediaList
114 * LibVLC Media List handling
118 typedef struct libvlc_media_list_t libvlc_media_list_t;
122 /*****************************************************************************
124 *****************************************************************************/
125 /** defgroup libvlc_media_list_player MediaListPlayer
127 * LibVLC Media List Player handling
131 typedef struct libvlc_media_list_player_t libvlc_media_list_player_t;
135 /*****************************************************************************
137 *****************************************************************************/
138 /** defgroup libvlc_playlist Playlist
140 * LibVLC Playlist handling
144 typedef struct libvlc_playlist_item_t
150 } libvlc_playlist_item_t;
155 /*****************************************************************************
157 *****************************************************************************/
158 /** defgroup libvlc_video Video
160 * LibVLC Video handling
165 * Downcast to this general type as placeholder for a platform specific one, such as:
167 * CGrafPort on MacOSX,
170 typedef int libvlc_drawable_t;
173 * Rectangle type for video geometry
175 typedef struct libvlc_rectangle_t
185 /*****************************************************************************
186 * Message log handling
187 *****************************************************************************/
189 /** defgroup libvlc_log Log
191 * LibVLC Message Logging
195 /** This structure is opaque. It represents a libvlc log instance */
196 typedef struct libvlc_log_t libvlc_log_t;
198 /** This structure is opaque. It represents a libvlc log iterator */
199 typedef struct libvlc_log_iterator_t libvlc_log_iterator_t;
201 typedef struct libvlc_log_message_t
203 unsigned sizeof_msg; /* sizeof() of message structure, must be filled in by user */
204 int i_severity; /* 0=INFO, 1=ERR, 2=WARN, 3=DBG */
205 const char *psz_type; /* module type */
206 const char *psz_name; /* module name */
207 const char *psz_header; /* optional header */
208 const char *psz_message; /* message */
209 } libvlc_log_message_t;
213 /*****************************************************************************
215 *****************************************************************************/
217 /** defgroup libvlc_callbacks Callbacks
219 * LibVLC Event Callbacks
224 * Available events: (XXX: being reworked)
225 * - libvlc_MediaInstanceReachedEnd
228 typedef enum libvlc_event_type_t {
229 libvlc_MediaInstanceReachedEnd,
230 libvlc_MediaListItemAdded,
231 libvlc_MediaListItemDeleted,
232 libvlc_MediaListItemChanged,
233 } libvlc_event_type_t;
237 * \param type the even type
238 * \param p_obj the sender object
239 * \param u Event dependent content
242 typedef struct libvlc_event_t
244 libvlc_event_type_t type;
246 union event_type_specific
250 libvlc_media_descriptor_t * item;
252 } media_list_item_added;
255 libvlc_media_descriptor_t * item;
257 } media_list_item_deleted;
260 libvlc_media_descriptor_t * item;
262 } media_list_item_changed;
267 * Event manager that belongs to a libvlc object, and from whom events can
271 typedef struct libvlc_event_manager_t libvlc_event_manager_t;
274 * Callback function notification
275 * \param p_event the event triggering the callback
278 typedef void ( *libvlc_callback_t )( const libvlc_event_t *, void * );