]> git.sesse.net Git - vlc/commitdiff
Remove useless vlc_object parameter when creating an input item
authorRémi Denis-Courmont <remi@remlab.net>
Sun, 10 Jul 2011 15:23:41 +0000 (18:23 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 10 Jul 2011 17:12:41 +0000 (20:12 +0300)
48 files changed:
include/vlc_input_item.h
modules/access/cdda.c
modules/access/mms/mmsh.c
modules/control/rc.c
modules/demux/mp4/mp4.c
modules/demux/playlist/asx.c
modules/demux/playlist/b4s.c
modules/demux/playlist/dvb.c
modules/demux/playlist/gvp.c
modules/demux/playlist/ifo.c
modules/demux/playlist/itml.c
modules/demux/playlist/m3u.c
modules/demux/playlist/pls.c
modules/demux/playlist/podcast.c
modules/demux/playlist/qtl.c
modules/demux/playlist/ram.c
modules/demux/playlist/sgimb.c
modules/demux/playlist/shoutcast.c
modules/demux/playlist/wpl.c
modules/demux/playlist/xspf.c
modules/demux/playlist/zpl.c
modules/gui/hildon/maemo_callbacks.c
modules/gui/macosx/applescript.m
modules/gui/macosx/playlist.m
modules/gui/macosx/wizard.m
modules/gui/qt4/dialogs/open.cpp
modules/gui/qt4/dialogs_provider.cpp
modules/gui/skins2/vars/playtree.cpp
modules/lua/libs/sd.c
modules/lua/vlc.c
modules/media_library/sql_media_library.c
modules/media_library/sql_monitor.c
modules/services_discovery/bonjour.c
modules/services_discovery/mediadirs.c
modules/services_discovery/mtp.c
modules/services_discovery/podcast.c
modules/services_discovery/sap.c
modules/services_discovery/udev.c
modules/services_discovery/upnp.cpp
modules/services_discovery/windrive.c
modules/services_discovery/xcb_apps.c
src/control/media.c
src/control/media_list.c
src/input/item.c
src/input/vlm.c
src/playlist/item.c
src/playlist/loadsave.c
src/playlist/tree.c

index 45cc4d2e7c391a83636fb5acfeebf105b2db1f8e..9ccdfac1db0dee200a46f588ec59c74b2a991be9 100644 (file)
@@ -246,27 +246,26 @@ VLC_API void input_item_MergeInfos( input_item_t *, info_category_t * );
  * XXX You may also use input_item_New or input_item_NewExt as they need
  * less arguments.
  */
-VLC_API input_item_t * input_item_NewWithType( vlc_object_t *, const char *psz_uri, const char *psz_name, int i_options, const char *const *ppsz_options, unsigned i_option_flags, mtime_t i_duration, int i_type ) VLC_USED;
+VLC_API input_item_t * input_item_NewWithType( const char *psz_uri, const char *psz_name, int i_options, const char *const *ppsz_options, unsigned i_option_flags, mtime_t i_duration, int i_type ) VLC_USED;
 
 /**
  * This function creates a new input_item_t with the provided information.
  *
  * Provided for convenience.
  */
-VLC_API input_item_t * input_item_NewExt(vlc_object_t *, const char *psz_uri, const char *psz_name, int i_options, const char *const *ppsz_options, unsigned i_option_flags, mtime_t i_duration ) VLC_USED;
-#define input_item_NewExt(a,b,c,d,e,f,g) input_item_NewExt( VLC_OBJECT(a),b,c,d,e,f,g)
+VLC_API input_item_t * input_item_NewExt( const char *psz_uri, const char *psz_name, int i_options, const char *const *ppsz_options, unsigned i_option_flags, mtime_t i_duration ) VLC_USED;
 
 /**
  * This function creates a new input_item_t with the provided information.
  *
  * Provided for convenience.
  */
-#define input_item_New( a,b,c ) input_item_NewExt( a, b, c, 0, NULL, 0, -1 )
+#define input_item_New( a,b ) input_item_NewExt( a, b, 0, NULL, 0, -1 )
 
 /**
  * This function creates a new input_item_t as a copy of another.
  */
-VLC_API input_item_t * input_item_Copy(vlc_object_t *, input_item_t * ) VLC_USED;
+VLC_API input_item_t * input_item_Copy(input_item_t * ) VLC_USED;
 
 
 /******************
index 99b9d9e3b8003e9d869e432dfeb4e65cb6f55c56..9094d7431a96d0557547f8f520577bd90428e5f5 100644 (file)
@@ -505,9 +505,8 @@ static int GetTracks( access_t *p_access, input_item_t *p_current )
         /* Create playlist items */
         const mtime_t i_duration = (int64_t)( p_sys->p_sectors[i+1] - p_sys->p_sectors[i] ) *
                                    CDDA_DATA_SIZE * 1000000 / 44100 / 2 / 2;
-        p_input_item = input_item_NewWithType( VLC_OBJECT( p_access ),
-                                              psz_uri, psz_name, 0, NULL, 0, i_duration,
-                                              ITEM_TYPE_DISC );
+        p_input_item = input_item_NewWithType( psz_uri, psz_name, 0, NULL, 0,
+                                               i_duration, ITEM_TYPE_DISC );
         input_item_CopyOptions( p_current, p_input_item );
         input_item_AddOption( p_input_item, psz_first, VLC_INPUT_OPTION_TRUSTED );
         input_item_AddOption( p_input_item, psz_last, VLC_INPUT_OPTION_TRUSTED );
index 3094f3add2fe7c19f20b251ef562b12d782a9433..7deb1bc852c1201baf17754fc80a8cc0aeb05091 100644 (file)
@@ -162,7 +162,7 @@ int MMSHOpen( access_t *p_access )
             goto error;
         }
         /** \bug we do not autodelete here */
-        p_new_loc = input_item_New( p_access, psz_location, psz_location );
+        p_new_loc = input_item_New( psz_location, psz_location );
         input_item_t *p_item = input_GetItem( p_input );
         input_item_PostSubItem( p_item, p_new_loc );
 
