]> git.sesse.net Git - vlc/blobdiff - modules/demux/playlist/playlist.h
* Fixed a bunch of memory leaks.
[vlc] / modules / demux / playlist / playlist.h
index ae1fdc1ac9c7847ef7e7071e0f1bdb1bd153e459..4e643b85428dcf009a12634b7bf1914c46450f89 100644 (file)
@@ -4,7 +4,7 @@
  * Copyright (C) 2004 the VideoLAN team
  * $Id$
  *
- * Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
+ * Authors: Sigmund Augdal Helberg <dnumgis@videolan.org>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
  *
  * You should have received a copy of the GNU General Public License
  * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
 char *E_(ProcessMRL)( char *, char * );
@@ -26,6 +26,8 @@ char *E_(FindPrefix)( demux_t * );
 
 vlc_bool_t E_(FindItem)( demux_t *, playlist_t *, playlist_item_t **);
 
+void E_(AddToPlaylist)( demux_t *, playlist_t*,input_item_t*,playlist_item_t*,int );
+
 int E_(Import_Old) ( vlc_object_t * );
 
 int E_(Import_Native) ( vlc_object_t * );
@@ -39,3 +41,57 @@ void E_(Close_PLS) ( vlc_object_t * );
 
 int E_(Import_B4S) ( vlc_object_t * );
 void E_(Close_B4S) ( vlc_object_t * );
+
+int E_(Import_DVB) ( vlc_object_t * );
+void E_(Close_DVB) ( vlc_object_t * );
+
+int E_(Import_podcast) ( vlc_object_t * );
+void E_(Close_podcast) ( vlc_object_t * );
+
+int E_(Import_xspf) ( vlc_object_t * );
+void E_(Close_xspf) ( vlc_object_t * );
+
+int E_(Import_Shoutcast) ( vlc_object_t * );
+void E_(Close_Shoutcast) ( vlc_object_t * );
+
+int E_(Import_ASX) ( vlc_object_t * );
+void E_(Close_ASX) ( vlc_object_t * );
+
+int E_(Import_SGIMB) ( vlc_object_t * );
+void E_(Close_SGIMB) ( vlc_object_t * );
+
+int E_(Import_QTL) ( vlc_object_t * );
+void E_(Close_QTL) ( vlc_object_t * );
+
+int E_(Import_GVP) ( vlc_object_t * );
+void E_(Close_GVP) ( vlc_object_t * );
+
+#define INIT_PLAYLIST_STUFF \
+    int i_parent_id; \
+    vlc_bool_t b_play; \
+    playlist_item_t *p_current, *p_item_in_category = NULL; \
+    input_item_t *p_input; \
+    playlist_t *p_playlist = pl_Yield( p_demux ); \
+    i_parent_id = var_CreateGetInteger( p_demux, "parent-item" ); \
+    if( i_parent_id > 0 ) \
+    { \
+        b_play = VLC_FALSE;     \
+        p_current = playlist_ItemGetById( p_playlist, i_parent_id );    \
+    } \
+    else \
+    { \
+        b_play = E_(FindItem)( p_demux, p_playlist, &p_current ); \
+        p_item_in_category = playlist_ItemToNode( p_playlist, p_current ); \
+        p_item_in_category->p_input->i_type = ITEM_TYPE_PLAYLIST;        \
+    }
+
+#define HANDLE_PLAY_AND_RELEASE \
+    /* Go back and play the playlist */ \
+    if( b_play && p_playlist->status.p_item && \
+                  p_playlist->status.p_item->i_children > 0 ) \
+    { \
+        playlist_Control( p_playlist, PLAYLIST_VIEWPLAY,  \
+                          p_playlist->status.p_item, NULL ); \
+    } \
+    vlc_object_release( p_playlist );
+