
Data Structures | |
| struct | msg_context_t |
| struct | msg_bank_t |
| Store all data required by messages interfaces. More... | |
| struct | msg_subscription_t |
Defines | |
| #define | vlc_va_copy(dest, src) (dest)=(src) |
| #define | COL(x) "\033[" #x ";1m" |
| #define | RED COL(31) |
| #define | GREEN COL(32) |
| #define | YELLOW COL(33) |
| #define | WHITE COL(0) |
| #define | GRAY "\033[0m" |
Functions | |
| static void | cleanup_msg_context (void *data) |
| static msg_bank_t * | libvlc_bank (libvlc_int_t *inst) |
| static void | PrintMsg (vlc_object_t *, msg_item_t *) |
| msg_bank_t * | msg_Create (void) |
| Initialize messages queues This function initializes all message queues. | |
| void | msg_EnableObjectPrinting (vlc_object_t *obj, const char *psz_object) |
| void | msg_DisableObjectPrinting (vlc_object_t *obj, const char *psz_object) |
| void | msg_Destroy (msg_bank_t *bank) |
| Destroy the message queues. | |
| msg_subscription_t * | msg_Subscribe (libvlc_int_t *instance, msg_callback_t cb, msg_cb_data_t *opaque) |
| Subscribe to the message queue. | |
| void | msg_Unsubscribe (msg_subscription_t *sub) |
| Unsubscribe from the message queue. | |
| void | msg_Generic (vlc_object_t *p_this, int i_type, const char *psz_module, const char *psz_format,...) |
| static void | msg_Free (gc_object_t *gc) |
| Destroys a message. | |
| void | msg_GenericVa (vlc_object_t *p_this, int i_type, const char *psz_module, const char *psz_format, va_list _args) |
| Add a message to a queue. | |
| static msg_context_t * | GetContext (void) |
| void | msg_StackSet (int i_code, const char *psz_message,...) |
| Internal message stack context. | |
| void | msg_StackAdd (const char *psz_message,...) |
| const char * | msg_StackMsg (void) |
Variables | |
| static vlc_threadvar_t | msg_context |
| static uintptr_t | banks = 0 |
| static vlc_mutex_t | msg_stack_lock = PTHREAD_MUTEX_INITIALIZER |
| static void const * | kObjectPrintingEnabled = &kObjectPrintingEnabled |
| Object Printing selection. | |
| static void const * | kObjectPrintingDisabled = &kObjectPrintingDisabled |
| #define COL | ( | x | ) | "\033[" #x ";1m" |
| #define GRAY "\033[0m" |
| #define GREEN COL(32) |
| #define RED COL(31) |
Referenced by msg_GenericVa().
| #define WHITE COL(0) |
| #define YELLOW COL(33) |
| static void cleanup_msg_context | ( | void * | data | ) | [static] |
| static msg_context_t* GetContext | ( | void | ) | [static] |
References msg_context, msg_context_t::psz_message, vlc_threadvar_get(), and vlc_threadvar_set().
Referenced by msg_StackAdd(), msg_StackMsg(), and msg_StackSet().
| static msg_bank_t* libvlc_bank | ( | libvlc_int_t * | inst | ) | [inline, static] |
References libvlc_priv().
Referenced by msg_DisableObjectPrinting(), msg_EnableObjectPrinting(), msg_GenericVa(), msg_Subscribe(), and msg_Unsubscribe().
| msg_bank_t* msg_Create | ( | void | ) |
Initialize messages queues This function initializes all message queues.
References msg_bank_t::all_objects_enabled, banks, cleanup_msg_context(), msg_bank_t::enabled_objects, msg_bank_t::i_sub, LC_MESSAGES_MASK, msg_bank_t::locale, msg_bank_t::lock, msg_context, msg_stack_lock, newlocale(), msg_bank_t::pp_sub, vlc_dictionary_init(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_rwlock_init(), and vlc_threadvar_create().
Referenced by libvlc_InternalCreate().
| void msg_Destroy | ( | msg_bank_t * | bank | ) |
Destroy the message queues.
This functions prints all messages remaining in the queues, then frees all the allocated resources No other messages interface functions should be called after this one.
References banks, msg_bank_t::enabled_objects, freelocale(), msg_bank_t::i_sub, msg_bank_t::locale, msg_bank_t::lock, msg_context, msg_stack_lock, unlikely, vlc_dictionary_clear(), vlc_mutex_lock(), vlc_mutex_unlock(), vlc_rwlock_destroy(), and vlc_threadvar_delete().
Referenced by libvlc_InternalDestroy().
| static void msg_Free | ( | gc_object_t * | gc | ) | [static] |
Destroys a message.
References msg_item_t::psz_header, msg_item_t::psz_module, msg_item_t::psz_msg, and vlc_priv.
Referenced by msg_GenericVa().
| void msg_StackAdd | ( | const char * | psz_message, | |
| ... | ||||
| ) |
References asprintf(), GetContext(), msg_context_t::psz_message, and vasprintf().
| const char* msg_StackMsg | ( | void | ) |
| void msg_StackSet | ( | int | i_code, | |
| const char * | psz_message, | |||
| ... | ||||
| ) |
Internal message stack context.
References GetContext(), msg_context_t::i_code, msg_context_t::psz_message, and vasprintf().
| static void PrintMsg | ( | vlc_object_t * | p_this, | |
| msg_item_t * | p_item | |||
| ) | [static] |
References msg_bank_t::all_objects_enabled, libvlc_priv_t::b_color, msg_bank_t::enabled_objects, GRAY, GREEN, msg_item_t::i_object_id, msg_item_t::i_type, i_type, libvlc_priv_t::i_verbose, kObjectPrintingDisabled, kObjectPrintingEnabled, libvlc_priv(), libvlc_priv_t::msg_bank, vlc_object_t::p_libvlc, ppsz_type, msg_item_t::psz_header, msg_item_t::psz_module, msg_item_t::psz_msg, msg_item_t::psz_object_type, RED, utf8_fprintf(), vlc_dictionary_value_for_key(), VLC_MSG_DBG, VLC_MSG_ERR, VLC_MSG_INFO, VLC_MSG_WARN, vlc_restorecancel(), vlc_savecancel(), WHITE, and YELLOW.
Referenced by msg_GenericVa().
uintptr_t banks = 0 [static] |
Referenced by msg_Create(), and msg_Destroy().
void const* kObjectPrintingDisabled = &kObjectPrintingDisabled [static] |
Referenced by msg_DisableObjectPrinting(), and PrintMsg().
void const* kObjectPrintingEnabled = &kObjectPrintingEnabled [static] |
vlc_threadvar_t msg_context [static] |
Referenced by GetContext(), msg_Create(), and msg_Destroy().
vlc_mutex_t msg_stack_lock = PTHREAD_MUTEX_INITIALIZER [static] |
Referenced by msg_Create(), and msg_Destroy().
1.5.6