?? vlc_common.h
字號(hào):
/* function imported from libavutil/common.h */LIBVLC_USEDstatic inline uint8_t clip_uint8_vlc( int32_t a ){ if( a&(~255) ) return (-a)>>31; else return a;}/* Free and set set the variable to NULL */#define FREENULL(a) do { free( a ); a = NULL; } while(0)#define EMPTY_STR(str) (!str || !*str)VLC_EXPORT( char const *, vlc_error, ( int ) LIBVLC_USED );#include <vlc_arrays.h>/* MSB (big endian)/LSB (little endian) conversions - network order is always * MSB, and should be used for both network communications and files. */LIBVLC_USEDstatic inline uint16_t U16_AT( const void * _p ){ const uint8_t * p = (const uint8_t *)_p; return ( ((uint16_t)p[0] << 8) | p[1] );}LIBVLC_USEDstatic inline uint32_t U32_AT( const void * _p ){ const uint8_t * p = (const uint8_t *)_p; return ( ((uint32_t)p[0] << 24) | ((uint32_t)p[1] << 16) | ((uint32_t)p[2] << 8) | p[3] );}LIBVLC_USEDstatic inline uint64_t U64_AT( const void * _p ){ const uint8_t * p = (const uint8_t *)_p; return ( ((uint64_t)p[0] << 56) | ((uint64_t)p[1] << 48) | ((uint64_t)p[2] << 40) | ((uint64_t)p[3] << 32) | ((uint64_t)p[4] << 24) | ((uint64_t)p[5] << 16) | ((uint64_t)p[6] << 8) | p[7] );}LIBVLC_USEDstatic inline uint16_t GetWLE( const void * _p ){ const uint8_t * p = (const uint8_t *)_p; return ( ((uint16_t)p[1] << 8) | p[0] );}LIBVLC_USEDstatic inline uint32_t GetDWLE( const void * _p ){ const uint8_t * p = (const uint8_t *)_p; return ( ((uint32_t)p[3] << 24) | ((uint32_t)p[2] << 16) | ((uint32_t)p[1] << 8) | p[0] );}LIBVLC_USEDstatic inline uint64_t GetQWLE( const void * _p ){ const uint8_t * p = (const uint8_t *)_p; return ( ((uint64_t)p[7] << 56) | ((uint64_t)p[6] << 48) | ((uint64_t)p[5] << 40) | ((uint64_t)p[4] << 32) | ((uint64_t)p[3] << 24) | ((uint64_t)p[2] << 16) | ((uint64_t)p[1] << 8) | p[0] );}#define GetWBE( p ) U16_AT( p )#define GetDWBE( p ) U32_AT( p )#define GetQWBE( p ) U64_AT( p )/* Helper writer functions */#define SetWLE( p, v ) _SetWLE( (uint8_t*)(p), v)static inline void _SetWLE( uint8_t *p, uint16_t i_dw ){ p[1] = ( i_dw >> 8 )&0xff; p[0] = ( i_dw )&0xff;}#define SetDWLE( p, v ) _SetDWLE( (uint8_t*)(p), v)static inline void _SetDWLE( uint8_t *p, uint32_t i_dw ){ p[3] = ( i_dw >> 24 )&0xff; p[2] = ( i_dw >> 16 )&0xff; p[1] = ( i_dw >> 8 )&0xff; p[0] = ( i_dw )&0xff;}#define SetQWLE( p, v ) _SetQWLE( (uint8_t*)(p), v)static inline void _SetQWLE( uint8_t *p, uint64_t i_qw ){ SetDWLE( p, i_qw&0xffffffff ); SetDWLE( p+4, ( i_qw >> 32)&0xffffffff );}#define SetWBE( p, v ) _SetWBE( (uint8_t*)(p), v)static inline void _SetWBE( uint8_t *p, uint16_t i_dw ){ p[0] = ( i_dw >> 8 )&0xff; p[1] = ( i_dw )&0xff;}#define SetDWBE( p, v ) _SetDWBE( (uint8_t*)(p), v)static inline void _SetDWBE( uint8_t *p, uint32_t i_dw ){ p[0] = ( i_dw >> 24 )&0xff; p[1] = ( i_dw >> 16 )&0xff; p[2] = ( i_dw >> 8 )&0xff; p[3] = ( i_dw )&0xff;}#define SetQWBE( p, v ) _SetQWBE( (uint8_t*)(p), v)static inline void _SetQWBE( uint8_t *p, uint64_t i_qw ){ SetDWBE( p+4, i_qw&0xffffffff ); SetDWBE( p, ( i_qw >> 32)&0xffffffff );}#define hton16(i) htons(i)#define hton32(i) htonl(i)#define ntoh16(i) ntohs(i)#define ntoh32(i) ntohl(i)LIBVLC_USEDstatic inline uint64_t ntoh64 (uint64_t ll){ union { uint64_t qw; uint8_t b[16]; } v = { ll }; return ((uint64_t)v.b[0] << 56) | ((uint64_t)v.b[1] << 48) | ((uint64_t)v.b[2] << 40) | ((uint64_t)v.b[3] << 32) | ((uint64_t)v.b[4] << 24) | ((uint64_t)v.b[5] << 16) | ((uint64_t)v.b[6] << 8) | ((uint64_t)v.b[7] << 0);}#define hton64(i) ntoh64(i)/* */#define VLC_UNUSED(x) (void)(x)/* Stuff defined in src/extras/libc.c */VLC_EXPORT( size_t, vlc_strlcpy, ( char *, const char *, size_t ) );VLC_EXPORT( long long, vlc_strtoll, ( const char *nptr, char **endptr, int base ) LIBVLC_USED );VLC_EXPORT( char *, vlc_strcasestr, ( const char *s1, const char *s2 ) LIBVLC_USED );char *vlc_strsep( char **, const char * );#if defined(WIN32) || defined(UNDER_CE)/* win32, cl and icl support */# if defined( _MSC_VER ) || !defined( __MINGW32__ )# define __attribute__(x)# define __inline__ __inline# define S_IFBLK 0x3000 /* Block */# define S_ISBLK(m) (0)# define S_ISCHR(m) (0)# define S_ISFIFO(m) (((m)&_S_IFMT) == _S_IFIFO)# define S_ISREG(m) (((m)&_S_IFMT) == _S_IFREG)# endif/* several type definitions */# if defined( __MINGW32__ )# if !defined( _OFF_T_ ) typedef long long _off_t; typedef _off_t off_t;# define _OFF_T_# else# ifdef off_t# undef off_t# endif# define off_t long long# endif# endif# if defined( _MSC_VER ) && !defined( __WXMSW__ )# if !defined( _OFF_T_DEFINED ) typedef __int64 off_t;# define _OFF_T_DEFINED# else /* for wx compatibility typedef long off_t; */# define off_t __int64# endif# endif# if defined( __BORLANDC__ )# undef off_t# define off_t unsigned __int64# endif# ifndef O_NONBLOCK# define O_NONBLOCK 0# endif# ifndef alloca# define alloca _alloca# endif /* These two are not defined in mingw32 (bug?) */# ifndef snprintf# define snprintf _snprintf# endif# ifndef vsnprintf# define vsnprintf _vsnprintf# endif# include <tchar.h>#endifVLC_EXPORT( bool, vlc_ureduce, ( unsigned *, unsigned *, uint64_t, uint64_t, uint64_t ) );/* vlc_wraptext (defined in src/extras/libc.c) */#define wraptext vlc_wraptextVLC_EXPORT( char *, vlc_wraptext, ( const char *, int ) LIBVLC_USED );/* iconv wrappers (defined in src/extras/libc.c) */typedef void *vlc_iconv_t;VLC_EXPORT( vlc_iconv_t, vlc_iconv_open, ( const char *, const char * ) LIBVLC_USED );VLC_EXPORT( size_t, vlc_iconv, ( vlc_iconv_t, const char **, size_t *, char **, size_t * ) LIBVLC_USED );VLC_EXPORT( int, vlc_iconv_close, ( vlc_iconv_t ) );/* execve wrapper (defined in src/extras/libc.c) */VLC_EXPORT( int, __vlc_execve, ( vlc_object_t *p_object, int i_argc, char *const *pp_argv, char *const *pp_env, const char *psz_cwd, const char *p_in, size_t i_in, char **pp_data, size_t *pi_data ) LIBVLC_USED );#define vlc_execve(a,b,c,d,e,f,g,h,i) __vlc_execve(VLC_OBJECT(a),b,c,d,e,f,g,h,i)/* dir wrappers (defined in src/extras/libc.c) */VLC_EXPORT(int, vlc_wclosedir, ( void *_p_dir ));/***************************************************************************** * CPU capabilities *****************************************************************************/#define CPU_CAPABILITY_NONE 0#define CPU_CAPABILITY_486 (1<<0)#define CPU_CAPABILITY_586 (1<<1)#define CPU_CAPABILITY_PPRO (1<<2)#define CPU_CAPABILITY_MMX (1<<3)#define CPU_CAPABILITY_3DNOW (1<<4)#define CPU_CAPABILITY_MMXEXT (1<<5)#define CPU_CAPABILITY_SSE (1<<6)#define CPU_CAPABILITY_SSE2 (1<<7)#define CPU_CAPABILITY_ALTIVEC (1<<16)#define CPU_CAPABILITY_FPU (1<<31)VLC_EXPORT( unsigned, vlc_CPU, ( void ) );typedef void *(*vlc_memcpy_t) (void *tgt, const void *src, size_t n);typedef void *(*vlc_memset_t) (void *tgt, int c, size_t n);VLC_EXPORT( void, vlc_fastmem_register, (vlc_memcpy_t cpy, vlc_memset_t set) );VLC_EXPORT( void *, vlc_memcpy, ( void *, const void *, size_t ) );VLC_EXPORT( void *, vlc_memset, ( void *, int, size_t ) );/***************************************************************************** * I18n stuff *****************************************************************************/VLC_EXPORT( char *, vlc_gettext, ( const char *msgid ) LIBVLC_USED );/***************************************************************************** * libvlc features *****************************************************************************/VLC_EXPORT( const char *, VLC_Version, ( void ) LIBVLC_USED );VLC_EXPORT( const char *, VLC_CompileBy, ( void ) LIBVLC_USED );VLC_EXPORT( const char *, VLC_CompileHost, ( void ) LIBVLC_USED );VLC_EXPORT( const char *, VLC_CompileDomain, ( void ) LIBVLC_USED );VLC_EXPORT( const char *, VLC_Compiler, ( void ) LIBVLC_USED );VLC_EXPORT( const char *, VLC_Error, ( int ) LIBVLC_USED );VLC_EXPORT( const char *, VLC_Changeset, ( void ) LIBVLC_USED );/***************************************************************************** * Additional vlc stuff *****************************************************************************/#include "vlc_messages.h"#include "vlc_variables.h"#include "vlc_objects.h"#include "vlc_modules.h"#include "vlc_main.h"#include "vlc_configuration.h"#if defined( WIN32 ) || defined( UNDER_CE )# define DIR_SEP_CHAR '\\'# define DIR_SEP "\\"# define PATH_SEP_CHAR ';'# define PATH_SEP ";"#else# define DIR_SEP_CHAR '/'# define DIR_SEP "/"# define PATH_SEP_CHAR ':'# define PATH_SEP ":"#endif#define LICENSE_MSG \ _("This program comes with NO WARRANTY, to the extent permitted by " \ "law.\nYou may redistribute it under the terms of the GNU General " \ "Public License;\nsee the file named COPYING for details.\n" \ "Written by the VideoLAN team; see the AUTHORS file.\n")#endif /* !VLC_COMMON_H */
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -