1 /*****************************************************************************
2 * libvlc_vlm.h: libvlc_* new external API
3 *****************************************************************************
4 * Copyright (C) 1998-2005 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
32 /*****************************************************************************
34 *****************************************************************************/
35 /** \defgroup libvlc_vlm libvlc_vlm
43 * Release the vlm instance related to the given libvlc_instance_t
45 * \param p_instance the instance
46 * \param p_e an initialized exception pointer
48 VLC_PUBLIC_API void libvlc_vlm_release( libvlc_instance_t *, libvlc_exception_t * );
51 * Add a broadcast, with one input.
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
63 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
64 int, char **, int, int, libvlc_exception_t * );
67 * Add a vod, with one input.
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
78 VLC_PUBLIC_API void libvlc_vlm_add_vod( libvlc_instance_t *, char *, char *, int, char **,
79 int, char *, libvlc_exception_t * );
82 * Delete a media (VOD or broadcast).
84 * \param p_instance the instance
85 * \param psz_name the media to delete
86 * \param p_e an initialized exception pointer
88 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
91 * Enable or disable a media (VOD or broadcast).
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
98 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
99 libvlc_exception_t *);
102 * Set the output for a media.
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
109 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
110 libvlc_exception_t *);
113 * Set a media's input MRL. This will delete all existing inputs and
114 * add the specified one.
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
121 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
122 libvlc_exception_t *);
125 * Add a media's input MRL. This will add the specified one.
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
132 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
133 libvlc_exception_t *p_exception );
135 * Set a media's loop status.
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
142 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
143 libvlc_exception_t *);
146 * Set a media's vod muxer.
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
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 );
157 * Edit the parameters of a media. This will delete all existing inputs and
158 * add the specified one.
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
170 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
171 int, char **, int, int, libvlc_exception_t * );
174 * Play the named broadcast.
176 * \param p_instance the instance
177 * \param psz_name the name of the broadcast
178 * \param p_e an initialized exception pointer
180 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
183 * Stop the named broadcast.
185 * \param p_instance the instance
186 * \param psz_name the name of the broadcast
187 * \param p_e an initialized exception pointer
189 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
192 * Pause the named broadcast.
194 * \param p_instance the instance
195 * \param psz_name the name of the broadcast
196 * \param p_e an initialized exception pointer
198 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
201 * Seek in the named broadcast.
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
208 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
209 float, libvlc_exception_t * );
212 * Return information about the named broadcast.
214 * \param p_instance the instance
215 * \param psz_name the name of the broadcast
216 * \param p_e an initialized exception pointer
218 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
220 #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
221 returnType libvlc_vlm_get_media_instance_## attr( libvlc_instance_t *, \
222 char *, int , libvlc_exception_t * );
224 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
225 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
226 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
227 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
228 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
229 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
230 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
232 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
240 #endif /* <vlc/libvlc.h> */