?? vlc_common.h
字號(hào):
typedef struct device_probe_t device_probe_t;typedef struct probe_sys_t probe_sys_t;/* block */typedef struct block_t block_t;typedef struct block_fifo_t block_fifo_t;/* httpd */typedef struct httpd_t httpd_t;typedef struct httpd_host_t httpd_host_t;typedef struct httpd_url_t httpd_url_t;typedef struct httpd_client_t httpd_client_t;typedef struct httpd_callback_sys_t httpd_callback_sys_t;typedef struct httpd_message_t httpd_message_t;typedef int (*httpd_callback_t)( httpd_callback_sys_t *, httpd_client_t *, httpd_message_t *answer, const httpd_message_t *query );typedef struct httpd_file_t httpd_file_t;typedef struct httpd_file_sys_t httpd_file_sys_t;typedef int (*httpd_file_callback_t)( httpd_file_sys_t *, httpd_file_t *, uint8_t *psz_request, uint8_t **pp_data, int *pi_data );typedef struct httpd_handler_t httpd_handler_t;typedef struct httpd_handler_sys_t httpd_handler_sys_t;typedef int (*httpd_handler_callback_t)( httpd_handler_sys_t *, httpd_handler_t *, char *psz_url, uint8_t *psz_request, int i_type, uint8_t *p_in, int i_in, char *psz_remote_addr, char *psz_remote_host, uint8_t **pp_data, int *pi_data );typedef struct httpd_redirect_t httpd_redirect_t;typedef struct httpd_stream_t httpd_stream_t;/* TLS support */typedef struct tls_server_t tls_server_t;typedef struct tls_session_t tls_session_t;/* Hashing */typedef struct md5_s md5_t;/* XML */typedef struct xml_t xml_t;typedef struct xml_sys_t xml_sys_t;typedef struct xml_reader_t xml_reader_t;typedef struct xml_reader_sys_t xml_reader_sys_t;/* vod server */typedef struct vod_t vod_t;typedef struct vod_sys_t vod_sys_t;typedef struct vod_media_t vod_media_t;/* opengl */typedef struct opengl_t opengl_t;typedef struct opengl_sys_t opengl_sys_t;/* osdmenu */typedef struct osd_menu_t osd_menu_t;typedef struct osd_state_t osd_state_t;typedef struct osd_event_t osd_event_t;typedef struct osd_button_t osd_button_t;typedef struct osd_menu_state_t osd_menu_state_t;/* VLM */typedef struct vlm_t vlm_t;typedef struct vlm_message_t vlm_message_t;/* divers */typedef struct vlc_meta_t vlc_meta_t;typedef struct meta_export_t meta_export_t;/* Stats */typedef struct counter_t counter_t;typedef struct counter_sample_t counter_sample_t;typedef struct stats_handler_t stats_handler_t;typedef struct input_stats_t input_stats_t;typedef struct global_stats_t global_stats_t;/* Update */typedef struct update_t update_t;typedef struct update_iterator_t update_iterator_t;/* Meta engine */typedef struct meta_engine_t meta_engine_t;/* stat/lstat/fstat */#ifdef WIN32#include <sys/stat.h># ifndef UNDER_CEstruct _stati64;#define stat _stati64#define fstat _fstati64#endif/* You should otherwise use utf8_stat and utf8_lstat. */#elsestruct stat;#endif/** * VLC value structure */typedef union{ int i_int; bool b_bool; float f_float; char * psz_string; void * p_address; vlc_object_t * p_object; vlc_list_t * p_list; mtime_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;};/** * \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/**@}*//***************************************************************************** * Error values (shouldn't be exposed) *****************************************************************************/#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_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 *//***************************************************************************** * Variable callbacks *****************************************************************************/typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */ char const *, /* variable name */ vlc_value_t, /* old value */ vlc_value_t, /* new value */ void * ); /* callback data *//***************************************************************************** * Plug-in stuff *****************************************************************************/#ifdef __cplusplus# define LIBVLC_EXTERN extern "C"#else# define LIBVLC_EXTERN extern#endif#if defined (WIN32) && defined (DLL_EXPORT)#if defined (UNDER_CE)# include <windef.h>#endif# define LIBVLC_EXPORT __declspec(dllexport)#else# define LIBVLC_EXPORT#endif#define VLC_EXPORT( type, name, args ) \ LIBVLC_EXTERN LIBVLC_EXPORT type name args/***************************************************************************** * OS-specific headers and thread types *****************************************************************************/#if defined( WIN32 ) || defined( UNDER_CE )# define WIN32_LEAN_AND_MEAN# include <windows.h>#endif#include "vlc_mtime.h"#include "vlc_threads.h"/***************************************************************************** * Common structure members *****************************************************************************//* VLC_COMMON_MEMBERS : members common to all basic vlc objects */#define VLC_COMMON_MEMBERS \/** \name VLC_COMMON_MEMBERS \ * these members are common for all vlc objects \ */ \/**@{*/ \ int i_object_type; \ const char *psz_object_type; \ char *psz_object_name; \ \ /* Messages header */ \ char *psz_header; \ int i_flags; \ \ /* Object properties */ \ volatile bool b_error; /**< set by the object */ \ volatile bool b_die; /**< set by the outside */ \ bool b_force; /**< set by the outside (eg. module_need()) */ \ \ /** Just a reminder so that people don't cast garbage */ \ bool be_sure_to_add_VLC_COMMON_MEMBERS_to_struct; \ \ /* Stuff related to the libvlc structure */ \ libvlc_int_t *p_libvlc; /**< (root of all evil) - 1 */ \ \ vlc_object_t * p_parent; /**< our parent */ \ \ /* Private data */ \ void * p_private; \ \/**@}*/ \/* VLC_OBJECT: attempt at doing a clever cast */#ifdef __GNUC__# define VLC_OBJECT( x ) \ (((vlc_object_t *)(x))+0*(((typeof(x))0)->be_sure_to_add_VLC_COMMON_MEMBERS_to_struct))#else# define VLC_OBJECT( x ) ((vlc_object_t *)(x))#endiftypedef struct gc_object_t{ vlc_spinlock_t spin; uintptr_t refs; void (*pf_destructor) (struct gc_object_t *);} gc_object_t;/** * These members are common to all objects that wish to be garbage-collected. */#define VLC_GC_MEMBERS gc_object_t vlc_gc_data;VLC_EXPORT(void *, vlc_gc_init, (gc_object_t *, void (*)(gc_object_t *)));VLC_EXPORT(void *, vlc_hold, (gc_object_t *));VLC_EXPORT(void, vlc_release, (gc_object_t *));#define vlc_gc_init( a,b ) vlc_gc_init( &(a)->vlc_gc_data, (b) )#define vlc_gc_incref( a ) vlc_hold( &(a)->vlc_gc_data )#define vlc_gc_decref( a ) vlc_release( &(a)->vlc_gc_data )#define vlc_priv( gc, t ) ((t *)(((char *)(gc)) - offsetof(t, vlc_gc_data)))/***************************************************************************** * Macros and inline functions *****************************************************************************//* CEIL: division with round to nearest greater integer */#define CEIL(n, d) ( ((n) / (d)) + ( ((n) % (d)) ? 1 : 0) )/* PAD: PAD(n, d) = CEIL(n ,d) * d */#define PAD(n, d) ( ((n) % (d)) ? ((((n) / (d)) + 1) * (d)) : (n) )/* __MAX and __MIN: self explanatory */#ifndef __MAX# define __MAX(a, b) ( ((a) > (b)) ? (a) : (b) )#endif#ifndef __MIN# define __MIN(a, b) ( ((a) < (b)) ? (a) : (b) )#endifLIBVLC_USEDstatic inline int64_t GCD ( int64_t a, int64_t b ){ while( b ) { int64_t c = a % b; a = b; b = c; } return a;}
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -