]> git.sesse.net Git - vlc/blob - modules/demux/playlist/playlist.h
A bit of headers cleanup
[vlc] / modules / demux / playlist / playlist.h
1 /*****************************************************************************
2  * playlist.h:  Playlist import module common functions
3  *****************************************************************************
4  * Copyright (C) 2004 the VideoLAN team
5  * $Id$
6  *
7  * Authors: Sigmund Augdal Helberg <dnumgis@videolan.org>
8  *
9  * This program is free software; you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation; either version 2 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #include <vlc_playlist.h>
25 char *E_(ProcessMRL)( char *, char * );
26 char *E_(FindPrefix)( demux_t * );
27
28 vlc_bool_t E_(FindItem)( demux_t *, playlist_t *, playlist_item_t **);
29
30 void E_(AddToPlaylist)( demux_t *, playlist_t*,input_item_t*,playlist_item_t*,int );
31
32 int E_(Import_Old) ( vlc_object_t * );
33
34 int E_(Import_Native) ( vlc_object_t * );
35 void E_(Close_Native) ( vlc_object_t * );
36
37 int E_(Import_M3U) ( vlc_object_t * );
38 void E_(Close_M3U) ( vlc_object_t * );
39
40 int E_(Import_PLS) ( vlc_object_t * );
41 void E_(Close_PLS) ( vlc_object_t * );
42
43 int E_(Import_B4S) ( vlc_object_t * );
44 void E_(Close_B4S) ( vlc_object_t * );
45
46 int E_(Import_DVB) ( vlc_object_t * );
47 void E_(Close_DVB) ( vlc_object_t * );
48
49 int E_(Import_podcast) ( vlc_object_t * );
50 void E_(Close_podcast) ( vlc_object_t * );
51
52 int E_(Import_xspf) ( vlc_object_t * );
53 void E_(Close_xspf) ( vlc_object_t * );
54
55 int E_(Import_Shoutcast) ( vlc_object_t * );
56 void E_(Close_Shoutcast) ( vlc_object_t * );
57
58 int E_(Import_ASX) ( vlc_object_t * );
59 void E_(Close_ASX) ( vlc_object_t * );
60
61 int E_(Import_SGIMB) ( vlc_object_t * );
62 void E_(Close_SGIMB) ( vlc_object_t * );
63
64 int E_(Import_QTL) ( vlc_object_t * );
65 void E_(Close_QTL) ( vlc_object_t * );
66
67 int E_(Import_GVP) ( vlc_object_t * );
68 void E_(Close_GVP) ( vlc_object_t * );
69
70 #define INIT_PLAYLIST_STUFF \
71     playlist_t *p_playlist = pl_Yield( p_demux ); \
72     vlc_bool_t b_play = var_CreateGetBool( p_demux, "playlist-autostart" ); \
73     input_item_t *p_current_input = input_GetItem( \
74                                      (input_thread_t*)p_demux->p_parent); \
75     playlist_item_t *p_current = \
76                  playlist_ItemGetByInput( p_playlist, p_current_input, VLC_FALSE ); \
77     playlist_item_t *p_item_in_category = \
78                             playlist_ItemToNode( p_playlist, p_current, \
79                                                  VLC_TRUE ); \
80     b_play = b_play && p_current == p_playlist->status.p_item; \
81     if( p_item_in_category ) \
82         p_item_in_category->p_input->i_type = ITEM_TYPE_PLAYLIST;
83
84 #define HANDLE_PLAY_AND_RELEASE \
85     /* Go back and play the playlist */ \
86     if( b_play && p_item_in_category && p_item_in_category->i_children > 0 ) \
87         playlist_Control( p_playlist, PLAYLIST_VIEWPLAY, VLC_TRUE, p_item_in_category, \
88                           NULL ); \
89     vlc_object_release( p_playlist );