diff options
author | roman.artiukhin <bahusdrive@gmail.com> | 2023-09-22 19:49:41 +0300 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2023-09-26 08:38:31 -0400 |
commit | ec2c507e601dc07461b84cadaa8865aa8c85a5d9 (patch) | |
tree | b541c74bee7a57985fa1b84f27cd8431b95eb50d | |
parent | 62db16c82c27e2ca6895b6c50fdc9d3b30be4702 (diff) | |
download | rockbox-ec2c507e60.tar.gz rockbox-ec2c507e60.zip |
Support per file logging with LOGF_ENABLE in codecs
Codecs mostly use custom LOGF define for logging (i.e. see aac.c). Now such logging can be enabled in single file with #define LOGF_ENABLE
Change-Id: I36312fbcd2d9166fb1fe5ead31e7354342d8828d
-rw-r--r-- | lib/rbcodec/codecs/codecs.h | 4 | ||||
-rw-r--r-- | lib/rbcodec/codecs/libfaad/common.h | 16 |
2 files changed, 4 insertions, 16 deletions
diff --git a/lib/rbcodec/codecs/codecs.h b/lib/rbcodec/codecs/codecs.h index aa9d2e8a0d..9dc4d322cc 100644 --- a/lib/rbcodec/codecs/codecs.h +++ b/lib/rbcodec/codecs/codecs.h @@ -60,6 +60,10 @@ #ifdef ROCKBOX_HAS_LOGF #undef LOGF #define LOGF ci->logf +#elifdef LOGF_ENABLE +#include "logf.h" +#undef LOGF +#define LOGF logf #else #define LOGF(...) #endif diff --git a/lib/rbcodec/codecs/libfaad/common.h b/lib/rbcodec/codecs/libfaad/common.h index c5eaa0aa51..8f66a14ce0 100644 --- a/lib/rbcodec/codecs/libfaad/common.h +++ b/lib/rbcodec/codecs/libfaad/common.h @@ -35,22 +35,6 @@ extern "C" { #include "faad_config.h" #include "codeclib.h" -extern struct codec_api* ci; - -#if defined(DEBUG) || defined(SIMULATOR) -#undef DEBUGF -#define DEBUGF ci->debugf -#else -#define DEBUGF(...) -#endif - -#ifdef ROCKBOX_HAS_LOGF -#undef LOGF -#define LOGF ci->logf -#else -#define LOGF(...) -#endif - #if (CONFIG_CPU == MCF5250) /* Enough IRAM but performance suffers with ICODE_ATTR. */ #define IBSS_ATTR_FAAD_LARGE_IRAM IBSS_ATTR |