libvlc_int_t *instance;
msg_callback_t func;
msg_cb_data_t *opaque;
- int verbosity;
};
/**
sub->instance = instance;
sub->func = cb;
sub->opaque = opaque;
- sub->verbosity = 2; /* by default, give all the messages */
msg_bank_t *bank = libvlc_bank (instance);
vlc_rwlock_wrlock (&bank->lock);
if( val == kObjectPrintingEnabled ); /* Allowed */
else if( !bank->all_objects_enabled ) continue;
}
- switch( msg.i_type )
- {
- case VLC_MSG_INFO:
- case VLC_MSG_ERR:
- if( sub->verbosity < 0 ) continue;
- break;
- case VLC_MSG_WARN:
- if( sub->verbosity < 1 ) continue;
- break;
- case VLC_MSG_DBG:
- if( sub->verbosity < 2 ) continue;
- break;
- }
-
sub->func (sub->opaque, &msg);
}
vlc_rwlock_unlock (&bank->lock);