Commit 00b17365 authored by Rye Mutt's avatar Rye Mutt 🍞
Browse files

Merge branch 'vendor'

parents 157c7799 0d125831
Pipeline #876 failed with stages
in 3 minutes and 2 seconds
*.DS_Store
\ No newline at end of file
......@@ -2,7 +2,7 @@
* deprecated.h: libvlc deprecated API
*****************************************************************************
* Copyright (C) 1998-2008 VLC authors and VideoLAN
* $Id: 7f55090fcd482489ceed9145ce2253e78fa6fd2a $
* $Id: 27323a434498604ca281900c3e4087a42d22a5d8 $
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Paul Saman <jpsaman@videolan.org>
......@@ -25,22 +25,442 @@
#ifndef LIBVLC_DEPRECATED_H
#define LIBVLC_DEPRECATED_H 1
/**
* \file
* This file defines libvlc deprecated API
*/
# ifdef __cplusplus
extern "C" {
# endif
/*****************************************************************************
* Playlist (Deprecated)
*****************************************************************************/
/** \defgroup libvlc_playlist LibVLC playlist (legacy)
/**
* \ingroup libvlc libvlc_media_player
* @{
*/
/**
* Get movie fps rate
*
* This function is provided for backward compatibility. It cannot deal with
* multiple video tracks. In LibVLC versions prior to 3.0, it would also fail
* if the file format did not convey the frame rate explicitly.
*
* \deprecated Consider using libvlc_media_tracks_get() instead.
*
* \param p_mi the Media Player
* \return frames per second (fps) for this playing movie, or 0 if unspecified
*/
LIBVLC_DEPRECATED
LIBVLC_API float libvlc_media_player_get_fps( libvlc_media_player_t *p_mi );
/** end bug */
/**
* \deprecated Use libvlc_media_player_set_nsobject() instead
*/
LIBVLC_DEPRECATED
LIBVLC_API void libvlc_media_player_set_agl ( libvlc_media_player_t *p_mi, uint32_t drawable );
/**
* \deprecated Use libvlc_media_player_get_nsobject() instead
*/
LIBVLC_DEPRECATED
LIBVLC_API uint32_t libvlc_media_player_get_agl ( libvlc_media_player_t *p_mi );
/**
* \deprecated Use libvlc_track_description_list_release() instead
*/
LIBVLC_DEPRECATED LIBVLC_API
void libvlc_track_description_release( libvlc_track_description_t *p_track_description );
/** @}*/
/**
* \ingroup libvlc libvlc_video
* @{
*/
/**
* Get current video height.
* \deprecated Use libvlc_video_get_size() instead.
*
* \param p_mi the media player
* \return the video pixel height or 0 if not applicable
*/
LIBVLC_DEPRECATED LIBVLC_API
int libvlc_video_get_height( libvlc_media_player_t *p_mi );
/**
* Get current video width.
* \deprecated Use libvlc_video_get_size() instead.
*
* \param p_mi the media player
* \return the video pixel width or 0 if not applicable
*/
LIBVLC_DEPRECATED LIBVLC_API
int libvlc_video_get_width( libvlc_media_player_t *p_mi );
/**
* Get the description of available titles.
*
* \param p_mi the media player
* \return list containing description of available titles.
* It must be freed with libvlc_track_description_list_release()
*/
LIBVLC_DEPRECATED LIBVLC_API libvlc_track_description_t *
libvlc_video_get_title_description( libvlc_media_player_t *p_mi );
/**
* Get the description of available chapters for specific title.
*
* \param p_mi the media player
* \param i_title selected title
* \return list containing description of available chapter for title i_title.
* It must be freed with libvlc_track_description_list_release()
*/
LIBVLC_DEPRECATED LIBVLC_API libvlc_track_description_t *
libvlc_video_get_chapter_description( libvlc_media_player_t *p_mi, int i_title );
/**
* Set new video subtitle file.
* \deprecated Use libvlc_media_player_add_slave() instead.
*
* \param p_mi the media player
* \param psz_subtitle new video subtitle file
* \return the success status (boolean)
*/
LIBVLC_DEPRECATED LIBVLC_API int
libvlc_video_set_subtitle_file( libvlc_media_player_t *p_mi, const char *psz_subtitle );
/**
* Toggle teletext transparent status on video output.
* \deprecated use libvlc_video_set_teletext() instead.
*
* \param p_mi the media player
*/
LIBVLC_DEPRECATED LIBVLC_API void
libvlc_toggle_teletext( libvlc_media_player_t *p_mi );
/** @}*/
/**
* \ingroup libvlc libvlc_audio
* @{
*/
/**
* Backward compatibility stub. Do not use in new code.
* \deprecated Use libvlc_audio_output_device_list_get() instead.
* \return always 0.
*/
LIBVLC_DEPRECATED LIBVLC_API
int libvlc_audio_output_device_count( libvlc_instance_t *p_instance, const char *psz_audio_output );
/**
* Backward compatibility stub. Do not use in new code.
* \deprecated Use libvlc_audio_output_device_list_get() instead.
* \return always NULL.
*/
LIBVLC_DEPRECATED LIBVLC_API
char *libvlc_audio_output_device_longname( libvlc_instance_t *p_instance, const char *psz_output,
int i_device );
/**
* Backward compatibility stub. Do not use in new code.
* \deprecated Use libvlc_audio_output_device_list_get() instead.
* \return always NULL.
*/
LIBVLC_DEPRECATED LIBVLC_API
char *libvlc_audio_output_device_id( libvlc_instance_t *p_instance, const char *psz_audio_output, int i_device );
/**
* Stub for backward compatibility.
* \return always -1.
*/
LIBVLC_DEPRECATED
LIBVLC_API int libvlc_audio_output_get_device_type( libvlc_media_player_t *p_mi );
/**
* Stub for backward compatibility.
*/
LIBVLC_DEPRECATED
LIBVLC_API void libvlc_audio_output_set_device_type( libvlc_media_player_t *p_mp,
int device_type );
/** @}*/
/**
* \ingroup libvlc libvlc_media
* @{
*/
/**
* Parse a media.
*
* This fetches (local) art, meta data and tracks information.
* The method is synchronous.
*
* \deprecated This function could block indefinitely.
* Use libvlc_media_parse_with_options() instead
*
* \see libvlc_media_parse_with_options
* \see libvlc_media_get_meta
* \see libvlc_media_get_tracks_info
*
* \param p_md media descriptor object
*/
LIBVLC_DEPRECATED LIBVLC_API void
libvlc_media_parse( libvlc_media_t *p_md );
/**
* Parse a media.
*
* This fetches (local) art, meta data and tracks information.
* The method is the asynchronous of libvlc_media_parse().
*
* To track when this is over you can listen to libvlc_MediaParsedChanged
* event. However if the media was already parsed you will not receive this
* event.
*
* \deprecated You can't be sure to receive the libvlc_MediaParsedChanged
* event (you can wait indefinitely for this event).
* Use libvlc_media_parse_with_options() instead
*
* \see libvlc_media_parse
* \see libvlc_MediaParsedChanged
* \see libvlc_media_get_meta
* \see libvlc_media_get_tracks_info
*
* \param p_md media descriptor object
*/
LIBVLC_DEPRECATED LIBVLC_API void
libvlc_media_parse_async( libvlc_media_t *p_md );
/**
* Return true is the media descriptor object is parsed
*
* \deprecated This can return true in case of failure.
* Use libvlc_media_get_parsed_status() instead
*
* \see libvlc_MediaParsedChanged
*
* \param p_md media descriptor object
* \return true if media object has been parsed otherwise it returns false
*
* \libvlc_return_bool
*/
LIBVLC_DEPRECATED LIBVLC_API int
libvlc_media_is_parsed( libvlc_media_t *p_md );
/**
* Get media descriptor's elementary streams description
*
* Note, you need to call libvlc_media_parse() or play the media at least once
* before calling this function.
* Not doing this will result in an empty array.
*
* \deprecated Use libvlc_media_tracks_get() instead
*
* \param p_md media descriptor object
* \param tracks address to store an allocated array of Elementary Streams
* descriptions (must be freed by the caller) [OUT]
*
* \return the number of Elementary Streams
*/
LIBVLC_DEPRECATED LIBVLC_API
int libvlc_media_get_tracks_info( libvlc_media_t *p_md,
libvlc_media_track_info_t **tracks );
/** @}*/
/**
* \ingroup libvlc libvlc_media_list
* @{
*/
LIBVLC_DEPRECATED int
libvlc_media_list_add_file_content( libvlc_media_list_t * p_ml,
const char * psz_uri );
/** @}*/
/**
* \ingroup libvlc libvlc_media_discoverer
* @{
*/
/**
* \deprecated Use libvlc_media_discoverer_new() and libvlc_media_discoverer_start().
*/
LIBVLC_DEPRECATED LIBVLC_API libvlc_media_discoverer_t *
libvlc_media_discoverer_new_from_name( libvlc_instance_t * p_inst,
const char * psz_name );
/**
* Get media service discover object its localized name.
*
* \deprecated Useless, use libvlc_media_discoverer_list_get() to get the
* longname of the service discovery.
*
* \param p_mdis media discover object
* \return localized name or NULL if the media_discoverer is not started
*/
LIBVLC_DEPRECATED LIBVLC_API char *
libvlc_media_discoverer_localized_name( libvlc_media_discoverer_t * p_mdis );
/**
* Get event manager from media service discover object.
*
* \deprecated Useless, media_discoverer events are only triggered when calling
* libvlc_media_discoverer_start() and libvlc_media_discoverer_stop().
*
* \param p_mdis media service discover object
* \return event manager object.
*/
LIBVLC_DEPRECATED LIBVLC_API libvlc_event_manager_t *
libvlc_media_discoverer_event_manager( libvlc_media_discoverer_t * p_mdis );
/** @}*/
/**
* \ingroup libvlc libvlc_core
* @{
*/
/**
* Waits until an interface causes the instance to exit.
* You should start at least one interface first, using libvlc_add_intf().
*
* \param p_instance the instance
* \warning This function wastes one thread doing basically nothing.
* libvlc_set_exit_handler() should be used instead.
*/
LIBVLC_DEPRECATED LIBVLC_API
void libvlc_wait( libvlc_instance_t *p_instance );
/** @}*/
/**
* \ingroup libvlc_core
* \defgroup libvlc_log_deprecated LibVLC logging (legacy)
* @{
*/
/** This structure is opaque. It represents a libvlc log iterator */
typedef struct libvlc_log_iterator_t libvlc_log_iterator_t;
typedef struct libvlc_log_message_t
{
int i_severity; /* 0=INFO, 1=ERR, 2=WARN, 3=DBG */
const char *psz_type; /* module type */
const char *psz_name; /* module name */
const char *psz_header; /* optional header */
const char *psz_message; /* message */
} libvlc_log_message_t;
/**
* Always returns minus one.
* This function is only provided for backward compatibility.
*
* \param p_instance ignored
* \return always -1
*/
LIBVLC_DEPRECATED LIBVLC_API
unsigned libvlc_get_log_verbosity( const libvlc_instance_t *p_instance );
/**
* This function does nothing.
* It is only provided for backward compatibility.
*
* \param p_instance ignored
* \param level ignored
*/
LIBVLC_DEPRECATED LIBVLC_API
void libvlc_set_log_verbosity( libvlc_instance_t *p_instance, unsigned level );
/**
* This function does nothing useful.
* It is only provided for backward compatibility.
*
* \param p_instance libvlc instance
* \return an unique pointer or NULL on error
*/
LIBVLC_DEPRECATED LIBVLC_API
libvlc_log_t *libvlc_log_open( libvlc_instance_t *p_instance );
/**
* Frees memory allocated by libvlc_log_open().
*
* \param p_log libvlc log instance or NULL
*/
LIBVLC_DEPRECATED LIBVLC_API
void libvlc_log_close( libvlc_log_t *p_log );
/**
* Always returns zero.
* This function is only provided for backward compatibility.
*
* \param p_log ignored
* \return always zero
*/
LIBVLC_DEPRECATED LIBVLC_API
unsigned libvlc_log_count( const libvlc_log_t *p_log );
/**
* This function does nothing.
* It is only provided for backward compatibility.
*
* \param p_log ignored
*/
LIBVLC_DEPRECATED LIBVLC_API
void libvlc_log_clear( libvlc_log_t *p_log );
/**
* This function does nothing useful.
* It is only provided for backward compatibility.
*
* \param p_log ignored
* \return an unique pointer or NULL on error or if the parameter was NULL
*/
LIBVLC_DEPRECATED LIBVLC_API
libvlc_log_iterator_t *libvlc_log_get_iterator( const libvlc_log_t *p_log );
/**
* Frees memory allocated by libvlc_log_get_iterator().
*
* \param p_iter libvlc log iterator or NULL
*/
LIBVLC_DEPRECATED LIBVLC_API
void libvlc_log_iterator_free( libvlc_log_iterator_t *p_iter );
/**
* Always returns zero.
* This function is only provided for backward compatibility.
*
* \param p_iter ignored
* \return always zero
*/
LIBVLC_DEPRECATED LIBVLC_API
int libvlc_log_iterator_has_next( const libvlc_log_iterator_t *p_iter );
/**
* Always returns NULL.
* This function is only provided for backward compatibility.
*
* \param p_iter libvlc log iterator or NULL
* \param p_buf ignored
* \return always NULL
*/
LIBVLC_DEPRECATED LIBVLC_API
libvlc_log_message_t *libvlc_log_iterator_next( libvlc_log_iterator_t *p_iter,
libvlc_log_message_t *p_buf );
/** @}*/
/**
* \ingroup libvlc
* \defgroup libvlc_playlist LibVLC playlist (legacy)
* @deprecated Use @ref libvlc_media_list instead.
* @{
* \file
* LibVLC deprecated playlist API
*/
/**
......
......@@ -2,7 +2,7 @@
* libvlc.h: libvlc external API
*****************************************************************************
* Copyright (C) 1998-2009 VLC authors and VideoLAN
* $Id: 0bc0b401a553d2758abddf6f545022a6c2644405 $
* $Id: b12d900469fa6438c41421f2ac7697b93ffc8a35 $
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Paul Saman <jpsaman@videolan.org>
......@@ -23,16 +23,13 @@
* Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
/**
* \file
* This file defines libvlc external API
*/
/**
* \defgroup libvlc LibVLC
* LibVLC is the external programming interface of the VLC media player.
* It is used to embed VLC into other applications or frameworks.
* @{
* \file
* LibVLC core external API
*/
#ifndef VLC_LIBVLC_H
......@@ -58,13 +55,12 @@
#include <stdio.h>
#include <stdarg.h>
#include <stdint.h>
# ifdef __cplusplus
extern "C" {
# endif
#include <vlc/libvlc_structures.h>
/** \defgroup libvlc_core LibVLC core
* \ingroup libvlc
* Before it can do anything useful, LibVLC must be initialized.
......@@ -77,6 +73,11 @@ extern "C" {
* @{
*/
/** This structure is opaque. It represents a libvlc instance */
typedef struct libvlc_instance_t libvlc_instance_t;
typedef int64_t libvlc_time_t;
/** \defgroup libvlc_error LibVLC error handling
* @{
*/
......@@ -123,6 +124,45 @@ LIBVLC_API const char *libvlc_printerr (const char *fmt, ...);
* This functions accept a list of "command line" arguments similar to the
* main(). These arguments affect the LibVLC instance default configuration.
*
* \note
* LibVLC may create threads. Therefore, any thread-unsafe process
* initialization must be performed before calling libvlc_new(). In particular
* and where applicable:
* - setlocale() and textdomain(),
* - setenv(), unsetenv() and putenv(),
* - with the X11 display system, XInitThreads()
* (see also libvlc_media_player_set_xwindow()) and
* - on Microsoft Windows, SetErrorMode().
* - sigprocmask() shall never be invoked; pthread_sigmask() can be used.
*
* On POSIX systems, the SIGCHLD signal <b>must not</b> be ignored, i.e. the
* signal handler must set to SIG_DFL or a function pointer, not SIG_IGN.
* Also while LibVLC is active, the wait() function shall not be called, and
* any call to waitpid() shall use a strictly positive value for the first
* parameter (i.e. the PID). Failure to follow those rules may lead to a
* deadlock or a busy loop.
* Also on POSIX systems, it is recommended that the SIGPIPE signal be blocked,
* even if it is not, in principles, necessary, e.g.:
* @code
sigset_t set;
signal(SIGCHLD, SIG_DFL);
sigemptyset(&set);
sigaddset(&set, SIGPIPE);
pthread_sigmask(SIG_BLOCK, &set, NULL);
* @endcode
*
* On Microsoft Windows Vista/2008, the process error mode
* SEM_FAILCRITICALERRORS flag <b>must</b> be set before using LibVLC.
* On later versions, that is optional and unnecessary.
* Also on Microsoft Windows (Vista and any later version), setting the default
* DLL directories to SYSTEM32 exclusively is strongly recommended for
* security reasons:
* @code
SetErrorMode(SEM_FAILCRITICALERRORS);
SetDefaultDllDirectories(LOAD_LIBRARY_SEARCH_SYSTEM32);
* @endcode
*
* \version
* Arguments are meant to be passed from the command line to LibVLC, just like
* VLC media player does. The list of valid arguments depends on the LibVLC
......@@ -190,17 +230,6 @@ LIBVLC_API
void libvlc_set_exit_handler( libvlc_instance_t *p_instance,
void (*cb) (void *), void *opaque );
/**
* Waits until an interface causes the instance to exit.
* You should start at least one interface first, using libvlc_add_intf().
*
* \param p_instance the instance
* \warning This function wastes one thread doing basically nothing.
* libvlc_set_exit_handler() should be used instead.
*/
LIBVLC_DEPRECATED LIBVLC_API
void libvlc_wait( libvlc_instance_t *p_instance );
/**
* Sets the application name. LibVLC passes this as the user agent string
* when a protocol requires it.
......@@ -292,7 +321,7 @@ typedef int libvlc_event_type_t;
* Callback function notification
* \param p_event the event triggering the callback
*/
typedef void ( *libvlc_callback_t )( const struct libvlc_event_t *, void * );
typedef void ( *libvlc_callback_t )( const struct libvlc_event_t *p_event, void *p_data );
/**
* Register for an event notification.
......@@ -353,8 +382,12 @@ enum libvlc_log_level
typedef struct vlc_log_t libvlc_log_t;
/**
* Gets debugging information about a log message: the name of the VLC module
* emitting the message and the message location within the source code.
* Gets log message debug infos.
*
* This function retrieves self-debug information about a log message:
* - the name of the VLC module emitting the message,
* - the name of the source code module (i.e. file) and
* - the line number within the source code module.
*
* The returned module name and file name will be NULL if unknown.
* The returned line number will similarly be zero if unknown.
......@@ -372,10 +405,14 @@ LIBVLC_API void libvlc_log_get_context(const libvlc_log_t *ctx,
const char **module, const char **file, unsigned *line);
/**
* Gets VLC object information about a log message: the type name of the VLC
* object emitting the message, the object header if any and a temporaly-unique
* object identifier. This information is mainly meant for <b>manual</b>
* troubleshooting.
* Gets log message info.
*
* This function retrieves meta-information about a log message:
* - the type name of the VLC object emitting the message,
* - the object header if any, and
* - a temporaly-unique object identifier.
*
* This information is mainly meant for <b>manual</b> troubleshooting.
*
* The returned type name may be "generic" if unknown, but it cannot be NULL.
* The returned header will be NULL if unset; in current versions, the header
......@@ -397,8 +434,9 @@ LIBVLC_API void libvlc_log_get_object(const libvlc_log_t *ctx,
/**
* Callback prototype for LibVLC log message handler.
*
* \param data data pointer as given to libvlc_log_set()
* \param level message level (@ref enum libvlc_log_level)
* \param level message level (@ref libvlc_log_level)
* \param ctx message context (meta-information about the message)