123456789101112131415161718192021222324252627282930313233343536 |
- #include "video_jbuff_log.h"
- #include "video_jbuff_defines.h"
- #include "stdarg.h "
- static VideoJBufferLogCallBack g_log_func = {0};
- void ex_video_jitterbuffer_log(int level, const char* file, int line, const char *fmt, ...)
- {
- va_list vl;
- if (g_log_func.log_fn != NULL) {
- va_start(vl, fmt);
- g_log_func.log_fn(g_log_func.userdata, level, file, line, fmt, vl);
- va_end(vl);
- }
- }
- void video_jitterbuffer_setup_log(VideoJBufferLogCallBack *log_func)
- {
- if (log_func) {
- g_log_func.log_fn = log_func->log_fn;
- g_log_func.userdata = log_func->userdata;
- } else {
- g_log_func.log_fn = NULL;
- g_log_func.userdata = NULL;
- }
- }
- void video_jitterbuffer_unsetup_log()
- {
- g_log_func.log_fn = NULL;
- g_log_func.userdata = NULL;
- }
|