1 /*****************************************************************************
2 * libvlc.h: libvlc_* new external API
3 *****************************************************************************
4 * Copyright (C) 1998-2005 the VideoLAN team
5 * $Id: vlc.h 13701 2005-12-12 17:58:56Z zorglub $
7 * Authors: Clément Stenac <zorglub@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., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
22 *****************************************************************************/
25 * \defgroup libvlc Libvlc
26 * This is libvlc, the base library of the VLC program.
41 /*****************************************************************************
43 *****************************************************************************/
44 /** defgroup libvlc_exception Exceptions
46 * LibVLC Exceptions handling
50 struct libvlc_exception_t
55 typedef struct libvlc_exception_t libvlc_exception_t;
58 * Initialize an exception structure. This can be called several times to reuse
59 * an exception structure.
60 * \param p_exception the exception to initialize
62 void libvlc_exception_init( libvlc_exception_t *p_exception );
65 * Has an exception been raised ?
66 * \param p_exception the exception to query
67 * \return 0 if no exception raised, 1 else
69 int libvlc_exception_raised( libvlc_exception_t *p_exception );
72 * Get exception message
73 * \param p_exception the exception to query
74 * \return the exception message or NULL if not applicable (exception not raised
77 char* libvlc_exception_get_message( libvlc_exception_t *p_exception );
83 /*****************************************************************************
85 *****************************************************************************/
87 /** defgroup libvlc_core Core
93 /** This structure is opaque. It represents a libvlc instance */
94 typedef struct libvlc_instance_t libvlc_instance_t;
97 * Create an initialized libvlc instance
98 * \param argc the number of arguments
99 * \param argv command-line-type arguments
100 * \param exception an initialized exception pointer
102 libvlc_instance_t * libvlc_new( int , char **, libvlc_exception_t *);
105 * Destroy a libvlc instance
106 * \param p_instance the instance to destroy
108 void libvlc_destroy( libvlc_instance_t *);
112 /*****************************************************************************
114 *****************************************************************************/
115 /** defgroup libvlc_playlist Playlist
117 * LibVLC Playlist handling
122 * Start playing. You can give some additionnal playlist item options
123 * that will be added to the item before playing it.
124 * \param p_instance the instance
125 * \param i_options the number of options to add to the item
126 * \param ppsz_options the options to add to the item
127 * \param p_exception an initialized exception
129 void libvlc_playlist_play( libvlc_instance_t*, int, char **,
130 libvlc_exception_t * );
132 typedef struct libvlc_input_t libvlc_input_t;
135 libvlc_input_t *libvlc_playlist_get_input( libvlc_instance_t *,
136 libvlc_exception_t * );
142 /*****************************************************************************
144 *****************************************************************************/
145 /** defgroup libvlc_input Input
147 * LibVLC Input handling
151 /** Free an input object
152 * \param p_input the input to free
154 void libvlc_input_free( libvlc_input_t * );
156 /// \bug This might go away ... to be replaced by a broader system
157 vlc_int64_t libvlc_input_get_length( libvlc_input_t *, libvlc_exception_t *);
158 vlc_int64_t libvlc_input_get_time( libvlc_input_t *, libvlc_exception_t *);
159 float libvlc_input_get_position( libvlc_input_t *, libvlc_exception_t *);
169 #endif /* <vlc/vlc_control.h> */