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