1 /*****************************************************************************
2 * deprecated.h: libvlc deprecated API
3 *****************************************************************************
4 * Copyright (C) 1998-2008 the VideoLAN team
7 * Authors: Clément Stenac <zorglub@videolan.org>
8 * Jean-Paul Saman <jpsaman@videolan.org>
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 *****************************************************************************/
25 #ifndef LIBVLC_DEPRECATED_H
26 #define LIBVLC_DEPRECATED_H 1
30 * This file defines libvlc depreceated API
34 * This is the legacy representation of a platform-specific drawable. Because
35 * it cannot accomodate a pointer on most 64-bits platforms, it should not be
38 typedef int libvlc_drawable_t;
45 * Set the drawable where the media player should render its video output.
47 * On Windows 32-bits, a window handle (HWND) is expected.
48 * On Windows 64-bits, this function will always fail.
50 * On OSX 32-bits, a CGrafPort is expected.
51 * On OSX 64-bits, this function will always fail.
53 * On other platforms, an existing X11 window ID is expected. See
54 * libvlc_media_player_set_xid() for details.
56 * \param p_mi the Media Player
57 * \param drawable the libvlc_drawable_t where the media player
58 * should render its video
59 * \param p_e an initialized exception pointer
61 VLC_PUBLIC_API void libvlc_media_player_set_drawable ( libvlc_media_player_t *, libvlc_drawable_t, libvlc_exception_t * );
64 * Get the drawable where the media player should render its video output
66 * \param p_mi the Media Player
67 * \param p_e an initialized exception pointer
68 * \return the libvlc_drawable_t where the media player
69 * should render its video
71 VLC_PUBLIC_API libvlc_drawable_t
72 libvlc_media_player_get_drawable ( libvlc_media_player_t *, libvlc_exception_t * );
75 * Set the default video output's parent.
77 * This setting will be used as default for any video output.
79 * \param p_instance libvlc instance
80 * \param drawable the new parent window
81 * (see libvlc_media_player_set_drawable() for details)
82 * \param p_e an initialized exception pointer
83 * @deprecated Use libvlc_media_player_set_drawable
85 VLC_PUBLIC_API void libvlc_video_set_parent( libvlc_instance_t *, libvlc_drawable_t, libvlc_exception_t * );
88 * Set the default video output parent.
90 * This setting will be used as default for all video outputs.
92 * \param p_instance libvlc instance
93 * \param drawable the new parent window (Drawable on X11, CGrafPort on MacOSX, HWND on Win32)
94 * \param p_e an initialized exception pointer
95 * @deprecated Use libvlc_media_player_get_drawable
97 VLC_PUBLIC_API libvlc_drawable_t libvlc_video_get_parent( libvlc_instance_t *, libvlc_exception_t * );
100 * This function shall not be used at all. It may lead to crash and race condition.
102 VLC_DEPRECATED_API int libvlc_video_destroy( libvlc_media_player_t *, libvlc_exception_t *);
104 /*****************************************************************************
105 * Playlist (Deprecated)
106 *****************************************************************************/
107 /** \defgroup libvlc_playlist libvlc_playlist (Deprecated)
109 * LibVLC Playlist handling (Deprecated)
110 * @deprecated Use media_list
115 * Set the playlist's loop attribute. If set, the playlist runs continuously
116 * and wraps around when it reaches the end.
118 * \param p_instance the playlist instance
119 * \param loop the loop attribute. 1 sets looping, 0 disables it
120 * \param p_e an initialized exception pointer
122 VLC_DEPRECATED_API void libvlc_playlist_loop( libvlc_instance_t* , int,
123 libvlc_exception_t * );
128 * Additionnal playlist item options can be specified for addition to the
129 * item before it is played.
131 * \param p_instance the playlist instance
132 * \param i_id the item to play. If this is a negative number, the next
133 * item will be selected. Otherwise, the item with the given ID will be
135 * \param i_options the number of options to add to the item
136 * \param ppsz_options the options to add to the item
137 * \param p_e an initialized exception pointer
139 VLC_DEPRECATED_API void libvlc_playlist_play( libvlc_instance_t*, int, int,
140 char **, libvlc_exception_t * );
143 * Toggle the playlist's pause status.
145 * If the playlist was running, it is paused. If it was paused, it is resumed.
147 * \param p_instance the playlist instance to pause
148 * \param p_e an initialized exception pointer
150 VLC_DEPRECATED_API void libvlc_playlist_pause( libvlc_instance_t *,
151 libvlc_exception_t * );
154 * Checks whether the playlist is running
156 * \param p_instance the playlist instance
157 * \param p_e an initialized exception pointer
158 * \return 0 if the playlist is stopped or paused, 1 if it is running
160 VLC_DEPRECATED_API int libvlc_playlist_isplaying( libvlc_instance_t *,
161 libvlc_exception_t * );
164 * Get the number of items in the playlist
166 * \param p_instance the playlist instance
167 * \param p_e an initialized exception pointer
168 * \return the number of items
170 VLC_DEPRECATED_API int libvlc_playlist_items_count( libvlc_instance_t *,
171 libvlc_exception_t * );
173 VLC_DEPRECATED_API int libvlc_playlist_get_current_index( libvlc_instance_t *,
174 libvlc_exception_t *);
178 * \param p_instance the playlist instance
180 VLC_DEPRECATED_API void libvlc_playlist_lock( libvlc_instance_t * );
183 * Unlock the playlist.
185 * \param p_instance the playlist instance
187 VLC_DEPRECATED_API void libvlc_playlist_unlock( libvlc_instance_t * );
192 * \param p_instance the playlist instance to stop
193 * \param p_e an initialized exception pointer
195 VLC_DEPRECATED_API void libvlc_playlist_stop( libvlc_instance_t *,
196 libvlc_exception_t * );
199 * Go to the next playlist item. If the playlist was stopped, playback
202 * \param p_instance the playlist instance
203 * \param p_e an initialized exception pointer
205 VLC_DEPRECATED_API void libvlc_playlist_next( libvlc_instance_t *,
206 libvlc_exception_t * );
209 * Go to the previous playlist item. If the playlist was stopped, playback
212 * \param p_instance the playlist instance
213 * \param p_e an initialized exception pointer
215 VLC_DEPRECATED_API void libvlc_playlist_prev( libvlc_instance_t *,
216 libvlc_exception_t * );
219 * Empty a playlist. All items in the playlist are removed.
221 * \param p_instance the playlist instance
222 * \param p_e an initialized exception pointer
224 VLC_DEPRECATED_API void libvlc_playlist_clear( libvlc_instance_t *,
225 libvlc_exception_t * );
228 * Append an item to the playlist. The item is added at the end. If more
229 * advanced options are required, \see libvlc_playlist_add_extended instead.
231 * \param p_instance the playlist instance
232 * \param psz_uri the URI to open, using VLC format
233 * \param psz_name a name that you might want to give or NULL
234 * \param p_e an initialized exception pointer
235 * \return the identifier of the new item
237 VLC_DEPRECATED_API int libvlc_playlist_add( libvlc_instance_t *, const char *,
238 const char *, libvlc_exception_t * );
241 * Append an item to the playlist. The item is added at the end, with
242 * additional input options.
244 * \param p_instance the playlist instance
245 * \param psz_uri the URI to open, using VLC format
246 * \param psz_name a name that you might want to give or NULL
247 * \param i_options the number of options to add
248 * \param ppsz_options strings representing the options to add
249 * \param p_e an initialized exception pointer
250 * \return the identifier of the new item
252 VLC_DEPRECATED_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
253 const char *, int, const char **,
254 libvlc_exception_t * );
257 * Append an item to the playlist. The item is added at the end, with
258 * additional input options from an untrusted source.
260 * \param p_instance the playlist instance
261 * \param psz_uri the URI to open, using VLC format
262 * \param psz_name a name that you might want to give or NULL
263 * \param i_options the number of options to add
264 * \param ppsz_options strings representing the options to add
265 * \param p_e an initialized exception pointer
266 * \return the identifier of the new item
268 VLC_DEPRECATED_API int libvlc_playlist_add_extended_untrusted( libvlc_instance_t *, const char *,
269 const char *, int, const char **,
270 libvlc_exception_t * );
273 * Delete the playlist item with the given ID.
275 * \param p_instance the playlist instance
276 * \param i_id the id to remove
277 * \param p_e an initialized exception pointer
278 * \return 0 in case of success, a non-zero value otherwise
280 VLC_DEPRECATED_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
281 libvlc_exception_t * );
283 /** Get the input that is currently being played by the playlist.
285 * \param p_instance the playlist instance to use
286 * \param p_e an initialized exception pointern
287 * \return a media instance object
289 VLC_DEPRECATED_API libvlc_media_player_t * libvlc_playlist_get_media_player(
290 libvlc_instance_t *, libvlc_exception_t * );
298 #endif /* _LIBVLC_DEPRECATED_H */