index 462480ca3e2fe7357a0a04f696a6c4ad56ba4300..c5e43dd0ddb8b10f37d07199735ed1ce6be60858 100644 (file)
@@ -2115,7 +2115,7 @@ static input_item_t *parse_MRL( intf_thread_t *p_intf, char *psz_mrl )
     /* Now create a playlist item */
     if( psz_item_mrl )
     {
-        p_item = input_item_New( p_intf, psz_item_mrl, NULL );
+        p_item = input_item_New( psz_item_mrl, NULL );
         for( i = 0; i < i_options; i++ )
         {
             input_item_AddOption( p_item, ppsz_options[i], VLC_INPUT_OPTION_TRUSTED );
index 3583fe7aea18acf87f1eb46723c891dad2d7836b..ef544ed4454d1b0f5511d93efa6ca82de9858eba 100644 (file)
@@ -421,7 +421,7 @@ static int Open( vlc_object_t * p_this )
                     free( psz_path );
                 }
                 msg_Dbg( p_demux, "adding ref = `%s'", psz_ref );
-                input_item_t *p_input = input_item_New( p_demux, psz_ref, NULL );
+                input_item_t *p_input = input_item_New( psz_ref, NULL );
                 input_item_CopyOptions( p_current, p_input );
                 input_item_node_AppendItem( p_subitems, p_input );
                 vlc_gc_decref( p_input );
index caf85771d9743e63cc197198f26a9287cc66a619..eb1539a2e8ceb36f8373578ac3bf3af257a4fef3 100644 (file)
@@ -475,7 +475,7 @@ static int Demux( demux_t *p_demux )
                             memcpy( psz_string, psz_backup, i_strlen );
                             psz_string[i_strlen] = '\0';
                             input_item_t *p_input;
-                            p_input = input_item_New( p_demux, psz_string, psz_title_asx );
+                            p_input = input_item_New( psz_string, psz_title_asx );
                             input_item_CopyOptions( p_current_input, p_input );
                             input_item_node_AppendItem( p_subitems, p_input );
                             vlc_gc_decref( p_input );
@@ -543,7 +543,7 @@ static int Demux( demux_t *p_demux )
                     if( asprintf( &psz_name, "%d %s", i_entry_count, ( psz_title_entry ? psz_title_entry : psz_current_input_name ) ) != -1 )
                     {
                         char *psz_mrl = ProcessMRL( psz_href, p_demux->p_sys->psz_prefix );
-                        p_entry = input_item_NewExt( p_demux, psz_mrl, psz_name,
+                        p_entry = input_item_NewExt( psz_mrl, psz_name,
                                                      i_options, (const char * const *)ppsz_options, VLC_INPUT_OPTION_TRUSTED, -1 );
                         free( psz_name );
                         free( psz_mrl );
@@ -642,7 +642,7 @@ static int Demux( demux_t *p_demux )
                                 char *psz_name = input_item_GetName( p_current_input );
 
                                 char *psz_mrl = ProcessMRL( psz_href, p_demux->p_sys->psz_prefix );
-                                p_entry = input_item_NewExt( p_demux, psz_mrl, psz_name,
+                                p_entry = input_item_NewExt( psz_mrl, psz_name,
                                                      0, NULL, VLC_INPUT_OPTION_TRUSTED, -1 );
                                 free( psz_mrl );
                                 input_item_CopyOptions( p_current_input, p_entry );
index ed1c765bb09107ff541ad4abacd7962889b5fe5b..cbf7bebc85f54f88c4a50ccc8205826a2835f4f3 100644 (file)
@@ -199,7 +199,7 @@ static int Demux( demux_t *p_demux )
                 // Read the element name
                 if( !strcmp( node, "entry" ) )
                 {
-                    p_input = input_item_New( p_demux, psz_mrl, psz_title );
+                    p_input = input_item_New( psz_mrl, psz_title );
                     if( psz_now )
                         input_item_SetNowPlaying( p_input, psz_now );
                     if( psz_genre )
index 627eebbcb33005f4c869009459d7d0b0c86bb979..5e712378155bff41fd4382c444603184ef85bbaf 100644 (file)
@@ -146,7 +146,7 @@ static int Demux( demux_t *p_demux )
             }
         }
 
-        p_input = input_item_NewExt( p_demux, psz_uri, psz_name,
+        p_input = input_item_NewExt( psz_uri, psz_name,
                                      i_options, (const char**)ppsz_options, VLC_INPUT_OPTION_TRUSTED, -1 );
         input_item_node_AppendItem( p_subitems, p_input );
         vlc_gc_decref( p_input );
index 2747d985c2f66ce94c93b20b21e8c3aef5e538bd..f63c8bf05be89882d0d4371262b5088d1cff63ea 100644 (file)
@@ -204,7 +204,7 @@ static int Demux( demux_t *p_demux )
     }
     else
     {
-        p_input = input_item_New( p_demux, psz_url, psz_title );
+        p_input = input_item_New( psz_url, psz_title );
 #define SADD_INFO( type, field ) if( field ) { input_item_AddInfo( \
                     p_input, _("Google Video"), type, "%s", field ) ; }
         SADD_INFO( "gvp_version", psz_version );
index 9c1d8beee22d633c3e7cba0386ca314ac694ed1d..6e8dc103092e554269acc51cfc0c5688e7791824 100644 (file)
@@ -113,7 +113,7 @@ static int Demux( demux_t *p_demux )
         return 0;
 
     input_item_t *p_current_input = GetCurrentItem(p_demux);
-    input_item_t *p_input = input_item_New( p_demux, psz_url, psz_url );
+    input_item_t *p_input = input_item_New( psz_url, psz_url );
     input_item_PostSubItem( p_current_input, p_input );
     vlc_gc_decref( p_input );
 
@@ -136,7 +136,7 @@ static int DemuxDVD_VR( demux_t *p_demux )
     memcpy( psz_url + len, "VR_MOVIE.VRO", 13 );
 
     input_item_t *p_current_input = GetCurrentItem(p_demux);
-    input_item_t *p_input = input_item_New( p_demux, psz_url, psz_url );
+    input_item_t *p_input = input_item_New( psz_url, psz_url );
     input_item_PostSubItem( p_current_input, p_input );
 
     vlc_gc_decref( p_input );
index d3fb93bfffc86b75c6f64f11e7a32d1334f2ee88..fa027809c30a6343cfa85de550562c13d02c07df 100644 (file)
@@ -333,7 +333,7 @@ static bool parse_track_dict( demux_t *p_demux, input_item_node_t *p_input_node,
     }
 
     msg_Info( p_demux, "Adding '%s'", p_track->location );
-    p_new_input = input_item_New( p_demux, p_track->location, NULL );
+    p_new_input = input_item_New( p_track->location, NULL );
     input_item_node_AppendItem( p_input_node, p_new_input );
 
     /* add meta info */
index 704e055e8284e113d0e577b17096365a2ccef469..5c34aa386beb469ec52daa6dc77211f966ddb1fd 100644 (file)
@@ -226,7 +226,7 @@ static int Demux( demux_t *p_demux )
                 goto error;
             }
 
-            p_input = input_item_NewExt( p_demux, psz_mrl, psz_name,
+            p_input = input_item_NewExt( psz_mrl, psz_name,
                                         i_options, ppsz_options, 0, i_duration );
 
             free( psz_parse );
index 6925cc09d069eedf6b08d80e42dec000cea90a69..f809ebe5048ffaa81caff179333bfecaa92ebc9c 100644 (file)
@@ -142,7 +142,7 @@ static int Demux( demux_t *p_demux )
             /* we found a new item, insert the previous */
             if( psz_mrl )
             {
-                p_input = input_item_New( p_demux, psz_mrl, psz_name );
+                p_input = input_item_New( psz_mrl, psz_name );
                 input_item_CopyOptions( p_current_input, p_input );
                 input_item_node_AppendItem( p_subitems, p_input );
                 vlc_gc_decref( p_input );
@@ -194,7 +194,7 @@ static int Demux( demux_t *p_demux )
     /* Add last object */
     if( psz_mrl )
     {
-        p_input = input_item_New( p_demux, psz_mrl, psz_name );
+        p_input = input_item_New( psz_mrl, psz_name );
         input_item_CopyOptions( p_current_input, p_input );
         input_item_node_AppendItem( p_subitems, p_input );
         vlc_gc_decref( p_input );
index 445d0c70b54e155ac5f061b8f71fefd2dc4da771..f346a0b07721fa99b529a40bd5316e850d9eea61 100644 (file)
@@ -243,7 +243,7 @@ static int Demux( demux_t *p_demux )
                         goto error;
                     }
 
-                    p_input = input_item_New( p_demux, psz_item_mrl, psz_item_name );
+                    p_input = input_item_New( psz_item_mrl, psz_item_name );
                     FREENULL( psz_item_mrl );
                     FREENULL( psz_item_name );
 
index b0cf5788714396beff756627f291ba90760ff372..4aaf0b97938346553c86f4ede0860c4229d83011 100644 (file)
@@ -243,7 +243,7 @@ static int Demux( demux_t *p_demux )
     else
     {
         input_item_node_t *p_subitems = input_item_node_Create( p_current_input );
-        p_input = input_item_New( p_demux, psz_src, psz_moviename );
+        p_input = input_item_New( psz_src, psz_moviename );
 #define SADD_INFO( type, field ) if( field ) { input_item_AddInfo( \
                     p_input, "QuickTime Media Link", type, "%s", field ) ; }
         SADD_INFO( "href", psz_href );
@@ -252,7 +252,7 @@ static int Demux( demux_t *p_demux )
         vlc_gc_decref( p_input );
         if( psz_qtnext )
         {
-            p_input = input_item_New( p_demux, psz_qtnext, NULL );
+            p_input = input_item_New( psz_qtnext, NULL );
             input_item_node_AppendItem( p_subitems, p_input );
             vlc_gc_decref( p_input );
         }
index 91f2da9aa1abf68071eff62936ffb45fa934e3f3..78ad7784a61bd4d5ec047fb0a643fcfaa8ab097d 100644 (file)
@@ -326,7 +326,7 @@ static int Demux( demux_t *p_demux )
             }
 
             /* Create the input item and pump in all the options into playlist item */
-            p_input = input_item_NewExt( p_demux, psz_mrl, psz_title, i_options, ppsz_options, 0, i_duration );
+            p_input = input_item_NewExt( psz_mrl, psz_title, i_options, ppsz_options, 0, i_duration );
 
             if( !EMPTY_STR( psz_artist ) ) input_item_SetArtist( p_input, psz_artist );
             if( !EMPTY_STR( psz_author ) ) input_item_SetPublisher( p_input, psz_author );
index 07065db66422adb511421c0774cadb912b7463ea..a2bcb64c50d920becb917c3e387e0388212e88e4 100644 (file)
@@ -376,7 +376,7 @@ static int Demux ( demux_t *p_demux )
         }
     }
 
