📄 vlc.h
字号:
/***************************************************************************** * vlc.h: global header for libvlc (old-style) ***************************************************************************** * Copyright (C) 1998-2004 the VideoLAN team * $Id: vlc.h 13960 2006-01-21 16:44:36Z zorglub $ * * 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_VLC_H#define _VLC_VLC_H 1# ifdef __cplusplusextern "C" {# endif/***************************************************************************** * Our custom types *****************************************************************************/typedef int 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;# elsetypedef 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_EEXIT -255 /* Program exited */#define VLC_EEXITSUCCESS -999 /* Program exited successfully */#define VLC_EGENERIC -666 /* Generic error *//***************************************************************************** * Booleans *****************************************************************************/#define VLC_FALSE 0#define VLC_TRUE 1/***************************************************************************** * Playlist *****************************************************************************//* Used by VLC_AddTarget() */#define PLAYLIST_INSERT 0x0001#define PLAYLIST_REPLACE 0x0002#define PLAYLIST_APPEND 0x0004#define PLAYLIST_GO 0x0008#define PLAYLIST_CHECK_INSERT 0x0010#define PLAYLIST_PREPARSE 0x0020#define PLAYLIST_END -666/***************************************************************************** * Required internal headers *****************************************************************************/#if defined( __VLC__ )# include "vlc_common.h"#endif/***************************************************************************** * Exported libvlc API *****************************************************************************/#if !defined( __VLC__ )/* Otherwise they are declared and exported in vlc_common.h *//** * Retrieve libvlc version * * \return a string containing the libvlc version */char const * VLC_Version ( void );/** * Retrieve libvlc compile time * * \return a string containing the libvlc compile time */char const * VLC_CompileTime ( void );/** * Retrieve the username of the libvlc builder * * \return a string containing the username of the libvlc builder */char const * VLC_CompileBy ( void );/** * Retrieve the host of the libvlc builder * * \return a string containing the host of the libvlc builder */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 */char const * VLC_CompileDomain ( void );/** * Retrieve libvlc compiler version * * \return a string containing the libvlc compiler version */char const * VLC_Compiler ( void );/** * Retrieve libvlc changeset * * \return a string containing the libvlc subversion changeset */char const * VLC_Changeset ( void );/** * Return an error string * * \param i_err an error code * \return an error string */char const * VLC_Error ( int i_err );#endif /* __VLC__ *//** * 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 */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 */int VLC_Init( int, int, 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 */int VLC_AddIntf( int, char const *, vlc_bool_t, vlc_bool_t );/** * Ask vlc to die * * This function sets p_vlc->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 */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 */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. *
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -