vlc_LogEarlyOpen
vlc_LogInit
if (early_sys != NULL)
vlc_LogEarlyClose
vlc_Log
vlc_vaLog
Win32DebugOutputMsg
OutputDebugStringW
vlc_LogDeinit
vlc_LogEarlyClose
vlc_LogEarlyClose
vlc_LogCallback
vlc_vaLogCallback
vlc_vaLogEarly
src/libvlc.c/libvlc_InternalInit
vlc_LogPreinit
vlc_LogInit
src/libvlc.c/libvlc_InternalCleanup
vlc_LogDeinit
vlc_LogDeinit
include/vlc_messages.h
msg_Info
msg_Err
msg_Warn
msg_Dbg
vlc_Log
1. messages.c 中的 vlc_logger_t 新增變數
vlc_mutex_t line_lock;
2. 在 vlc_Log 函數中使用 mutex_lock, 括住 va_start 和 va_end
vlc_logger_t *logger = libvlc_priv(obj->p_libvlc)->logger;
if (logger) vlc_mutex_lock(&logger->line_lock);
vlc_logger_t *logger = libvlc_priv(obj->p_libvlc)->logger;
if (logger) vlc_mutex_lock(&logger->line_lock);
if (logger) vlc_mutex_unlock(&logger->line_lock);
3. 在 vlc_LogInit 函數的最後增加
vlc_mutex_init(&logger->line_lock);
4. 在 vlc_LogDeinit 函數的最開頭增加
vlc_mutex_destroy(&logger->line_lock);
沒有留言:
張貼留言