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