image-source: Add a macro for logging info messages

This commit is contained in:
Christoph Hohmann 2015-02-21 20:41:47 +01:00 committed by jp9000
parent c5b8c744ed
commit 52ff7b9734

View File

@ -1,9 +1,16 @@
#include <obs-module.h>
#define warn(format, ...) \
blog(LOG_WARNING, "[image_source: '%s'] " format, \
#define blog(log_level, format, ...) \
blog(log_level, "[image_source: '%s'] " format, \
obs_source_get_name(context->source), ##__VA_ARGS__)
#define debug(format, ...) \
blog(LOG_DEBUG, format, ##__VA_ARGS__)
#define info(format, ...) \
blog(LOG_INFO, format, ##__VA_ARGS__)
#define warn(format, ...) \
blog(LOG_WARNING, format, ##__VA_ARGS__)
struct image_source {
obs_source_t *source;