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 *,
69 const char *, const char *,
73 libvlc_exception_t * );
76 * Add a vod, with one input.
78 * \param p_instance the instance
79 * \param psz_name the name of the new vod media
80 * \param psz_input the input MRL
81 * \param i_options number of additional options
82 * \param ppsz_options additional options
83 * \param b_enabled boolean for enabling the new vod
84 * \param psz_mux the muxer of the vod media
85 * \param p_e an initialized exception pointer
87 VLC_PUBLIC_API void libvlc_vlm_add_vod( libvlc_instance_t *,
88 const char *, const char *,
89 int, const char * const*,
91 libvlc_exception_t * );
94 * Delete a media (VOD or broadcast).
96 * \param p_instance the instance
97 * \param psz_name the media to delete
98 * \param p_e an initialized exception pointer
100 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *,
102 libvlc_exception_t * );
105 * Enable or disable a media (VOD or broadcast).
107 * \param p_instance the instance
108 * \param psz_name the media to work on
109 * \param b_enabled the new status
110 * \param p_e an initialized exception pointer
112 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, const char *,
113 int, libvlc_exception_t * );
116 * Set the output for a media.
118 * \param p_instance the instance
119 * \param psz_name the media to work on
120 * \param psz_output the output MRL (the parameter to the "sout" variable)
121 * \param p_e an initialized exception pointer
123 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, const char *,
125 libvlc_exception_t * );
128 * Set a media's input MRL. This will delete all existing inputs and
129 * add the specified one.
131 * \param p_instance the instance
132 * \param psz_name the media to work on
133 * \param psz_input the input MRL
134 * \param p_e an initialized exception pointer
136 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, const char *,
138 libvlc_exception_t * );
141 * Add a media's input MRL. This will add the specified one.
143 * \param p_instance the instance
144 * \param psz_name the media to work on
145 * \param psz_input the input MRL
146 * \param p_e an initialized exception pointer
148 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, const char *,
150 libvlc_exception_t * );
152 * Set a media's loop status.
154 * \param p_instance the instance
155 * \param psz_name the media to work on
156 * \param b_loop the new status
157 * \param p_e an initialized exception pointer
159 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, const char *,
160 int, libvlc_exception_t * );
163 * Set a media's vod muxer.
165 * \param p_instance the instance
166 * \param psz_name the media to work on
167 * \param psz_mux the new muxer
168 * \param p_e an initialized exception pointer
170 VLC_PUBLIC_API void libvlc_vlm_set_mux( libvlc_instance_t *, const char *,
171 const char *, libvlc_exception_t * );
174 * Edit the parameters of a media. This will delete all existing inputs and
175 * add the specified one.
177 * \param p_instance the instance
178 * \param psz_name the name of the new broadcast
179 * \param psz_input the input MRL
180 * \param psz_output the output MRL (the parameter to the "sout" variable)
181 * \param i_options number of additional options
182 * \param ppsz_options additional options
183 * \param b_enabled boolean for enabling the new broadcast
184 * \param b_loop Should this broadcast be played in loop ?
185 * \param p_e an initialized exception pointer
187 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *,
188 const char *, const char *,
190 const char * const *, int, int,
191 libvlc_exception_t * );
194 * Play the named broadcast.
196 * \param p_instance the instance
197 * \param psz_name the name of the broadcast
198 * \param p_e an initialized exception pointer
200 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, const char *,
201 libvlc_exception_t * );
204 * Stop the named broadcast.
206 * \param p_instance the instance
207 * \param psz_name the name of the broadcast
208 * \param p_e an initialized exception pointer
210 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, const char *,
211 libvlc_exception_t * );
214 * Pause the named broadcast.
216 * \param p_instance the instance
217 * \param psz_name the name of the broadcast
218 * \param p_e an initialized exception pointer
220 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, const char *,
221 libvlc_exception_t * );
224 * Seek in the named broadcast.
226 * \param p_instance the instance
227 * \param psz_name the name of the broadcast
228 * \param f_percentage the percentage to seek to
229 * \param p_e an initialized exception pointer
231 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, const char *,
232 float, libvlc_exception_t * );
235 * Return information about the named broadcast.
236 * \bug will always return NULL
237 * \param p_instance the instance
238 * \param psz_name the name of the broadcast
239 * \param p_e an initialized exception pointer
240 * \return string with information about named media
242 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, const char *,
243 libvlc_exception_t * );
246 * Get vlm_media instance position by name or instance id
248 * \param p_instance a libvlc instance
249 * \param psz_name name of vlm media instance
250 * \param i_instance instance id
251 * \param p_e an initialized exception pointer
252 * \return position as float
254 VLC_PUBLIC_API float libvlc_vlm_get_media_instance_position( libvlc_instance_t *,
256 libvlc_exception_t * );
259 * Get vlm_media instance time by name or instance id
261 * \param p_instance a libvlc instance
262 * \param psz_name name of vlm media instance
263 * \param i_instance instance id
264 * \param p_e an initialized exception pointer
265 * \return time as integer
267 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_time( libvlc_instance_t *,
269 libvlc_exception_t * );
272 * Get vlm_media instance length by name or instance id
274 * \param p_instance a libvlc instance
275 * \param psz_name name of vlm media instance
276 * \param i_instance instance id
277 * \param p_e an initialized exception pointer
278 * \return length of media item
280 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_length( libvlc_instance_t *,
282 libvlc_exception_t * );
285 * Get vlm_media instance playback rate by name or instance id
287 * \param p_instance a libvlc instance
288 * \param psz_name name of vlm media instance
289 * \param i_instance instance id
290 * \param p_e an initialized exception pointer
291 * \return playback rate
293 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_rate( libvlc_instance_t *,
295 libvlc_exception_t * );
298 * Get vlm_media instance title number by name or instance id
299 * \bug will always return 0
300 * \param p_instance a libvlc instance
301 * \param psz_name name of vlm media instance
302 * \param i_instance instance id
303 * \param p_e an initialized exception pointer
304 * \return title as number
306 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_title( libvlc_instance_t *,
308 libvlc_exception_t * );
311 * Get vlm_media instance chapter number by name or instance id
312 * \bug will always return 0
313 * \param p_instance a libvlc instance
314 * \param psz_name name of vlm media instance
315 * \param i_instance instance id
316 * \param p_e an initialized exception pointer
317 * \return chapter as number
319 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_chapter( libvlc_instance_t *,
321 libvlc_exception_t * );
324 * Is libvlc instance seekable ?
325 * \bug will always return 0
326 * \param p_instance a libvlc instance
327 * \param psz_name name of vlm media instance
328 * \param i_instance instance id
329 * \param p_e an initialized exception pointer
330 * \return 1 if seekable, 0 if not
332 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_seekable( libvlc_instance_t *,
334 libvlc_exception_t * );
337 * Get libvlc_event_manager from a vlm media.
338 * The p_event_manager is immutable, so you don't have to hold the lock
340 * \param p_instance a libvlc instance
341 * \param psz_name name of vlm media instance
342 * \param p_exception an initialized exception pointer
343 * \return libvlc_event_manager
345 VLC_PUBLIC_API libvlc_event_manager_t *
346 libvlc_vlm_get_event_manager( libvlc_instance_t *,
347 libvlc_exception_t * );
355 #endif /* <vlc/libvlc_vlm.h> */