]> git.sesse.net Git - vlc/blob - include/vlc/libvlc_vlm.h
LibVLC VLM: comment out unimplemented functions
[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  */
52 VLC_PUBLIC_API void libvlc_vlm_release( libvlc_instance_t * );
53
54 /**
55  * Add a broadcast, with one input.
56  *
57  * \param p_instance the instance
58  * \param psz_name the name of the new broadcast
59  * \param psz_input the input MRL
60  * \param psz_output the output MRL (the parameter to the "sout" variable)
61  * \param i_options number of additional options
62  * \param ppsz_options additional options
63  * \param b_enabled boolean for enabling the new broadcast
64  * \param b_loop Should this broadcast be played in loop ?
65  * \param p_e an initialized exception pointer
66  */
67 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *,
68                                               const char *, const char *,
69                                               const char * , int,
70                                               const char * const*,
71                                               int, int,
72                                               libvlc_exception_t * );
73
74 /**
75  * Add a vod, with one input.
76  *
77  * \param p_instance the instance
78  * \param psz_name the name of the new vod media
79  * \param psz_input the input MRL
80  * \param i_options number of additional options
81  * \param ppsz_options additional options
82  * \param b_enabled boolean for enabling the new vod
83  * \param psz_mux the muxer of the vod media
84  * \param p_e an initialized exception pointer
85  */
86 VLC_PUBLIC_API void libvlc_vlm_add_vod( libvlc_instance_t *,
87                                         const char *, const char *,
88                                         int, const char * const*,
89                                         int, const char *,
90                                         libvlc_exception_t * );
91
92 /**
93  * Delete a media (VOD or broadcast).
94  *
95  * \param p_instance the instance
96  * \param psz_name the media to delete
97  * \param p_e an initialized exception pointer
98  */
99 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *,
100                                           const char *,
101                                           libvlc_exception_t * );
102
103 /**
104  * Enable or disable a media (VOD or broadcast).
105  *
106  * \param p_instance the instance
107  * \param psz_name the media to work on
108  * \param b_enabled the new status
109  * \param p_e an initialized exception pointer
110  */
111 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, const char *,
112                                             int, libvlc_exception_t * );
113
114 /**
115  * Set the output for a media.
116  *
117  * \param p_instance the instance
118  * \param psz_name the media to work on
119  * \param psz_output the output MRL (the parameter to the "sout" variable)
120  * \param p_e an initialized exception pointer
121  */
122 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, const char *,
123                                            const char *,
124                                            libvlc_exception_t * );
125
126 /**
127  * Set a media's input MRL. This will delete all existing inputs and
128  * add the specified one.
129  *
130  * \param p_instance the instance
131  * \param psz_name the media to work on
132  * \param psz_input the input MRL
133  * \param p_e an initialized exception pointer
134  */
135 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, const char *,
136                                           const char *,
137                                           libvlc_exception_t * );
138
139 /**
140  * Add a media's input MRL. This will add the specified one.
141  *
142  * \param p_instance the instance
143  * \param psz_name the media to work on
144  * \param psz_input the input MRL
145  * \param p_e an initialized exception pointer
146  */
147 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, const char *,
148                                           const char *,
149                                           libvlc_exception_t * );
150 /**
151  * Set a media's loop status.
152  *
153  * \param p_instance the instance
154  * \param psz_name the media to work on
155  * \param b_loop the new status
156  * \param p_e an initialized exception pointer
157  */
158 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, const char *,
159                                          int, libvlc_exception_t * );
160
161 /**
162  * Set a media's vod muxer.
163  *
164  * \param p_instance the instance
165  * \param psz_name the media to work on
166  * \param psz_mux the new muxer
167  * \param p_e an initialized exception pointer
168  */
169 VLC_PUBLIC_API void libvlc_vlm_set_mux( libvlc_instance_t *, const char *,
170                                         const char *, libvlc_exception_t * );
171
172 /**
173  * Edit the parameters of a media. This will delete all existing inputs and
174  * add the specified one.
175  *
176  * \param p_instance the instance
177  * \param psz_name the name of the new broadcast
178  * \param psz_input the input MRL
179  * \param psz_output the output MRL (the parameter to the "sout" variable)
180  * \param i_options number of additional options
181  * \param ppsz_options additional options
182  * \param b_enabled boolean for enabling the new broadcast
183  * \param b_loop Should this broadcast be played in loop ?
184  * \param p_e an initialized exception pointer
185  */
186 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *,
187                                              const char *, const char *,
188                                              const char* , int,
189                                              const char * const *, int, int,
190                                              libvlc_exception_t * );
191
192 /**
193  * Play the named broadcast.
194  *
195  * \param p_instance the instance
196  * \param psz_name the name of the broadcast
197  * \param p_e an initialized exception pointer
198  */
199 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, const char *,
200                                             libvlc_exception_t * );
201
202 /**
203  * Stop the named broadcast.
204  *
205  * \param p_instance the instance
206  * \param psz_name the name of the broadcast
207  * \param p_e an initialized exception pointer
208  */
209 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, const char *,
210                                             libvlc_exception_t * );
211
212 /**
213  * Pause the named broadcast.
214  *
215  * \param p_instance the instance
216  * \param psz_name the name of the broadcast
217  * \param p_e an initialized exception pointer
218  */
219 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, const char *,
220                                             libvlc_exception_t * );
221
222 /**
223  * Seek in the named broadcast.
224  *
225  * \param p_instance the instance
226  * \param psz_name the name of the broadcast
227  * \param f_percentage the percentage to seek to
228  * \param p_e an initialized exception pointer
229  */
230 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, const char *,
231                                            float, libvlc_exception_t * );
232
233 /**
234  * Return information about the named media as a JSON
235  * string representation.
236  *
237  * This function is mainly intended for debugging use,
238  * if you want programmatic access to the state of
239  * a vlm_media_instance_t, please use the corresponding
240  * libvlc_vlm_get_media_instance_xxx -functions.
241  * Currently there are no such functions available for
242  * vlm_media_t though.
243  *
244  * \param p_instance the instance
245  * \param psz_name the name of the media,
246  *      if the name is an empty string, all media is described
247  * \param p_e an initialized exception pointer
248  * \return string with information about named media
249  */
250 VLC_PUBLIC_API const char* libvlc_vlm_show_media( libvlc_instance_t *, const char *,
251                                             libvlc_exception_t * );
252
253 /**
254  * Get vlm_media instance position by name or instance id
255  *
256  * \param p_instance a libvlc instance
257  * \param psz_name name of vlm media instance
258  * \param i_instance instance id
259  * \return position as float or -1. on error
260  */
261 VLC_PUBLIC_API float libvlc_vlm_get_media_instance_position( libvlc_instance_t *,
262                                                              const char *, int );
263
264 /**
265  * Get vlm_media instance time by name or instance id
266  *
267  * \param p_instance a libvlc instance
268  * \param psz_name name of vlm media instance
269  * \param i_instance instance id
270  * \return time as integer or -1 on error
271  */
272 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_time( libvlc_instance_t *,
273                                                        const char *, int );
274
275 /**
276  * Get vlm_media instance length by name or instance id
277  *
278  * \param p_instance a libvlc instance
279  * \param psz_name name of vlm media instance
280  * \param i_instance instance id
281  * \return length of media item or -1 on error
282  */
283 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_length( libvlc_instance_t *,
284                                                          const char *, int );
285
286 /**
287  * Get vlm_media instance playback rate by name or instance id
288  *
289  * \param p_instance a libvlc instance
290  * \param psz_name name of vlm media instance
291  * \param i_instance instance id
292  * \return playback rate or -1 on error
293  */
294 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_rate( libvlc_instance_t *,
295                                                        const char *, int );
296 #if 0
297 /**
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  * \return title as number or -1 on error
304  */
305 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_title( libvlc_instance_t *,
306                                                         const char *, int );
307
308 /**
309  * Get vlm_media instance chapter number by name or instance id
310  * \bug will always return 0
311  * \param p_instance a libvlc instance
312  * \param psz_name name of vlm media instance
313  * \param i_instance instance id
314  * \return chapter as number or -1 on error
315  */
316 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_chapter( libvlc_instance_t *,
317                                                           const char *, int );
318
319 /**
320  * Is libvlc instance seekable ?
321  * \bug will always return 0
322  * \param p_instance a libvlc instance
323  * \param psz_name name of vlm media instance
324  * \param i_instance instance id
325  * \return 1 if seekable, 0 if not, -1 if media does not exist
326  */
327 VLC_PUBLIC_API int libvlc_vlm_get_media_instance_seekable( libvlc_instance_t *,
328                                                            const char *, int );
329 #endif
330 /**
331  * Get libvlc_event_manager from a vlm media.
332  * The p_event_manager is immutable, so you don't have to hold the lock
333  *
334  * \param p_instance a libvlc instance
335  * \return libvlc_event_manager
336  */
337 VLC_PUBLIC_API libvlc_event_manager_t *
338     libvlc_vlm_get_event_manager( libvlc_instance_t * );
339
340 /** @} */
341
342 # ifdef __cplusplus
343 }
344 # endif
345
346 #endif /* <vlc/libvlc_vlm.h> */