1 /*****************************************************************************
2 * libvlc_vlm.h: libvlc_* new external API
3 *****************************************************************************
4 * Copyright (C) 1998-2008 the VideoLAN team
7 * Authors: Clément Stenac <zorglub@videolan.org>
8 * Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
23 *****************************************************************************/
26 #define LIBVLC_VLM_H 1
30 * This file defines libvlc_vlm_* external API
37 /*****************************************************************************
39 *****************************************************************************/
40 /** \defgroup libvlc_vlm libvlc_vlm
48 * Release the vlm instance related to the given libvlc_instance_t
50 * \param p_instance the instance
51 * \param p_e an initialized exception pointer
53 VLC_PUBLIC_API void libvlc_vlm_release( libvlc_instance_t *, libvlc_exception_t * );
56 * Add a broadcast, with one input.
58 * \param p_instance the instance
59 * \param psz_name the name of the new broadcast
60 * \param psz_input the input MRL
61 * \param psz_output the output MRL (the parameter to the "sout" variable)
62 * \param i_options number of additional options
63 * \param ppsz_options additional options
64 * \param b_enabled boolean for enabling the new broadcast
65 * \param b_loop Should this broadcast be played in loop ?
66 * \param p_e an initialized exception pointer
68 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
69 int, char **, int, int, libvlc_exception_t * );
72 * Add a vod, with one input.
74 * \param p_instance the instance
75 * \param psz_name the name of the new vod media
76 * \param psz_input the input MRL
77 * \param i_options number of additional options
78 * \param ppsz_options additional options
79 * \param b_enabled boolean for enabling the new vod
80 * \param psz_mux the muxer of the vod media
81 * \param p_e an initialized exception pointer
83 VLC_PUBLIC_API void libvlc_vlm_add_vod( libvlc_instance_t *, char *, char *, int, char **,
84 int, char *, libvlc_exception_t * );
87 * Delete a media (VOD or broadcast).
89 * \param p_instance the instance
90 * \param psz_name the media to delete
91 * \param p_e an initialized exception pointer
93 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
96 * Enable or disable a media (VOD or broadcast).
98 * \param p_instance the instance
99 * \param psz_name the media to work on
100 * \param b_enabled the new status
101 * \param p_e an initialized exception pointer
103 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
104 libvlc_exception_t *);
107 * Set the output for a media.
109 * \param p_instance the instance
110 * \param psz_name the media to work on
111 * \param psz_output the output MRL (the parameter to the "sout" variable)
112 * \param p_e an initialized exception pointer
114 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
115 libvlc_exception_t *);
118 * Set a media's input MRL. This will delete all existing inputs and
119 * add the specified one.
121 * \param p_instance the instance
122 * \param psz_name the media to work on
123 * \param psz_input the input MRL
124 * \param p_e an initialized exception pointer
126 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
127 libvlc_exception_t *);
130 * Add a media's input MRL. This will add the specified one.
132 * \param p_instance the instance
133 * \param psz_name the media to work on
134 * \param psz_input the input MRL
135 * \param p_e an initialized exception pointer
137 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
138 libvlc_exception_t *p_exception );
140 * Set a media's loop status.
142 * \param p_instance the instance
143 * \param psz_name the media to work on
144 * \param b_loop the new status
145 * \param p_e an initialized exception pointer
147 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
148 libvlc_exception_t *);
151 * Set a media's vod muxer.
153 * \param p_instance the instance
154 * \param psz_name the media to work on
155 * \param psz_mux the new muxer
156 * \param p_e an initialized exception pointer
158 VLC_PUBLIC_API void libvlc_vlm_set_mux( libvlc_instance_t *p_instance, char *psz_name,
159 char *psz_mux, libvlc_exception_t *p_exception );
162 * Edit the parameters of a media. This will delete all existing inputs and
163 * add the specified one.
165 * \param p_instance the instance
166 * \param psz_name the name of the new broadcast
167 * \param psz_input the input MRL
168 * \param psz_output the output MRL (the parameter to the "sout" variable)
169 * \param i_options number of additional options
170 * \param ppsz_options additional options
171 * \param b_enabled boolean for enabling the new broadcast
172 * \param b_loop Should this broadcast be played in loop ?
173 * \param p_e an initialized exception pointer
175 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
176 int, char **, int, int, libvlc_exception_t * );
179 * Play the named broadcast.
181 * \param p_instance the instance
182 * \param psz_name the name of the broadcast
183 * \param p_e an initialized exception pointer
185 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
188 * Stop the named broadcast.
190 * \param p_instance the instance
191 * \param psz_name the name of the broadcast
192 * \param p_e an initialized exception pointer
194 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
197 * Pause the named broadcast.
199 * \param p_instance the instance
200 * \param psz_name the name of the broadcast
201 * \param p_e an initialized exception pointer
203 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
206 * Seek in the named broadcast.
208 * \param p_instance the instance
209 * \param psz_name the name of the broadcast
210 * \param f_percentage the percentage to seek to
211 * \param p_e an initialized exception pointer
213 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
214 float, libvlc_exception_t * );
217 * Return information about the named broadcast.
218 * \bug will always return NULL
219 * \param p_instance the instance
220 * \param psz_name the name of the broadcast
221 * \param p_e an initialized exception pointer
222 * \return string with information about named media
224 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
227 * Get vlm_media instance position by name or instance id
229 * \param p_instance a libvlc instance
230 * \param psz_name name of vlm media instance
231 * \param i_instance instance id
232 * \param p_e an initialized exception pointer
233 * \return position as float
235 VLC_PUBLIC_API float libvlc_vlm_get_media_instance_position( libvlc_instance_t *p_instance,
236 char *psz_name, int i_instance, libvlc_exception_t *p_e );
239 * Get vlm_media instance time by name or instance id
241 * \param p_instance a libvlc instance
242 * \param psz_name name of vlm media instance
243 * \param i_instance instance id
244 * \param p_e an initialized exception pointer
245 * \return time as integer
247 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_time( libvlc_instance_t *p_instance,
248 char *psz_name, int i_instance, libvlc_exception_t *p_e );
251 * Get vlm_media instance length by name or instance id
253 * \param p_instance a libvlc instance
254 * \param psz_name name of vlm media instance
255 * \param i_instance instance id
256 * \param p_e an initialized exception pointer
257 * \return length of media item
259 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_length( libvlc_instance_t *p_instance,
260 char *psz_name, int i_instance, libvlc_exception_t *p_e );
263 * Get vlm_media instance playback rate by name or instance id
265 * \param p_instance a libvlc instance
266 * \param psz_name name of vlm media instance
267 * \param i_instance instance id
268 * \param p_e an initialized exception pointer
269 * \return playback rate
271 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_rate( libvlc_instance_t *p_instance,
272 char *psz_name, int i_instance, libvlc_exception_t *p_e );
275 * Get vlm_media instance title number by name or instance id
276 * \bug will always return 0
277 * \param p_instance a libvlc instance
278 * \param psz_name name of vlm media instance
279 * \param i_instance instance id
280 * \param p_e an initialized exception pointer
281 * \return title as number
283 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_title( libvlc_instance_t *p_instance,
284 char *psz_name, int i_instance, libvlc_exception_t *p_e );
287 * Get vlm_media instance chapter number by name or instance id
288 * \bug will always return 0
289 * \param p_instance a libvlc instance
290 * \param psz_name name of vlm media instance
291 * \param i_instance instance id
292 * \param p_e an initialized exception pointer
293 * \return chapter as number
295 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_chapter( libvlc_instance_t *p_instance,
296 char *psz_name, int i_instance, libvlc_exception_t *p_e );
299 * Is libvlc instance seekable ?
300 * \bug will always return 0
301 * \param p_instance a libvlc instance
302 * \param psz_name name of vlm media instance
303 * \param i_instance instance id
304 * \param p_e an initialized exception pointer
305 * \return 1 if seekable, 0 if not
307 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_seekable( libvlc_instance_t *p_instance,
308 char *psz_name, int i_instance, libvlc_exception_t *p_e );
316 #endif /* <vlc/libvlc_vlm.h> */