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 *, char *, char *, char* ,
69 int, char **, int, int, libvlc_exception_t * );
72 * Add a vod, with one input.
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
83 VLC_PUBLIC_API void libvlc_vlm_add_vod( libvlc_instance_t *, char *, char *, int, char **,
84 int, char *, libvlc_exception_t * );
87 * Delete a media (VOD or broadcast).
89 * \param p_instance the instance
90 * \param psz_name the media to delete
91 * \param p_e an initialized exception pointer
93 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
96 * Enable or disable a media (VOD or broadcast).
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
103 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
104 libvlc_exception_t *);
107 * Set the output for a media.
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
114 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
115 libvlc_exception_t *);
118 * Set a media's input MRL. This will delete all existing inputs and
119 * add the specified one.
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
126 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
127 libvlc_exception_t *);
130 * Add a media's input MRL. This will add the specified one.
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
137 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
138 libvlc_exception_t *p_exception );
140 * Set a media's loop status.
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
147 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
148 libvlc_exception_t *);
151 * Set a media's vod muxer.
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
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 );
162 * Edit the parameters of a media. This will delete all existing inputs and
163 * add the specified one.
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
175 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
176 int, char **, int, int, libvlc_exception_t * );
179 * Play the named broadcast.
181 * \param p_instance the instance
182 * \param psz_name the name of the broadcast
183 * \param p_e an initialized exception pointer
185 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
188 * Stop the named broadcast.
190 * \param p_instance the instance
191 * \param psz_name the name of the broadcast
192 * \param p_e an initialized exception pointer
194 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
197 * Pause the named broadcast.
199 * \param p_instance the instance
200 * \param psz_name the name of the broadcast
201 * \param p_e an initialized exception pointer
203 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
206 * Seek in the named broadcast.
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
213 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
214 float, libvlc_exception_t * );
217 * Return information about the named broadcast.
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
224 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
227 * Get information about media attribute from vlm.
229 * \param libvlc instance
230 * \param type of information
231 * \param default value
232 * \return value of media attribute
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 * );
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);
246 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
254 #endif /* <vlc/libvlc_vlm.h> */