1 | /***************************************************************************** |
2 | * deprecated.h: libvlc deprecated API |
3 | ***************************************************************************** |
4 | * Copyright (C) 1998-2008 VLC authors and VideoLAN |
5 | * $Id: 27323a434498604ca281900c3e4087a42d22a5d8 $ |
6 | * |
7 | * Authors: Clément Stenac <zorglub@videolan.org> |
8 | * Jean-Paul Saman <jpsaman@videolan.org> |
9 | * |
10 | * This program is free software; you can redistribute it and/or modify it |
11 | * under the terms of the GNU Lesser General Public License as published by |
12 | * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details. |
19 | * |
20 | * You should have received a copy of the GNU Lesser General Public License |
21 | * along with this program; if not, write to the Free Software Foundation, |
22 | * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. |
23 | *****************************************************************************/ |
24 | |
25 | #ifndef LIBVLC_DEPRECATED_H |
26 | #define LIBVLC_DEPRECATED_H 1 |
27 | |
28 | # ifdef __cplusplus |
29 | extern "C" { |
30 | # endif |
31 | |
32 | /** |
33 | * \ingroup libvlc libvlc_media_player |
34 | * @{ |
35 | */ |
36 | |
37 | /** |
38 | * Get movie fps rate |
39 | * |
40 | * This function is provided for backward compatibility. It cannot deal with |
41 | * multiple video tracks. In LibVLC versions prior to 3.0, it would also fail |
42 | * if the file format did not convey the frame rate explicitly. |
43 | * |
44 | * \deprecated Consider using libvlc_media_tracks_get() instead. |
45 | * |
46 | * \param p_mi the Media Player |
47 | * \return frames per second (fps) for this playing movie, or 0 if unspecified |
48 | */ |
49 | LIBVLC_DEPRECATED |
50 | LIBVLC_API float libvlc_media_player_get_fps( libvlc_media_player_t *p_mi ); |
51 | |
52 | /** end bug */ |
53 | |
54 | /** |
55 | * \deprecated Use libvlc_media_player_set_nsobject() instead |
56 | */ |
57 | LIBVLC_DEPRECATED |
58 | LIBVLC_API void libvlc_media_player_set_agl ( libvlc_media_player_t *p_mi, uint32_t drawable ); |
59 | |
60 | /** |
61 | * \deprecated Use libvlc_media_player_get_nsobject() instead |
62 | */ |
63 | LIBVLC_DEPRECATED |
64 | LIBVLC_API uint32_t libvlc_media_player_get_agl ( libvlc_media_player_t *p_mi ); |
65 | |
66 | /** |
67 | * \deprecated Use libvlc_track_description_list_release() instead |
68 | */ |
69 | LIBVLC_DEPRECATED LIBVLC_API |
70 | void libvlc_track_description_release( libvlc_track_description_t *p_track_description ); |
71 | |
72 | /** @}*/ |
73 | |
74 | /** |
75 | * \ingroup libvlc libvlc_video |
76 | * @{ |
77 | */ |
78 | |
79 | /** |
80 | * Get current video height. |
81 | * \deprecated Use libvlc_video_get_size() instead. |
82 | * |
83 | * \param p_mi the media player |
84 | * \return the video pixel height or 0 if not applicable |
85 | */ |
86 | LIBVLC_DEPRECATED LIBVLC_API |
87 | int libvlc_video_get_height( libvlc_media_player_t *p_mi ); |
88 | |
89 | /** |
90 | * Get current video width. |
91 | * \deprecated Use libvlc_video_get_size() instead. |
92 | * |
93 | * \param p_mi the media player |
94 | * \return the video pixel width or 0 if not applicable |
95 | */ |
96 | LIBVLC_DEPRECATED LIBVLC_API |
97 | int libvlc_video_get_width( libvlc_media_player_t *p_mi ); |
98 | |
99 | /** |
100 | * Get the description of available titles. |
101 | * |
102 | * \param p_mi the media player |
103 | * \return list containing description of available titles. |
104 | * It must be freed with libvlc_track_description_list_release() |
105 | */ |
106 | LIBVLC_DEPRECATED LIBVLC_API libvlc_track_description_t * |
107 | libvlc_video_get_title_description( libvlc_media_player_t *p_mi ); |
108 | |
109 | /** |
110 | * Get the description of available chapters for specific title. |
111 | * |
112 | * \param p_mi the media player |
113 | * \param i_title selected title |
114 | * \return list containing description of available chapter for title i_title. |
115 | * It must be freed with libvlc_track_description_list_release() |
116 | */ |
117 | LIBVLC_DEPRECATED LIBVLC_API libvlc_track_description_t * |
118 | libvlc_video_get_chapter_description( libvlc_media_player_t *p_mi, int i_title ); |
119 | |
120 | /** |
121 | * Set new video subtitle file. |
122 | * \deprecated Use libvlc_media_player_add_slave() instead. |
123 | * |
124 | * \param p_mi the media player |
125 | * \param psz_subtitle new video subtitle file |
126 | * \return the success status (boolean) |
127 | */ |
128 | LIBVLC_DEPRECATED LIBVLC_API int |
129 | libvlc_video_set_subtitle_file( libvlc_media_player_t *p_mi, const char *psz_subtitle ); |
130 | |
131 | /** |
132 | * Toggle teletext transparent status on video output. |
133 | * \deprecated use libvlc_video_set_teletext() instead. |
134 | * |
135 | * \param p_mi the media player |
136 | */ |
137 | LIBVLC_DEPRECATED LIBVLC_API void |
138 | libvlc_toggle_teletext( libvlc_media_player_t *p_mi ); |
139 | |
140 | /** @}*/ |
141 | |
142 | /** |
143 | * \ingroup libvlc libvlc_audio |
144 | * @{ |
145 | */ |
146 | |
147 | /** |
148 | * Backward compatibility stub. Do not use in new code. |
149 | * \deprecated Use libvlc_audio_output_device_list_get() instead. |
150 | * \return always 0. |
151 | */ |
152 | LIBVLC_DEPRECATED LIBVLC_API |
153 | int libvlc_audio_output_device_count( libvlc_instance_t *p_instance, const char *psz_audio_output ); |
154 | |
155 | /** |
156 | * Backward compatibility stub. Do not use in new code. |
157 | * \deprecated Use libvlc_audio_output_device_list_get() instead. |
158 | * \return always NULL. |
159 | */ |
160 | LIBVLC_DEPRECATED LIBVLC_API |
161 | char *libvlc_audio_output_device_longname( libvlc_instance_t *p_instance, const char *psz_output, |
162 | int i_device ); |
163 | |
164 | /** |
165 | * Backward compatibility stub. Do not use in new code. |
166 | * \deprecated Use libvlc_audio_output_device_list_get() instead. |
167 | * \return always NULL. |
168 | */ |
169 | LIBVLC_DEPRECATED LIBVLC_API |
170 | char *libvlc_audio_output_device_id( libvlc_instance_t *p_instance, const char *psz_audio_output, int i_device ); |
171 | |
172 | /** |
173 | * Stub for backward compatibility. |
174 | * \return always -1. |
175 | */ |
176 | LIBVLC_DEPRECATED |
177 | LIBVLC_API int libvlc_audio_output_get_device_type( libvlc_media_player_t *p_mi ); |
178 | |
179 | /** |
180 | * Stub for backward compatibility. |
181 | */ |
182 | LIBVLC_DEPRECATED |
183 | LIBVLC_API void libvlc_audio_output_set_device_type( libvlc_media_player_t *p_mp, |
184 | int device_type ); |
185 | |
186 | /** @}*/ |
187 | |
188 | /** |
189 | * \ingroup libvlc libvlc_media |
190 | * @{ |
191 | */ |
192 | |
193 | /** |
194 | * Parse a media. |
195 | * |
196 | * This fetches (local) art, meta data and tracks information. |
197 | * The method is synchronous. |
198 | * |
199 | * \deprecated This function could block indefinitely. |
200 | * Use libvlc_media_parse_with_options() instead |
201 | * |
202 | * \see libvlc_media_parse_with_options |
203 | * \see libvlc_media_get_meta |
204 | * \see libvlc_media_get_tracks_info |
205 | * |
206 | * \param p_md media descriptor object |
207 | */ |
208 | LIBVLC_DEPRECATED LIBVLC_API void |
209 | libvlc_media_parse( libvlc_media_t *p_md ); |
210 | |
211 | /** |
212 | * Parse a media. |
213 | * |
214 | * This fetches (local) art, meta data and tracks information. |
215 | * The method is the asynchronous of libvlc_media_parse(). |
216 | * |
217 | * To track when this is over you can listen to libvlc_MediaParsedChanged |
218 | * event. However if the media was already parsed you will not receive this |
219 | * event. |
220 | * |
221 | * \deprecated You can't be sure to receive the libvlc_MediaParsedChanged |
222 | * event (you can wait indefinitely for this event). |
223 | * Use libvlc_media_parse_with_options() instead |
224 | * |
225 | * \see libvlc_media_parse |
226 | * \see libvlc_MediaParsedChanged |
227 | * \see libvlc_media_get_meta |
228 | * \see libvlc_media_get_tracks_info |
229 | * |
230 | * \param p_md media descriptor object |
231 | */ |
232 | LIBVLC_DEPRECATED LIBVLC_API void |
233 | libvlc_media_parse_async( libvlc_media_t *p_md ); |
234 | |
235 | /** |
236 | * Return true is the media descriptor object is parsed |
237 | * |
238 | * \deprecated This can return true in case of failure. |
239 | * Use libvlc_media_get_parsed_status() instead |
240 | * |
241 | * \see libvlc_MediaParsedChanged |
242 | * |
243 | * \param p_md media descriptor object |
244 | * \return true if media object has been parsed otherwise it returns false |
245 | * |
246 | * \libvlc_return_bool |
247 | */ |
248 | LIBVLC_DEPRECATED LIBVLC_API int |
249 | libvlc_media_is_parsed( libvlc_media_t *p_md ); |
250 | |
251 | /** |
252 | * Get media descriptor's elementary streams description |
253 | * |
254 | * Note, you need to call libvlc_media_parse() or play the media at least once |
255 | * before calling this function. |
256 | * Not doing this will result in an empty array. |
257 | * |
258 | * \deprecated Use libvlc_media_tracks_get() instead |
259 | * |
260 | * \param p_md media descriptor object |
261 | * \param tracks address to store an allocated array of Elementary Streams |
262 | * descriptions (must be freed by the caller) [OUT] |
263 | * |
264 | * \return the number of Elementary Streams |
265 | */ |
266 | LIBVLC_DEPRECATED LIBVLC_API |
267 | int libvlc_media_get_tracks_info( libvlc_media_t *p_md, |
268 | libvlc_media_track_info_t **tracks ); |
269 | |
270 | /** @}*/ |
271 | |
272 | /** |
273 | * \ingroup libvlc libvlc_media_list |
274 | * @{ |
275 | */ |
276 | |
277 | LIBVLC_DEPRECATED int |
278 | libvlc_media_list_add_file_content( libvlc_media_list_t * p_ml, |
279 | const char * psz_uri ); |
280 | |
281 | /** @}*/ |
282 | |
283 | /** |
284 | * \ingroup libvlc libvlc_media_discoverer |
285 | * @{ |
286 | */ |
287 | |
288 | /** |
289 | * \deprecated Use libvlc_media_discoverer_new() and libvlc_media_discoverer_start(). |
290 | */ |
291 | LIBVLC_DEPRECATED LIBVLC_API libvlc_media_discoverer_t * |
292 | libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst, |
293 | const char * psz_name ); |
294 | |
295 | /** |
296 | * Get media service discover object its localized name. |
297 | * |
298 | * \deprecated Useless, use libvlc_media_discoverer_list_get() to get the |
299 | * longname of the service discovery. |
300 | * |
301 | * \param p_mdis media discover object |
302 | * \return localized name or NULL if the media_discoverer is not started |
303 | */ |
304 | LIBVLC_DEPRECATED LIBVLC_API char * |
305 | libvlc_media_discoverer_localized_name( libvlc_media_discoverer_t * p_mdis ); |
306 | |
307 | /** |
308 | * Get event manager from media service discover object. |
309 | * |
310 | * \deprecated Useless, media_discoverer events are only triggered when calling |
311 | * libvlc_media_discoverer_start() and libvlc_media_discoverer_stop(). |
312 | * |
313 | * \param p_mdis media service discover object |
314 | * \return event manager object. |
315 | */ |
316 | LIBVLC_DEPRECATED LIBVLC_API libvlc_event_manager_t * |
317 | libvlc_media_discoverer_event_manager( libvlc_media_discoverer_t * p_mdis ); |
318 | |
319 | /** @}*/ |
320 | |
321 | /** |
322 | * \ingroup libvlc libvlc_core |
323 | * @{ |
324 | */ |
325 | |
326 | /** |
327 | * Waits until an interface causes the instance to exit. |
328 | * You should start at least one interface first, using libvlc_add_intf(). |
329 | * |
330 | * \param p_instance the instance |
331 | * \warning This function wastes one thread doing basically nothing. |
332 | * libvlc_set_exit_handler() should be used instead. |
333 | */ |
334 | LIBVLC_DEPRECATED LIBVLC_API |
335 | void libvlc_wait( libvlc_instance_t *p_instance ); |
336 | |
337 | |
338 | /** @}*/ |
339 | |
340 | /** |
341 | * \ingroup libvlc_core |
342 | * \defgroup libvlc_log_deprecated LibVLC logging (legacy) |
343 | * @{ |
344 | */ |
345 | |
346 | /** This structure is opaque. It represents a libvlc log iterator */ |
347 | typedef struct libvlc_log_iterator_t libvlc_log_iterator_t; |
348 | |
349 | typedef struct libvlc_log_message_t |
350 | { |
351 | int i_severity; /* 0=INFO, 1=ERR, 2=WARN, 3=DBG */ |
352 | const char *psz_type; /* module type */ |
353 | const char *psz_name; /* module name */ |
354 | const char *; /* optional header */ |
355 | const char *psz_message; /* message */ |
356 | } libvlc_log_message_t; |
357 | |
358 | /** |
359 | * Always returns minus one. |
360 | * This function is only provided for backward compatibility. |
361 | * |
362 | * \param p_instance ignored |
363 | * \return always -1 |
364 | */ |
365 | LIBVLC_DEPRECATED LIBVLC_API |
366 | unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance ); |
367 | |
368 | /** |
369 | * This function does nothing. |
370 | * It is only provided for backward compatibility. |
371 | * |
372 | * \param p_instance ignored |
373 | * \param level ignored |
374 | */ |
375 | LIBVLC_DEPRECATED LIBVLC_API |
376 | void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level ); |
377 | |
378 | /** |
379 | * This function does nothing useful. |
380 | * It is only provided for backward compatibility. |
381 | * |
382 | * \param p_instance libvlc instance |
383 | * \return an unique pointer or NULL on error |
384 | */ |
385 | LIBVLC_DEPRECATED LIBVLC_API |
386 | libvlc_log_t *libvlc_log_open( libvlc_instance_t *p_instance ); |
387 | |
388 | /** |
389 | * Frees memory allocated by libvlc_log_open(). |
390 | * |
391 | * \param p_log libvlc log instance or NULL |
392 | */ |
393 | LIBVLC_DEPRECATED LIBVLC_API |
394 | void libvlc_log_close( libvlc_log_t *p_log ); |
395 | |
396 | /** |
397 | * Always returns zero. |
398 | * This function is only provided for backward compatibility. |
399 | * |
400 | * \param p_log ignored |
401 | * \return always zero |
402 | */ |
403 | LIBVLC_DEPRECATED LIBVLC_API |
404 | unsigned libvlc_log_count( const libvlc_log_t *p_log ); |
405 | |
406 | /** |
407 | * This function does nothing. |
408 | * It is only provided for backward compatibility. |
409 | * |
410 | * \param p_log ignored |
411 | */ |
412 | LIBVLC_DEPRECATED LIBVLC_API |
413 | void libvlc_log_clear( libvlc_log_t *p_log ); |
414 | |
415 | /** |
416 | * This function does nothing useful. |
417 | * It is only provided for backward compatibility. |
418 | * |
419 | * \param p_log ignored |
420 | * \return an unique pointer or NULL on error or if the parameter was NULL |
421 | */ |
422 | LIBVLC_DEPRECATED LIBVLC_API |
423 | libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *p_log ); |
424 | |
425 | /** |
426 | * Frees memory allocated by libvlc_log_get_iterator(). |
427 | * |
428 | * \param p_iter libvlc log iterator or NULL |
429 | */ |
430 | LIBVLC_DEPRECATED LIBVLC_API |
431 | void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter ); |
432 | |
433 | /** |
434 | * Always returns zero. |
435 | * This function is only provided for backward compatibility. |
436 | * |
437 | * \param p_iter ignored |
438 | * \return always zero |
439 | */ |
440 | LIBVLC_DEPRECATED LIBVLC_API |
441 | int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter ); |
442 | |
443 | /** |
444 | * Always returns NULL. |
445 | * This function is only provided for backward compatibility. |
446 | * |
447 | * \param p_iter libvlc log iterator or NULL |
448 | * \param p_buf ignored |
449 | * \return always NULL |
450 | */ |
451 | LIBVLC_DEPRECATED LIBVLC_API |
452 | libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter, |
453 | libvlc_log_message_t *p_buf ); |
454 | |
455 | /** @}*/ |
456 | |
457 | /** |
458 | * \ingroup libvlc |
459 | * \defgroup libvlc_playlist LibVLC playlist (legacy) |
460 | * @deprecated Use @ref libvlc_media_list instead. |
461 | * @{ |
462 | * \file |
463 | * LibVLC deprecated playlist API |
464 | */ |
465 | |
466 | /** |
467 | * Start playing (if there is any item in the playlist). |
468 | * |
469 | * Additionnal playlist item options can be specified for addition to the |
470 | * item before it is played. |
471 | * |
472 | * \param p_instance the playlist instance |
473 | * \param i_id the item to play. If this is a negative number, the next |
474 | * item will be selected. Otherwise, the item with the given ID will be |
475 | * played |
476 | * \param i_options the number of options to add to the item |
477 | * \param ppsz_options the options to add to the item |
478 | */ |
479 | LIBVLC_DEPRECATED LIBVLC_API |
480 | void libvlc_playlist_play( libvlc_instance_t *p_instance, int i_id, |
481 | int i_options, char **ppsz_options ); |
482 | |
483 | /** @}*/ |
484 | |
485 | # ifdef __cplusplus |
486 | } |
487 | # endif |
488 | |
489 | #endif /* _LIBVLC_DEPRECATED_H */ |
490 | |