]> git.sesse.net Git - vlc/commitdiff
demux/playlist: Don't use playlist_t.
authorPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 14 Jun 2008 15:36:03 +0000 (17:36 +0200)
committerPierre d'Herbemont <pdherbemont@videolan.org>
Sat, 14 Jun 2008 15:36:03 +0000 (17:36 +0200)
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/itml.h
modules/demux/playlist/m3u.c
modules/demux/playlist/playlist.h

index f79ada6bce2e93361276599cfda11a47f228abae..49e1dc4c01ce1083fa91d9d788f1c2b6cefb8480 100644 (file)
@@ -459,7 +459,7 @@ static int Demux( demux_t *p_demux )
                             psz_string = malloc( i_strlen*sizeof( char ) +1);
                             memcpy( psz_string, psz_backup, i_strlen );
                             psz_string[i_strlen] = '\0';
-                            p_input = input_ItemNew( p_playlist, psz_string, psz_title_asx );
+                            p_input = input_ItemNew( p_demux, psz_string, psz_title_asx );
                             input_ItemCopyOptions( p_current_input, p_input );
                             input_ItemAddSubItem( p_current_input, p_input );
                             free( psz_string );
@@ -516,7 +516,7 @@ static int Demux( demux_t *p_demux )
                     /* create the new entry */
                     asprintf( &psz_name, "%d %s", i_entry_count, ( psz_title_entry ? psz_title_entry : p_current_input->psz_name ) );
 
-                    p_entry = input_ItemNewExt( p_playlist, psz_href, psz_name, i_options, (const char * const *)ppsz_options, -1 );
+                    p_entry = input_ItemNewExt( p_demux, psz_href, psz_name, i_options, (const char * const *)ppsz_options, -1 );
                     FREENULL( psz_name );
                     input_ItemCopyOptions( p_current_input, p_entry );
                     while( i_options )
index 0f533c945c7baafb6416fe0cd44afad50ed9fd82..bd001894cbbbdfec5b8623fabd064f67d681a5a1 100644 (file)
@@ -109,7 +109,6 @@ static int Demux( demux_t *p_demux )
     if( xml_ReaderRead( p_xml_reader ) != 1 )
     {
         msg_Err( p_demux, "invalid file (no root node)" );
-        vlc_object_release( p_playlist );
         return -1;
     }
 
@@ -120,7 +119,6 @@ static int Demux( demux_t *p_demux )
         msg_Err( p_demux, "invalid root node %i, %s",
                  xml_ReaderNodeType( p_xml_reader ), psz_elname );
         free( psz_elname );
-        vlc_object_release( p_playlist );
         return -1;
     }
     free( psz_elname );
