]> git.sesse.net Git - vlc/blob - include/vlc/libvlc_vlm.h
Document more VLM API's and expand define.
[vlc] / include / vlc / libvlc_vlm.h
1 /*****************************************************************************
2  * libvlc_vlm.h:  libvlc_* new external API
3  *****************************************************************************
4  * Copyright (C) 1998-2008 the VideoLAN team
5  * $Id$
6  *
7  * Authors: ClĂ©ment Stenac <zorglub@videolan.org>
8  *          Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
9  *
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.
14  *
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.
19  *
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  *****************************************************************************/
24
25 #ifndef LIBVLC_VLM_H
26 #define LIBVLC_VLM_H 1
27
28 /**
29  * \file
30  * This file defines libvlc_vlm_* external API
31  */
32
33 # ifdef __cplusplus
34 extern "C" {
35 # endif
36
37 /*****************************************************************************
38  * VLM
39  *****************************************************************************/
40 /** \defgroup libvlc_vlm libvlc_vlm
41  * \ingroup libvlc
42  * LibVLC VLM
43  * @{
44  */
45
46
47 /**
48  * Release the vlm instance related to the given libvlc_instance_t
49  *
50  * \param p_instance the instance
51  * \param p_e an initialized exception pointer
52  */
53 VLC_PUBLIC_API void libvlc_vlm_release( libvlc_instance_t *, libvlc_exception_t * );
54
55 /**
56  * Add a broadcast, with one input.
57  *
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
67  */
68 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
69                                               int, char **, int, int, libvlc_exception_t * );
70
71 /**
72  * Add a vod, with one input.
73  *
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
82  */
83 VLC_PUBLIC_API void libvlc_vlm_add_vod( libvlc_instance_t *, char *, char *, int, char **,
84                                         int, char *, libvlc_exception_t * );
85
86 /**
87  * Delete a media (VOD or broadcast).
88  *
89  * \param p_instance the instance
90  * \param psz_name the media to delete
91  * \param p_e an initialized exception pointer
92  */
93 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
94
95 /**
96  * Enable or disable a media (VOD or broadcast).
97  *
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
102  */
103 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
104                                             libvlc_exception_t *);
105
106 /**
107  * Set the output for a media.
108  *
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
113  */
114 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
115                                            libvlc_exception_t *);
116
117 /**
118  * Set a media's input MRL. This will delete all existing inputs and
119  * add the specified one.
120  *
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
125  */
126 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
127                                           libvlc_exception_t *);
128
129 /**
130  * Add a media's input MRL. This will add the specified one.
131  *
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
136  */
137 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
138                                           libvlc_exception_t *p_exception );
139 /**
140  * Set a media's loop status.
141  *
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
146  */
147 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
148                                          libvlc_exception_t *);
149
150 /**
151  * Set a media's vod muxer.
152  *
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
157  */
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 );
160
161 /**
162  * Edit the parameters of a media. This will delete all existing inputs and
163  * add the specified one.
164  *
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
174  */
175 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
176                                              int, char **, int, int, libvlc_exception_t * );
177
178 /**
179  * Play the named broadcast.
180  *
181  * \param p_instance the instance
182  * \param psz_name the name of the broadcast
183  * \param p_e an initialized exception pointer
184  */
185 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
186
187 /**
188  * Stop the named broadcast.
189  *
190  * \param p_instance the instance
191  * \param psz_name the name of the broadcast
192  * \param p_e an initialized exception pointer
193  */
194 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
195
196 /**
197  * Pause the named broadcast.
198  *
199  * \param p_instance the instance
200  * \param psz_name the name of the broadcast
201  * \param p_e an initialized exception pointer
202  */
203 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
204
205 /**
206  * Seek in the named broadcast.
207  *
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
212  */
213 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
214                                            float, libvlc_exception_t * );
215
216 /**
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
223  */
224 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
225
226 /**
227  * Get vlm_media instance position by name or instance id
228  *
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
234  */
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 );
237
238 /**
239  * Get vlm_media instance time by name or instance id
240  *
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
246  */
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 );
249
250 /**
251  * Get vlm_media instance length by name or instance id
252  *
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
258  */
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 );
261
262 /**
263  * Get vlm_media instance playback rate by name or instance id
264  *
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
270  */
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 );
273
274 /**
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
282  */
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 );
285
286 /**
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
294  */
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 );
297
298 /**
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
306  */
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 );
309
310 /** @} */
311
312 # ifdef __cplusplus
313 }
314 # endif
315
316 #endif /* <vlc/libvlc_vlm.h> */