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
42 * Add a broadcast, with one input.
44 * \param p_instance the instance
45 * \param psz_name the name of the new broadcast
46 * \param psz_input the input MRL
47 * \param psz_output the output MRL (the parameter to the "sout" variable)
48 * \param i_options number of additional options
49 * \param ppsz_options additional options
50 * \param b_enabled boolean for enabling the new broadcast
51 * \param b_loop Should this broadcast be played in loop ?
52 * \param p_e an initialized exception pointer
54 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
55 int, char **, int, int, libvlc_exception_t * );
58 * Delete a media (VOD or broadcast).
60 * \param p_instance the instance
61 * \param psz_name the media to delete
62 * \param p_e an initialized exception pointer
64 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
67 * Enable or disable a media (VOD or broadcast).
69 * \param p_instance the instance
70 * \param psz_name the media to work on
71 * \param b_enabled the new status
72 * \param p_e an initialized exception pointer
74 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
75 libvlc_exception_t *);
78 * Set the output for a media.
80 * \param p_instance the instance
81 * \param psz_name the media to work on
82 * \param psz_output the output MRL (the parameter to the "sout" variable)
83 * \param p_e an initialized exception pointer
85 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
86 libvlc_exception_t *);
89 * Set a media's input MRL. This will delete all existing inputs and
90 * add the specified one.
92 * \param p_instance the instance
93 * \param psz_name the media to work on
94 * \param psz_input the input MRL
95 * \param p_e an initialized exception pointer
97 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
98 libvlc_exception_t *);
101 * Add a media's input MRL. This will add the specified one.
103 * \param p_instance the instance
104 * \param psz_name the media to work on
105 * \param psz_input the input MRL
106 * \param p_e an initialized exception pointer
108 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
109 libvlc_exception_t *p_exception );
111 * Set a media's loop status.
113 * \param p_instance the instance
114 * \param psz_name the media to work on
115 * \param b_loop the new status
116 * \param p_e an initialized exception pointer
118 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
119 libvlc_exception_t *);
122 * Edit the parameters of a media. This will delete all existing inputs and
123 * add the specified one.
125 * \param p_instance the instance
126 * \param psz_name the name of the new broadcast
127 * \param psz_input the input MRL
128 * \param psz_output the output MRL (the parameter to the "sout" variable)
129 * \param i_options number of additional options
130 * \param ppsz_options additional options
131 * \param b_enabled boolean for enabling the new broadcast
132 * \param b_loop Should this broadcast be played in loop ?
133 * \param p_e an initialized exception pointer
135 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
136 int, char **, int, int, libvlc_exception_t * );
139 * Play the named broadcast.
141 * \param p_instance the instance
142 * \param psz_name the name of the broadcast
143 * \param p_e an initialized exception pointer
145 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
148 * Stop 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_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
157 * Pause 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_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
166 * Seek in the named broadcast.
168 * \param p_instance the instance
169 * \param psz_name the name of the broadcast
170 * \param f_percentage the percentage to seek to
171 * \param p_e an initialized exception pointer
173 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
174 float, libvlc_exception_t * );
177 * Return information about the named broadcast.
179 * \param p_instance the instance
180 * \param psz_name the name of the broadcast
181 * \param p_e an initialized exception pointer
183 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
185 #define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
186 returnType libvlc_vlm_get_media_instance_## attr( libvlc_instance_t *, \
187 char *, int , libvlc_exception_t * );
189 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
190 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
191 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
192 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
193 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
194 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
195 VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
197 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
205 #endif /* <vlc/libvlc.h> */