Defines | Functions | Variables

messages.c File Reference

Include dependency graph for messages.c:

Defines

#define COL(x, y)   "\033[" #x ";" #y "m"
#define RED   COL(31,1)
#define GREEN   COL(32,1)
#define YELLOW   COL(0,33)
#define WHITE   COL(0,1)
#define GRAY   "\033[0m"

Functions

void vlc_Subscribe (msg_subscription_t *sub, msg_callback_t cb, void *opaque)
 Subscribe to the message queue.
void vlc_Unsubscribe (msg_subscription_t *sub)
 Unsubscribe from the message queue.
void vlc_Log (vlc_object_t *obj, int type, const char *module, const char *format,...)
 Emit a log message.
static void PrintColorMsg (void *, int, const msg_item_t *, const char *, va_list)
static void PrintMsg (void *, int, const msg_item_t *, const char *, va_list)
void vlc_vaLog (vlc_object_t *obj, int type, const char *module, const char *format, va_list args)
 Emit a log message.

Variables

vlc_rwlock_t msg_lock = PTHREAD_RWLOCK_INITIALIZER
 Store all data required by messages interfaces.
msg_subscription_tmsg_head
static const char msg_type [4][9] = { "", " error", " warning", " debug" }
static const char msg_color [4][8] = { WHITE, RED, YELLOW, GRAY }

Define Documentation

#define COL (   x,
  y 
)    "\033[" #x ";" #y "m"
#define GRAY   "\033[0m"

Referenced by PrintColorMsg().

#define GREEN   COL(32,1)

Referenced by PrintColorMsg().

#define RED   COL(31,1)
#define WHITE   COL(0,1)
#define YELLOW   COL(0,33)

Function Documentation

static void PrintColorMsg ( void *  d,
int  type,
const msg_item_t p_item,
const char *  format,
va_list  ap 
) [static]
static void PrintMsg ( void *  d,
int  type,
const msg_item_t p_item,
const char *  format,
va_list  ap 
) [static]
void vlc_Log ( vlc_object_t obj,
int  type,
const char *  module,
const char *  format,
  ... 
)

Emit a log message.

Parameters:
obj VLC object emitting the message or NULL
type VLC_MSG_* message type (info, error, warning or debug)
module name of module from which the message come (normally MODULE_STRING)
format printf-like message format

References va_end(), va_start(), and vlc_vaLog().


Variable Documentation

const char msg_color[4][8] = { WHITE, RED, YELLOW, GRAY } [static]

Referenced by PrintColorMsg().

vlc_rwlock_t msg_lock = PTHREAD_RWLOCK_INITIALIZER

Store all data required by messages interfaces.

Referenced by _DLL_InitTerm(), DllMain(), vlc_Subscribe(), vlc_Unsubscribe(), and vlc_vaLog().

const char msg_type[4][9] = { "", " error", " warning", " debug" } [static]

Referenced by PrintColorMsg(), and PrintMsg().

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines