|
libgpac
0.4.5
|
Macros | |
| #define | GF_LOG(_log_level, _log_tools, __args) |
| Message logging. | |
Typedefs | |
| typedef void(* | gf_log_cbk )(void *cbck, u32 log_level, u32 log_tool, const char *fmt, va_list vlist) |
| Log Message Callback. | |
Enumerations | |
| enum | { GF_LOG_QUIET = 0, GF_LOG_ERROR, GF_LOG_WARNING, GF_LOG_INFO, GF_LOG_DEBUG } |
| enum | { GF_LOG_CORE = 0, GF_LOG_CODING, GF_LOG_CONTAINER, GF_LOG_NETWORK, GF_LOG_RTP, GF_LOG_AUTHOR, GF_LOG_SYNC, GF_LOG_CODEC, GF_LOG_PARSER, GF_LOG_MEDIA, GF_LOG_SCENE, GF_LOG_SCRIPT, GF_LOG_INTERACT, GF_LOG_COMPOSE, GF_LOG_CACHE, GF_LOG_MMIO, GF_LOG_RTI, GF_LOG_SMIL, GF_LOG_MEMORY, GF_LOG_AUDIO, GF_LOG_MODULE, GF_LOG_MUTEX, GF_LOG_CONSOLE, GF_LOG_ALL, GF_LOG_TOOL_MAX = GF_LOG_ALL } |
Functions | |
| void | gf_log_set_strict_error (Bool strict) |
| Log exits at first error assignment. | |
| char * | gf_log_get_tools_levels () |
| gets string-formated log tools | |
| void | gf_log_set_tool_level (u32 tool, u32 level) |
| Log modules assignment. | |
| gf_log_cbk | gf_log_set_callback (void *usr_cbk, gf_log_cbk cbk) |
| Log overwrite. | |
| void | gf_log (const char *fmt,...) |
| void | gf_log_lt (u32 ll, u32 lt) |
| Bool | gf_log_tool_level_on (u32 log_tool, u32 log_level) |
| Log level checking. | |
| GF_Err | gf_log_set_tools_levels (const char *log_tools_levels) |
| Set log tools and levels. | |
| GF_Err | gf_log_modify_tools_levels (const char *val) |
| Modify log tools and levels. | |
| #define GF_LOG | ( | _log_level, | |
| _log_tools, | |||
| __args | |||
| ) |
Macro for logging messages. Usage is GF_LOG(log_lev, log_module, (fmt, ...)). The log function is only called if log filtering allows it. This avoids fetching logged parameters when the tool is not being logged.
| typedef void(* gf_log_cbk)(void *cbck, u32 log_level, u32 log_tool, const char *fmt, va_list vlist) |
The gf_log_cbk type is the type for the callback of the gf_log_set_callback function. By default all logs are redirected to stdout
| cbck | Opaque user data. |
| log_level | level of the log. This value is not guaranteed in multi-threaded context. |
| log_tool | tool emitting the log. This value is not guaranteed in multi-threaded context. |
| fmt | message log format. |
| vlist | message log param. |
| anonymous enum |
GPAC Log Levels
These levels describes messages priority used when filtering logs
| anonymous enum |
GPAC Log tools
These flags describes which sub-part of GPAC generates the log and are used when filtering logs
| void gf_log_set_strict_error | ( | Bool | strict | ) |
When GF_LOG_ERROR happens, program leaves with instruction exit(1);
| strict | strict behaviour when encoutering a serious error. |
| char* gf_log_get_tools_levels | ( | ) |
Returns the string-formatted log tools and levels. Returned string shall be freed by the caller.
| void gf_log_set_tool_level | ( | u32 | tool, |
| u32 | level | ||
| ) |
Set log level for a given tool.
Sets the tools to be checked for log filtering. By default no logging is performed.
| tool | tool to be logged. |
| level | level of logging for this tool. |
Set log level for a given tool.
| tool | tool to log |
| level | log level for this tool |
| gf_log_cbk gf_log_set_callback | ( | void * | usr_cbk, |
| gf_log_cbk | cbk | ||
| ) |
Assigns a user-defined callback for printing log messages. By default all logs are redirected to stdout
| usr_cbk | Opaque user data |
| cbk | callback log function |
| Bool gf_log_tool_level_on | ( | u32 | log_tool, |
| u32 | log_level | ||
| ) |
Checks if a given tool is logged for the given level
| log_tool | tool to check |
| log_level | level to check |
| GF_Err gf_log_set_tools_levels | ( | const char * | log_tools_levels | ) |
Set log tools and levels according to the log_tools_levels string. All previous log settings are discarded.
| log_tools_levels | string specifying the tools and levels. It is formatted as logToolX:logToolZ:... |
| GF_Err gf_log_modify_tools_levels | ( | const char * | val | ) |
Modify log tools and levels according to the log_tools_levels string. Previous log settings are kept.
| log_tools_levels | string specifying the tools and levels. It is formatted as logToolX:logToolZ:... |
1.8.1.1