Refactoring debug code

Conflicts:
	libeplayer3-arm/container/container_ffmpeg.c
This commit is contained in:
samsamsam
2019-01-11 18:57:06 +01:00
committed by Thilo Graf
parent 99844a02dd
commit f58a34e220
53 changed files with 1404 additions and 1398 deletions

View File

@@ -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 */
/* ***************************** */