]> git.sesse.net Git - vlc/blobdiff - modules/demux/playlist/sgimb.c
Finish the playlist API transition (hopefully)
[vlc] / modules / demux / playlist / sgimb.c
index d8c3211e7e9b04a6295267ea14a2431b84891c34..f244f9727e783990f60c1800934c22ce6c97bad9 100644 (file)
@@ -97,6 +97,7 @@
 /*****************************************************************************
  * Preamble
  *****************************************************************************/
+#define _GNU_SOURCE
 #include <stdlib.h>                                      /* malloc(), free() */
 
 #include <vlc/vlc.h>
@@ -381,35 +382,35 @@ static int Demux ( demux_t *p_demux )
         return VLC_EGENERIC;
     }
 
-    vlc_input_item_CopyOptions( p_current->p_input, p_child );
+    input_ItemCopyOptions( p_current->p_input, p_child );
     if( p_sys->i_packet_size && p_sys->psz_mcast_ip )
     {
         char *psz_option;
         p_sys->i_packet_size += 1000;
         asprintf( &psz_option, "mtu=%i", p_sys->i_packet_size );
-        vlc_input_item_AddOption( p_child, psz_option );
+        input_ItemAddOption( p_child, psz_option );
         free( psz_option );
     }
     if( !p_sys->psz_mcast_ip )
     {
         char *psz_option;
         asprintf( &psz_option, "rtsp-caching=5000" );
-        vlc_input_item_AddOption( p_child, psz_option );
+        input_ItemAddOption( p_child, psz_option );
         free( psz_option );
     }
     if( !p_sys->psz_mcast_ip && p_sys->b_rtsp_kasenna )
     {
         char *psz_option;
         asprintf( &psz_option, "rtsp-kasenna" );
-        vlc_input_item_AddOption( p_child, psz_option );
+        input_ItemAddOption( p_child, psz_option );
         free( psz_option );
     }
 
-    playlist_AddWhereverNeeded( p_playlist, p_child, p_current,
-                                 p_item_in_category, (i_parent_id > 0 )? VLC_TRUE : VLC_FALSE,
-                                 PLAYLIST_APPEND );
+    playlist_BothAddInput( p_playlist, p_child, p_item_in_category,
+                           PLAYLIST_APPEND | PLAYLIST_SPREPARSE, PLAYLIST_END,
+                           NULL, NULL);
     HANDLE_PLAY_AND_RELEASE
-    return VLC_SUCCESS;
+    return -1; /* Needed for correct operation of go back */
 }
 
 static int Control( demux_t *p_demux, int i_query, va_list args )