libtriple: improve debug architecture

every libtriple module can have its debug output enabled separately
by exporting the TRIPLE_DEBUG variable
This commit is contained in:
Stefan Seyfried
2011-02-06 16:15:24 +01:00
parent ddf592f805
commit 45e7d0d9fa
9 changed files with 172 additions and 90 deletions

View File

@@ -1,4 +1,19 @@
#ifndef __LT_DEBUG_H
#define __LT_DEBUG_H
void lt_debug(const char *fmt, ...);
#define TRIPLE_DEBUG_AUDIO 0
#define TRIPLE_DEBUG_VIDEO 1
#define TRIPLE_DEBUG_DEMUX 2
#define TRIPLE_DEBUG_RECORD 3
#define TRIPLE_DEBUG_PLAYBACK 4
#define TRIPLE_DEBUG_PWRMNGR 5
#define TRIPLE_DEBUG_INIT 6
#define TRIPLE_DEBUG_CA 7
#define TRIPLE_DEBUG_ALL ((1<<8)-1)
extern int debuglevel;
void _lt_debug(int facility, const char *fmt, ...);
void _lt_info(int facility, const char *fmt, ...);
void lt_debug_init(void);
#endif