summaryrefslogtreecommitdiff
path: root/include/tinyff/dbg.h
blob: 74a5fbb212e666b2d09ec4ee5c6966e68d4b7e40 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#ifndef DBG_H
#define DBG_H

// Debug logging writes to a user-supplied stream.
// By default debug is disabled. Enable via ff_set_debug_stream.


#define FF_DEBUG_ENABLED 1

#include <tinyff/result.h>
#include <tinyff/common.h>
#include <tinyff/stream.h>

#include <stdarg.h>


// Sets the debug stream. If stream is NULL, debug is disabled.
ff_result ff_set_debug_stream(ff_stream* stream, ff_ctx* ctx);

// Prints a string to the debug stream if debug is enabled.
ff_result ff_dprintf(ff_ctx* ctx, const char *msg, ...);

#endif