]> git.sesse.net Git - vlc/blob - include/vlc/libvlc_vlm.h
80ca9ff8bea600f90d8b8cc7d8ec609c247de6dd
[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  * Add a broadcast, with one input.
43  *
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
53  */
54 VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
55                                               int, char **, int, int, libvlc_exception_t * );
56
57 /**
58  * Delete a media (VOD or broadcast).
59  *
60  * \param p_instance the instance
61  * \param psz_name the media to delete
62  * \param p_e an initialized exception pointer
63  */
64 VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
65
66 /**
67  * Enable or disable a media (VOD or broadcast).
68  *
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
73  */
74 VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
75                                             libvlc_exception_t *);
76
77 /**
78  * Set the output for a media.
79  *
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
84  */
85 VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
86                                            libvlc_exception_t *);
87
88 /**
89  * Set a media's input MRL. This will delete all existing inputs and
90  * add the specified one.
91  *
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
96  */
97 VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
98                                           libvlc_exception_t *);
99
100 /**
101  * Add a media's input MRL. This will add the specified one.
102  *
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
107  */
108 VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
109                                           libvlc_exception_t *p_exception );
110 /**
111  * Set a media's loop status.
112  *
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
117  */
118 VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
119                                          libvlc_exception_t *);
120
121 /**
122  * Edit the parameters of a media. This will delete all existing inputs and
123  * add the specified one.
124  *
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
134  */
135 VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
136                                              int, char **, int, int, libvlc_exception_t * );
137
138 /**
139  * Play the named broadcast.
140  *
141  * \param p_instance the instance
142  * \param psz_name the name of the broadcast
143  * \param p_e an initialized exception pointer
144  */
145 VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
146
147 /**
148  * Stop 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_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
155
156 /**
157  * Pause 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_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
164
165 /**
166  * Seek in the named broadcast.
167  *
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
172  */
173 VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
174                                            float, libvlc_exception_t * );
175
176 /**
177  * Return information about the named broadcast.
178  *
179  * \param p_instance the instance
180  * \param psz_name the name of the broadcast
181  * \param p_e an initialized exception pointer
182  */
183 VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
184
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 * );
188
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);
196
197 #undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
198
199 /** @} */
200
201 # ifdef __cplusplus
202 }
203 # endif
204
205 #endif /* <vlc/libvlc.h> */