]> git.sesse.net Git - vlc/blob - include/vlc/libvlc_structures.h
Remove FORWARD_S and BACKWARD_S from input state.
[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 } libvlc_meta_t;
108
109 /**@} */
110
111 typedef struct libvlc_media_t libvlc_media_t;
112
113 /**@} */
114
115
116 /*****************************************************************************
117  * Media Instance
118  *****************************************************************************/
119 /** \defgroup libvlc_media_player libvlc_media_player
120  * \ingroup libvlc
121  * LibVLC Media Instance handling
122  * @{
123  */
124
125 typedef struct libvlc_media_player_t libvlc_media_player_t;
126
127 /**
128  * Note the order of libvlc_state_t enum must match exactly the order of
129  * @see mediacontrol_PlayerStatus and @see input_state_e enums.
130  *
131  * Expected states by web plugins are:
132  * IDLE/CLOSE=0, OPENING=1, BUFFERING=2, PLAYING=3, PAUSED=4,
133  * STOPPING=5, ENDED=6, ERROR=7
134  */
135 typedef enum libvlc_state_t
136 {
137     libvlc_NothingSpecial=0,
138     libvlc_Opening,
139     libvlc_Buffering,
140     libvlc_Playing,
141     libvlc_Paused,
142     libvlc_Stopped,
143     libvlc_Ended,
144     libvlc_Error
145 } libvlc_state_t;
146
147 /**@} */
148
149 /*****************************************************************************
150  * Media List
151  *****************************************************************************/
152 /** \defgroup libvlc_media_list libvlc_media_list
153  * \ingroup libvlc
154  * LibVLC Media List handling
155  * @{
156  */
157
158 typedef struct libvlc_media_list_t libvlc_media_list_t;
159 typedef struct libvlc_media_list_view_t libvlc_media_list_view_t;
160
161
162 /*****************************************************************************
163  * Media List Player
164  *****************************************************************************/
165 /** \defgroup libvlc_media_list_player libvlc_media_list_player
166  * \ingroup libvlc_media_list
167  * LibVLC Media List Player handling
168  * @{
169  */
170
171 typedef struct libvlc_media_list_player_t libvlc_media_list_player_t;
172
173 /**@} libvlc_media_list_player */
174
175 /**@} libvlc_media_list */
176
177 /*****************************************************************************
178  * Media Library
179  *****************************************************************************/
180 /** \defgroup libvlc_media_library libvlc_media_library
181  * \ingroup libvlc
182  * LibVLC Media Library
183  * @{
184  */
185
186 typedef struct libvlc_media_library_t libvlc_media_library_t;
187
188 /**@} */
189
190 /*****************************************************************************
191  * Playlist
192  *****************************************************************************/
193 /** \defgroup libvlc_playlist libvlc_playlist (Deprecated)
194  * \ingroup libvlc
195  * LibVLC Playlist handling (Deprecated)
196  * @deprecated Use media_list
197  * @{
198  */
199
200 typedef struct libvlc_playlist_item_t
201 {
202     int i_id;
203     char * psz_uri;
204     char * psz_name;
205
206 } libvlc_playlist_item_t;
207
208 /**@} */
209
210 /*****************************************************************************
211  * Media Player
212  *****************************************************************************/
213 /** \defgroup libvlc_media_player libvlc_media_player
214  * \ingroup libvlc
215  * LibVLC Media Player, object that let you play a media
216  * in a libvlc_drawable_t
217  * @{
218  */
219
220 /**
221  * Description for video, audio tracks and subtitles. It contains
222  * id, name (description string) and pointer to next record.
223  */
224 typedef struct libvlc_track_description_t
225 {
226     int   i_id;
227     char *psz_name;
228     struct libvlc_track_description_t *p_next;
229
230 } libvlc_track_description_t;
231
232 /**@} */
233
234 /*****************************************************************************
235  * Audio
236  *****************************************************************************/
237 /** \defgroup libvlc_audio libvlc_audio
238  * \ingroup libvlc_media_player
239  * LibVLC Audio handling
240  * @{
241  */
242
243 /**
244  * Description for audio output. It contains
245  * name, description and pointer to next record.
246  */
247 typedef struct libvlc_audio_output_t
248 {
249     char *psz_name;
250     char *psz_description;
251     struct libvlc_audio_output_t *p_next;
252
253 } libvlc_audio_output_t;
254
255 /**@} */
256
257
258 /*****************************************************************************
259  * Video
260  *****************************************************************************/
261 /** \defgroup libvlc_video libvlc_video
262  * \ingroup libvlc_media_player
263  * LibVLC Video handling
264  * @{
265  */
266
267 /**
268 * Downcast to this general type as placeholder for a platform specific one, such as:
269 *  Drawable on X11,
270 *  CGrafPort on MacOSX,
271 *  HWND on win32
272 */
273 typedef int libvlc_drawable_t;
274
275 /**
276 * Rectangle type for video geometry
277 */
278 typedef struct libvlc_rectangle_t
279 {
280     int top, left;
281     int bottom, right;
282 }
283 libvlc_rectangle_t;
284
285 /**@} */
286
287
288 /*****************************************************************************
289  * Services/Media Discovery
290  *****************************************************************************/
291 /** \defgroup libvlc_media_discoverer libvlc_media_discoverer
292  * \ingroup libvlc
293  * LibVLC Media Discoverer
294  * @{
295  */
296
297 typedef struct libvlc_media_discoverer_t libvlc_media_discoverer_t;
298
299 /**@} */
300
301 /*****************************************************************************
302  * Message log handling
303  *****************************************************************************/
304
305 /** \defgroup libvlc_log libvlc_log
306  * \ingroup libvlc_core
307  * LibVLC Message Logging
308  * @{
309  */
310
311 /** This structure is opaque. It represents a libvlc log instance */
312 typedef struct libvlc_log_t libvlc_log_t;
313
314 /** This structure is opaque. It represents a libvlc log iterator */
315 typedef struct libvlc_log_iterator_t libvlc_log_iterator_t;
316
317 typedef struct libvlc_log_message_t
318 {
319     unsigned    sizeof_msg;   /* sizeof() of message structure, must be filled in by user */
320     int         i_severity;   /* 0=INFO, 1=ERR, 2=WARN, 3=DBG */
321     const char *psz_type;     /* module type */
322     const char *psz_name;     /* module name */
323     const char *psz_header;   /* optional header */
324     const char *psz_message;  /* message */
325 } libvlc_log_message_t;
326
327 /**@} */
328
329 # ifdef __cplusplus
330 }
331 # endif
332
333 #endif