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_media_descriptor MediaDescriptor
60 * LibVLC Media Descriptor handling
65 /** defgroup libvlc_meta Meta
66 * \ingroup libvlc_media_descriptor
71 typedef enum libvlc_meta_t {
78 typedef struct libvlc_media_descriptor_t libvlc_media_descriptor_t;
82 /*****************************************************************************
84 *****************************************************************************/
85 /** defgroup libvlc_media_instance MediaInstance
87 * LibVLC Media Instance handling
91 typedef struct libvlc_media_instance_t libvlc_media_instance_t;
96 /*****************************************************************************
98 *****************************************************************************/
99 /** defgroup libvlc_playlist Playlist
101 * LibVLC Playlist handling
105 typedef struct libvlc_playlist_item_t
111 } libvlc_playlist_item_t;
116 /*****************************************************************************
118 *****************************************************************************/
119 /** defgroup libvlc_video Video
121 * LibVLC Video handling
126 * Downcast to this general type as placeholder for a platform specific one, such as:
128 * CGrafPort on MacOSX,
131 typedef int libvlc_drawable_t;
134 * Rectangle type for video geometry
136 typedef struct libvlc_rectangle_t
146 /*****************************************************************************
147 * Message log handling
148 *****************************************************************************/
150 /** defgroup libvlc_log Log
152 * LibVLC Message Logging
156 /** This structure is opaque. It represents a libvlc log instance */
157 typedef struct libvlc_log_t libvlc_log_t;
159 /** This structure is opaque. It represents a libvlc log iterator */
160 typedef struct libvlc_log_iterator_t libvlc_log_iterator_t;
162 typedef struct libvlc_log_message_t
164 unsigned sizeof_msg; /* sizeof() of message structure, must be filled in by user */
165 int i_severity; /* 0=INFO, 1=ERR, 2=WARN, 3=DBG */
166 const char *psz_type; /* module type */
167 const char *psz_name; /* module name */
168 const char *psz_header; /* optional header */
169 const char *psz_message; /* message */
170 } libvlc_log_message_t;
174 /*****************************************************************************
176 *****************************************************************************/
178 /** defgroup libvlc_callbacks Callbacks
180 * LibVLC Event Callbacks
186 * - libvlc_VolumeChanged
187 * - libvlc_InputPositionChanged
190 typedef enum libvlc_event_type_t {
191 libvlc_VolumeChanged,
192 libvlc_InputPositionChanged,
193 } libvlc_event_type_t;
195 typedef struct libvlc_event_t
197 libvlc_event_type_t type;
206 vlc_int64_t new_position;
207 } input_position_changed;
212 * Callback function notification
213 * \param p_instance the libvlc instance
214 * \param p_event the event triggering the callback
215 * \param p_user_data user provided data
218 typedef void ( *libvlc_callback_t )( struct libvlc_instance_t *, libvlc_event_t *, void * );