mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 15:33:00 +02:00
Refactoring debug code
Conflicts: libeplayer3-arm/container/container_ffmpeg.c
This commit is contained in:
@@ -36,6 +36,7 @@
|
||||
#include <time.h>
|
||||
|
||||
#include "common.h"
|
||||
#include "debug.h"
|
||||
#include "misc.h"
|
||||
#include "writer.h"
|
||||
|
||||
@@ -62,29 +63,6 @@ typedef struct BufferingNode_s
|
||||
#define cERR_LINUX_DVB_BUFFERING_NO_ERROR 0
|
||||
#define cERR_LINUX_DVB_BUFFERING_ERROR -1
|
||||
|
||||
//#define SAM_WITH_DEBUG
|
||||
#ifdef SAM_WITH_DEBUG
|
||||
#define LINUX_DVB_BUFFERING_DEBUG
|
||||
#else
|
||||
#define LINUX_DVB_BUFFERING_SILENT
|
||||
#endif
|
||||
|
||||
#ifdef LINUX_DVB_BUFFERING_DEBUG
|
||||
|
||||
static const uint16_t debug_level = 40;
|
||||
|
||||
#define buff_printf(level, fmt, x...) do { \
|
||||
if (debug_level >= level) printf("[%s:%d:%s] " fmt, __FILE__, __LINE__, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define buff_printf(level, fmt, x...)
|
||||
#endif
|
||||
|
||||
#ifndef LINUX_DVB_BUFFERING_SILENT
|
||||
#define buff_err(fmt, x...) do { printf("[%s:%d:%s] " fmt, __FILE__, __LINE__, __FUNCTION__, ## x); } while (0)
|
||||
#else
|
||||
#define buff_err(fmt, x...)
|
||||
#endif
|
||||
|
||||
/* ***************************** */
|
||||
/* Variables */
|
||||
/* ***************************** */
|
||||
|
Reference in New Issue
Block a user