Update libaaf to v1.0-10-g13f0b0a

This commit is contained in:
Robin Gareus 2024-03-19 20:59:04 +01:00
parent da4218c2db
commit 4883867f2b
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
20 changed files with 116 additions and 262 deletions

View file

@ -55,9 +55,9 @@ laaf_new_log (void)
return NULL;
}
log->debug_callback = &laaf_log_callback;
log->fp = stdout;
log->ansicolor = 0;
log->log_callback = &laaf_log_callback;
log->fp = stdout;
log->ansicolor = 0;
return log;
}
@ -85,28 +85,28 @@ laaf_log_callback (struct aafLog* log, void* ctxdata, int libid, int type, const
const char* color = "";
if (log->fp == NULL) {
DBG_BUFFER_RESET (log);
LOG_BUFFER_RESET (log);
return;
}
switch (libid) {
case DEBUG_SRC_ID_LIB_CFB:
case LOG_SRC_ID_LIB_CFB:
lib = "libCFB";
aafi = (AAF_Iface*)ctxdata;
break;
case DEBUG_SRC_ID_AAF_CORE:
case LOG_SRC_ID_AAF_CORE:
lib = "AAFCore";
aafd = (AAF_Data*)ctxdata;
break;
case DEBUG_SRC_ID_AAF_IFACE:
case LOG_SRC_ID_AAF_IFACE:
lib = "AAFIface";
cfbd = (CFB_Data*)ctxdata;
break;
case DEBUG_SRC_ID_TRACE:
case LOG_SRC_ID_TRACE:
lib = "trace";
aafi = (AAF_Iface*)ctxdata;
break;
case DEBUG_SRC_ID_DUMP:
case LOG_SRC_ID_DUMP:
lib = "dump";
break;
}
@ -132,7 +132,7 @@ laaf_log_callback (struct aafLog* log, void* ctxdata, int libid, int type, const
const char* eol = "";
if (libid != DEBUG_SRC_ID_TRACE && libid != DEBUG_SRC_ID_DUMP) {
if (libid != LOG_SRC_ID_TRACE && libid != LOG_SRC_ID_DUMP) {
#ifdef __MINGW32__
fwprintf (log->fp, L"[%" WPRIs "%" WPRIs "%" WPRIs "] %" WPRIs "%" WPRIs ":%i in %" WPRIs "()%" WPRIs " : ",
color,
@ -156,7 +156,7 @@ laaf_log_callback (struct aafLog* log, void* ctxdata, int libid, int type, const
#endif
}
if (libid != DEBUG_SRC_ID_DUMP) {
if (libid != LOG_SRC_ID_DUMP) {
eol = "\n";
}
@ -173,7 +173,7 @@ laaf_log_callback (struct aafLog* log, void* ctxdata, int libid, int type, const
fflush (log->fp);
DBG_BUFFER_RESET (log);
LOG_BUFFER_RESET (log);
/* avoids -Wunused-parameter -Wunused-but-set-variable */
(void)aafi;
@ -184,13 +184,13 @@ laaf_log_callback (struct aafLog* log, void* ctxdata, int libid, int type, const
}
void
laaf_write_log (struct aafLog* log, void* ctxdata, enum debug_source_id lib, enum verbosityLevel_e type, const char* dbgfile, const char* dbgfunc, int dbgline, const char* format, ...)
laaf_write_log (struct aafLog* log, void* ctxdata, enum log_source_id lib, enum verbosityLevel_e type, const char* srcfile, const char* srcfunc, int srcline, const char* format, ...)
{
if (!log) {
return;
}
if (!log->debug_callback) {
if (!log->log_callback) {
return;
}
@ -275,7 +275,7 @@ laaf_write_log (struct aafLog* log, void* ctxdata, enum debug_source_id lib, enu
return;
}
log->debug_callback (log, (void*)ctxdata, lib, type, dbgfile, dbgfunc, dbgline, log->_msg, log->user);
log->log_callback (log, (void*)ctxdata, lib, type, srcfile, srcfunc, srcline, log->_msg, log->user);
va_end (ap);