]> git.sesse.net Git - vlc/blob - include/vlc/libvlc_structures.h
libvlc: rename libvlc_media_descriptor to libvlc_media and libvlc_media_instance...
[vlc] / include / vlc / libvlc_structures.h
1 /*****************************************************************************
2  * libvlc.h:  libvlc_* new external API structures
3  *****************************************************************************
4  * Copyright (C) 1998-2007 the VideoLAN team
5  * $Id $
6  *
7  * Authors: Filippo Carone <littlejohn@videolan.org>
8  *
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.
13  *
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.
18  *
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  *****************************************************************************/
23
24 #ifndef _LIBVLC_STRUCTURES_H
25 #define _LIBVLC_STRUCTURES_H 1
26
27 # ifdef __cplusplus
28 extern "C" {
29 # endif
30
31 /** This structure is opaque. It represents a libvlc instance */
32 typedef struct libvlc_instance_t libvlc_instance_t;
33
34 /*****************************************************************************
35  * Exceptions
36  *****************************************************************************/
37
38 /** \defgroup libvlc_exception libvlc_exception
39  * \ingroup libvlc
40  * LibVLC Exceptions handling
41  * @{
42  */
43
44 typedef struct libvlc_exception_t
45 {
46     int b_raised;
47     int i_code;
48     char *psz_message;
49 } libvlc_exception_t;
50
51 /**@} */
52
53 /*****************************************************************************
54  * Time
55  *****************************************************************************/
56 /** \defgroup libvlc_time libvlc_time
57  * \ingroup libvlc
58  * LibVLC Time support in libvlc
59  * @{
60  */
61
62 typedef vlc_int64_t libvlc_time_t;
63
64 /**@} */
65
66 /*****************************************************************************
67  * Media Descriptor
68  *****************************************************************************/
69 /** \defgroup libvlc_media libvlc_media
70  * \ingroup libvlc
71  * LibVLC Media Descriptor handling
72  * @{
73  */
74
75 /* Meta Handling */
76 /** defgroup libvlc_meta libvlc_meta
77  * \ingroup libvlc_media
78  * LibVLC Media Meta
79  * @{
80  */
81
82 typedef enum libvlc_meta_t {
83     libvlc_meta_Title,
84     libvlc_meta_Artist,
85     libvlc_meta_Genre,
86     libvlc_meta_Copyright,
87     libvlc_meta_Album,
88     libvlc_meta_TrackNumber,
89     libvlc_meta_Description,
90     libvlc_meta_Rating,
91     libvlc_meta_Date,
92     libvlc_meta_Setting,
93     libvlc_meta_URL,
94     libvlc_meta_Language,
95     libvlc_meta_NowPlaying,
96     libvlc_meta_Publisher,
97     libvlc_meta_EncodedBy,
98     libvlc_meta_ArtworkURL,
99     libvlc_meta_TrackID
100 } libvlc_meta_t;
101
102 /**@} */
103
104 typedef struct libvlc_media_t libvlc_media_t;
105
106 /**@} */
107
108
109 /*****************************************************************************
110  * Media Instance
111  *****************************************************************************/
112 /** \defgroup libvlc_media_player libvlc_media_player
113  * \ingroup libvlc
114  * LibVLC Media Instance handling
115  * @{
116  */
117
118 typedef struct libvlc_media_player_t libvlc_media_player_t;
119
120 typedef enum libvlc_state_t
121 {
122     libvlc_NothingSpecial,
123     libvlc_Stopped,
124     libvlc_Opening,
125     libvlc_Buffering,
126     libvlc_Ended,
127     libvlc_Error,
128     libvlc_Playing,
129     libvlc_Paused
130 } libvlc_state_t;
131
132 /**@} */
133
134 /*****************************************************************************
135  * Media List
136  *****************************************************************************/
137 /** \defgroup libvlc_media_list libvlc_media_list
138  * \ingroup libvlc
139  * LibVLC Media List handling
140  * @{
141  */
142
143 typedef struct libvlc_media_list_t libvlc_media_list_t;
144 typedef struct libvlc_media_list_view_t libvlc_media_list_view_t;
145
146
147 /*****************************************************************************
148  * Media List Player
149  *****************************************************************************/
150 /** \defgroup libvlc_media_list_player libvlc_media_list_player
151  * \ingroup libvlc_media_list
152  * LibVLC Media List Player handling
153  * @{
154  */
155
156 typedef struct libvlc_media_list_player_t libvlc_media_list_player_t;
157
158 /**@} libvlc_media_list_player */
159
160 /**@} libvlc_media_list */
161
162 /*****************************************************************************
163  * Media Library
164  *****************************************************************************/
165 /** \defgroup libvlc_media_library libvlc_media_library
166  * \ingroup libvlc
167  * LibVLC Media Library
168  * @{
169  */
170
171 typedef struct libvlc_media_library_t libvlc_media_library_t;
172
173 /**@} */
174
175 /*****************************************************************************
176  * Playlist
177  *****************************************************************************/
178 /** \defgroup libvlc_playlist libvlc_playlist (Deprecated)
179  * \ingroup libvlc
180  * LibVLC Playlist handling (Deprecated)
181  * @deprecated Use media_list
182  * @{
183  */
184
185 typedef struct libvlc_playlist_item_t
186 {
187     int i_id;
188     char * psz_uri;
189     char * psz_name;
190
191 } libvlc_playlist_item_t;
192
193 /**@} */
194
195
196 /*****************************************************************************
197  * Video
198  *****************************************************************************/
199 /** \defgroup libvlc_video libvlc_video
200  * \ingroup libvlc_media_player
201  * LibVLC Video handling
202  * @{
203  */
204  
205 /**
206 * Downcast to this general type as placeholder for a platform specific one, such as:
207 *  Drawable on X11,
208 *  CGrafPort on MacOSX,
209 *  HWND on win32
210 */
211 typedef int libvlc_drawable_t;
212
213 /**
214 * Rectangle type for video geometry
215 */
216 typedef struct libvlc_rectangle_t
217 {
218     int top, left;
219     int bottom, right;
220 }
221 libvlc_rectangle_t;
222
223 /**@} */
224
225
226 /*****************************************************************************
227  * Services/Media Discovery
228  *****************************************************************************/
229 /** \defgroup libvlc_media_discoverer libvlc_media_discoverer
230  * \ingroup libvlc
231  * LibVLC Media Discoverer
232  * @{
233  */
234
235 typedef struct libvlc_media_discoverer_t libvlc_media_discoverer_t;
236
237 /**@} */
238
239 /*****************************************************************************
240  * Message log handling
241  *****************************************************************************/
242
243 /** \defgroup libvlc_log libvlc_log
244  * \ingroup libvlc
245  * LibVLC Message Logging
246  * @{
247  */
248
249 /** This structure is opaque. It represents a libvlc log instance */
250 typedef struct libvlc_log_t libvlc_log_t;
251
252 /** This structure is opaque. It represents a libvlc log iterator */
253 typedef struct libvlc_log_iterator_t libvlc_log_iterator_t;
254
255 typedef struct libvlc_log_message_t
256 {
257     unsigned    sizeof_msg;   /* sizeof() of message structure, must be filled in by user */
258     int         i_severity;   /* 0=INFO, 1=ERR, 2=WARN, 3=DBG */
259     const char *psz_type;     /* module type */
260     const char *psz_name;     /* module name */
261     const char *psz_header;   /* optional header */
262     const char *psz_message;  /* message */
263 } libvlc_log_message_t;
264
265 /**@} */
266
267 # ifdef __cplusplus
268 }
269 # endif
270
271 #endif