SASC-NG
DVBSoftCAM

debug.h

Go to the documentation of this file.
00001 #ifndef _DVBLB_DEBUG_H_
00002 #define _DVBLB_DEBUG_H_
00003 enum {
00004   DVBDBG_FRONTEND = 0,
00005   DVBDBG_DEMUX    = 2,
00006   DVBDBG_DVR      = 4,
00007   DVBDBG_CA       = 6,
00008   DVBDBG_SID      = 8,
00009   DVBDBG_IOCTL    = 10,
00010   DVBDBG_RINGBUF  = 12,
00011   DVBDBG_DSS      = 14,
00012 };
00013 extern unsigned int _dbglvl;
00014 int tmprintf(const char *plugin, const char *fmt, ...);
00015 
00016 #define dprintf(args...) tmprintf("", args)
00017 #define dprintf0(args...) tmprintf(DBG_NAME, args)
00018 #define dprintf1(args...) if(1 <= ((_dbglvl >> PLUGIN_ID) & 3)) \
00019         tmprintf(DBG_NAME, args)
00020 #define dprintf2(args...) if(2 <= ((_dbglvl >> PLUGIN_ID) & 3)) \
00021         tmprintf(DBG_NAME, args)
00022 #define dprintf3(args...) if(3 == ((_dbglvl >> PLUGIN_ID) & 3)) \
00023         tmprintf(DBG_NAME, args)
00024 #else
00025 #ifdef PLUGIN_ID
00026   #if (PLUGIN_ID % 2) == 1
00027     #undef  dprintf1
00028     #undef  dprintf2
00029     #undef  dprintf3
00030   #else
00031     #if PLUGIN_ID > 30
00032       #error PLUGIN_ID is too large (must be between 8 and 30)
00033     #elif PLUGIN_ID < 8 && PLUGIN_ID != 0
00034       #error PLUGIN_ID is too small (must be between 8 and 30)
00035     #endif
00036   #endif
00037 #endif //#ifdef PLUGIN_ID
00038 #endif
00039 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines