Now "#include <vlc/vlc.h>" defines all the definitions needed to use libvlc_*.
* New layout is the following:
vlc/common.h: Global definitions
vlc/deprecated.h: Deprecated stuff
vlc/libvlc_structures.h: Contains all libvlc_* structures.
vlc/libvlc_events.h: Contains libvlc_event_t structure.
vlc/libvlc.h: Contains all libvlc_* functions
vlc/libvlc_media_list.h: Contains all libvlc_media_list_* functions
vlc/libvlc_vlm.h: Contains all libvlc_vlm_* functions.
vlc/vlc.h: Use this header to use libvlc-control.dylib.
--- /dev/null
+/*****************************************************************************
+ * vlc.h: global header for libvlc (old-style)
+ *****************************************************************************
+ * Copyright (C) 1998-2004 the VideoLAN team
+ * $Id$
+ *
+ * Authors: Vincent Seguin <seguin@via.ecp.fr>
+ * Samuel Hocevar <sam@zoy.org>
+ * Gildas Bazin <gbazin@netcourrier.com>
+ * Derk-Jan Hartman <hartman at videolan dot org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+/**
+ * \defgroup libvlc_old Libvlc Old
+ * This is libvlc, the base library of the VLC program.
+ * This is the legacy API. Please consider using the new libvlc API
+ *
+ * @{
+ */
+
+
+#ifndef _VLC_COMMON_H
+#define _VLC_COMMON_H 1
+
+#ifndef __cplusplus
+# include <stdbool.h>
+#endif
+
+/*****************************************************************************
+ * Shared library Export macros
+ *****************************************************************************/
+#ifndef VLC_PUBLIC_API
+# define VLC_PUBLIC_API extern
+#endif
+
+/*****************************************************************************
+ * Compiler specific
+ *****************************************************************************/
+
+#ifndef VLC_DEPRECATED_API
+# ifdef __LIBVLC__
+/* Avoid unuseful warnings from libvlc with our deprecated APIs */
+# define VLC_DEPRECATED_API VLC_PUBLIC_API
+# else /* __LIBVLC__ */
+# if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
+# define VLC_DEPRECATED_API VLC_PUBLIC_API __attribute__((deprecated))
+# else
+# define VLC_DEPRECATED_API VLC_PUBLIC_API
+# endif
+# endif /* __LIBVLC__ */
+#endif
+
+/*****************************************************************************
+ * Types
+ *****************************************************************************/
+
+#if (defined( WIN32 ) || defined( UNDER_CE )) && !defined( __MINGW32__ )
+typedef signed __int64 vlc_int64_t;
+# else
+typedef signed long long vlc_int64_t;
+#endif
+
+#endif /* _VLC_COMMON_H */
--- /dev/null
+/*****************************************************************************
+ * deprecated.h: libvlc deprecated API
+ *****************************************************************************
+ * Copyright (C) 1998-2005 the VideoLAN team
+ * $Id$
+ *
+ * Authors: Clément Stenac <zorglub@videolan.org>
+ * Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef _LIBVLC_DEPRECATED_H
+#define _LIBVLC_DEPRECATED_H 1
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+
+/*****************************************************************************
+ * Playlist (Deprecated)
+ *****************************************************************************/
+/** \defgroup libvlc_playlist Playlist (Deprecated)
+ * \ingroup libvlc
+ * LibVLC Playlist handling (Deprecated)
+ * @deprecated Use media_list
+ * @{
+ */
+
+/**
+ * Set the playlist's loop attribute. If set, the playlist runs continuously
+ * and wraps around when it reaches the end.
+ *
+ * \param p_instance the playlist instance
+ * \param loop the loop attribute. 1 sets looping, 0 disables it
+ * \param p_e an initialized exception pointer
+ */
+VLC_DEPRECATED_API void libvlc_playlist_loop( libvlc_instance_t* , int,
+ libvlc_exception_t * );
+
+/**
+ * Start playing.
+ *
+ * Additionnal playlist item options can be specified for addition to the
+ * item before it is played.
+ *
+ * \param p_instance the playlist instance
+ * \param i_id the item to play. If this is a negative number, the next
+ * item will be selected. Otherwise, the item with the given ID will be
+ * played
+ * \param i_options the number of options to add to the item
+ * \param ppsz_options the options to add to the item
+ * \param p_e an initialized exception pointer
+ */
+VLC_DEPRECATED_API void libvlc_playlist_play( libvlc_instance_t*, int, int,
+ char **, libvlc_exception_t * );
+
+/**
+ * Toggle the playlist's pause status.
+ *
+ * If the playlist was running, it is paused. If it was paused, it is resumed.
+ *
+ * \param p_instance the playlist instance to pause
+ * \param p_e an initialized exception pointer
+ */
+VLC_DEPRECATED_API void libvlc_playlist_pause( libvlc_instance_t *,
+ libvlc_exception_t * );
+
+/**
+ * Checks whether the playlist is running
+ *
+ * \param p_instance the playlist instance
+ * \param p_e an initialized exception pointer
+ * \return 0 if the playlist is stopped or paused, 1 if it is running
+ */
+VLC_DEPRECATED_API int libvlc_playlist_isplaying( libvlc_instance_t *,
+ libvlc_exception_t * );
+
+/**
+ * Get the number of items in the playlist
+ *
+ * \param p_instance the playlist instance
+ * \param p_e an initialized exception pointer
+ * \return the number of items
+ */
+VLC_DEPRECATED_API int libvlc_playlist_items_count( libvlc_instance_t *,
+ libvlc_exception_t * );
+
+/**
+ * Lock the playlist.
+ *
+ * \param p_instance the playlist instance
+ */
+VLC_DEPRECATED_API void libvlc_playlist_lock( libvlc_instance_t * );
+
+/**
+ * Unlock the playlist.
+ *
+ * \param p_instance the playlist instance
+ */
+VLC_DEPRECATED_API void libvlc_playlist_unlock( libvlc_instance_t * );
+
+/**
+ * Stop playing.
+ *
+ * \param p_instance the playlist instance to stop
+ * \param p_e an initialized exception pointer
+ */
+VLC_DEPRECATED_API void libvlc_playlist_stop( libvlc_instance_t *,
+ libvlc_exception_t * );
+
+/**
+ * Go to the next playlist item. If the playlist was stopped, playback
+ * is started.
+ *
+ * \param p_instance the playlist instance
+ * \param p_e an initialized exception pointer
+ */
+VLC_DEPRECATED_API void libvlc_playlist_next( libvlc_instance_t *,
+ libvlc_exception_t * );
+
+/**
+ * Go to the previous playlist item. If the playlist was stopped, playback
+ * is started.
+ *
+ * \param p_instance the playlist instance
+ * \param p_e an initialized exception pointer
+ */
+VLC_DEPRECATED_API void libvlc_playlist_prev( libvlc_instance_t *,
+ libvlc_exception_t * );
+
+/**
+ * Empty a playlist. All items in the playlist are removed.
+ *
+ * \param p_instance the playlist instance
+ * \param p_e an initialized exception pointer
+ */
+VLC_DEPRECATED_API void libvlc_playlist_clear( libvlc_instance_t *,
+ libvlc_exception_t * );
+
+/**
+ * Append an item to the playlist. The item is added at the end. If more
+ * advanced options are required, \see libvlc_playlist_add_extended instead.
+ *
+ * \param p_instance the playlist instance
+ * \param psz_uri the URI to open, using VLC format
+ * \param psz_name a name that you might want to give or NULL
+ * \param p_e an initialized exception pointer
+ * \return the identifier of the new item
+ */
+VLC_DEPRECATED_API int libvlc_playlist_add( libvlc_instance_t *, const char *,
+ const char *, libvlc_exception_t * );
+
+/**
+ * Append an item to the playlist. The item is added at the end, with
+ * additional input options.
+ *
+ * \param p_instance the playlist instance
+ * \param psz_uri the URI to open, using VLC format
+ * \param psz_name a name that you might want to give or NULL
+ * \param i_options the number of options to add
+ * \param ppsz_options strings representing the options to add
+ * \param p_e an initialized exception pointer
+ * \return the identifier of the new item
+ */
+VLC_DEPRECATED_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
+ const char *, int, const char **,
+ libvlc_exception_t * );
+
+/**
+ * Delete the playlist item with the given ID.
+ *
+ * \param p_instance the playlist instance
+ * \param i_id the id to remove
+ * \param p_e an initialized exception pointer
+ * \return 0 in case of success, a non-zero value otherwise
+ */
+VLC_DEPRECATED_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
+ libvlc_exception_t * );
+
+/** Get the input that is currently being played by the playlist.
+ *
+ * \param p_instance the playlist instance to use
+ * \param p_e an initialized exception pointern
+ * \return a media instance object
+ */
+VLC_DEPRECATED_API libvlc_media_instance_t * libvlc_playlist_get_media_instance(
+ libvlc_instance_t *, libvlc_exception_t * );
+
+/** @}*/
+
+/**
+ * \defgroup libvlc_old Libvlc Old (Deprecated)
+ * This is libvlc, the base library of the VLC program. (Deprecated)
+ * This is the legacy API. Please consider using the new libvlc API
+ *
+ * @deprecated
+ * @{
+ */
+
+/*****************************************************************************
+ * Our custom types
+ *****************************************************************************/
+typedef bool vlc_bool_t;
+typedef struct vlc_list_t vlc_list_t;
+typedef struct vlc_object_t vlc_object_t;
+
+/**
+ * \defgroup var_type Variable types
+ * These are the different types a vlc variable can have.
+ * @{
+ */
+#define VLC_VAR_VOID 0x0010
+#define VLC_VAR_BOOL 0x0020
+#define VLC_VAR_INTEGER 0x0030
+#define VLC_VAR_HOTKEY 0x0031
+#define VLC_VAR_STRING 0x0040
+#define VLC_VAR_MODULE 0x0041
+#define VLC_VAR_FILE 0x0042
+#define VLC_VAR_DIRECTORY 0x0043
+#define VLC_VAR_VARIABLE 0x0044
+#define VLC_VAR_FLOAT 0x0050
+#define VLC_VAR_TIME 0x0060
+#define VLC_VAR_ADDRESS 0x0070
+#define VLC_VAR_MUTEX 0x0080
+#define VLC_VAR_LIST 0x0090
+/**@}*/
+
+/**
+ * VLC value structure
+ */
+typedef union
+{
+ int i_int;
+ vlc_bool_t b_bool;
+ float f_float;
+ char * psz_string;
+ void * p_address;
+ vlc_object_t * p_object;
+ vlc_list_t * p_list;
+ vlc_int64_t i_time;
+
+ struct { char *psz_name; int i_object_id; } var;
+
+ /* Make sure the structure is at least 64bits */
+ struct { char a, b, c, d, e, f, g, h; } padding;
+
+} vlc_value_t;
+
+/**
+ * VLC list structure
+ */
+struct vlc_list_t
+{
+ int i_count;
+ vlc_value_t * p_values;
+ int * pi_types;
+
+};
+
+/*****************************************************************************
+ * Error values
+ *****************************************************************************/
+#define VLC_SUCCESS -0 /* No error */
+#define VLC_ENOMEM -1 /* Not enough memory */
+#define VLC_ETHREAD -2 /* Thread error */
+#define VLC_ETIMEOUT -3 /* Timeout */
+
+#define VLC_ENOMOD -10 /* Module not found */
+
+#define VLC_ENOOBJ -20 /* Object not found */
+#define VLC_EBADOBJ -21 /* Bad object type */
+
+#define VLC_ENOVAR -30 /* Variable not found */
+#define VLC_EBADVAR -31 /* Bad variable value */
+
+#define VLC_ENOITEM -40 /**< Item not found */
+
+#define VLC_EEXIT -255 /* Program exited */
+#define VLC_EEXITSUCCESS -999 /* Program exited successfully */
+#define VLC_EGENERIC -666 /* Generic error */
+
+/*****************************************************************************
+ * Booleans
+ *****************************************************************************/
+#define VLC_FALSE false
+#define VLC_TRUE true
+
+/*****************************************************************************
+ * Playlist
+ *****************************************************************************/
+
+/* Used by VLC_AddTarget() */
+#define PLAYLIST_INSERT 0x0001
+#define PLAYLIST_APPEND 0x0002
+#define PLAYLIST_GO 0x0004
+#define PLAYLIST_PREPARSE 0x0008
+#define PLAYLIST_SPREPARSE 0x0010
+#define PLAYLIST_NO_REBUILD 0x0020
+
+#define PLAYLIST_END -666
+
+/*****************************************************************************
+ * Required internal headers
+ *****************************************************************************/
+#if defined( __LIBVLC__ )
+# include "vlc_common.h"
+#endif
+
+
+/*****************************************************************************
+ * Exported vlc API (Deprecated)
+ *****************************************************************************/
+
+#if !defined( __LIBVLC__ )
+/* Otherwise they are declared and exported in vlc_common.h */
+/**
+ * Retrieve libvlc version
+ *
+ * \return a string containing the libvlc version
+ */
+VLC_DEPRECATED_API char const * VLC_Version ( void );
+
+/**
+ * Retrieve libvlc compile time
+ *
+ * \return a string containing the libvlc compile time
+ */
+VLC_DEPRECATED_API char const * VLC_CompileTime ( void );
+
+/**
+ * Retrieve the username of the libvlc builder
+ *
+ * \return a string containing the username of the libvlc builder
+ */
+VLC_DEPRECATED_API char const * VLC_CompileBy ( void );
+
+/**
+ * Retrieve the host of the libvlc builder
+ *
+ * \return a string containing the host of the libvlc builder
+ */
+VLC_DEPRECATED_API char const * VLC_CompileHost ( void );
+
+/**
+ * Retrieve the domain name of the host of the libvlc builder
+ *
+ * \return a string containing the domain name of the host of the libvlc builder
+ */
+VLC_DEPRECATED_API char const * VLC_CompileDomain ( void );
+
+/**
+ * Retrieve libvlc compiler version
+ *
+ * \return a string containing the libvlc compiler version
+ */
+VLC_DEPRECATED_API char const * VLC_Compiler ( void );
+
+/**
+ * Retrieve libvlc changeset
+ *
+ * \return a string containing the libvlc subversion changeset
+ */
+VLC_DEPRECATED_API char const * VLC_Changeset ( void );
+
+/**
+ * Return an error string
+ *
+ * \param i_err an error code
+ * \return an error string
+ */
+VLC_DEPRECATED_API char const * VLC_Error ( int i_err );
+
+#endif /* __LIBVLC__ */
+
+/**
+ * Initialize libvlc
+ *
+ * This function allocates a vlc_t structure and returns a negative value
+ * in case of failure. Also, the thread system is initialized
+ *
+ * \return vlc object id or an error code
+ */
+VLC_DEPRECATED_API int VLC_Create( void );
+
+/**
+ * Initialize a vlc_t structure
+ *
+ * This function initializes a previously allocated vlc_t structure:
+ * - CPU detection
+ * - gettext initialization
+ * - message queue, module bank and playlist initialization
+ * - configuration and commandline parsing
+ *
+ * \param i_object a vlc object id
+ * \param i_argc the number of arguments
+ * \param ppsz_argv an array of arguments
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_Init( int, int, const char *[] );
+
+/**
+ * Add an interface
+ *
+ * This function opens an interface plugin and runs it. If b_block is set
+ * to 0, VLC_AddIntf will return immediately and let the interface run in a
+ * separate thread. If b_block is set to 1, VLC_AddIntf will continue until
+ * user requests to quit.
+ *
+ * \param i_object a vlc object id
+ * \param psz_module a vlc module name of an interface
+ * \param b_block make this interface blocking
+ * \param b_play start playing when the interface is done loading
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_AddIntf( int, char const *, vlc_bool_t, vlc_bool_t );
+
+/**
+ * Ask vlc to die
+ *
+ * This function sets p_libvlc->b_die to VLC_TRUE, but does not do any other
+ * task. It is your duty to call VLC_CleanUp and VLC_Destroy afterwards.
+ *
+ * \param i_object a vlc object id
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_Die( int );
+
+/**
+ * Clean up all the intf, playlist, vout and aout
+ *
+ * This function requests all intf, playlist, vout and aout objects to finish
+ * and CleanUp. Only a blank VLC object should remain after this.
+ *
+ * \note This function was previously called VLC_Stop
+ *
+ * \param i_object a vlc object id
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_CleanUp( int );
+
+/**
+ * Destroy all threads and the VLC object
+ *
+ * This function requests the running threads to finish, waits for their
+ * termination, and destroys their structure.
+ * Then it will de-init all VLC object initializations.
+ *
+ * \param i_object a vlc object id
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_Destroy( int );
+
+/**
+ * Set a VLC variable
+ *
+ * This function sets a variable of VLC
+ *
+ * \note Was previously called VLC_Set
+ *
+ * \param i_object a vlc object id
+ * \param psz_var a vlc variable name
+ * \param value a vlc_value_t structure
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_VariableSet( int, char const *, vlc_value_t );
+
+/**
+ * Get a VLC variable
+ *
+ * This function gets the value of a variable of VLC
+ * It stores it in the p_value argument
+ *
+ * \note Was previously called VLC_Get
+ *
+ * \param i_object a vlc object id
+ * \param psz_var a vlc variable name
+ * \param p_value a pointer to a vlc_value_t structure
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_VariableGet( int, char const *, vlc_value_t * );
+
+/**
+ * Get a VLC variable type
+ *
+ * This function gets the type of a variable of VLC
+ * It stores it in the p_type argument
+ *
+ * \param i_object a vlc object id
+ * \param psz_var a vlc variable name
+ * \param pi_type a pointer to an integer
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_VariableType( int, char const *, int * );
+
+/**
+ * Add a target to the current playlist
+ *
+ * This funtion will add a target to the current playlist. If a playlist does
+ * not exist, it will be created.
+ *
+ * \param i_object a vlc object id
+ * \param psz_target the URI of the target to play
+ * \param ppsz_options an array of strings with input options (ie. :input-repeat)
+ * \param i_options the amount of options in the ppsz_options array
+ * \param i_mode the insert mode to insert the target into the playlist (PLAYLIST_* defines)
+ * \param i_pos the position at which to add the new target (PLAYLIST_END for end)
+ * \return the item id on success and -1 on error
+ */
+VLC_DEPRECATED_API int VLC_AddTarget( int, char const *, const char **, int, int, int );
+
+/**
+ * Start the playlist and play the currently selected playlist item
+ *
+ * If there is something in the playlist, and the playlist is not running,
+ * then start the playlist and play the currently selected playlist item.
+ * If an item is currently paused, then resume it.
+ *
+ * \param i_object a vlc object id
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_Play( int );
+
+/**
+ * Pause the currently playing item. Resume it if already paused
+ *
+ * If an item is currently playing then pause it.
+ * If the item is already paused, then resume playback.
+ *
+ * \param i_object a vlc object id
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_Pause( int );
+
+/**
+ * Stop the playlist
+ *
+ * If an item is currently playing then stop it.
+ * Set the playlist to a stopped state.
+ *
+ * \note This function is new. The old VLC_Stop is now called VLC_CleanUp
+ *
+ * \param i_object a vlc object id
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_Stop( int );
+
+/**
+ * Tell if VLC is playing
+ *
+ * If an item is currently playing, it returns
+ * VLC_TRUE, else VLC_FALSE
+ *
+ * \param i_object a vlc object id
+ * \return VLC_TRUE or VLC_FALSE
+ */
+VLC_DEPRECATED_API vlc_bool_t VLC_IsPlaying( int );
+
+/**
+ * Get the current position in a input
+ *
+ * Return the current position as a float
+ * This method should be used for time sliders etc
+ * \note For some inputs, this will be unknown.
+ *
+ * \param i_object a vlc object id
+ * \return a float in the range of 0.0 - 1.0
+ */
+VLC_DEPRECATED_API float VLC_PositionGet( int );
+
+/**
+ * Set the current position in a input
+ *
+ * Set the current position as a float
+ * This method should be used for time sliders etc
+ * \note For some inputs, this will be unknown.
+ *
+ * \param i_object a vlc object id
+ * \param i_position a float in the range of 0.0 - 1.0
+ * \return a float in the range of 0.0 - 1.0
+ */
+VLC_DEPRECATED_API float VLC_PositionSet( int, float );
+
+/**
+ * Get the current position in a input
+ *
+ * Return the current position in seconds from the start.
+ * \note For some inputs, this will be unknown.
+ *
+ * \param i_object a vlc object id
+ * \return the offset from 0:00 in seconds
+ */
+VLC_DEPRECATED_API int VLC_TimeGet( int );
+
+/**
+ * Seek to a position in the current input
+ *
+ * Seek i_seconds in the current input. If b_relative is set,
+ * then the seek will be relative to the current position, otherwise
+ * it will seek to i_seconds from the beginning of the input.
+ * \note For some inputs, this will be unknown.
+ *
+ * \param i_object a vlc object id
+ * \param i_seconds seconds from current position or from beginning of input
+ * \param b_relative seek relative from current position
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_TimeSet( int, int, vlc_bool_t );
+
+/**
+ * Get the total length of a input
+ *
+ * Return the total length in seconds from the current input.
+ * \note For some inputs, this will be unknown.
+ *
+ * \param i_object a vlc object id
+ * \return the length in seconds
+ */
+VLC_DEPRECATED_API int VLC_LengthGet( int );
+
+/**
+ * Play the input faster than realtime
+ *
+ * 2x, 4x, 8x faster than realtime
+ * \note For some inputs, this will be impossible.
+ *
+ * \param i_object a vlc object id
+ * \return the current speedrate
+ */
+VLC_DEPRECATED_API float VLC_SpeedFaster( int );
+
+/**
+ * Play the input slower than realtime
+ *
+ * 1/2x, 1/4x, 1/8x slower than realtime
+ * \note For some inputs, this will be impossible.
+ *
+ * \param i_object a vlc object id
+ * \return the current speedrate
+ */
+VLC_DEPRECATED_API float VLC_SpeedSlower( int );
+
+/**
+ * Return the current playlist item
+ *
+ * \param i_object a vlc object id
+ * \return the index of the playlistitem that is currently selected for play
+ */
+VLC_DEPRECATED_API int VLC_PlaylistIndex( int );
+
+/**
+ * Total amount of items in the playlist
+ *
+ * \param i_object a vlc object id
+ * \return amount of playlist items
+ */
+VLC_DEPRECATED_API int VLC_PlaylistNumberOfItems( int );
+
+/**
+ * Next playlist item
+ *
+ * Skip to the next playlistitem and play it.
+ *
+ * \param i_object a vlc object id
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_PlaylistNext( int );
+
+/**
+ * Previous playlist item
+ *
+ * Skip to the previous playlistitem and play it.
+ *
+ * \param i_object a vlc object id
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_PlaylistPrev( int );
+
+/**
+ * Clear the contents of the playlist
+ *
+ * Completly empty the entire playlist.
+ *
+ * \note Was previously called VLC_ClearPlaylist
+ *
+ * \param i_object a vlc object id
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_PlaylistClear( int );
+
+/**
+ * Change the volume
+ *
+ * \param i_object a vlc object id
+ * \param i_volume something in a range from 0-200
+ * \return the new volume (range 0-200 %)
+ */
+VLC_DEPRECATED_API int VLC_VolumeSet( int, int );
+
+/**
+ * Get the current volume
+ *
+ * Retrieve the current volume.
+ *
+ * \param i_object a vlc object id
+ * \return the current volume (range 0-200 %)
+ */
+VLC_DEPRECATED_API int VLC_VolumeGet( int );
+
+/**
+ * Mute/Unmute the volume
+ *
+ * \param i_object a vlc object id
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_VolumeMute( int );
+
+/**
+ * Toggle Fullscreen mode
+ *
+ * Switch between normal and fullscreen video
+ *
+ * \param i_object a vlc object id
+ * \return VLC_SUCCESS on success
+ */
+VLC_DEPRECATED_API int VLC_FullScreen( int );
+
+/**@} */
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* _LIBVLC_DEPRECATED_H */
/*****************************************************************************
- * libvlc.h: libvlc_* new external API
+ * libvlc.h: libvlc external API
*****************************************************************************
* Copyright (C) 1998-2005 the VideoLAN team
* $Id$
*
* Authors: Clément Stenac <zorglub@videolan.org>
* Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
+ * Pierre d'Herbemont <pdherbemont@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
#define _LIBVLC_H 1
#include <vlc/vlc.h>
-#include <vlc/libvlc_structures.h>
# ifdef __cplusplus
extern "C" {
/*****************************************************************************
* Exception handling
*****************************************************************************/
-/** defgroup libvlc_exception Exceptions
+/** \defgroup libvlc_exception Exceptions
* \ingroup libvlc
* LibVLC Exceptions handling
* @{
* Core handling
*****************************************************************************/
-/** defgroup libvlc_core Core
+/** \defgroup libvlc_core Core
* \ingroup libvlc
* LibVLC Core
* @{
/*****************************************************************************
* Media descriptor
*****************************************************************************/
-/** defgroup libvlc_media_descriptor Media Descriptor
+/** \defgroup libvlc_media_descriptor Media Descriptor
* \ingroup libvlc
* LibVLC Media Descriptor
* @{
libvlc_media_descriptor_t *p_meta_desc,
libvlc_exception_t *p_e );
-/* Tags */
-VLC_PUBLIC_API void libvlc_media_descriptor_add_tag( libvlc_media_descriptor_t *p_md,
- const char * key,
- const libvlc_tag_t tag,
- libvlc_exception_t *p_e );
-
-VLC_PUBLIC_API void libvlc_media_descriptor_remove_tag( libvlc_media_descriptor_t *p_md,
- const char * key,
- const libvlc_tag_t tag,
- libvlc_exception_t *p_e );
-
-VLC_PUBLIC_API int
- libvlc_media_descriptor_tags_count_for_key( libvlc_media_descriptor_t *p_md,
- const char * key,
- libvlc_exception_t *p_e );
-
-VLC_PUBLIC_API libvlc_tag_t
- libvlc_media_descriptor_tag_at_index_for_key( libvlc_media_descriptor_t *p_md,
- int i,
- const char * key,
- libvlc_exception_t *p_e );
-
VLC_PUBLIC_API libvlc_media_list_t *
libvlc_media_descriptor_subitems( libvlc_media_descriptor_t *p_md,
libvlc_exception_t *p_e );
/*****************************************************************************
* Media Instance
*****************************************************************************/
-/** defgroup libvlc_media_instance Media Instance
+/** \defgroup libvlc_media_instance Media Instance
* \ingroup libvlc
* LibVLC Media Instance, object that let you play a media descriptor
* in a libvlc_drawable_t
*/
VLC_PUBLIC_API int libvlc_media_instance_can_pause( libvlc_media_instance_t *p_mi, libvlc_exception_t *p_e );
-/** defgroup libvlc_video Video
+/** \defgroup libvlc_video Video
* \ingroup libvlc_media_instance
* LibVLC Video handling
* @{
/** @} video */
-/** defgroup libvlc_audio Audio
+/** \defgroup libvlc_audio Audio
* \ingroup libvlc_media_instance
* LibVLC Audio handling
* @{
* Event handling
*****************************************************************************/
-/** defgroup libvlc_callbacks Callbacks
+/** \defgroup libvlc_callbacks Callbacks
* \ingroup libvlc
* LibVLC Events
* @{
/*****************************************************************************
* Media List
*****************************************************************************/
-/** defgroup libvlc_media_list MediaList
+/** \defgroup libvlc_media_list MediaList
* \ingroup libvlc
* LibVLC Media List, a media list holds multiple media descriptors
* @{
/*****************************************************************************
* Media List View
*****************************************************************************/
-/** defgroup libvlc_media_list_view MediaListView
+/** \defgroup libvlc_media_list_view MediaListView
* \ingroup libvlc_media_list
* LibVLC Media List View, represent a media_list using a different layout
* @{ */
/*****************************************************************************
* Media List Player
*****************************************************************************/
-/** defgroup libvlc_media_list_player MediaListPlayer
+/** \defgroup libvlc_media_list_player MediaListPlayer
* \ingroup libvlc
* LibVLC Media List Player, play a media_list. You can see that as a media
* instance subclass
/*****************************************************************************
* Media Library
*****************************************************************************/
-/** defgroup libvlc_media_library Media Library
+/** \defgroup libvlc_media_library Media Library
* \ingroup libvlc
* LibVLC Media Library
* @{
/*****************************************************************************
* Services/Media Discovery
*****************************************************************************/
-/** defgroup libvlc_media_discoverer Media Discoverer
+/** \defgroup libvlc_media_discoverer Media Discoverer
* \ingroup libvlc
* LibVLC Media Discoverer
* @{
/**@} */
-/*****************************************************************************
- * VLM
- *****************************************************************************/
-/** defgroup libvlc_vlm VLM
- * \ingroup libvlc
- * LibVLC VLM
- * @{
- */
-
-/**
- * Add a broadcast, with one input.
- *
- * \param p_instance the instance
- * \param psz_name the name of the new broadcast
- * \param psz_input the input MRL
- * \param psz_output the output MRL (the parameter to the "sout" variable)
- * \param i_options number of additional options
- * \param ppsz_options additional options
- * \param b_enabled boolean for enabling the new broadcast
- * \param b_loop Should this broadcast be played in loop ?
- * \param p_e an initialized exception pointer
- */
-VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
- int, char **, int, int, libvlc_exception_t * );
-
-/**
- * Delete a media (VOD or broadcast).
- *
- * \param p_instance the instance
- * \param psz_name the media to delete
- * \param p_e an initialized exception pointer
- */
-VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
-
-/**
- * Enable or disable a media (VOD or broadcast).
- *
- * \param p_instance the instance
- * \param psz_name the media to work on
- * \param b_enabled the new status
- * \param p_e an initialized exception pointer
- */
-VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
- libvlc_exception_t *);
-
-/**
- * Set the output for a media.
- *
- * \param p_instance the instance
- * \param psz_name the media to work on
- * \param psz_output the output MRL (the parameter to the "sout" variable)
- * \param p_e an initialized exception pointer
- */
-VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
- libvlc_exception_t *);
-
-/**
- * Set a media's input MRL. This will delete all existing inputs and
- * add the specified one.
- *
- * \param p_instance the instance
- * \param psz_name the media to work on
- * \param psz_input the input MRL
- * \param p_e an initialized exception pointer
- */
-VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
- libvlc_exception_t *);
-
-/**
- * Add a media's input MRL. This will add the specified one.
- *
- * \param p_instance the instance
- * \param psz_name the media to work on
- * \param psz_input the input MRL
- * \param p_e an initialized exception pointer
- */
-VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
- libvlc_exception_t *p_exception );
-/**
- * Set a media's loop status.
- *
- * \param p_instance the instance
- * \param psz_name the media to work on
- * \param b_loop the new status
- * \param p_e an initialized exception pointer
- */
-VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
- libvlc_exception_t *);
-
-/**
- * Edit the parameters of a media. This will delete all existing inputs and
- * add the specified one.
- *
- * \param p_instance the instance
- * \param psz_name the name of the new broadcast
- * \param psz_input the input MRL
- * \param psz_output the output MRL (the parameter to the "sout" variable)
- * \param i_options number of additional options
- * \param ppsz_options additional options
- * \param b_enabled boolean for enabling the new broadcast
- * \param b_loop Should this broadcast be played in loop ?
- * \param p_e an initialized exception pointer
- */
-VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
- int, char **, int, int, libvlc_exception_t * );
-
-/**
- * Play the named broadcast.
- *
- * \param p_instance the instance
- * \param psz_name the name of the broadcast
- * \param p_e an initialized exception pointer
- */
-VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
-
-/**
- * Stop the named broadcast.
- *
- * \param p_instance the instance
- * \param psz_name the name of the broadcast
- * \param p_e an initialized exception pointer
- */
-VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
-
-/**
- * Pause the named broadcast.
- *
- * \param p_instance the instance
- * \param psz_name the name of the broadcast
- * \param p_e an initialized exception pointer
- */
-VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
-
-/**
- * Seek in the named broadcast.
- *
- * \param p_instance the instance
- * \param psz_name the name of the broadcast
- * \param f_percentage the percentage to seek to
- * \param p_e an initialized exception pointer
- */
-VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
- float, libvlc_exception_t * );
-
-/**
- * Return information about the named broadcast.
- *
- * \param p_instance the instance
- * \param psz_name the name of the broadcast
- * \param p_e an initialized exception pointer
- */
-VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
-
-#define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
-returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *, \
- char *, int , libvlc_exception_t * );
-
-VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
-VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
-VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
-VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
-VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
-VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
-VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
-
-#undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
-
-/** @} */
-
/*****************************************************************************
* Message log handling
*****************************************************************************/
-/** defgroup libvlc_log Log
+/** \defgroup libvlc_log Log
* \ingroup libvlc
* LibVLC Message Logging
* @{
/** @} */
-/*****************************************************************************
- * Playlist (Deprecated)
- *****************************************************************************/
-/** defgroup libvlc_playlist Playlist
- * \ingroup libvlc
- * LibVLC Playlist handling
- * @{
- */
-
-/**
- * Set the playlist's loop attribute. If set, the playlist runs continuously
- * and wraps around when it reaches the end.
- *
- * \param p_instance the playlist instance
- * \param loop the loop attribute. 1 sets looping, 0 disables it
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_playlist_loop( libvlc_instance_t* , int,
- libvlc_exception_t * );
-
-/**
- * Start playing.
- *
- * Additionnal playlist item options can be specified for addition to the
- * item before it is played.
- *
- * \param p_instance the playlist instance
- * \param i_id the item to play. If this is a negative number, the next
- * item will be selected. Otherwise, the item with the given ID will be
- * played
- * \param i_options the number of options to add to the item
- * \param ppsz_options the options to add to the item
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_playlist_play( libvlc_instance_t*, int, int,
- char **, libvlc_exception_t * );
-
-/**
- * Toggle the playlist's pause status.
- *
- * If the playlist was running, it is paused. If it was paused, it is resumed.
- *
- * \param p_instance the playlist instance to pause
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_playlist_pause( libvlc_instance_t *,
- libvlc_exception_t * );
-
-/**
- * Checks whether the playlist is running
- *
- * \param p_instance the playlist instance
- * \param p_e an initialized exception pointer
- * \return 0 if the playlist is stopped or paused, 1 if it is running
- */
-VLC_DEPRECATED_API int libvlc_playlist_isplaying( libvlc_instance_t *,
- libvlc_exception_t * );
-
-/**
- * Get the number of items in the playlist
- *
- * \param p_instance the playlist instance
- * \param p_e an initialized exception pointer
- * \return the number of items
- */
-VLC_DEPRECATED_API int libvlc_playlist_items_count( libvlc_instance_t *,
- libvlc_exception_t * );
-
-/**
- * Lock the playlist.
- *
- * \param p_instance the playlist instance
- */
-VLC_DEPRECATED_API void libvlc_playlist_lock( libvlc_instance_t * );
-
-/**
- * Unlock the playlist.
- *
- * \param p_instance the playlist instance
- */
-VLC_DEPRECATED_API void libvlc_playlist_unlock( libvlc_instance_t * );
-
-/**
- * Stop playing.
- *
- * \param p_instance the playlist instance to stop
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_playlist_stop( libvlc_instance_t *,
- libvlc_exception_t * );
-
-/**
- * Go to the next playlist item. If the playlist was stopped, playback
- * is started.
- *
- * \param p_instance the playlist instance
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_playlist_next( libvlc_instance_t *,
- libvlc_exception_t * );
-
-/**
- * Go to the previous playlist item. If the playlist was stopped, playback
- * is started.
- *
- * \param p_instance the playlist instance
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_playlist_prev( libvlc_instance_t *,
- libvlc_exception_t * );
-
-/**
- * Empty a playlist. All items in the playlist are removed.
- *
- * \param p_instance the playlist instance
- * \param p_e an initialized exception pointer
- */
-VLC_DEPRECATED_API void libvlc_playlist_clear( libvlc_instance_t *,
- libvlc_exception_t * );
-
-/**
- * Append an item to the playlist. The item is added at the end. If more
- * advanced options are required, \see libvlc_playlist_add_extended instead.
- *
- * \param p_instance the playlist instance
- * \param psz_uri the URI to open, using VLC format
- * \param psz_name a name that you might want to give or NULL
- * \param p_e an initialized exception pointer
- * \return the identifier of the new item
- */
-VLC_DEPRECATED_API int libvlc_playlist_add( libvlc_instance_t *, const char *,
- const char *, libvlc_exception_t * );
-
-/**
- * Append an item to the playlist. The item is added at the end, with
- * additional input options.
- *
- * \param p_instance the playlist instance
- * \param psz_uri the URI to open, using VLC format
- * \param psz_name a name that you might want to give or NULL
- * \param i_options the number of options to add
- * \param ppsz_options strings representing the options to add
- * \param p_e an initialized exception pointer
- * \return the identifier of the new item
- */
-VLC_DEPRECATED_API int libvlc_playlist_add_extended( libvlc_instance_t *, const char *,
- const char *, int, const char **,
- libvlc_exception_t * );
-
-/**
- * Delete the playlist item with the given ID.
- *
- * \param p_instance the playlist instance
- * \param i_id the id to remove
- * \param p_e an initialized exception pointer
- * \return 0 in case of success, a non-zero value otherwise
- */
-VLC_DEPRECATED_API int libvlc_playlist_delete_item( libvlc_instance_t *, int,
- libvlc_exception_t * );
-
-/** Get the input that is currently being played by the playlist.
- *
- * \param p_instance the playlist instance to use
- * \param p_e an initialized exception pointern
- * \return a media instance object
- */
-VLC_DEPRECATED_API libvlc_media_instance_t * libvlc_playlist_get_media_instance(
- libvlc_instance_t *, libvlc_exception_t * );
-
-/** @}*/
-
# ifdef __cplusplus
}
# endif
--- /dev/null
+/*****************************************************************************
+ * libvlc_events.h: libvlc_events external API structure
+ *****************************************************************************
+ * Copyright (C) 1998-2007 the VideoLAN team
+ * $Id $
+ *
+ * Authors: Filippo Carone <littlejohn@videolan.org>
+ * Pierre d'Herbemont <pdherbemont@videolan.org>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef _LIBVLC_EVENTS_H
+#define _LIBVLC_EVENTS_H 1
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/*****************************************************************************
+ * Events handling
+ *****************************************************************************/
+
+/** \defgroup libvlc_events Events
+ * \ingroup libvlc
+ * LibVLC Available Events
+ * @{
+ */
+
+typedef enum libvlc_event_type_t {
+ libvlc_MediaDescriptorMetaChanged,
+ libvlc_MediaDescriptorSubItemAdded,
+ libvlc_MediaDescriptorDurationChanged,
+ libvlc_MediaDescriptorPreparsedChanged,
+ libvlc_MediaDescriptorFreed,
+ libvlc_MediaDescriptorStateChanged,
+
+ libvlc_MediaInstancePlayed,
+ libvlc_MediaInstancePaused,
+ libvlc_MediaInstanceReachedEnd,
+ libvlc_MediaInstanceEncounteredError,
+ libvlc_MediaInstanceTimeChanged,
+ libvlc_MediaInstancePositionChanged,
+ libvlc_MediaInstanceSeekableChanged,
+ libvlc_MediaInstancePausableChanged,
+
+ libvlc_MediaListItemAdded,
+ libvlc_MediaListWillAddItem,
+ libvlc_MediaListItemDeleted,
+ libvlc_MediaListWillDeleteItem,
+
+ libvlc_MediaListViewItemAdded,
+ libvlc_MediaListViewWillAddItem,
+ libvlc_MediaListViewItemDeleted,
+ libvlc_MediaListViewWillDeleteItem,
+
+ libvlc_MediaListPlayerPlayed,
+ libvlc_MediaListPlayerNextItemSet,
+ libvlc_MediaListPlayerStopped,
+
+ libvlc_MediaDiscovererStarted,
+ libvlc_MediaDiscovererEnded
+
+} libvlc_event_type_t;
+
+/**
+ * An Event
+ * \param type the even type
+ * \param p_obj the sender object
+ * \param u Event dependent content
+ */
+
+typedef struct libvlc_event_t
+{
+ libvlc_event_type_t type;
+ void * p_obj;
+ union event_type_specific
+ {
+ /* media descriptor */
+ struct
+ {
+ libvlc_meta_t meta_type;
+ } media_descriptor_meta_changed;
+ struct
+ {
+ libvlc_media_descriptor_t * new_child;
+ } media_descriptor_subitem_added;
+ struct
+ {
+ vlc_int64_t new_duration;
+ } media_descriptor_duration_changed;
+ struct
+ {
+ int new_status;
+ } media_descriptor_preparsed_changed;
+ struct
+ {
+ libvlc_media_descriptor_t * md;
+ } media_descriptor_freed;
+ struct
+ {
+ libvlc_state_t new_state;
+ } media_descriptor_state_changed;
+
+ /* media instance */
+ struct
+ {
+ float new_position;
+ } media_instance_position_changed;
+ struct
+ {
+ libvlc_time_t new_time;
+ } media_instance_time_changed;
+ struct
+ {
+ libvlc_time_t new_seekable;
+ } media_instance_seekable_changed;
+ struct
+ {
+ libvlc_time_t new_pausable;
+ } media_instance_pausable_changed;
+
+ /* media list */
+ struct
+ {
+ libvlc_media_descriptor_t * item;
+ int index;
+ } media_list_item_added;
+ struct
+ {
+ libvlc_media_descriptor_t * item;
+ int index;
+ } media_list_will_add_item;
+ struct
+ {
+ libvlc_media_descriptor_t * item;
+ int index;
+ } media_list_item_deleted;
+ struct
+ {
+ libvlc_media_descriptor_t * item;
+ int index;
+ } media_list_will_delete_item;
+
+ /* media list view */
+ struct
+ {
+ libvlc_media_descriptor_t * item;
+ int index;
+ } media_list_view_item_added;
+ struct
+ {
+ libvlc_media_descriptor_t * item;
+ int index;
+ } media_list_view_will_add_item;
+ struct
+ {
+ libvlc_media_descriptor_t * item;
+ int index;
+ } media_list_view_item_deleted;
+ struct
+ {
+ libvlc_media_descriptor_t * item;
+ int index;
+ } media_list_view_will_delete_item;
+
+ /* media discoverer */
+ struct
+ {
+ void * unused;
+ } media_media_discoverer_started;
+ struct
+ {
+ void * unused;
+ } media_media_discoverer_ended;
+
+ } u;
+} libvlc_event_t;
+
+/**
+ * Event manager that belongs to a libvlc object, and from whom events can
+ * be received.
+ */
+
+typedef struct libvlc_event_manager_t libvlc_event_manager_t;
+
+/**
+ * Callback function notification
+ * \param p_event the event triggering the callback
+ */
+
+typedef void ( *libvlc_callback_t )( const libvlc_event_t *, void * );
+
+/**@} */
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* _LIBVLC_EVENTS_H */
--- /dev/null
+/*****************************************************************************
+ * libvlc_media_list.h: libvlc_media_list API
+ *****************************************************************************
+ * Copyright (C) 1998-2005 the VideoLAN team
+ * $Id$
+ *
+ * Authors: Pierre d'Herbemont
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef _LIBVLC_MEDIA_LIST_H
+#define _LIBVLC_MEDIA_LIST_H 1
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/*****************************************************************************
+ * Media List
+ *****************************************************************************/
+/** defgroup libvlc_media_list MediaList
+ * \ingroup libvlc
+ * LibVLC Media List, a media list holds multiple media descriptors
+ * @{
+ */
+
+/**
+ * Create an empty media list.
+ *
+ * \param p_libvlc the event manager
+ * \param i_event_type the desired event to which we want to unregister
+ * \param f_callback the function to call when i_event_type occurs
+ * \param p_e an initialized exception pointer
+ */
+
+VLC_PUBLIC_API libvlc_media_list_t *
+ libvlc_media_list_new( libvlc_instance_t *, libvlc_exception_t * );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_release( libvlc_media_list_t * );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_retain( libvlc_media_list_t * );
+
+VLC_DEPRECATED_API void
+ libvlc_media_list_add_file_content( libvlc_media_list_t * p_mlist,
+ const char * psz_uri,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_set_media_descriptor( libvlc_media_list_t *,
+ libvlc_media_descriptor_t *,
+ libvlc_exception_t *);
+
+VLC_PUBLIC_API libvlc_media_descriptor_t *
+ libvlc_media_list_media_descriptor( libvlc_media_list_t *,
+ libvlc_exception_t *);
+
+VLC_PUBLIC_API void
+ libvlc_media_list_add_media_descriptor( libvlc_media_list_t *,
+ libvlc_media_descriptor_t *,
+ libvlc_exception_t * );
+VLC_PUBLIC_API void
+ libvlc_media_list_insert_media_descriptor( libvlc_media_list_t *,
+ libvlc_media_descriptor_t *,
+ int,
+ libvlc_exception_t * );
+VLC_PUBLIC_API void
+ libvlc_media_list_remove_index( libvlc_media_list_t *, int,
+ libvlc_exception_t * );
+
+VLC_PUBLIC_API int
+ libvlc_media_list_count( libvlc_media_list_t * p_mlist,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API libvlc_media_descriptor_t *
+ libvlc_media_list_item_at_index( libvlc_media_list_t *, int,
+ libvlc_exception_t * );
+VLC_PUBLIC_API int
+ libvlc_media_list_index_of_item( libvlc_media_list_t *,
+ libvlc_media_descriptor_t *,
+ libvlc_exception_t * );
+
+/* This indicates if this media list is read-only from a user point of view */
+VLC_PUBLIC_API int
+ libvlc_media_list_is_readonly( libvlc_media_list_t * p_mlist );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_lock( libvlc_media_list_t * );
+VLC_PUBLIC_API void
+ libvlc_media_list_unlock( libvlc_media_list_t * );
+
+VLC_PUBLIC_API libvlc_media_list_view_t *
+ libvlc_media_list_flat_view( libvlc_media_list_t *,
+ libvlc_exception_t * );
+
+VLC_PUBLIC_API libvlc_media_list_view_t *
+ libvlc_media_list_hierarchical_view( libvlc_media_list_t *,
+ libvlc_exception_t * );
+
+VLC_PUBLIC_API libvlc_media_list_view_t *
+ libvlc_media_list_hierarchical_node_view( libvlc_media_list_t *,
+ libvlc_exception_t * );
+
+VLC_PUBLIC_API libvlc_event_manager_t *
+ libvlc_media_list_event_manager( libvlc_media_list_t *,
+ libvlc_exception_t * );
+
+/*****************************************************************************
+ * Media List View
+ *****************************************************************************/
+/** defgroup libvlc_media_list_view MediaListView
+ * \ingroup libvlc_media_list
+ * LibVLC Media List View, represent a media_list using a different layout
+ * @{ */
+
+VLC_PUBLIC_API void
+ libvlc_media_list_view_retain( libvlc_media_list_view_t * p_mlv );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_view_release( libvlc_media_list_view_t * p_mlv );
+
+VLC_PUBLIC_API libvlc_event_manager_t *
+ libvlc_media_list_view_event_manager( libvlc_media_list_view_t * p_mlv );
+
+VLC_PUBLIC_API int
+ libvlc_media_list_view_count( libvlc_media_list_view_t * p_mlv,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API libvlc_media_descriptor_t *
+ libvlc_media_list_view_item_at_index( libvlc_media_list_view_t * p_mlv,
+ int index,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API libvlc_media_list_view_t *
+ libvlc_media_list_view_children_at_index( libvlc_media_list_view_t * p_mlv,
+ int index,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API libvlc_media_list_view_t *
+ libvlc_media_list_view_children_for_item( libvlc_media_list_view_t * p_mlv,
+ libvlc_media_descriptor_t * p_md,
+ libvlc_exception_t * p_e );
+
+
+VLC_PUBLIC_API int
+ libvlc_media_list_view_index_of_item( libvlc_media_list_view_t * p_mlv,
+ libvlc_media_descriptor_t * p_md,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_view_insert_at_index( libvlc_media_list_view_t * p_mlv,
+ libvlc_media_descriptor_t * p_md,
+ int index,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_view_remove_at_index( libvlc_media_list_view_t * p_mlv,
+ int index,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_view_add_item( libvlc_media_list_view_t * p_mlv,
+ libvlc_media_descriptor_t * p_md,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API libvlc_media_list_t *
+ libvlc_media_list_view_parent_media_list( libvlc_media_list_view_t * p_mlv,
+ libvlc_exception_t * p_e );
+
+/** @} media_list_view */
+
+/*****************************************************************************
+ * Media List Player
+ *****************************************************************************/
+/** defgroup libvlc_media_list_player MediaListPlayer
+ * \ingroup libvlc
+ * LibVLC Media List Player, play a media_list. You can see that as a media
+ * instance subclass
+ * @{
+ */
+VLC_PUBLIC_API libvlc_media_list_player_t *
+ libvlc_media_list_player_new( libvlc_instance_t * p_instance,
+ libvlc_exception_t * p_e );
+VLC_PUBLIC_API void
+ libvlc_media_list_player_release( libvlc_media_list_player_t * p_mlp );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_player_set_media_instance(
+ libvlc_media_list_player_t * p_mlp,
+ libvlc_media_instance_t * p_mi,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_player_set_media_list(
+ libvlc_media_list_player_t * p_mlp,
+ libvlc_media_list_t * p_mlist,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_player_play( libvlc_media_list_player_t * p_mlp,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_player_pause( libvlc_media_list_player_t * p_mlp,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API int
+ libvlc_media_list_player_is_playing( libvlc_media_list_player_t * p_mlp,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API libvlc_state_t
+ libvlc_media_list_player_get_state( libvlc_media_list_player_t * p_mlp,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_player_play_item_at_index(
+ libvlc_media_list_player_t * p_mlp,
+ int i_index,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_player_play_item(
+ libvlc_media_list_player_t * p_mlp,
+ libvlc_media_descriptor_t * p_md,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_player_stop( libvlc_media_list_player_t * p_mlp,
+ libvlc_exception_t * p_e );
+
+VLC_PUBLIC_API void
+ libvlc_media_list_player_next( libvlc_media_list_player_t * p_mlp,
+ libvlc_exception_t * p_e );
+
+/** @} media_list_player */
+
+/** @} media_list */
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* _LIBVLC_MEDIA_LIST_H */
#ifndef _LIBVLC_STRUCTURES_H
#define _LIBVLC_STRUCTURES_H 1
-#include <vlc/vlc.h>
-
# ifdef __cplusplus
extern "C" {
# endif
/**@} */
-/*****************************************************************************
- * Tag
- *****************************************************************************/
-/** defgroup libvlc_tag Tag
- * \ingroup libvlc
- * LibVLC Tag support in media descriptor
- * @{
- */
-
-typedef struct libvlc_tag_query_t libvlc_tag_query_t;
-typedef char * libvlc_tag_t;
-
-/**@} */
-
/*****************************************************************************
* Time
*****************************************************************************/
/**@} */
-/*****************************************************************************
- * Dynamic Media List
- *****************************************************************************/
-/** defgroup libvlc_media_list MediaList
- * \ingroup libvlc
- * LibVLC Dynamic Media list: Media list with content synchronized with
- * an other playlist
- * @{
- */
-
-typedef struct libvlc_dynamic_media_list_t libvlc_dynamic_media_list_t;
-
-/**@} */
-
/*****************************************************************************
* Media List Player
*****************************************************************************/
/**@} */
-/*****************************************************************************
- * Callbacks handling
- *****************************************************************************/
-
-/** defgroup libvlc_callbacks Callbacks
- * \ingroup libvlc
- * LibVLC Event Callbacks
- * @{
- */
-
-/**
- * Available events: (XXX: being reworked)
- * - libvlc_MediaInstanceReachedEnd
- */
-
-typedef enum libvlc_event_type_t {
- libvlc_MediaDescriptorMetaChanged,
- libvlc_MediaDescriptorSubItemAdded,
- libvlc_MediaDescriptorDurationChanged,
- libvlc_MediaDescriptorPreparsedChanged,
- libvlc_MediaDescriptorFreed,
- libvlc_MediaDescriptorStateChanged,
-
- libvlc_MediaInstancePlayed,
- libvlc_MediaInstancePaused,
- libvlc_MediaInstanceReachedEnd,
- libvlc_MediaInstanceEncounteredError,
- libvlc_MediaInstanceTimeChanged,
- libvlc_MediaInstancePositionChanged,
- libvlc_MediaInstanceSeekableChanged,
- libvlc_MediaInstancePausableChanged,
-
- libvlc_MediaListItemAdded,
- libvlc_MediaListWillAddItem,
- libvlc_MediaListItemDeleted,
- libvlc_MediaListWillDeleteItem,
-
- libvlc_MediaListViewItemAdded,
- libvlc_MediaListViewWillAddItem,
- libvlc_MediaListViewItemDeleted,
- libvlc_MediaListViewWillDeleteItem,
-
- libvlc_MediaListPlayerPlayed,
- libvlc_MediaListPlayerNextItemSet,
- libvlc_MediaListPlayerStopped,
-
- libvlc_MediaDiscovererStarted,
- libvlc_MediaDiscovererEnded
-
-} libvlc_event_type_t;
-
-/**
- * An Event
- * \param type the even type
- * \param p_obj the sender object
- * \param u Event dependent content
- */
-
-typedef struct libvlc_event_t
-{
- libvlc_event_type_t type;
- void * p_obj;
- union event_type_specific
- {
- /* media descriptor */
- struct
- {
- libvlc_meta_t meta_type;
- } media_descriptor_meta_changed;
- struct
- {
- libvlc_media_descriptor_t * new_child;
- } media_descriptor_subitem_added;
- struct
- {
- vlc_int64_t new_duration;
- } media_descriptor_duration_changed;
- struct
- {
- int new_status;
- } media_descriptor_preparsed_changed;
- struct
- {
- libvlc_media_descriptor_t * md;
- } media_descriptor_freed;
- struct
- {
- libvlc_state_t new_state;
- } media_descriptor_state_changed;
-
- /* media instance */
- struct
- {
- float new_position;
- } media_instance_position_changed;
- struct
- {
- libvlc_time_t new_time;
- } media_instance_time_changed;
- struct
- {
- libvlc_time_t new_seekable;
- } media_instance_seekable_changed;
- struct
- {
- libvlc_time_t new_pausable;
- } media_instance_pausable_changed;
-
- /* media list */
- struct
- {
- libvlc_media_descriptor_t * item;
- int index;
- } media_list_item_added;
- struct
- {
- libvlc_media_descriptor_t * item;
- int index;
- } media_list_will_add_item;
- struct
- {
- libvlc_media_descriptor_t * item;
- int index;
- } media_list_item_deleted;
- struct
- {
- libvlc_media_descriptor_t * item;
- int index;
- } media_list_will_delete_item;
-
- /* media list view */
- struct
- {
- libvlc_media_descriptor_t * item;
- int index;
- } media_list_view_item_added;
- struct
- {
- libvlc_media_descriptor_t * item;
- int index;
- } media_list_view_will_add_item;
- struct
- {
- libvlc_media_descriptor_t * item;
- int index;
- } media_list_view_item_deleted;
- struct
- {
- libvlc_media_descriptor_t * item;
- int index;
- } media_list_view_will_delete_item;
-
- /* media discoverer */
- struct
- {
- void * unused;
- } media_media_discoverer_started;
- struct
- {
- void * unused;
- } media_media_discoverer_ended;
-
- } u;
-} libvlc_event_t;
-
-/**
- * Event manager that belongs to a libvlc object, and from whom events can
- * be received.
- */
-
-typedef struct libvlc_event_manager_t libvlc_event_manager_t;
-
-/**
- * Callback function notification
- * \param p_event the event triggering the callback
- */
-
-typedef void ( *libvlc_callback_t )( const libvlc_event_t *, void * );
-
-/**@} */
-
# ifdef __cplusplus
}
# endif
--- /dev/null
+/*****************************************************************************
+ * libvlc_vlm.h: libvlc_* new external API
+ *****************************************************************************
+ * Copyright (C) 1998-2005 the VideoLAN team
+ * $Id$
+ *
+ * Authors: Clément Stenac <zorglub@videolan.org>
+ * Jean-Paul Saman <jpsaman _at_ m2x _dot_ nl>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
+ *****************************************************************************/
+
+#ifndef _LIBVLC_VLM_H
+#define _LIBVLC_VLM_H 1
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/*****************************************************************************
+ * VLM
+ *****************************************************************************/
+/** \defgroup libvlc_vlm VLM
+ * \ingroup libvlc
+ * LibVLC VLM
+ * @{
+ */
+
+/**
+ * Add a broadcast, with one input.
+ *
+ * \param p_instance the instance
+ * \param psz_name the name of the new broadcast
+ * \param psz_input the input MRL
+ * \param psz_output the output MRL (the parameter to the "sout" variable)
+ * \param i_options number of additional options
+ * \param ppsz_options additional options
+ * \param b_enabled boolean for enabling the new broadcast
+ * \param b_loop Should this broadcast be played in loop ?
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char *, char* ,
+ int, char **, int, int, libvlc_exception_t * );
+
+/**
+ * Delete a media (VOD or broadcast).
+ *
+ * \param p_instance the instance
+ * \param psz_name the media to delete
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_exception_t * );
+
+/**
+ * Enable or disable a media (VOD or broadcast).
+ *
+ * \param p_instance the instance
+ * \param psz_name the media to work on
+ * \param b_enabled the new status
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int,
+ libvlc_exception_t *);
+
+/**
+ * Set the output for a media.
+ *
+ * \param p_instance the instance
+ * \param psz_name the media to work on
+ * \param psz_output the output MRL (the parameter to the "sout" variable)
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*,
+ libvlc_exception_t *);
+
+/**
+ * Set a media's input MRL. This will delete all existing inputs and
+ * add the specified one.
+ *
+ * \param p_instance the instance
+ * \param psz_name the media to work on
+ * \param psz_input the input MRL
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*,
+ libvlc_exception_t *);
+
+/**
+ * Add a media's input MRL. This will add the specified one.
+ *
+ * \param p_instance the instance
+ * \param psz_name the media to work on
+ * \param psz_input the input MRL
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *,
+ libvlc_exception_t *p_exception );
+/**
+ * Set a media's loop status.
+ *
+ * \param p_instance the instance
+ * \param psz_name the media to work on
+ * \param b_loop the new status
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int,
+ libvlc_exception_t *);
+
+/**
+ * Edit the parameters of a media. This will delete all existing inputs and
+ * add the specified one.
+ *
+ * \param p_instance the instance
+ * \param psz_name the name of the new broadcast
+ * \param psz_input the input MRL
+ * \param psz_output the output MRL (the parameter to the "sout" variable)
+ * \param i_options number of additional options
+ * \param ppsz_options additional options
+ * \param b_enabled boolean for enabling the new broadcast
+ * \param b_loop Should this broadcast be played in loop ?
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char *, char* ,
+ int, char **, int, int, libvlc_exception_t * );
+
+/**
+ * Play the named broadcast.
+ *
+ * \param p_instance the instance
+ * \param psz_name the name of the broadcast
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
+
+/**
+ * Stop the named broadcast.
+ *
+ * \param p_instance the instance
+ * \param psz_name the name of the broadcast
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_exception_t * );
+
+/**
+ * Pause the named broadcast.
+ *
+ * \param p_instance the instance
+ * \param psz_name the name of the broadcast
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_exception_t * );
+
+/**
+ * Seek in the named broadcast.
+ *
+ * \param p_instance the instance
+ * \param psz_name the name of the broadcast
+ * \param f_percentage the percentage to seek to
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, char *,
+ float, libvlc_exception_t * );
+
+/**
+ * Return information about the named broadcast.
+ *
+ * \param p_instance the instance
+ * \param psz_name the name of the broadcast
+ * \param p_e an initialized exception pointer
+ */
+VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * );
+
+#define LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( attr, returnType, getType, default)\
+returnType libvlc_vlm_get_media_## attr( libvlc_instance_t *, \
+ char *, int , libvlc_exception_t * );
+
+VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( position, float, Float, -1);
+VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( time, int, Integer, -1);
+VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( length, int, Integer, -1);
+VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( rate, int, Integer, -1);
+VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( title, int, Integer, 0);
+VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( chapter, int, Integer, 0);
+VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0);
+
+#undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE
+
+/** @} */
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* <vlc/libvlc.h> */
/*****************************************************************************
- * vlc.h: global header for libvlc (old-style)
+ * vlc.h: global header for libvlc
*****************************************************************************
* Copyright (C) 1998-2004 the VideoLAN team
* $Id$
* Samuel Hocevar <sam@zoy.org>
* Gildas Bazin <gbazin@netcourrier.com>
* Derk-Jan Hartman <hartman at videolan dot org>
+ * Pierre d'Herbemont <pdherbemont@videolan.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
-/**
- * \defgroup libvlc_old Libvlc Old
- * This is libvlc, the base library of the VLC program.
- * This is the legacy API. Please consider using the new libvlc API
- *
- * @{
- */
-
-
#ifndef _VLC_VLC_H
#define _VLC_VLC_H 1
# ifdef __cplusplus
extern "C" {
-# else
-# include <stdbool.h>
# endif
-/*****************************************************************************
- * Our custom types
- *****************************************************************************/
-typedef bool vlc_bool_t;
-typedef struct vlc_list_t vlc_list_t;
-typedef struct vlc_object_t vlc_object_t;
-
-#if (defined( WIN32 ) || defined( UNDER_CE )) && !defined( __MINGW32__ )
-typedef signed __int64 vlc_int64_t;
-# else
-typedef signed long long vlc_int64_t;
-#endif
-
-/**
- * \defgroup var_type Variable types
- * These are the different types a vlc variable can have.
- * @{
- */
-#define VLC_VAR_VOID 0x0010
-#define VLC_VAR_BOOL 0x0020
-#define VLC_VAR_INTEGER 0x0030
-#define VLC_VAR_HOTKEY 0x0031
-#define VLC_VAR_STRING 0x0040
-#define VLC_VAR_MODULE 0x0041
-#define VLC_VAR_FILE 0x0042
-#define VLC_VAR_DIRECTORY 0x0043
-#define VLC_VAR_VARIABLE 0x0044
-#define VLC_VAR_FLOAT 0x0050
-#define VLC_VAR_TIME 0x0060
-#define VLC_VAR_ADDRESS 0x0070
-#define VLC_VAR_MUTEX 0x0080
-#define VLC_VAR_LIST 0x0090
-/**@}*/
-
-/**
- * VLC value structure
- */
-typedef union
-{
- int i_int;
- vlc_bool_t b_bool;
- float f_float;
- char * psz_string;
- void * p_address;
- vlc_object_t * p_object;
- vlc_list_t * p_list;
- vlc_int64_t i_time;
-
- struct { char *psz_name; int i_object_id; } var;
-
- /* Make sure the structure is at least 64bits */
- struct { char a, b, c, d, e, f, g, h; } padding;
-
-} vlc_value_t;
-
-/**
- * VLC list structure
- */
-struct vlc_list_t
-{
- int i_count;
- vlc_value_t * p_values;
- int * pi_types;
-
-};
-
-/*****************************************************************************
- * Error values
- *****************************************************************************/
-#define VLC_SUCCESS -0 /* No error */
-#define VLC_ENOMEM -1 /* Not enough memory */
-#define VLC_ETHREAD -2 /* Thread error */
-#define VLC_ETIMEOUT -3 /* Timeout */
-
-#define VLC_ENOMOD -10 /* Module not found */
-
-#define VLC_ENOOBJ -20 /* Object not found */
-#define VLC_EBADOBJ -21 /* Bad object type */
-
-#define VLC_ENOVAR -30 /* Variable not found */
-#define VLC_EBADVAR -31 /* Bad variable value */
-
-#define VLC_ENOITEM -40 /**< Item not found */
-
-#define VLC_EEXIT -255 /* Program exited */
-#define VLC_EEXITSUCCESS -999 /* Program exited successfully */
-#define VLC_EGENERIC -666 /* Generic error */
-
-/*****************************************************************************
- * Booleans
- *****************************************************************************/
-#define VLC_FALSE false
-#define VLC_TRUE true
-
-/*****************************************************************************
- * Playlist
- *****************************************************************************/
-
-/* Used by VLC_AddTarget() */
-#define PLAYLIST_INSERT 0x0001
-#define PLAYLIST_APPEND 0x0002
-#define PLAYLIST_GO 0x0004
-#define PLAYLIST_PREPARSE 0x0008
-#define PLAYLIST_SPREPARSE 0x0010
-#define PLAYLIST_NO_REBUILD 0x0020
-
-#define PLAYLIST_END -666
-
-/*****************************************************************************
- * Required internal headers
- *****************************************************************************/
-#if defined( __LIBVLC__ )
-# include "vlc_common.h"
-#endif
-
-/*****************************************************************************
- * Shared library Export macros
- *****************************************************************************/
-#ifndef VLC_PUBLIC_API
-# define VLC_PUBLIC_API extern
-#endif
-
-/*****************************************************************************
- * Compiler specific
- *****************************************************************************/
-
-#ifndef VLC_DEPRECATED_API
-# ifdef __LIBVLC__
-/* Avoid unuseful warnings from libvlc with our deprecated APIs */
-# define VLC_DEPRECATED_API VLC_PUBLIC_API
-# else /* __LIBVLC__ */
-# if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0)
-# define VLC_DEPRECATED_API VLC_PUBLIC_API __attribute__((deprecated))
-# else
-# define VLC_DEPRECATED_API VLC_PUBLIC_API
-# endif
-# endif /* __LIBVLC__ */
-#endif
-
-/*****************************************************************************
- * Exported libvlc API
- *****************************************************************************/
-#if !defined( __LIBVLC__ )
-/* Otherwise they are declared and exported in vlc_common.h */
-/**
- * Retrieve libvlc version
- *
- * \return a string containing the libvlc version
- */
-VLC_DEPRECATED_API char const * VLC_Version ( void );
-
-/**
- * Retrieve libvlc compile time
- *
- * \return a string containing the libvlc compile time
- */
-VLC_DEPRECATED_API char const * VLC_CompileTime ( void );
-
-/**
- * Retrieve the username of the libvlc builder
- *
- * \return a string containing the username of the libvlc builder
- */
-VLC_DEPRECATED_API char const * VLC_CompileBy ( void );
-
-/**
- * Retrieve the host of the libvlc builder
- *
- * \return a string containing the host of the libvlc builder
- */
-VLC_DEPRECATED_API char const * VLC_CompileHost ( void );
-
-/**
- * Retrieve the domain name of the host of the libvlc builder
- *
- * \return a string containing the domain name of the host of the libvlc builder
- */
-VLC_DEPRECATED_API char const * VLC_CompileDomain ( void );
-
-/**
- * Retrieve libvlc compiler version
- *
- * \return a string containing the libvlc compiler version
- */
-VLC_DEPRECATED_API char const * VLC_Compiler ( void );
-
-/**
- * Retrieve libvlc changeset
- *
- * \return a string containing the libvlc subversion changeset
- */
-VLC_DEPRECATED_API char const * VLC_Changeset ( void );
-
-/**
- * Return an error string
- *
- * \param i_err an error code
- * \return an error string
- */
-VLC_DEPRECATED_API char const * VLC_Error ( int i_err );
-
-#endif /* __LIBVLC__ */
-
-/**
- * Initialize libvlc
- *
- * This function allocates a vlc_t structure and returns a negative value
- * in case of failure. Also, the thread system is initialized
- *
- * \return vlc object id or an error code
- */
-VLC_PUBLIC_API int VLC_Create( void );
-
-/**
- * Initialize a vlc_t structure
- *
- * This function initializes a previously allocated vlc_t structure:
- * - CPU detection
- * - gettext initialization
- * - message queue, module bank and playlist initialization
- * - configuration and commandline parsing
- *
- * \param i_object a vlc object id
- * \param i_argc the number of arguments
- * \param ppsz_argv an array of arguments
- * \return VLC_SUCCESS on success
- */
-VLC_PUBLIC_API int VLC_Init( int, int, const char *[] );
-
-/**
- * Add an interface
- *
- * This function opens an interface plugin and runs it. If b_block is set
- * to 0, VLC_AddIntf will return immediately and let the interface run in a
- * separate thread. If b_block is set to 1, VLC_AddIntf will continue until
- * user requests to quit.
- *
- * \param i_object a vlc object id
- * \param psz_module a vlc module name of an interface
- * \param b_block make this interface blocking
- * \param b_play start playing when the interface is done loading
- * \return VLC_SUCCESS on success
- */
-VLC_PUBLIC_API int VLC_AddIntf( int, char const *, vlc_bool_t, vlc_bool_t );
-
-/**
- * Ask vlc to die
- *
- * This function sets p_libvlc->b_die to VLC_TRUE, but does not do any other
- * task. It is your duty to call VLC_CleanUp and VLC_Destroy afterwards.
- *
- * \param i_object a vlc object id
- * \return VLC_SUCCESS on success
- */
-VLC_PUBLIC_API int VLC_Die( int );
-
-/**
- * Clean up all the intf, playlist, vout and aout
- *
- * This function requests all intf, playlist, vout and aout objects to finish
- * and CleanUp. Only a blank VLC object should remain after this.
- *
- * \note This function was previously called VLC_Stop
- *
- * \param i_object a vlc object id
- * \return VLC_SUCCESS on success
- */
-VLC_PUBLIC_API int VLC_CleanUp( int );
-
-/**
- * Destroy all threads and the VLC object
- *
- * This function requests the running threads to finish, waits for their
- * termination, and destroys their structure.
- * Then it will de-init all VLC object initializations.
- *
- * \param i_object a vlc object id
- * \return VLC_SUCCESS on success
- */
-VLC_PUBLIC_API int VLC_Destroy( int );
-
-/**
- * Set a VLC variable
- *
- * This function sets a variable of VLC
- *
- * \note Was previously called VLC_Set
- *
- * \param i_object a vlc object id
- * \param psz_var a vlc variable name
- * \param value a vlc_value_t structure
- * \return VLC_SUCCESS on success
- */
-VLC_DEPRECATED_API int VLC_VariableSet( int, char const *, vlc_value_t );
-
-/**
- * Get a VLC variable
- *
- * This function gets the value of a variable of VLC
- * It stores it in the p_value argument
- *
- * \note Was previously called VLC_Get
- *
- * \param i_object a vlc object id
- * \param psz_var a vlc variable name
- * \param p_value a pointer to a vlc_value_t structure
- * \return VLC_SUCCESS on success
- */
-VLC_DEPRECATED_API int VLC_VariableGet( int, char const *, vlc_value_t * );
-
-/**
- * Get a VLC variable type
- *
- * This function gets the type of a variable of VLC
- * It stores it in the p_type argument
- *
- * \param i_object a vlc object id
- * \param psz_var a vlc variable name
- * \param pi_type a pointer to an integer
- * \return VLC_SUCCESS on success
- */
-VLC_DEPRECATED_API int VLC_VariableType( int, char const *, int * );
-
-/**
- * Add a target to the current playlist
- *
- * This funtion will add a target to the current playlist. If a playlist does
- * not exist, it will be created.
- *
- * \param i_object a vlc object id
- * \param psz_target the URI of the target to play
- * \param ppsz_options an array of strings with input options (ie. :input-repeat)
- * \param i_options the amount of options in the ppsz_options array
- * \param i_mode the insert mode to insert the target into the playlist (PLAYLIST_* defines)
- * \param i_pos the position at which to add the new target (PLAYLIST_END for end)
- * \return the item id on success and -1 on error
- */
-VLC_PUBLIC_API int VLC_AddTarget( int, char const *, const char **, int, int, int );
-
-/**
- * Start the playlist and play the currently selected playlist item
- *
- * If there is something in the playlist, and the playlist is not running,
- * then start the playlist and play the currently selected playlist item.
- * If an item is currently paused, then resume it.
- *
- * \param i_object a vlc object id
- * \return VLC_SUCCESS on success
- */
-VLC_DEPRECATED_API int VLC_Play( int );
-
-/**
- * Pause the currently playing item. Resume it if already paused
- *
- * If an item is currently playing then pause it.
- * If the item is already paused, then resume playback.
- *
- * \param i_object a vlc object id
- * \return VLC_SUCCESS on success
- */
-VLC_DEPRECATED_API int VLC_Pause( int );
-
-/**
- * Stop the playlist
- *
- * If an item is currently playing then stop it.
- * Set the playlist to a stopped state.
- *
- * \note This function is new. The old VLC_Stop is now called VLC_CleanUp
- *
- * \param i_object a vlc object id
- * \return VLC_SUCCESS on success
- */
-VLC_DEPRECATED_API int VLC_Stop( int );
-
-/**
- * Tell if VLC is playing
- *
- * If an item is currently playing, it returns
- * VLC_TRUE, else VLC_FALSE
- *
- * \param i_object a vlc object id
- * \return VLC_TRUE or VLC_FALSE
- */
-VLC_DEPRECATED_API vlc_bool_t VLC_IsPlaying( int );
-
-/**
- * Get the current position in a input
- *
- * Return the current position as a float
- * This method should be used for time sliders etc
- * \note For some inputs, this will be unknown.
- *
- * \param i_object a vlc object id
- * \return a float in the range of 0.0 - 1.0
- */
-VLC_DEPRECATED_API float VLC_PositionGet( int );
-
-/**
- * Set the current position in a input
- *
- * Set the current position as a float
- * This method should be used for time sliders etc
- * \note For some inputs, this will be unknown.
- *
- * \param i_object a vlc object id
- * \param i_position a float in the range of 0.0 - 1.0
- * \return a float in the range of 0.0 - 1.0
- */
-VLC_DEPRECATED_API float VLC_PositionSet( int, float );
-
-/**
- * Get the current position in a input
- *
- * Return the current position in seconds from the start.
- * \note For some inputs, this will be unknown.
- *
- * \param i_object a vlc object id
- * \return the offset from 0:00 in seconds
- */
-VLC_DEPRECATED_API int VLC_TimeGet( int );
-
-/**
- * Seek to a position in the current input
- *
- * Seek i_seconds in the current input. If b_relative is set,
- * then the seek will be relative to the current position, otherwise
- * it will seek to i_seconds from the beginning of the input.
- * \note For some inputs, this will be unknown.
- *
- * \param i_object a vlc object id
- * \param i_seconds seconds from current position or from beginning of input
- * \param b_relative seek relative from current position
- * \return VLC_SUCCESS on success
- */
-VLC_DEPRECATED_API int VLC_TimeSet( int, int, vlc_bool_t );
-
-/**
- * Get the total length of a input
- *
- * Return the total length in seconds from the current input.
- * \note For some inputs, this will be unknown.
- *
- * \param i_object a vlc object id
- * \return the length in seconds
- */
-VLC_DEPRECATED_API int VLC_LengthGet( int );
-
-/**
- * Play the input faster than realtime
- *
- * 2x, 4x, 8x faster than realtime
- * \note For some inputs, this will be impossible.
- *
- * \param i_object a vlc object id
- * \return the current speedrate
- */
-VLC_DEPRECATED_API float VLC_SpeedFaster( int );
-
-/**
- * Play the input slower than realtime
- *
- * 1/2x, 1/4x, 1/8x slower than realtime
- * \note For some inputs, this will be impossible.
- *
- * \param i_object a vlc object id
- * \return the current speedrate
- */
-VLC_DEPRECATED_API float VLC_SpeedSlower( int );
-
-/**
- * Return the current playlist item
- *
- * \param i_object a vlc object id
- * \return the index of the playlistitem that is currently selected for play
- */
-VLC_DEPRECATED_API int VLC_PlaylistIndex( int );
-
-/**
- * Total amount of items in the playlist
- *
- * \param i_object a vlc object id
- * \return amount of playlist items
- */
-VLC_DEPRECATED_API int VLC_PlaylistNumberOfItems( int );
-
-/**
- * Next playlist item
- *
- * Skip to the next playlistitem and play it.
- *
- * \param i_object a vlc object id
- * \return VLC_SUCCESS on success
- */
-VLC_DEPRECATED_API int VLC_PlaylistNext( int );
-
-/**
- * Previous playlist item
- *
- * Skip to the previous playlistitem and play it.
- *
- * \param i_object a vlc object id
- * \return VLC_SUCCESS on success
- */
-VLC_DEPRECATED_API int VLC_PlaylistPrev( int );
-
-/**
- * Clear the contents of the playlist
- *
- * Completly empty the entire playlist.
- *
- * \note Was previously called VLC_ClearPlaylist
- *
- * \param i_object a vlc object id
- * \return VLC_SUCCESS on success
- */
-VLC_DEPRECATED_API int VLC_PlaylistClear( int );
-
-/**
- * Change the volume
- *
- * \param i_object a vlc object id
- * \param i_volume something in a range from 0-200
- * \return the new volume (range 0-200 %)
- */
-VLC_DEPRECATED_API int VLC_VolumeSet( int, int );
-
-/**
- * Get the current volume
- *
- * Retrieve the current volume.
- *
- * \param i_object a vlc object id
- * \return the current volume (range 0-200 %)
- */
-VLC_DEPRECATED_API int VLC_VolumeGet( int );
-
-/**
- * Mute/Unmute the volume
- *
- * \param i_object a vlc object id
- * \return VLC_SUCCESS on success
- */
-VLC_DEPRECATED_API int VLC_VolumeMute( int );
-
-/**
- * Toggle Fullscreen mode
- *
- * Switch between normal and fullscreen video
- *
- * \param i_object a vlc object id
- * \return VLC_SUCCESS on success
- */
-VLC_DEPRECATED_API int VLC_FullScreen( int );
-
+#include <vlc/common.h>
+#include <vlc/libvlc_structures.h>
+#include <vlc/libvlc_events.h>
+#include <vlc/libvlc.h>
+#include <vlc/libvlc_media_list.h>
+#include <vlc/libvlc_vlm.h>
+#include <vlc/deprecated.h>
# ifdef __cplusplus
}
"Public License;\nsee the file named COPYING for details.\n" \
"Written by the VideoLAN team; see the AUTHORS file.\n")
-#endif /* <vlc/vlc.h> */
+#endif /* _VLC_VLC_H */