Commit 8eaff121 authored by Clément Stenac's avatar Clément Stenac

Don't print debug messages and don't do interaction on preparsing

parent f3112de7
......@@ -474,6 +474,7 @@ typedef int ( * vlc_callback_t ) ( vlc_object_t *, /* variable's object */
\
/* Messages header */ \
char *psz_header; \
int i_flags; \
\
/* Thread properties, if any */ \
vlc_bool_t b_thread; \
......
......@@ -71,6 +71,11 @@
#define FIND_STRICT 0x0010
/* Object flags */
#define OBJECT_FLAGS_NODBG 0x0001
#define OBJECT_FLAGS_QUIET 0x0002
#define OBJECT_FLAGS_NOINTERACT 0x0004
/*****************************************************************************
* The vlc_object_t type. Yes, it's that simple :-)
*****************************************************************************/
......
......@@ -320,6 +320,8 @@ int __input_Preparse( vlc_object_t *p_parent, input_item_t *p_item )
/* Allocate descriptor */
p_input = Create( p_parent, p_item, NULL, VLC_TRUE );
p_input->i_flags |= OBJECT_FLAGS_NODBG;
p_input->i_flags |= OBJECT_FLAGS_NOINTERACT;
/* Now we can attach our new input */
vlc_object_attach( p_input, p_parent );
......
......@@ -73,6 +73,11 @@ int __intf_Interact( vlc_object_t *p_this, interaction_dialog_t *
p_dialog->i_id = ++p_interaction->i_last_id;
}
if( p_this->i_flags & OBJECT_FLAGS_NOINTERACT )
{
return;
}
p_dialog->p_interaction = p_interaction;
p_dialog->p_parent = p_this;
......@@ -165,7 +170,6 @@ void intf_InteractionManage( playlist_t *p_playlist )
{
case ANSWERED_DIALOG:
// Ask interface to hide it
msg_Dbg( p_interaction, "Hiding dialog %i", p_dialog->i_id );
p_dialog->i_action = INTERACT_HIDE;
val.p_address = p_dialog;
if( p_interaction->p_intf )
......@@ -178,15 +182,11 @@ void intf_InteractionManage( playlist_t *p_playlist )
if( p_interaction->p_intf )
var_Set( p_interaction->p_intf, "interaction", val );
p_dialog->i_status = SENT_DIALOG;
msg_Dbg( p_interaction, "Updating dialog %i, %i widgets",
p_dialog->i_id, p_dialog->i_widgets );
break;
case HIDDEN_DIALOG:
if( !(p_dialog->i_flags & DIALOG_GOT_ANSWER) ) break;
if( !(p_dialog->i_flags & DIALOG_REUSABLE) )
{
msg_Dbg( p_interaction, "Destroying dialog %i",
p_dialog->i_id );
p_dialog->i_action = INTERACT_DESTROY;
val.p_address = p_dialog;
if( p_interaction->p_intf )
......@@ -194,8 +194,6 @@ void intf_InteractionManage( playlist_t *p_playlist )
}
break;
case DESTROYED_DIALOG:
msg_Dbg( p_interaction, "Removing dialog %i",
p_dialog->i_id );
// Interface has now destroyed it, remove it
REMOVE_ELEM( p_interaction->pp_dialogs, p_interaction->i_dialogs,
i_index);
......
......@@ -307,6 +307,13 @@ static void QueueMsg( vlc_object_t *p_this, int i_queue_id, int i_type,
#endif
int i;
if( p_this->i_flags & OBJECT_FLAGS_QUIET ||
(p_this->i_flags & OBJECT_FLAGS_NODBG &&
i_type == VLC_MSG_DBG ) )
{
return;
}
/*
* Convert message to string
*/
......
......@@ -678,7 +678,7 @@ module_t * __module_Need( vlc_object_t *p_this, const char *psz_capability,
if( p_module != NULL )
{
msg_Dbg( p_module, "using %s module \"%s\"",
msg_Dbg( p_this, "using %s module \"%s\"",
psz_capability, p_module->psz_object_name );
}
else if( p_first == NULL )
......@@ -728,7 +728,7 @@ void __module_Unneed( vlc_object_t * p_this, module_t * p_module )
p_module->pf_deactivate( p_this );
}
msg_Dbg( p_module, "removing module \"%s\"", p_module->psz_object_name );
msg_Dbg( p_this, "removing module \"%s\"", p_module->psz_object_name );
vlc_object_release( p_module );
......
......@@ -250,6 +250,14 @@ void * __vlc_object_create( vlc_object_t *p_this, int i_type )
p_new->psz_header = NULL;
p_new->i_flags = 0;
if( p_this->i_flags & OBJECT_FLAGS_NODBG )
p_new->i_flags |= OBJECT_FLAGS_NODBG;
if( p_this->i_flags & OBJECT_FLAGS_QUIET )
p_new->i_flags |= OBJECT_FLAGS_QUIET;
if( p_this->i_flags & OBJECT_FLAGS_NOINTERACT )
p_new->i_flags |= OBJECT_FLAGS_NOINTERACT;
p_new->i_vars = 0;
p_new->p_vars = (variable_t *)malloc( 16 * sizeof( variable_t ) );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment