1
0
mirror of https://github.com/DigitalDevices/dddvb.git synced 2023-10-10 13:37:43 +02:00
dddvb/lib/src/debug.h

32 lines
669 B
C
Raw Normal View History

2018-09-17 13:45:26 +02:00
#ifndef _DDDVB_DEBUG_H_
#define _DDDVB_DEBUG_H_
#include "tools.h"
#if BUILDING_LIBDDDVB
extern uint32_t dddvb_debug;
#endif
#define DEBUG_RTSP 1
#define DEBUG_SSDP 2
#define DEBUG_NET 4
#define DEBUG_SYS 8
#define DEBUG_DVB 16
#define DEBUG_IGMP 32
#define DEBUG_SWITCH 64
2019-07-08 10:05:16 +02:00
#define DEBUG_CA 128
2018-09-17 13:45:26 +02:00
#define DEBUG_DEBUG 256
#if 0
#define dbgprintf(_mask_, ...) \
do { if (dddvb_debug & _mask_) fprintf(stderr, __VA_ARGS__); } while (0)
#else
#define dbgprintf(_mask_, ...) \
do { if (dddvb_debug & _mask_) { fprintf(stderr, "[%5u] ", mtime(NULL)); \
fprintf(stderr, __VA_ARGS__); } } while (0)
#endif
#endif