VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
messages.c File Reference
Include dependency graph for messages.c:

Macros

#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] = { "\033[" "0" ";" "1" "m" , "\033[" "31" ";" "1" "m" , "\033[" "0" ";" "33" "m" , "\033[0m" }

Macro Definition Documentation

#define COL (   x,
 
)    "\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

Variable Documentation

const char msg_color[4][8] = { "\033[" "0" ";" "1" "m" , "\033[" "31" ";" "1" "m" , "\033[" "0" ";" "33" "m" , "\033[0m" }
static

Referenced by PrintColorMsg().

msg_subscription_t* msg_head

Referenced by vlc_Subscribe().

vlc_rwlock_t msg_lock = PTHREAD_RWLOCK_INITIALIZER

Store all data required by messages interfaces.

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

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

Referenced by PrintColorMsg(), and PrintMsg().