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 * Delete a media (VOD or broadcast).
69 * \param p_instance the instance
70 * \param psz_name the media to delete
71 * \param p_e an initialized exception pointer
73 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
76 * Enable or disable a media (VOD or broadcast).
78 * \param p_instance the instance
79 * \param psz_name the media to work on
80 * \param b_enabled the new status
81 * \param p_e an initialized exception pointer
83 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
84 libvlc_exception_t *);
87 * Set the output for a media.
89 * \param p_instance the instance
90 * \param psz_name the media to work on
91 * \param psz_output the output MRL (the parameter to the "sout" variable)
92 * \param p_e an initialized exception pointer
94 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
95 libvlc_exception_t *);
98 * Set a media's input MRL. This will delete all existing inputs and
99 * add the specified one.
101 * \param p_instance the instance
102 * \param psz_name the media to work on
103 * \param psz_input the input MRL
104 * \param p_e an initialized exception pointer
106 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
107 libvlc_exception_t *);
110 * Add a media's input MRL. This will add the specified one.
112 * \param p_instance the instance
113 * \param psz_name the media to work on
114 * \param psz_input the input MRL
115 * \param p_e an initialized exception pointer
117 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
118 libvlc_exception_t *p_exception );
120 * Set a media's loop status.
122 * \param p_instance the instance
123 * \param psz_name the media to work on
124 * \param b_loop the new status
125 * \param p_e an initialized exception pointer
127 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
128 libvlc_exception_t *);
131 * Edit the parameters of a media. This will delete all existing inputs and
132 * add the specified one.
134 * \param p_instance the instance
135 * \param psz_name the name of the new broadcast
136 * \param psz_input the input MRL
137 * \param psz_output the output MRL (the parameter to the "sout" variable)
138 * \param i_options number of additional options
139 * \param ppsz_options additional options
140 * \param b_enabled boolean for enabling the new broadcast
141 * \param b_loop Should this broadcast be played in loop ?
142 * \param p_e an initialized exception pointer
144 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
145 int, char **, int, int, libvlc_exception_t * );
148 * Play the named broadcast.
150 * \param p_instance the instance
151 * \param psz_name the name of the broadcast
152 * \param p_e an initialized exception pointer
154 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
157 * Stop the named broadcast.
159 * \param p_instance the instance
160 * \param psz_name the name of the broadcast
161 * \param p_e an initialized exception pointer
163 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
166 * Pause the named broadcast.
168 * \param p_instance the instance
169 * \param psz_name the name of the broadcast
170 * \param p_e an initialized exception pointer
172 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
175 * Seek in the named broadcast.
177 * \param p_instance the instance
178 * \param psz_name the name of the broadcast
179 * \param f_percentage the percentage to seek to
180 * \param p_e an initialized exception pointer
182 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
183 float, libvlc_exception_t * );
186 * Return information about the named broadcast.
188 * \param p_instance the instance
189 * \param psz_name the name of the broadcast
190 * \param p_e an initialized exception pointer
192 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
194 #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
195 returnType libvlc_vlm_get_media_instance_## attr( libvlc_instance_t *, \
196 char *, int , libvlc_exception_t * );
198 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
199 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
200 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
201 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
202 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
203 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
204 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
206 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
214 #endif /* <vlc/libvlc.h> */