@@ -258,16 +256,16 @@ static int Demux( demux_t *p_demux )
                 if( !psz_elname ) return -1;
                 if( !strcmp( psz_elname, "entry" ) )
                 {
-                    p_input = input_ItemNewExt( p_playlist, psz_mrl, psz_name,
+                    p_input = input_ItemNewExt( p_demux, psz_mrl, psz_name,
                                                 0, NULL, -1 );
                     if( psz_now )
                         input_item_SetNowPlaying( p_input, psz_now );
                     if( psz_genre )
                         input_item_SetGenre( p_input, psz_genre );
                     if( psz_listeners )
-                        msg_Err( p_playlist, "Unsupported meta listeners" );
+                        msg_Err( p_demux, "Unsupported meta listeners" );
                     if( psz_bitrate )
-                        msg_Err( p_playlist, "Unsupported meta bitrate" );
+                        msg_Err( p_demux, "Unsupported meta bitrate" );
 
                     input_ItemAddSubItem( p_current_input, p_input );
                     vlc_gc_decref( p_input );
index 2e1f4b2694df03423653b96700bcdeddf5c93c27..8145fd3cdbb80af2fde977c1993fdd84e1012105 100644 (file)
@@ -117,7 +117,7 @@ static int Demux( demux_t *p_demux )
 
         EnsureUTF8( psz_name );
 
-        p_input = input_ItemNewExt( p_playlist, "dvb://", psz_name, 0, NULL, -1 );
+        p_input = input_ItemNewExt( p_demux, "dvb://", psz_name, 0, NULL, -1 );
         for( i = 0; i< i_options; i++ )
         {
             EnsureUTF8( ppsz_options[i] );
index 3dbaaf8d5ad35e0c62b4e4e403b8b579013b2b39..fdec2fbd86e97e505699aa9202baab24244fc54a 100644 (file)
@@ -61,7 +61,6 @@ description:The now infamous Apple Macintosh commercial aired during the 1984 Su
 
 struct demux_sys_t
 {
-    playlist_t *p_playlist;
     input_item_t *p_current_input;
 };
 
@@ -98,7 +97,6 @@ int Import_GVP( vlc_object_t *p_this )
     p_demux->pf_control = Control;
     p_demux->pf_demux = Demux;
     MALLOC_ERR( p_demux->p_sys, demux_sys_t );
-    p_demux->p_sys->p_playlist = NULL;
 
     return VLC_SUCCESS;
 }
@@ -111,8 +109,6 @@ void Close_GVP( vlc_object_t *p_this )
     demux_t *p_demux = (demux_t *)p_this;
     demux_sys_t *p_sys = p_demux->p_sys;
 
-    if( p_sys->p_playlist )
-        vlc_object_release( p_sys->p_playlist );
     free( p_sys );
 }
 
@@ -133,7 +129,6 @@ static int Demux( demux_t *p_demux )
 
     INIT_PLAYLIST_STUFF;
 
-    p_sys->p_playlist = p_playlist;
     p_sys->p_current_input = p_current_input;
 
     while( ( psz_line = stream_ReadLine( p_demux->s ) ) )
@@ -206,7 +201,7 @@ static int Demux( demux_t *p_demux )
     }
     else
     {
-        p_input = input_ItemNewExt( p_sys->p_playlist,
+        p_input = input_ItemNewExt( p_demux,
                                     psz_url, psz_title, 0, NULL, -1 );
 #define SADD_INFO( type, field ) if( field ) { input_ItemAddInfo( \
                     p_input, _("Google Video"), _(type), "%s", field ) ; }
@@ -225,8 +220,6 @@ static int Demux( demux_t *p_demux )
     free( psz_title );
     free( psz_description );
 
-    p_sys->p_playlist = NULL;
-
     return 0; /* Needed for correct operation of go back */
 }
 
index c961ad2e6bd93fea1c15adf2910bb08cebe38bc8..bf02d743554f539aeb9197480300a8e3be91627f 100644 (file)
@@ -95,7 +95,7 @@ static int Demux( demux_t *p_demux )
     psz_url = (char *)malloc( len+1 );
     snprintf( psz_url, len+1, "dvd://%s", p_demux->psz_path );
 
-    p_input = input_ItemNewExt( p_playlist, psz_url, psz_url, 0, NULL, -1 );
+    p_input = input_ItemNewExt( p_demux, psz_url, psz_url, 0, NULL, -1 );
     input_ItemAddSubItem( p_current_input, p_input );
     vlc_gc_decref( p_input );
 
