X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=include%2Fvlc%2Flibvlc_vlm.h;h=56a0a4698d32ee62af533378d0f7392c35df323f;hb=bda1fc3c38d7ba0834a671f436aa69e68368da5e;hp=5158281aa69d5597ed81df0d2c8e9ed35638cb7c;hpb=242a2d12ffc267fae04a03d42d2b045cf5b2b441;p=vlc diff --git a/include/vlc/libvlc_vlm.h b/include/vlc/libvlc_vlm.h index 5158281aa6..56a0a4698d 100644 --- a/include/vlc/libvlc_vlm.h +++ b/include/vlc/libvlc_vlm.h @@ -1,7 +1,7 @@ /***************************************************************************** * libvlc_vlm.h: libvlc_* new external API ***************************************************************************** - * Copyright (C) 1998-2005 the VideoLAN team + * Copyright (C) 1998-2008 the VideoLAN team * $Id$ * * Authors: Clément Stenac @@ -22,8 +22,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA. *****************************************************************************/ -#ifndef _LIBVLC_VLM_H -#define _LIBVLC_VLM_H 1 +#ifndef LIBVLC_VLM_H +#define LIBVLC_VLM_H 1 + +/** + * \file + * This file defines libvlc_vlm_* external API + */ # ifdef __cplusplus extern "C" { @@ -38,6 +43,15 @@ extern "C" { * @{ */ + +/** + * Release the vlm instance related to the given libvlc_instance_t + * + * \param p_instance the instance + * \param p_e an initialized exception pointer + */ +VLC_PUBLIC_API void libvlc_vlm_release( libvlc_instance_t *, libvlc_exception_t * ); + /** * Add a broadcast, with one input. * @@ -51,8 +65,30 @@ extern "C" { * \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 * ); +VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, + const char *, const char *, + const char * , int, + const char * const*, + int, int, + libvlc_exception_t * ); + +/** + * Add a vod, with one input. + * + * \param p_instance the instance + * \param psz_name the name of the new vod media + * \param psz_input the input MRL + * \param i_options number of additional options + * \param ppsz_options additional options + * \param b_enabled boolean for enabling the new vod + * \param psz_mux the muxer of the vod media + * \param p_e an initialized exception pointer + */ +VLC_PUBLIC_API void libvlc_vlm_add_vod( libvlc_instance_t *, + const char *, const char *, + int, const char * const*, + int, const char *, + libvlc_exception_t * ); /** * Delete a media (VOD or broadcast). @@ -61,7 +97,9 @@ VLC_PUBLIC_API void libvlc_vlm_add_broadcast( libvlc_instance_t *, char *, char * \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 * ); +VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, + const char *, + libvlc_exception_t * ); /** * Enable or disable a media (VOD or broadcast). @@ -71,8 +109,8 @@ VLC_PUBLIC_API void libvlc_vlm_del_media( libvlc_instance_t *, char *, libvlc_ex * \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 *); +VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, const char *, + int, libvlc_exception_t * ); /** * Set the output for a media. @@ -82,8 +120,9 @@ VLC_PUBLIC_API void libvlc_vlm_set_enabled( libvlc_instance_t *, char *, int, * \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 *); +VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, const char *, + const char *, + libvlc_exception_t * ); /** * Set a media's input MRL. This will delete all existing inputs and @@ -94,8 +133,9 @@ VLC_PUBLIC_API void libvlc_vlm_set_output( libvlc_instance_t *, char *, char*, * \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 *); +VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, const char *, + const char *, + libvlc_exception_t * ); /** * Add a media's input MRL. This will add the specified one. @@ -105,8 +145,9 @@ VLC_PUBLIC_API void libvlc_vlm_set_input( libvlc_instance_t *, char *, char*, * \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 ); +VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, const char *, + const char *, + libvlc_exception_t * ); /** * Set a media's loop status. * @@ -115,8 +156,19 @@ VLC_PUBLIC_API void libvlc_vlm_add_input( libvlc_instance_t *, char *, char *, * \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 *); +VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, const char *, + int, libvlc_exception_t * ); + +/** + * Set a media's vod muxer. + * + * \param p_instance the instance + * \param psz_name the media to work on + * \param psz_mux the new muxer + * \param p_e an initialized exception pointer + */ +VLC_PUBLIC_API void libvlc_vlm_set_mux( libvlc_instance_t *, const char *, + const char *, libvlc_exception_t * ); /** * Edit the parameters of a media. This will delete all existing inputs and @@ -132,8 +184,11 @@ VLC_PUBLIC_API void libvlc_vlm_set_loop( libvlc_instance_t *, char *, int, * \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 * ); +VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, + const char *, const char *, + const char* , int, + const char * const *, int, int, + libvlc_exception_t * ); /** * Play the named broadcast. @@ -142,7 +197,8 @@ VLC_PUBLIC_API void libvlc_vlm_change_media( libvlc_instance_t *, char *, char * * \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 * ); +VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, const char *, + libvlc_exception_t * ); /** * Stop the named broadcast. @@ -151,7 +207,8 @@ VLC_PUBLIC_API void libvlc_vlm_play_media ( libvlc_instance_t *, char *, libvlc_ * \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 * ); +VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, const char *, + libvlc_exception_t * ); /** * Pause the named broadcast. @@ -160,7 +217,8 @@ VLC_PUBLIC_API void libvlc_vlm_stop_media ( libvlc_instance_t *, char *, libvlc_ * \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 * ); +VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, const char *, + libvlc_exception_t * ); /** * Seek in the named broadcast. @@ -170,31 +228,123 @@ VLC_PUBLIC_API void libvlc_vlm_pause_media( libvlc_instance_t *, char *, libvlc_ * \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 *, +VLC_PUBLIC_API void libvlc_vlm_seek_media( libvlc_instance_t *, const char *, float, libvlc_exception_t * ); /** * Return information about the named broadcast. - * + * \bug will always return NULL * \param p_instance the instance * \param psz_name the name of the broadcast * \param p_e an initialized exception pointer + * \return string with information about named media + */ +VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, const char *, + libvlc_exception_t * ); + +/** + * Get vlm_media instance position by name or instance id + * + * \param p_instance a libvlc instance + * \param psz_name name of vlm media instance + * \param i_instance instance id + * \param p_e an initialized exception pointer + * \return position as float + */ +VLC_PUBLIC_API float libvlc_vlm_get_media_instance_position( libvlc_instance_t *, + const char *, int, + libvlc_exception_t * ); + +/** + * Get vlm_media instance time by name or instance id + * + * \param p_instance a libvlc instance + * \param psz_name name of vlm media instance + * \param i_instance instance id + * \param p_e an initialized exception pointer + * \return time as integer + */ +VLC_PUBLIC_API int libvlc_vlm_get_media_instance_time( libvlc_instance_t *, + const char *, int, + libvlc_exception_t * ); + +/** + * Get vlm_media instance length by name or instance id + * + * \param p_instance a libvlc instance + * \param psz_name name of vlm media instance + * \param i_instance instance id + * \param p_e an initialized exception pointer + * \return length of media item + */ +VLC_PUBLIC_API int libvlc_vlm_get_media_instance_length( libvlc_instance_t *, + const char *, int , + libvlc_exception_t * ); + +/** + * Get vlm_media instance playback rate by name or instance id + * + * \param p_instance a libvlc instance + * \param psz_name name of vlm media instance + * \param i_instance instance id + * \param p_e an initialized exception pointer + * \return playback rate */ -VLC_PUBLIC_API char* libvlc_vlm_show_media( libvlc_instance_t *, char *, libvlc_exception_t * ); +VLC_PUBLIC_API int libvlc_vlm_get_media_instance_rate( libvlc_instance_t *, + const char *, int, + 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 * ); +/** + * Get vlm_media instance title number by name or instance id + * \bug will always return 0 + * \param p_instance a libvlc instance + * \param psz_name name of vlm media instance + * \param i_instance instance id + * \param p_e an initialized exception pointer + * \return title as number + */ +VLC_PUBLIC_API int libvlc_vlm_get_media_instance_title( libvlc_instance_t *, + const 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); +/** + * Get vlm_media instance chapter number by name or instance id + * \bug will always return 0 + * \param p_instance a libvlc instance + * \param psz_name name of vlm media instance + * \param i_instance instance id + * \param p_e an initialized exception pointer + * \return chapter as number + */ +VLC_PUBLIC_API int libvlc_vlm_get_media_instance_chapter( libvlc_instance_t *, + const char *, int, + libvlc_exception_t * ); -#undef LIBVLC_VLM_GET_MEDIA_ATTRIBUTE +/** + * Is libvlc instance seekable ? + * \bug will always return 0 + * \param p_instance a libvlc instance + * \param psz_name name of vlm media instance + * \param i_instance instance id + * \param p_e an initialized exception pointer + * \return 1 if seekable, 0 if not + */ +VLC_PUBLIC_API int libvlc_vlm_get_media_instance_seekable( libvlc_instance_t *, + const char *, int, + libvlc_exception_t * ); + +/** + * Get libvlc_event_manager from a vlm media. + * The p_event_manager is immutable, so you don't have to hold the lock + * + * \param p_instance a libvlc instance + * \param psz_name name of vlm media instance + * \param p_exception an initialized exception pointer + * \return libvlc_event_manager + */ +VLC_PUBLIC_API libvlc_event_manager_t * + libvlc_vlm_get_event_manager( libvlc_instance_t *, + libvlc_exception_t * ); /** @} */ @@ -202,4 +352,4 @@ VLC_PUBLIC_API LIBVLC_VLM_GET_MEDIA_ATTRIBUTE( seekable, int, Bool, 0); } # endif -#endif /* */ +#endif /* */