mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2026-02-26 01:40:28 -05:00
spa: add context to debug functions
Add new spa_debugc_ funnctions that take a context. The user should also redefine the spa_debugc macro to handle the context. Use this to let some plugins log the pod and format to the log without using the global logger. Also use this to remove our custom pod logger function by reusing the spa one with a custom context.
This commit is contained in:
parent
f472fd736d
commit
3c67821c4a
14 changed files with 158 additions and 268 deletions
|
|
@ -38,11 +38,14 @@ extern "C" {
|
|||
* \{
|
||||
*/
|
||||
|
||||
#ifndef spa_debug
|
||||
#define spa_debug(fmt,...) ({ printf((fmt"\n"), ## __VA_ARGS__); })
|
||||
#endif
|
||||
#ifndef spa_debugn
|
||||
#define spa_debugn(fmt,...) ({ printf((fmt), ## __VA_ARGS__); })
|
||||
#define spa_debugn(_fmt,...) printf((_fmt), ## __VA_ARGS__)
|
||||
#endif
|
||||
#ifndef spa_debug
|
||||
#define spa_debug(_fmt,...) spa_debugn(_fmt"\n", ## __VA_ARGS__)
|
||||
#endif
|
||||
#ifndef spa_debugc
|
||||
#define spa_debugc(_c,_fmt,...) spa_debug(_fmt, ## __VA_ARGS__)
|
||||
#endif
|
||||
|
||||
struct spa_debug_buffer {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue