]> git.sesse.net Git - vlc/blob - include/vlc/libvlc_vlm.h
libvlc_vlm_release added
[vlc] / include / vlc / libvlc_vlm.h
1 /*****************************************************************************
2  * libvlc_vlm.h:  libvlc_* new external API
3  *****************************************************************************
4  * Copyright (C) 1998-2005 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 # ifdef __cplusplus
29 extern "C" {
30 # endif
31
32 /*****************************************************************************
33  * VLM
34  *****************************************************************************/
35 /** \defgroup libvlc_vlm libvlc_vlm
36  * \ingroup libvlc
37  * LibVLC VLM
38  * @{
39  */
40
41     
42 /**
43  * Release the vlm instance related to the given libvlc_instance_t
44  *
45  * \param p_instance the instance
46  * \param p_e an initialized exception pointer
47  */
48 VLC_PUBLIC_API void libvlc_vlm_release( libvlc_instance_t *, libvlc_exception_t * );
49     
50 /**
51  * Add a broadcast, with one input.
52  *
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
62  */
63 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
64                                               int, char **, int, int, libvlc_exception_t * );
65
66 /**
67  * Delete a media (VOD or broadcast).
68  *
69  * \param p_instance the instance
70  * \param psz_name the media to delete
71  * \param p_e an initialized exception pointer
72  */
73 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
74
75 /**
76  * Enable or disable a media (VOD or broadcast).
77  *
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
82  */
83 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
84                                             libvlc_exception_t *);
85
86 /**
87  * Set the output for a media.
88  *
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
93  */
94 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
95                                            libvlc_exception_t *);
96
97 /**
98  * Set a media's input MRL. This will delete all existing inputs and
99  * add the specified one.
100  *
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
105  */
106 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
107                                           libvlc_exception_t *);
108
109 /**
110  * Add a media's input MRL. This will add the specified one.
111  *
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
116  */
117 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
118                                           libvlc_exception_t *p_exception );
119 /**
120  * Set a media's loop status.
121  *
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
126  */
127 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
128                                          libvlc_exception_t *);
129
130 /**
131  * Edit the parameters of a media. This will delete all existing inputs and
132  * add the specified one.
133  *
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
143  */
144 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
145                                              int, char **, int, int, libvlc_exception_t * );
146
147 /**
148  * Play the named broadcast.
149  *
150  * \param p_instance the instance
151  * \param psz_name the name of the broadcast
152  * \param p_e an initialized exception pointer
153  */
154 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
155
156 /**
157  * Stop the named broadcast.
158  *
159  * \param p_instance the instance
160  * \param psz_name the name of the broadcast
161  * \param p_e an initialized exception pointer
162  */
163 VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
164
165 /**
166  * Pause the named broadcast.
167  *
168  * \param p_instance the instance
169  * \param psz_name the name of the broadcast
170  * \param p_e an initialized exception pointer
171  */
172 VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
173
174 /**
175  * Seek in the named broadcast.
176  *
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
181  */
182 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
183                                            float, libvlc_exception_t * );
184
185 /**
186  * Return information about the named broadcast.
187  *
188  * \param p_instance the instance
189  * \param psz_name the name of the broadcast
190  * \param p_e an initialized exception pointer
191  */
192 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
193
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 * );
197
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);
205
206 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
207
208 /** @} */
209
210 # ifdef __cplusplus
211 }
212 # endif
213
214 #endif /* <vlc/libvlc.h> */