#ifndef _VCCOMMON_H_ #define _VCCOMMON_H_ /* Includes */ #include #include #include #include #include using namespace std; /* Defines */ #define _64BITARG_ "q" #define _S64BITARG_ "lld" #define _U64BITARG_ "llu" #define _S32BITARG_ "ld" #define _U32BITARG_ "lu" #define _SPOINTERSIZEARG_ _S32BITARG_ #define _UPOINTERSIZEARG_ _U32BITARG_ /* paths */ #define kEOLString "\n" #define kPathDelimiterString "/" #define kPathDelimiterChar '/' #define kPartialPathBeginsWithDelimiter 0 /* Constants */ #define QT_TIME_TO_LOCAL_TIME (-2082844800) #define QT_PATH_SEPARATOR '/' #define kSInt16_Max (SInt16) SHRT_MAX #define kUInt16_Max (uint16) USHRT_MAX #define kSInt32_Max (sint32) LONG_MAX #define kuint32_Max (uint32)0xFFFFFFFF//ULONG_MAX #define kSInt64_Max (sint64) LONG_LONG_MAX #define kUInt64_Max (uint64) ULONG_LONG_MAX /* Typedefs */ typedef signed long PointerSizedInt; typedef unsigned long PointerSizedUInt; typedef uint8_t uint8; typedef int8_t sint8; typedef uint16_t uint16; typedef int16_t sint16; typedef uint32_t uint32; typedef int32_t sint32; typedef int64_t sint64; typedef uint64_t uint64; typedef float float32; typedef double float64; typedef uint16 bool16; typedef uint8 bool8; #ifndef CONST #define CONST const #endif #ifndef FALSE #define FALSE 0 #endif #ifndef TRUE #define TRUE 1 #endif #ifndef NULL #define NULL ((void *)0) #endif typedef void *HANDLE; #ifdef FOUR_CHARS_TO_INT #error Conflicting Macro "FOUR_CHARS_TO_INT" #endif #define FOUR_CHARS_TO_INT( c1, c2, c3, c4 ) ( c1 << 24 | c2 << 16 | c3 << 8 | c4 ) #ifdef TW0_CHARS_TO_INT #error Conflicting Macro "TW0_CHARS_TO_INT" #endif #define TW0_CHARS_TO_INT( c1, c2 ) ( c1 << 8 | c2 ) #define MAX_PATH 260 #define FF_ALIGN(x, a) (((x)+(a)-1)&~((a)-1)) ///< 对齐 typedef sint32 S_Res; typedef sint32 OS_Error; enum { OS_NoErr = (OS_Error) 0, OS_SocketFailed = (OS_Error) -50, OS_BadURLFormat = (OS_Error) -100, OS_NotEnoughSpace = (OS_Error) -101 }; #define APP_QUEUE_BUF_COUNT 8 //监听Queue中节点的个数 #define APP_VIDEO_QUEUE_BUF_SIZE (1280*720*3) //video Queue中节点buf大小 #define QUEUE_BUF_COUNT 8 //监听Queue中节点的个数 #define VIDEO_QUEUE_BUF_SIZE (1920*1080*3) //video Queue中节点buf大小 ///紫外队列相关 #define UV_QUEUE_NODE_NUM 8 ///队列中节点的个数 #define UV_VIDEO_QUEUE_BUF_SIZE (720*576*3) #endif //_VCCOMMON_H_