VLC  2.1.0-git
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Typedefs | Functions
Log messages subscription
Interface

These functions deal with log messages. More...

Collaboration diagram for Log messages subscription:

Data Structures

struct  msg_subscription
 Used by interface plugins which subscribe to the message bank. More...

Typedefs

typedef void(* msg_callback_t )(void *, int, const msg_item_t *, const char *, va_list)
 Message logging callback signature.
typedef struct msg_subscription msg_subscription_t
 Used by interface plugins which subscribe to the message bank.

Functions

void vlc_Subscribe (msg_subscription_t *, msg_callback_t, void *)
 Subscribe to the message queue.
void vlc_Unsubscribe (msg_subscription_t *)
 Unsubscribe from the message queue.

Detailed Description

These functions deal with log messages.

Typedef Documentation

typedef void(* msg_callback_t)(void *, int, const msg_item_t *, const char *, va_list)

Message logging callback signature.

Accepts one private data pointer, the message, and an overrun counter.

Used by interface plugins which subscribe to the message bank.

Function Documentation

void vlc_Subscribe ( msg_subscription_t sub,
msg_callback_t  cb,
void *  opaque 
)

Subscribe to the message queue.

Whenever a message is emitted, a callback will be called. Callback invocation are serialized within a subscription.

Parameters
cbcallback function
opaquedata for the callback function

References msg_subscription::func, msg_head, msg_lock, msg_subscription::next, msg_subscription::opaque, msg_subscription::prev, vlc_rwlock_unlock(), and vlc_rwlock_wrlock().

void vlc_Unsubscribe ( msg_subscription_t sub)

Unsubscribe from the message queue.

This function waits for the message callback to return if needed.

References msg_lock, msg_subscription::next, msg_subscription::prev, vlc_rwlock_unlock(), and vlc_rwlock_wrlock().