/** @file vetDefs.h * * @brief This header contains VETLib shared definitions: * * - VETRESULT definition and standard return codes; * - VETLib Class types definition; * - Some MACROs and a DEBUG utility. * * @version 1.0.2 * @date 23/12/2005 * @author Alessandro Polo * * **************************************************************************** * VETLib Framework 1.0.2 * Copyright (C) Alessandro Polo 2006 * http://www.ewgate.net/vetlib * ****************************************************************************/ #ifndef __VETLIB_VETDEFINITIONS_H__ #define __VETLIB_VETDEFINITIONS_H__ /** * @brief Short way to call unsigned char, useful with vetFrameT<> */ typedef unsigned char uchar; /////////////////////////////////////////////////////////////////////////////////////////////////////// // Define Return Codes (integers) /** * @brief Standard return type for VETLib methods is defined as an integer, * but in future it may be updated as a long, in your code you should * define always VETRESULT, not int: * Sample: VETRESULT myMethod() { return VETRET_OK; } */ typedef int VETRESULT; /** * @brief Standard return codes are defined as pow of 2, so you may add result * and still be able to extract each original error from the sum (15=8+4+2+1) */ #define VETRET_OK 0 /* no errors found */ #define VETRET_PARAM_ERR 1 /* illegal parameter(s) */ #define VETRET_INTERNAL_ERR 2 /* internal routine error */ #define VETRET_ILLEGAL_USE 4 /* illegal use of function (forbidden, empty video/frame, ..) */ #define VETRET_DEPRECATED_ERR 8 /* */ #define VETRET_OK_DEPRECATED 16 /* */ #define VETRET_NOT_IMPLEMENTED 666 /* */ /////////////////////////////////////////////////////////////////////////////////////////////////////// // Define class types /** * @brief Here we define main class types of VETLib objects, referrer is * classType enumeration of main iterfaces (vetInput, vetFrame, ..). */ #define VETCLASS_TYPE_UNKNOWN 0 #define VETCLASS_TYPE_OBJECT 10 #define VETCLASS_TYPE_EXCEPTION 20 #define VETCLASS_TYPE_FRAME 1000 #define VETCLASS_TYPE_BUFFER 2000 #define VETCLASS_TYPE_INPUT 4000 #define VETCLASS_TYPE_OUTPUT 8000 #define VETCLASS_TYPE_FILTER 1600 #define VETCLASS_TYPE_CODEC 3200 #define VETCLASS_TYPE_VISION 6400 //#define __VETLIB_DEBUGMODE__ // define DEBUG utility, use: DEBUG('variablename') #ifdef __VETLIB_DEBUGMODE__ #include #define INFO(x) printf("_NFO: %s\n"); #define DEBUG(x) printf("_DBG: %s = %p \n", #x, x); #define DEBUGMSG(msg, x) printf("_DBG: %s %s = %p \n", msg, #x, x); #else #define INFO(x) ; #define DEBUG(x) ; #define DEBUGMSG(msg, x) ; #endif //__VETLIB_DEBUGMODE__ #endif //__VETLIB_VETDEFINITIONS_H__