Commit c2766f8b authored by Laurent Aimar's avatar Laurent Aimar

Removed b_block parameter from input_Read.

It is unused and not correctly implemented (!b_block case).
parent 9c0d4a43
......@@ -524,8 +524,8 @@ VLC_EXPORT( int, input_Start, ( input_thread_t * ) );
VLC_EXPORT( void, input_Stop, ( input_thread_t *, bool b_abort ) );
#define input_Read(a,b,c) __input_Read(VLC_OBJECT(a),b, c)
VLC_EXPORT( int, __input_Read, ( vlc_object_t *, input_item_t *, bool ) );
#define input_Read(a,b) __input_Read(VLC_OBJECT(a),b)
VLC_EXPORT( int, __input_Read, ( vlc_object_t *, input_item_t * ) );
VLC_EXPORT( int, input_vaControl,( input_thread_t *, int i_query, va_list ) );
......
......@@ -492,7 +492,7 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
PLAYLIST_END, pl, pl_Unlocked );
RecentsMRL::getInstance( p_intf )->addRecent( mrl );
if( !go )
input_Read( THEPL, p_input, true );
input_Read( THEPL, p_input );
vlc_gc_decref( p_input );
}
}
......
......@@ -207,7 +207,7 @@ static void *Run( void *data )
vlc_event_attach( p_em, vlc_InputItemSubItemAdded,
input_item_subitem_added, p_sd );
input_Read( p_sd, p_root, true );
input_Read( p_sd, p_root );
vlc_event_detach( p_em, vlc_InputItemSubItemAdded,
input_item_subitem_added, p_sd );
......
......@@ -214,7 +214,7 @@ static void AddSubitemsOfShoutItemURL( services_discovery_t *p_sd,
/* Read every subitems, and add them in ItemAdded */
vlc_event_attach( &p_input->event_manager, vlc_InputItemSubItemAdded,
ItemAdded, &category );
input_Read( p_sd, p_input, true );
input_Read( p_sd, p_input );
vlc_event_detach( &p_input->event_manager, vlc_InputItemSubItemAdded,
ItemAdded, &category );
......
......@@ -279,7 +279,7 @@ libvlc_media_list_add_file_content( libvlc_media_list_t * p_mlist,
if( libvlc_exception_raised( p_e ) )
return;
input_Read( p_mlist->p_libvlc_instance->p_libvlc_int, p_input_item, true );
input_Read( p_mlist->p_libvlc_instance->p_libvlc_int, p_input_item );
return;
}
......
......@@ -156,16 +156,13 @@ input_thread_t *__input_CreateAndStart( vlc_object_t *p_parent,
}
/**
* Initialize an input thread and run it. This thread will clean after itself,
* you can forget about it. It can work either in blocking or non-blocking mode
* Initialize an input thread and run it until it stops by itself.
*
* \param p_parent a vlc_object
* \param p_item an input item
* \param b_block should we block until read is finished ?
* \return an error code, VLC_SUCCESS on success
*/
int __input_Read( vlc_object_t *p_parent, input_item_t *p_item,
bool b_block )
int __input_Read( vlc_object_t *p_parent, input_item_t *p_item )
{
input_thread_t *p_input;
......@@ -173,22 +170,7 @@ int __input_Read( vlc_object_t *p_parent, input_item_t *p_item,
if( !p_input )
return VLC_EGENERIC;
if( b_block )
{
RunAndDestroy( VLC_OBJECT(p_input) );
return VLC_SUCCESS;
}
else
{
if( vlc_thread_create( p_input, "input", RunAndDestroy,
VLC_THREAD_PRIORITY_INPUT ) )
{
input_ChangeState( p_input, ERROR_S );
msg_Err( p_input, "cannot create input thread" );
vlc_object_release( p_input );
return VLC_EGENERIC;
}
}
RunAndDestroy( VLC_OBJECT(p_input) );
return VLC_SUCCESS;
}
......
......@@ -98,7 +98,7 @@ int playlist_Import( playlist_t *p_playlist, const char *psz_file )
playlist_AddInput( p_playlist, p_input, PLAYLIST_APPEND, PLAYLIST_END,
true, false );
return input_Read( p_playlist, p_input, true );
return input_Read( p_playlist, p_input );
}
/*****************************************************************************
......@@ -187,7 +187,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
PL_UNLOCK;
stats_TimerStart( p_playlist, "ML Load", STATS_TIMER_ML_LOAD );
input_Read( p_playlist, p_input, true );
input_Read( p_playlist, p_input );
stats_TimerStop( p_playlist,STATS_TIMER_ML_LOAD );
PL_LOCK;
......
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