index 097d375c335bca22e119c453f4ba80c5045b07cd..9f756a711154edf0ce9564512fea456973f58925 100644 (file)
@@ -114,7 +114,7 @@ int Demux( demux_t *p_demux )
     {
         xml_elem_hnd_t pl_elements[] =
             { {"dict",    COMPLEX_CONTENT, {.cmplx = parse_plist_dict} } };
-        i_ret = parse_plist_node( p_demux, p_playlist, p_current_input,
+        i_ret = parse_plist_node( p_demux, p_current_input,
                                      NULL, p_xml_reader, "plist",
                                      pl_elements );
         HANDLE_PLAY_AND_RELEASE;
@@ -172,7 +172,7 @@ static bool parse_plist_node COMPLEX_INTERFACE
     if( !b_version_found )
         msg_Warn( p_demux, "<plist> requires \"version\" attribute" );
 
-    return parse_dict( p_demux, p_playlist, p_input_item, NULL, p_xml_reader,
+    return parse_dict( p_demux, p_input_item, NULL, p_xml_reader,
                        "plist", p_handlers );
 }
 
@@ -220,7 +220,6 @@ static bool parse_dict COMPLEX_INTERFACE
                 if( p_handler->type == COMPLEX_CONTENT )
                 {
                     if( p_handler->pf_handler.cmplx( p_demux,
-                                                     p_playlist,
                                                      p_input_item,
                                                      NULL,
                                                      p_xml_reader,
@@ -316,7 +315,7 @@ static bool parse_plist_dict COMPLEX_INTERFACE
           {NULL,      UNKNOWN_CONTENT, {NULL} }
         };
 
-    return parse_dict( p_demux, p_playlist, p_input_item, NULL, p_xml_reader,
+    return parse_dict( p_demux, p_input_item, NULL, p_xml_reader,
                        "dict", pl_elements );
 }
 
@@ -329,7 +328,7 @@ static bool parse_tracks_dict COMPLEX_INTERFACE
           {NULL,      UNKNOWN_CONTENT, {NULL} }
         };
 
-    parse_dict( p_demux, p_playlist, p_input_item, NULL, p_xml_reader,
+    parse_dict( p_demux, p_input_item, NULL, p_xml_reader,
                 "dict", tracks_elements );
 
     msg_Info( p_demux, "added %i tracks successfully",
@@ -357,7 +356,7 @@ static bool parse_track_dict COMPLEX_INTERFACE
           {NULL,      UNKNOWN_CONTENT, {NULL} }
         };
 
-    i_ret = parse_dict( p_demux, p_playlist, p_input_item, p_track,
+    i_ret = parse_dict( p_demux, p_input_item, p_track,
                         p_xml_reader, "dict", track_elements );
 
     msg_Dbg( p_demux, "name: %s, artist: %s, album: %s, genre: %s, trackNum: %s, location: %s",
@@ -381,7 +380,7 @@ static bool parse_track_dict COMPLEX_INTERFACE
             memmove( psz_uri + 7, psz_uri + 17, strlen( psz_uri ) - 9 );
             msg_Info( p_demux, "Adding '%s'", psz_uri );
 
-            p_new_input = input_ItemNewExt( p_playlist, psz_uri,
+            p_new_input = input_ItemNewExt( p_demux, psz_uri,
                                             NULL, 0, NULL, -1 );
             input_ItemAddSubItem( p_input_item, p_new_input );
 
@@ -488,7 +487,7 @@ static bool add_meta( input_item_t *p_input_item,
  */
 static bool skip_element COMPLEX_INTERFACE
 {
-    VLC_UNUSED(p_demux); VLC_UNUSED(p_playlist); VLC_UNUSED(p_input_item);
+    VLC_UNUSED(p_demux); VLC_UNUSED(p_input_item);
     VLC_UNUSED(p_track); VLC_UNUSED(p_handlers);
     char *psz_endname;
 
index b8bf37a6433a2ff57615d1d14c8f22cafba65ea4..c29fef3660306a11117010c303400893204c5267 100644 (file)
@@ -41,7 +41,6 @@
                            const char      *psz_name,\
                            char            *psz_value)
 #define COMPLEX_INTERFACE (demux_t         *p_demux,\
-                           playlist_t      *p_playlist,\
                            input_item_t    *p_input_item,\
                            track_elem_t    *p_track,\
                            xml_reader_t    *p_xml_reader,\
index 8ae097ddaae3a88041f9ff85f00095017bb95352..9f3cc2c13aeb32ebf5f963c7ccc615416c65410d 100644 (file)
@@ -182,7 +182,7 @@ static int Demux( demux_t *p_demux )
             b_cleanup = true;
             if( !psz_mrl ) goto error;
 
-            p_input = input_ItemNewExt( p_playlist, psz_mrl, psz_name,
+            p_input = input_ItemNewExt( p_demux, psz_mrl, psz_name,
                                         0, NULL, i_duration );
 
             if ( psz_artist && *psz_artist )
index 18c6e9f095661572680d9576803c9959ea313b1a..5e743ccda6bed84bfe290d60cfc3513fb0512f2c 100644 (file)
@@ -21,7 +21,8 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#include <vlc_playlist.h>
+#include <vlc_input.h>
+
 char *ProcessMRL( char *, char * );
 char *FindPrefix( demux_t * );
 
@@ -77,11 +78,8 @@ int Import_iTML ( vlc_object_t * );
 void Close_iTML ( vlc_object_t * );
 
 #define INIT_PLAYLIST_STUFF \
-    playlist_t *p_playlist = pl_Yield( p_demux ); \
     input_thread_t *p_input_thread = (input_thread_t *)vlc_object_find( p_demux, VLC_OBJECT_INPUT, FIND_PARENT ); \
     input_item_t *p_current_input = input_GetItem( p_input_thread );
 
 #define HANDLE_PLAY_AND_RELEASE \
-    vlc_object_release( p_input_thread ); \
-    vlc_object_release( p_playlist );
-
+    vlc_object_release( p_input_thread );