]> git.sesse.net Git - vlc/blob - include/vlc/libvlc_vlm.h
Add another bunch of doxygen file comments.
[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  *
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 information about media attribute from vlm.
228  *
229  * \param libvlc instance
230  * \param type of information
231  * \param default value
232  * \return value of media attribute
233  */
234 #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
235 returnType libvlc_vlm_get_media_instance_## attr( libvlc_instance_t *, \
236                         char *, int , libvlc_exception_t * );
237
238 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
239 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
240 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
241 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
242 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
243 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
244 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
245
246 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
247
248 /** @} */
249
250 # ifdef __cplusplus
251 }
252 # endif
253
254 #endif /* <vlc/libvlc_vlm.h> */