]> git.sesse.net Git - vlc/blobdiff - modules/services_discovery/podcast.c
* Do not take and release the structure lock for each element of the list while
[vlc] / modules / services_discovery / podcast.c
index a0498bcfd013d1470af838a154b6e74d96a36afc..42f6574ab858a9ba8d10fea1652308f778ff0f30 100644 (file)
 /*****************************************************************************
  * Includes
  *****************************************************************************/
+#define _GNU_SOURCE
 #include <stdlib.h>                                      /* malloc(), free() */
 
 #include <vlc/vlc.h>
-#include <vlc/intf.h>
-
-#include <vlc/input.h>
-
-#include "network.h"
+#include <vlc_playlist.h>
+#include <vlc_network.h>
 
 #include <errno.h>                                                 /* ENOMEM */
 
@@ -106,7 +104,6 @@ static int Open( vlc_object_t *p_this )
 
     vlc_value_t         val;
     playlist_t          *p_playlist;
-    playlist_view_t     *p_view;
     playlist_item_t     *p_item;
 
     int i, j;
@@ -152,9 +149,9 @@ static int Open( vlc_object_t *p_this )
     }
 
     p_sys->p_node_cat = playlist_NodeCreate( p_playlist, _("Podcast"),
-                                         p_playlist->p_root_category );
+                                         p_playlist->p_root_category, 0 );
     p_sys->p_node_one = playlist_NodeCreate( p_playlist, _("Podcast"),
-                                         p_playlist->p_root_onelevel );
+                                         p_playlist->p_root_onelevel, 0 );
     p_sys->p_node_one->p_input->i_id = p_sys->p_node_cat->p_input->i_id;
 
     p_sys->p_node_one->i_flags |= PLAYLIST_RO_FLAG;
@@ -168,7 +165,7 @@ static int Open( vlc_object_t *p_this )
         asprintf( &psz_buf, "%s", p_sys->ppsz_urls[i] );
         p_input = input_ItemNewExt( p_playlist, psz_buf,
                                     p_sys->ppsz_urls[i], 0, NULL, -1 );
-        vlc_input_item_AddOption( p_input, "demux=podcast" );
+        input_ItemAddOption( p_input, "demux=podcast" );
         p_item = playlist_NodeAddInput( p_playlist, p_input, p_sys->p_node_cat,
                                         PLAYLIST_APPEND, PLAYLIST_END );
         p_item = playlist_NodeAddInput( p_playlist, p_input, p_sys->p_node_one,