]> git.sesse.net Git - vlc/commitdiff
Removed b_block parameter from input_Read.
authorLaurent Aimar <fenrir@videolan.org>
Mon, 14 Sep 2009 21:15:24 +0000 (23:15 +0200)
committerLaurent Aimar <fenrir@videolan.org>
Mon, 14 Sep 2009 21:27:28 +0000 (23:27 +0200)
It is unused and not correctly implemented (!b_block case).

include/vlc_input.h
modules/gui/qt4/dialogs_provider.cpp
modules/services_discovery/mediadirs.c
modules/services_discovery/shout.c
src/control/media_list.c
src/input/input.c
src/playlist/loadsave.c

index d58da61183b67f6711000870db9fa1247a16f7a9..330b574600494d33fca506638fd8b55a6c31813d 100644 (file)
@@ -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  ) );
 
index d45ef232b0de07f3c024509ad8a99c4a61e23488..5b29923fc2fa4cc7706446f7353258e746449394 100644 (file)
@@ -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 );
     }
 }
index 89a9c8596b74db12925955792594f7618b40adcb..425beb59b59c75cf3a766c5d0c602c70ff68a6cf 100644 (file)
@@ -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 );
index 385f34128e8aed2405e7f3338ca17d02b28a1b33..2103a4fda7bee4b6ba496a353b2eccb5b5ac04ef 100644 (file)
@@ -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 );
 
index d5b4aab0229e71e1ac67cc4213863f6bc323a653..a56d1f6bf5cf17cf0be3cd7b89e634ff06fe0e29 100644 (file)
@@ -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;
 }
index 224016c2bfffe649027b412f06014356cceda73a..62bde42c4ffd465039a9edf8ad3dcff42f2ee268 100644 (file)
@@ -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;
 }
 
index b1dc3abaa333e5bb70742690e9f4b97afec51038..f454f459bd0e0b23cd6ba3e6c53802849a71a95c 100644 (file)
@@ -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;