]> git.sesse.net Git - vlc/blob - include/vlc/libvlc_vlm.h
Headers: use non-reserved identifiers for multi-inclusion protection
[vlc] / include / vlc / libvlc_vlm.h
1 /*****************************************************************************
2  * libvlc_vlm.h:  libvlc_* new external API
3  *****************************************************************************
4  * Copyright (C) 1998-2005 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 # ifdef __cplusplus
29 extern "C" {
30 # endif
31
32 /*****************************************************************************
33  * VLM
34  *****************************************************************************/
35 /** \defgroup libvlc_vlm libvlc_vlm
36  * \ingroup libvlc
37  * LibVLC VLM
38  * @{
39  */
40
41
42 /**
43  * Release the vlm instance related to the given libvlc_instance_t
44  *
45  * \param p_instance the instance
46  * \param p_e an initialized exception pointer
47  */
48 VLC_PUBLIC_API void libvlc_vlm_release( libvlc_instance_t *, libvlc_exception_t * );
49
50 /**
51  * Add a broadcast, with one input.
52  *
53  * \param p_instance the instance
54  * \param psz_name the name of the new broadcast
55  * \param psz_input the input MRL
56  * \param psz_output the output MRL (the parameter to the "sout" variable)
57  * \param i_options number of additional options
58  * \param ppsz_options additional options
59  * \param b_enabled boolean for enabling the new broadcast
60  * \param b_loop Should this broadcast be played in loop ?
61  * \param p_e an initialized exception pointer
62  */
63 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
64                                               int, char **, int, int, libvlc_exception_t * );
65
66 /**
67  * Add a vod, with one input.
68  *
69  * \param p_instance the instance
70  * \param psz_name the name of the new vod media
71  * \param psz_input the input MRL
72  * \param i_options number of additional options
73  * \param ppsz_options additional options
74  * \param b_enabled boolean for enabling the new vod
75  * \param psz_mux the muxer of the vod media
76  * \param p_e an initialized exception pointer
77  */
78 VLC_PUBLIC_API void libvlc_vlm_add_vod( libvlc_instance_t *, char *, char *, int, char **,
79                                         int, char *, libvlc_exception_t * );
80
81 /**
82  * Delete a media (VOD or broadcast).
83  *
84  * \param p_instance the instance
85  * \param psz_name the media to delete
86  * \param p_e an initialized exception pointer
87  */
88 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
89
90 /**
91  * Enable or disable a media (VOD or broadcast).
92  *
93  * \param p_instance the instance
94  * \param psz_name the media to work on
95  * \param b_enabled the new status
96  * \param p_e an initialized exception pointer
97  */
98 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
99                                             libvlc_exception_t *);
100
101 /**
102  * Set the output for a media.
103  *
104  * \param p_instance the instance
105  * \param psz_name the media to work on
106  * \param psz_output the output MRL (the parameter to the "sout" variable)
107  * \param p_e an initialized exception pointer
108  */
109 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
110                                            libvlc_exception_t *);
111
112 /**
113  * Set a media's input MRL. This will delete all existing inputs and
114  * add the specified one.
115  *
116  * \param p_instance the instance
117  * \param psz_name the media to work on
118  * \param psz_input the input MRL
119  * \param p_e an initialized exception pointer
120  */
121 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
122                                           libvlc_exception_t *);
123
124 /**
125  * Add a media's input MRL. This will add the specified one.
126  *
127  * \param p_instance the instance
128  * \param psz_name the media to work on
129  * \param psz_input the input MRL
130  * \param p_e an initialized exception pointer
131  */
132 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
133                                           libvlc_exception_t *p_exception );
134 /**
135  * Set a media's loop status.
136  *
137  * \param p_instance the instance
138  * \param psz_name the media to work on
139  * \param b_loop the new status
140  * \param p_e an initialized exception pointer
141  */
142 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
143                                          libvlc_exception_t *);
144
145 /**
146  * Set a media's vod muxer.
147  *
148  * \param p_instance the instance
149  * \param psz_name the media to work on
150  * \param psz_mux the new muxer
151  * \param p_e an initialized exception pointer
152  */
153 VLC_PUBLIC_API void libvlc_vlm_set_mux( libvlc_instance_t *p_instance, char *psz_name,
154                                         char *psz_mux, libvlc_exception_t *p_exception );
155
156 /**
157  * Edit the parameters of a media. This will delete all existing inputs and
158  * add the specified one.
159  *
160  * \param p_instance the instance
161  * \param psz_name the name of the new broadcast
162  * \param psz_input the input MRL
163  * \param psz_output the output MRL (the parameter to the "sout" variable)
164  * \param i_options number of additional options
165  * \param ppsz_options additional options
166  * \param b_enabled boolean for enabling the new broadcast
167  * \param b_loop Should this broadcast be played in loop ?
168  * \param p_e an initialized exception pointer
169  */
170 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
171                                              int, char **, int, int, libvlc_exception_t * );
172
173 /**
174  * Play the named broadcast.
175  *
176  * \param p_instance the instance
177  * \param psz_name the name of the broadcast
178  * \param p_e an initialized exception pointer
179  */
180 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
181
182 /**
183  * Stop the named broadcast.
184  *
185  * \param p_instance the instance
186  * \param psz_name the name of the broadcast
187  * \param p_e an initialized exception pointer
188  */
189 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
190
191 /**
192  * Pause the named broadcast.
193  *
194  * \param p_instance the instance
195  * \param psz_name the name of the broadcast
196  * \param p_e an initialized exception pointer
197  */
198 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
199
200 /**
201  * Seek in the named broadcast.
202  *
203  * \param p_instance the instance
204  * \param psz_name the name of the broadcast
205  * \param f_percentage the percentage to seek to
206  * \param p_e an initialized exception pointer
207  */
208 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
209                                            float, libvlc_exception_t * );
210
211 /**
212  * Return information about the named broadcast.
213  *
214  * \param p_instance the instance
215  * \param psz_name the name of the broadcast
216  * \param p_e an initialized exception pointer
217  * \return string with information about named media
218  */
219 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
220
221 /**
222  * Get information about media attribute from vlm.
223  *
224  * \param libvlc instance
225  * \param type of information
226  * \param default value
227  * \return value of media attribute
228  */
229 #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
230 returnType libvlc_vlm_get_media_instance_## attr( libvlc_instance_t *, \
231                         char *, int , libvlc_exception_t * );
232
233 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
234 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
235 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
236 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
237 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
238 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
239 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
240
241 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
242
243 /** @} */
244
245 # ifdef __cplusplus
246 }
247 # endif
248
249 #endif /* <vlc/libvlc_vlm.h> */