-    p_child = input_item_NewWithType( VLC_OBJECT(p_demux), p_sys->psz_uri,
+    p_child = input_item_NewWithType( p_sys->psz_uri,
                       p_sys->psz_name ? p_sys->psz_name : p_sys->psz_uri,
                       0, NULL, 0, p_sys->i_duration, ITEM_TYPE_NET );
 
index a3c9b33ecbc6b6ccdf7de7e06fde08df7d0ac699..211612eac37144db991b365d369011ef5d3b85e6 100644 (file)
@@ -178,7 +178,7 @@ static int DemuxGenre( demux_t *p_demux, xml_reader_t *p_xml_reader,
                                   psz_name ) != -1 )
                     {
                         input_item_t *p_input;
-                        p_input = input_item_New( p_demux, psz_mrl, psz_name );
+                        p_input = input_item_New( psz_mrl, psz_name );
                         input_item_CopyOptions( p_input_node->p_item, p_input );
                         free( psz_mrl );
                         input_item_node_AppendItem( p_input_node, p_input );
@@ -322,7 +322,7 @@ static int DemuxStation( demux_t *p_demux, xml_reader_t *p_xml_reader,
 
                     /* Create the item */
                     input_item_t *p_input;
-                    p_input = input_item_New( p_demux, psz_mrl, psz_name );
+                    p_input = input_item_New( psz_mrl, psz_name );
                     input_item_CopyOptions( p_input_node->p_item, p_input );
                     free( psz_mrl );
 
index 7f30facf433f1b21a4f570578b27378904d262db..71609cb3d825fb8ba9414795002b04fca79c5299 100644 (file)
@@ -99,7 +99,7 @@ static int Demux( demux_t *p_demux )
 
                 *psz_parse = '\0';
                 psz_uri = ProcessMRL( psz_uri, p_demux->p_sys->psz_prefix );
-                p_input = input_item_NewExt( p_demux, psz_uri, psz_uri,
+                p_input = input_item_NewExt( psz_uri, psz_uri,
                                         0, NULL, 0, -1 );
                 input_item_node_AppendItem( p_subitems, p_input );
                 vlc_gc_decref( p_input );
index 464286ecf604a48812da7f5fdfce59ef690340ab..7fd5a0b78e91ea13d660098586aba287fe281d5b 100644 (file)
@@ -357,7 +357,7 @@ static bool parse_track_node COMPLEX_INTERFACE
           {NULL,           UNKNOWN_CONTENT, {NULL} }
         };
 
-    input_item_t *p_new_input = input_item_New( p_demux, NULL, NULL );
+    input_item_t *p_new_input = input_item_New( NULL, NULL );
     input_item_node_t *p_new_node = input_item_node_Create( p_new_input );
 
     if( !p_new_input )
@@ -624,9 +624,9 @@ static bool parse_extension_node COMPLEX_INTERFACE
             msg_Warn( p_demux, "<vlc:node> requires \"title\" attribute" );
             return false;
         }
-        p_new_input = input_item_NewWithType( VLC_OBJECT( p_demux ),
-                          "vlc://nop", psz_title, 0, NULL, 0, -1,
-                          ITEM_TYPE_DIRECTORY );
+        p_new_input = input_item_NewWithType( "vlc://nop", psz_title,
+                                              0, NULL, 0, -1,
+                                              ITEM_TYPE_DIRECTORY );
         if( p_new_input )
         {
             p_input_node =
index 48e077bd71de09f90247479cd23ed06dd0379bcd..a12c405d9395143dac8b51d9d9f4024dbd1ad695 100644 (file)
@@ -165,7 +165,7 @@ static int Demux( demux_t *p_demux )
         else if( !strncasecmp( psz_parse, "BR!", strlen( "BR!" ) ) )
         {
             /* create the input item */
-            input_item_t *p_input = input_item_NewExt( p_demux, psz_mrl,
+            input_item_t *p_input = input_item_NewExt( psz_mrl,
                                         psz_title, 0, NULL, 0, i_duration );
             input_item_node_AppendItem( p_subitems, p_input );
             FREENULL( psz_mrl );
index 073488e6e74c259346fcff4925829dccd56e24ea..831ce8c4b2e76f91781d01f02da12f858d722079 100644 (file)
@@ -135,7 +135,7 @@ void pl_row_activated_cb( GtkTreeView *tree_view , GtkTreePath *path,
     gtk_tree_model_get_iter( model, &iter, path );
     gtk_tree_model_get( model, &iter, 0, &filename, -1 );
 
-    p_input = input_item_New( p_intf, filename, NULL );
+    p_input = input_item_New( filename, NULL );
     playlist_AddInput( p_intf->p_sys->p_playlist, p_input,
                        PLAYLIST_APPEND | PLAYLIST_GO, PLAYLIST_END, true, false );
     vlc_gc_decref( p_input );
@@ -172,7 +172,7 @@ void open_cb( GtkMenuItem *menuitem, gpointer user_data )
 
     gtk_widget_destroy( dialog );
 
-    p_input = input_item_New( p_intf, psz_filename, NULL );
+    p_input = input_item_New( psz_filename, NULL );
     playlist_AddInput( p_intf->p_sys->p_playlist, p_input,
                        PLAYLIST_APPEND | PLAYLIST_GO,
                        PLAYLIST_END, true, false );
@@ -207,8 +207,7 @@ void open_address_cb( GtkMenuItem *menuitem, gpointer user_data )
         return;
     }
 
-    p_input = input_item_New( p_intf,
-                              gtk_entry_get_text( GTK_ENTRY( entry ) ),
+    p_input = input_item_New( gtk_entry_get_text( GTK_ENTRY( entry ) ),
                               NULL );
     playlist_AddInput( p_intf->p_sys->p_playlist, p_input,
                        PLAYLIST_APPEND | PLAYLIST_GO,
@@ -224,7 +223,7 @@ void open_webcam_cb( GtkMenuItem *menuitem, gpointer user_data )
     intf_thread_t *p_intf = (intf_thread_t *)user_data;
     input_item_t *p_input;
 
-    p_input = input_item_New( p_intf, "v4l2://", NULL );
+    p_input = input_item_New( "v4l2://", NULL );
     playlist_AddInput( p_intf->p_sys->p_playlist, p_input,
                        PLAYLIST_APPEND | PLAYLIST_GO,
                        PLAYLIST_END, true, false );
index 65cae704c661d9ae9c2cdab4badd3f6f576d618c..530557a52509df22e88983cfadecfac167f3470d 100644 (file)
@@ -52,8 +52,7 @@
             NSURL * o_url;
             input_item_t *p_input;
 
-            p_input = input_item_New( p_playlist,
-                                    [o_urlString fileSystemRepresentation],
+            p_input = input_item_New( [o_urlString fileSystemRepresentation],
                                     [[[NSFileManager defaultManager]
                                     displayNameAtPath: o_urlString] UTF8String] );
             /* FIXME: playlist_AddInput() can fail */
index bd029a1ea231db2b34d305b74c4cd7974efbdc5a..89ecd728d426bd1891aa2d4daef662a455a1d328 100644 (file)
         o_uri = o_temp;
     }
 
-    p_input = input_item_New( p_playlist, [o_uri fileSystemRepresentation], o_name ? [o_name UTF8String] : NULL );
+    p_input = input_item_New( [o_uri fileSystemRepresentation], o_name ? [o_name UTF8String] : NULL );
     if( !p_input )
         return NULL;
 
index 7f746bfdb3b20437d4936371f385a8b1490843b1..1e41dca832b3b7779b7a4c13cdd11145266bad3d 100644 (file)
@@ -1244,7 +1244,7 @@ static VLCWizard *_o_sharedInstance = nil;
             NSString *tempString = [NSString stringWithFormat:
                 @"%@ (%i/%i)", _NS("Streaming/Transcoding Wizard"),
                 ( x + 1 ), y];
-            input_item_t *p_input = input_item_New( p_playlist,
+            input_item_t *p_input = input_item_New(
                 [[[o_userSelections objectForKey:@"pathToStrm"]
                 objectAtIndex:x] UTF8String],
                 [tempString UTF8String] );
index 3db7109ef809c33f0829c5de2cba7f3fd28715f8..c849a43803bb86e5efb75737d8ee0cb7a2e0bf5c 100644 (file)
@@ -361,7 +361,7 @@ void OpenDialog::finish( bool b_enqueue = false )
         bool b_start = !i && !b_enqueue;
 
         input_item_t *p_input;
-        p_input = input_item_New( p_intf, qtu( itemsMRL[i] ), NULL );
+        p_input = input_item_New( qtu( itemsMRL[i] ), NULL );
 
         /* Insert options only for the first element.
            We don't know how to edit that anyway. */
index e5db189f670f243d90591c65a440bc791ed1e36f..5cad0869128a4f7ce42dad9e7d1928fe3eb648bf 100644 (file)
@@ -508,7 +508,7 @@ static void openDirectory( intf_thread_t *p_intf, bool pl, bool go )
 
     RecentsMRL::getInstance( p_intf )->addRecent( qfu(uri) );
 
-    input_item_t *p_input = input_item_New( THEPL, uri, NULL );
+    input_item_t *p_input = input_item_New( uri, NULL );
     free( uri );
     if( unlikely( p_input == NULL ) )
         return;
@@ -637,7 +637,7 @@ void DialogsProvider::streamingDialog( QWidget *parent,
 
         /* Create Input */
         input_item_t *p_input;
-        p_input = input_item_New( p_intf, qtu( mrl ), _("Streaming") );
+        p_input = input_item_New( qtu( mrl ), _("Streaming") );
 
         /* Add normal Options */
         for( int j = 0; j < options.size(); j++ )
index ce529eb1a4f2a5003c93389ae17bdc8133bebeaa..918d4b147ff62eb6fe51487a17c04555ff6a6e3a 100644 (file)
@@ -313,7 +313,7 @@ void Playtree::insertItems( VarTree& elem, const list<string>& files, bool start
         if( !psz_uri )
             continue;
 
-        input_item_t* pItem = input_item_New( m_pPlaylist, psz_uri, NULL );
+        input_item_t* pItem = input_item_New( psz_uri, NULL );
         if( pItem )
         {
             int i_mode = PLAYLIST_APPEND;
index 288c27d6f1213074b30fa77ade00e0c4319a1f35..7ca947668e91e65414d624305dce5fe62eda6abd 100644 (file)
@@ -115,8 +115,7 @@ static int vlclua_sd_add_node( lua_State *L )
         if( lua_isstring( L, -1 ) )
         {
             const char *psz_name = lua_tostring( L, -1 );
-            input_item_t *p_input = input_item_NewWithType( VLC_OBJECT( p_sd ),
-                                                            "vlc://nop",
+            input_item_t *p_input = input_item_NewWithType( "vlc://nop",
                                                             psz_name, 0, NULL, 0,
                                                             -1, ITEM_TYPE_NODE );
             lua_pop( L, 1 );
@@ -166,7 +165,7 @@ static int vlclua_sd_add_item( lua_State *L )
             int i_options = 0;
             const char *psz_path = lua_tostring( L, -1 );
             vlclua_read_options( p_sd, L, &i_options, &ppsz_options );
-            input_item_t *p_input = input_item_NewExt( p_sd, psz_path, psz_path,
+            input_item_t *p_input = input_item_NewExt( psz_path, psz_path,
                                                        i_options,
                                                        (const char **)ppsz_options,
                                                        VLC_INPUT_OPTION_TRUSTED, -1 );
@@ -238,7 +237,7 @@ static int vlclua_node_add_subitem( lua_State *L )
                 const char *psz_path = lua_tostring( L, -1 );
                 vlclua_read_options( p_sd, L, &i_options, &ppsz_options );
                 input_item_node_t *p_input_node = input_item_node_Create( *pp_node );
-                input_item_t *p_input = input_item_NewExt( p_sd, psz_path,
+                input_item_t *p_input = input_item_NewExt( psz_path,
                                                            psz_path, i_options,
                                                            (const char **)ppsz_options,
                                                            VLC_INPUT_OPTION_TRUSTED, -1 );
@@ -294,8 +293,7 @@ static int vlclua_node_add_node( lua_State *L )
             {
                 const char *psz_name = lua_tostring( L, -1 );
                 input_item_node_t *p_input_node = input_item_node_Create( *pp_node );
-                input_item_t *p_input = input_item_NewWithType( VLC_OBJECT( p_sd ),
-                                                                "vlc://nop",
+                input_item_t *p_input = input_item_NewWithType( "vlc://nop",
                                                                 psz_name, 0, NULL, 0,
                                                                 -1, ITEM_TYPE_NODE );
                 lua_pop( L, 1 );
index ca20d7a7c5fa182160a266a1f0f7a8cba06a2570..26e30caa39bec8d380eb1df4af1b1cfda9c39642 100644 (file)
@@ -547,8 +547,7 @@ int __vlclua_playlist_add_internal( vlc_object_t *p_this, lua_State *L,
                     vlclua_read_options( p_this, L, &i_options, &ppsz_options );
 
                     /* Create input item */
-                    p_input = input_item_NewExt( p_playlist, psz_path,
-                                                psz_name, i_options,
+                    p_input = input_item_NewExt( psz_path, psz_name, i_options,
                                                 (const char **)ppsz_options,
                                                 VLC_INPUT_OPTION_TRUSTED,
                                                 i_duration );
index c56479bd6a966f984fc6762848aa157895dc0876..5acd7fdb9b5cd0c672cc287d84b95320dc2eacf6 100644 (file)
@@ -1359,9 +1359,7 @@ static int CreateInputItemFromMedia( media_library_t *p_ml,
                               ml_media_t *p_media )
 {
     playlist_t *p_pl = pl_Get( p_ml );
-    *pp_item = input_item_New( VLC_OBJECT( p_pl ),
-                               p_media->psz_uri,
-                               p_media->psz_title );
+    *pp_item = input_item_New( p_media->psz_uri, p_media->psz_title );
                                /* ITEM_TYPE_FILE ); */
     if( !*pp_item )
         return VLC_EGENERIC;
index 651b3965d90e9c4ae2b9b215af13802411697b2e..37cd0a29774f3db1f814273e16a3cc75081d9969 100644 (file)
@@ -480,8 +480,7 @@ static void ScanFiles( monitoring_thread_t *p_mon, int i_dir_id,
                 if( b_skip )
                     continue;
 
-                p_input = input_item_New( VLC_OBJECT(p_mon), psz_encoded_uri,
-                                          psz_entry );
+                p_input = input_item_New( psz_encoded_uri, psz_entry );
 
                 playlist_t* p_pl = pl_Get( p_mon );
                 preparsed_item_t* p_itemobject;
index 0110e016b0f81d5cfbed5933d4fab0e799d0d385..e118ab260c9024b04deeb85f205abf6976c2b97c 100644 (file)
@@ -176,7 +176,7 @@ static void resolve_callback(
 
         if( psz_uri != NULL )
         {
-            p_input = input_item_New( p_sd, psz_uri, name );
+            p_input = input_item_New( psz_uri, name );
             free( psz_uri );
         }
         if( p_input != NULL )
index 63f9cb7110e9fdf9b3ae1234d16d80b154a5dfcb..11885a8e0a89f0bae3e1f298ff0983f932d3a27c 100644 (file)
@@ -192,7 +192,7 @@ static void *Run( void *data )
 
         char* psz_uri = make_URI( psz_dir, "file" );
 
-        input_item_t* p_root = input_item_New( p_sd, psz_uri, NULL );
+        input_item_t* p_root = input_item_New( psz_uri, NULL );
         if( p_sys->i_type == Picture )
             input_item_AddOption( p_root, "ignore-filetypes=ini,db,lnk,txt",
                                   VLC_INPUT_OPTION_TRUSTED );
@@ -269,7 +269,7 @@ static int onNewFileAdded( vlc_object_t *p_this, char const *psz_var,
         return VLC_EGENERIC;
 
     char* psz_uri = make_URI( psz_file, "file" );
-    input_item_t* p_item = input_item_New( p_sd, psz_uri, NULL );
+    input_item_t* p_item = input_item_New( psz_uri, NULL );
 
     if( p_sys->i_type == Picture )
     {
index e659f4c08cb2849961cc57737e31a63d3218d32a..a0e4ed5105d59b2df72493c4d9ccc77866c43325 100644 (file)
@@ -242,8 +242,7 @@ static void AddTrack( services_discovery_t *p_sd, LIBMTP_track_t *p_track )
         msg_Err( p_sd, "Error adding %s, skipping it", p_track->filename );
         return;
     }
-    if( ( p_input = input_item_New( p_sd, psz_string,
-                                    p_track->title ) ) == NULL )
+    if( ( p_input = input_item_New( psz_string, p_track->title ) ) == NULL )
     {
         msg_Err( p_sd, "Error adding %s, skipping it", p_track->filename );
         free( psz_string );
index 74c4a011f3bf46d58e07dcfc762c901c5c816528..5c936cfca87711cd103d92426db7f66705de9945 100644 (file)
@@ -311,7 +311,7 @@ static void ParseUrls( services_discovery_t *p_sd, char *psz_urls )
                          strdup( psz_urls ) );
 
             input_item_t *p_input;
-            p_input = input_item_New( p_sd, psz_urls, psz_urls );
+            p_input = input_item_New( psz_urls, psz_urls );
             input_item_AddOption( p_input, "demux=podcast", VLC_INPUT_OPTION_TRUSTED );
 
             INSERT_ELEM( pp_new_items, i_new_items, i_new_items, p_input );
@@ -374,7 +374,7 @@ static void ParseRequest( services_discovery_t *p_sd )
               strdup( psz_request ) );
 
             input_item_t *p_input;
-            p_input = input_item_New( p_sd, psz_request, psz_request );
+            p_input = input_item_New( psz_request, psz_request );
             input_item_AddOption( p_input, "demux=podcast", VLC_INPUT_OPTION_TRUSTED );
 
             INSERT_ELEM( p_sys->pp_items, p_sys->i_items, p_sys->i_items, p_input );
index dfcc39c2099ef0b92036b8874a5c554ecc1c452f..493783c43648040bafbed3e63c3cd0f5267a4411 100644 (file)
@@ -827,10 +827,9 @@ sap_announce_t *CreateAnnounce( services_discovery_t *p_sd, uint16_t i_hash,
     p_sap->p_sdp = p_sdp;
 
     /* Released in RemoveAnnounce */
-    p_input = input_item_NewWithType( VLC_OBJECT(p_sd),
-                                     p_sap->p_sdp->psz_uri,
-                                     p_sdp->psz_sessionname,
-                                     0, NULL, 0, -1, ITEM_TYPE_NET );
+    p_input = input_item_NewWithType( p_sap->p_sdp->psz_uri,
+                                      p_sdp->psz_sessionname,
+                                      0, NULL, 0, -1, ITEM_TYPE_NET );
     p_sap->p_item = p_input;
     if( !p_input )
     {
index 2b513c81e37b11ef92be4597d1af216c27567e6d..80a9bceed4dd6206a5ec9f91358f352beac79d6d 100644 (file)
@@ -162,8 +162,7 @@ static int AddDevice (services_discovery_t *sd, struct udev_device *dev)
     if (mrl == NULL)
         return 0; /* don't know if it was an error... */
     char *name = p_sys->subsys->get_name (dev);
-    input_item_t *item = input_item_NewWithType (VLC_OBJECT (sd), mrl,
-                                                 name ? name : mrl,
+    input_item_t *item = input_item_NewWithType (mrl, name ? name : mrl,
                                                  0, NULL, 0, -1,
                                                  p_sys->subsys->item_type);
     msg_Dbg (sd, "adding %s (%s)", mrl, name);
index 7e6311e9e6635c18640abd186bd84decddb5e979..3a992e5ca583a2526101378e0cfa0b0f05f967a7 100644 (file)
@@ -890,7 +890,7 @@ void MediaServer::_buildPlaylist( Container* p_parent, input_item_node_t *p_inpu
     {
         Container* p_container = p_parent->getContainer( i );
 
-        input_item_t* p_input_item = input_item_New( _p_sd, "vlc://nop",
+        input_item_t* p_input_item = input_item_New( "vlc://nop",
                                                     p_container->getTitle() );
         input_item_node_t *p_new_node =
             input_item_node_AppendItem( p_input_node, p_input_item );
@@ -903,8 +903,7 @@ void MediaServer::_buildPlaylist( Container* p_parent, input_item_node_t *p_inpu
     {
         Item* p_item = p_parent->getItem( i );
 
-        input_item_t* p_input_item = input_item_NewExt( _p_sd,
-                                               p_item->getResource(),
+        input_item_t* p_input_item = input_item_NewExt( p_item->getResource(),
                                                p_item->getTitle(),
                                                0,
                                                NULL,
@@ -966,8 +965,7 @@ bool MediaServerList::addServer( MediaServer* p_server )
 
     msg_Dbg( _p_sd, "Adding server '%s' with uuid '%s'", p_server->getFriendlyName(), p_server->getUDN() );
 
-    p_input_item = input_item_New( _p_sd, "vlc://nop",
-                                  p_server->getFriendlyName() );
+    p_input_item = input_item_New( "vlc://nop", p_server->getFriendlyName() );
 
     input_item_SetDescription( p_input_item, p_server->getUDN() );
 
index d17a76bb1b659e11ec3d129cf4919f7025d48e63..4264fef73ad80d07ca30774d9b1d8e51617a9adb 100644 (file)
@@ -74,7 +74,7 @@ static int Open (vlc_object_t *obj)
             continue;
 
         mrl[8] = name[0] = letter;
-        item = input_item_NewWithType (VLC_OBJECT (sd), mrl, name,
+        item = input_item_NewWithType (mrl, name,
                                        0, NULL, 0, -1, ITEM_TYPE_DISC);
         msg_Dbg (sd, "adding %s (%s)", mrl, name);
         if (item == NULL)
index 087bf58ae3d5ea2aca41845f1feb529fcf683714..9eea3aa2732010b67ff15303c7045f2b221d061f 100644 (file)
@@ -255,8 +255,7 @@ static struct app *AddApp (services_discovery_t *sd, xcb_window_t xid)
     else
         name = NULL;
 
-    input_item_t *item = input_item_NewWithType (VLC_OBJECT (sd), mrl,
-                                                 name ? name : mrl,
+    input_item_t *item = input_item_NewWithType (mrl, name ? name : mrl,
                                                  0, NULL, 0, -1,
                                                  ITEM_TYPE_CARD /* FIXME */);
     free (mrl);
@@ -349,7 +348,7 @@ static void AddDesktop(services_discovery_t *sd)
 {
     input_item_t *item;
 
-    item = input_item_NewWithType (VLC_OBJECT (sd), "screen://", _("Desktop"),
+    item = input_item_NewWithType ("screen://", _("Desktop"),
                                    0, NULL, 0, -1, ITEM_TYPE_CARD);
     if (item == NULL)
         return;
index 0aa64a6ae4e8f2871695071dfa2b89119dcbf099..dbb29dbb6b7692369181c724d671df2b9a6be52d 100644 (file)
@@ -294,7 +294,7 @@ libvlc_media_t *libvlc_media_new_location( libvlc_instance_t *p_instance,
     input_item_t * p_input_item;
     libvlc_media_t * p_md;
 
-    p_input_item = input_item_New( p_instance->p_libvlc_int, psz_mrl, NULL );
+    p_input_item = input_item_New( psz_mrl, NULL );
 
     if (!p_input_item)
     {
@@ -342,7 +342,7 @@ libvlc_media_t * libvlc_media_new_as_node( libvlc_instance_t *p_instance,
     input_item_t * p_input_item;
     libvlc_media_t * p_md;
 
-    p_input_item = input_item_New( p_instance->p_libvlc_int, "vlc://nop", psz_name );
+    p_input_item = input_item_New( "vlc://nop", psz_name );
 
     if (!p_input_item)
     {
index 08271247a3ceca66c8f9a946777741ae7bcbf5a6..2011f95bc73b6b1f2934c7f9d377b04c6a55cb25 100644 (file)
@@ -250,8 +250,7 @@ libvlc_media_list_add_file_content( libvlc_media_list_t * p_mlist,
     input_item_t * p_input_item;
     libvlc_media_t * p_md;
 
-    p_input_item = input_item_NewExt(
-                           p_mlist->p_libvlc_instance->p_libvlc_int, psz_uri,
+    p_input_item = input_item_NewExt( psz_uri,
                                          _("Media Library"), 0, NULL, 0, -1 );
 
     if( !p_input_item )
index e3a359f9c20bd3eafc40d3c0d8b4f3d44ace2d9b..3533fffad15d10793cdae218089835df524a6dc4 100644 (file)
 
 static int GuessType( const input_item_t *p_item );
 
-/** Stuff moved out of vlc_input.h -- FIXME: should probably not be inline
- * anyway. */
-static inline void input_item_Init( vlc_object_t *p_o, input_item_t *p_i )
-{
-    memset( p_i, 0, sizeof(input_item_t) );
-
-    p_i->psz_name = NULL;
-    p_i->psz_uri = NULL;
-    TAB_INIT( p_i->i_es, p_i->es );
-    TAB_INIT( p_i->i_options, p_i->ppsz_options );
-    p_i->optflagv = NULL, p_i->optflagc = 0;
-    TAB_INIT( p_i->i_categories, p_i->pp_categories );
-    TAB_INIT( p_i->i_epg, p_i->pp_epg );
-
-    p_i->i_type = ITEM_TYPE_UNKNOWN;
-    p_i->b_fixed_name = true;
-
-    p_i->p_stats = NULL;
-    p_i->p_meta = NULL;
-
-    vlc_mutex_init( &p_i->lock );
-    vlc_event_manager_t * p_em = &p_i->event_manager;
-    vlc_event_manager_init( p_em, p_i );
-    vlc_event_manager_register_event_type( p_em, vlc_InputItemMetaChanged );
-    vlc_event_manager_register_event_type( p_em, vlc_InputItemSubItemAdded );
-    vlc_event_manager_register_event_type( p_em, vlc_InputItemSubItemTreeAdded );
-    vlc_event_manager_register_event_type( p_em, vlc_InputItemDurationChanged );
-    vlc_event_manager_register_event_type( p_em, vlc_InputItemPreparsedChanged );
-    vlc_event_manager_register_event_type( p_em, vlc_InputItemNameChanged );
-    vlc_event_manager_register_event_type( p_em, vlc_InputItemInfoChanged );
-    vlc_event_manager_register_event_type( p_em, vlc_InputItemErrorWhenReadingChanged );
-}
-
 static inline void input_item_Clean( input_item_t *p_i )
 {
     int i;
@@ -823,66 +790,82 @@ void input_item_SetEpgOffline( input_item_t *p_item )
     vlc_event_send( &p_item->event_manager, &event );
 }
 
-#undef input_item_NewExt
-input_item_t *input_item_NewExt( vlc_object_t *p_obj, const char *psz_uri,
+input_item_t *input_item_NewExt( const char *psz_uri,
                                  const char *psz_name,
                                  int i_options,
                                  const char *const *ppsz_options,
                                  unsigned i_option_flags,
                                  mtime_t i_duration )
 {
-    return input_item_NewWithType( p_obj, psz_uri, psz_name,
+    return input_item_NewWithType( psz_uri, psz_name,
                                   i_options, ppsz_options, i_option_flags,
                                   i_duration, ITEM_TYPE_UNKNOWN );
 }
 
 
-input_item_t *input_item_NewWithType( vlc_object_t *p_obj, const char *psz_uri,
-                                const char *psz_name,
-                                int i_options,
-                                const char *const *ppsz_options,
-                                unsigned i_option_flags,
-                                mtime_t i_duration,
-                                int i_type )
+input_item_t *
+input_item_NewWithType( const char *psz_uri, const char *psz_name,
+                        int i_options, const char *const *ppsz_options,
+                        unsigned flags, mtime_t duration, int type )
 {
     static vlc_atomic_t last_input_id = VLC_ATOMIC_INIT(0);
 
-    input_item_t* p_input = malloc( sizeof(input_item_t ) );
+    input_item_t* p_input = calloc( sizeof( *p_input ), 1 );
     if( !p_input )
         return NULL;
-
-    input_item_Init( p_obj, p_input );
-    vlc_gc_init( p_input, input_item_Destroy );
+    vlc_event_manager_t * p_em = &p_input->event_manager;
 
     p_input->i_id = vlc_atomic_inc(&last_input_id);
+    vlc_gc_init( p_input, input_item_Destroy );
 
-    p_input->b_fixed_name = false;
-
-    p_input->i_type = i_type;
+    p_input->psz_name = NULL;
+    if( psz_name )
+        input_item_SetName( p_input, psz_name );
 
+    p_input->psz_uri = NULL;
     if( psz_uri )
         input_item_SetURI( p_input, psz_uri );
+    else
+        p_input->i_type = ITEM_TYPE_UNKNOWN;
 
-    if( i_type != ITEM_TYPE_UNKNOWN )
-        p_input->i_type = i_type;
+    TAB_INIT( p_input->i_options, p_input->ppsz_options );
+    p_input->optflagc = 0;
+    p_input->optflagv = NULL;
+    for( int i = 0; i < i_options; i++ )
+        input_item_AddOption( p_input, ppsz_options[i], flags );
 
-    if( psz_name )
-        input_item_SetName( p_input, psz_name );
+    p_input->i_duration = duration;
+    TAB_INIT( p_input->i_categories, p_input->pp_categories );
+    TAB_INIT( p_input->i_es, p_input->es );
+    p_input->p_stats = NULL;
+    p_input->i_nb_played = 0;
+    p_input->p_meta = NULL;
+    TAB_INIT( p_input->i_epg, p_input->pp_epg );
 
-    p_input->i_duration = i_duration;
+    vlc_event_manager_init( p_em, p_input );
+    vlc_event_manager_register_event_type( p_em, vlc_InputItemMetaChanged );
+    vlc_event_manager_register_event_type( p_em, vlc_InputItemSubItemAdded );
+    vlc_event_manager_register_event_type( p_em, vlc_InputItemSubItemTreeAdded );
+    vlc_event_manager_register_event_type( p_em, vlc_InputItemDurationChanged );
+    vlc_event_manager_register_event_type( p_em, vlc_InputItemPreparsedChanged );
+    vlc_event_manager_register_event_type( p_em, vlc_InputItemNameChanged );
+    vlc_event_manager_register_event_type( p_em, vlc_InputItemInfoChanged );
+    vlc_event_manager_register_event_type( p_em, vlc_InputItemErrorWhenReadingChanged );
 
-    for( int i = 0; i < i_options; i++ )
-        input_item_AddOption( p_input, ppsz_options[i], i_option_flags );
+    vlc_mutex_init( &p_input->lock );
+    if( type != ITEM_TYPE_UNKNOWN )
+        p_input->i_type = type;
+    p_input->b_fixed_name = false;
+    p_input->b_error_when_reading = false;
     return p_input;
 }
 
-input_item_t *input_item_Copy( vlc_object_t *p_obj, input_item_t *p_input )
+input_item_t *input_item_Copy( input_item_t *p_input )
 {
     vlc_mutex_lock( &p_input->lock );
 
     input_item_t *p_new_input =
-        input_item_NewWithType( p_obj,
-                                p_input->psz_uri, p_input->psz_name,
+        input_item_NewWithType( p_input->psz_uri, p_input->psz_name,
                                 0, NULL, 0, p_input->i_duration,
                                 p_input->i_type );
 
index ee7539d3bcb2e4419e14f2537caab216e5131dd0..55ece5c328d2695702f5db3c35d32d019a279855 100644 (file)
@@ -628,8 +628,7 @@ static int vlm_OnMediaUpdate( vlm_t *p_vlm, vlm_media_sys_t *p_media )
             vlc_gc_decref( p_media->vod.p_item );
 
             char *psz_uri = make_URI( p_cfg->ppsz_input[0], NULL );
-            p_media->vod.p_item = input_item_New( p_vlm, psz_uri,
-                p_cfg->psz_name );
+            p_media->vod.p_item = input_item_New( psz_uri, p_cfg->psz_name );
             free( psz_uri );
 
             if( p_cfg->psz_output )
@@ -788,7 +787,7 @@ static int vlm_ControlMediaAdd( vlm_t *p_vlm, vlm_media_t *p_cfg, int64_t *p_id
     p_media->cfg.id = p_vlm->i_id++;
     /* FIXME do we do something here if enabled is true ? */
 
-    p_media->vod.p_item = input_item_New( p_vlm, NULL, NULL );
+    p_media->vod.p_item = input_item_New( NULL, NULL );
 
     p_media->vod.p_media = NULL;
     TAB_INIT( p_media->i_instance, p_media->instance );
@@ -903,7 +902,7 @@ static vlm_media_instance_sys_t *vlm_MediaInstanceNew( vlm_t *p_vlm, const char
     if( psz_name )
         p_instance->psz_name = strdup( psz_name );
 
-    p_instance->p_item = input_item_New( p_vlm, NULL, NULL );
+    p_instance->p_item = input_item_New( NULL, NULL );
 
     p_instance->i_index = 0;
     p_instance->b_sout_keep = false;
index fd975d1bebd3c286fc78379e0939071e9fb280e0..4cc3246ecf7ab767284e85bdff53c9edc0df25a3 100644 (file)
@@ -422,7 +422,7 @@ int playlist_AddExt( playlist_t *p_playlist, const char * psz_uri,
     int i_ret;
     input_item_t *p_input;
 
-    p_input = input_item_NewExt( p_playlist, psz_uri, psz_name,
+    p_input = input_item_NewExt( psz_uri, psz_name,
                                  i_options, ppsz_options, i_option_flags,
                                  i_duration );
     if( p_input == NULL )
@@ -910,8 +910,7 @@ static int RecursiveInsertCopy (
 
     if( !(p_item->i_children != -1 && b_flat) )
     {
-        input_item_t *p_new_input = input_item_Copy( VLC_OBJECT(p_playlist),
-                                                     p_input );
+        input_item_t *p_new_input = input_item_Copy( p_input );
         if( !p_new_input ) return i_pos;
 
         playlist_item_t *p_new_item = NULL;
index 97d75a197d2f9a6b0aa3ede9c72d41ba42196063..e4aa606276bb92f79b49e3899a48b94cbb6b06a3 100644 (file)
@@ -91,7 +91,7 @@ int playlist_Import( playlist_t *p_playlist, const char *psz_file )
     if( psz_uri == NULL )
         return VLC_EGENERIC;
 
-    p_input = input_item_NewExt( p_playlist, psz_uri, psz_file,
+    p_input = input_item_NewExt( psz_uri, psz_file,
                                  1, &psz_option, VLC_INPUT_OPTION_TRUSTED, -1 );
     free( psz_uri );
 
@@ -150,7 +150,7 @@ int playlist_MLLoad( playlist_t *p_playlist )
     const char *const options[1] = { "meta-file", };
     /* that option has to be cleaned in input_item_subitem_tree_added() */
     /* vlc_gc_decref() in the same function */
-    p_input = input_item_NewExt( p_playlist, psz_uri, _("Media Library"),
+    p_input = input_item_NewExt( psz_uri, _("Media Library"),
                                  1, options, VLC_INPUT_OPTION_TRUSTED, -1 );
     free( psz_uri );
     if( p_input == NULL )
index 196ab807f05c0e8417b17cc6f818fd8bbaa0df14..fd7233a63c4bce18ae30cc8331e9824bb8e85e0f 100644 (file)
@@ -67,8 +67,8 @@ playlist_item_t * playlist_NodeCreate( playlist_t *p_playlist,
     if( !psz_name ) psz_name = _("Undefined");
 
     if( !p_input )
-        p_new_input = input_item_NewWithType( VLC_OBJECT(p_playlist), NULL,
-                                        psz_name, 0, NULL, 0, -1, ITEM_TYPE_NODE );
+        p_new_input = input_item_NewWithType( NULL, psz_name, 0, NULL, 0, -1,
+                                              ITEM_TYPE_NODE );
     p_item = playlist_ItemNewFromInput( p_playlist,
                                         p_input ? p_input : p_new_input );
     if( p_new_input )