]> git.sesse.net Git - vlc/blob - modules/demux/playlist/playlist.h
xspf: fix type limit warning
[vlc] / modules / demux / playlist / playlist.h
1 /*****************************************************************************
2  * playlist.h:  Playlist import module common functions
3  *****************************************************************************
4  * Copyright (C) 2004 VLC authors and VideoLAN
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 it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation; either version 2.1 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 Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public License
20  * along with this program; if not, write to the Free Software Foundation,
21  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
22  *****************************************************************************/
23
24 #include <vlc_input.h>
25 #include <vlc_playlist.h>
26
27 int Control(demux_t *, int, va_list);
28 char *ProcessMRL( const char *, const char * );
29 char *FindPrefix( demux_t * );
30
31 int Import_Old ( vlc_object_t * );
32
33 int Import_Native ( vlc_object_t * );
34 void Close_Native ( vlc_object_t * );
35
36 int Import_M3U ( vlc_object_t * );
37 void Close_M3U ( vlc_object_t * );
38
39 int Import_RAM ( vlc_object_t * );
40 void Close_RAM ( vlc_object_t * );
41
42 int Import_PLS ( vlc_object_t * );
43 void Close_PLS ( vlc_object_t * );
44
45 int Import_B4S ( vlc_object_t * );
46
47 int Import_DVB ( vlc_object_t * );
48
49 int Import_podcast ( vlc_object_t * );
50
51 int Import_xspf ( vlc_object_t * );
52 void Close_xspf ( vlc_object_t * );
53
54 int Import_Shoutcast ( vlc_object_t * );
55
56 int Import_ASX ( vlc_object_t * );
57 void Close_ASX ( vlc_object_t * );
58
59 int Import_SGIMB ( vlc_object_t * );
60 void Close_SGIMB ( vlc_object_t * );
61
62 int Import_QTL ( vlc_object_t * );
63
64 int Import_GVP ( vlc_object_t * );
65 void Close_GVP ( vlc_object_t * );
66
67 int Import_IFO ( vlc_object_t * );
68 void Close_IFO ( vlc_object_t * );
69
70 int Import_VideoPortal ( vlc_object_t * );
71 void Close_VideoPortal ( vlc_object_t * );
72
73 int Import_iTML ( vlc_object_t * );
74 void Close_iTML ( vlc_object_t * );
75
76 int Import_WPL ( vlc_object_t * );
77 void Close_WPL ( vlc_object_t * );
78
79 int Import_ZPL ( vlc_object_t * );
80 void Close_ZPL ( vlc_object_t * );
81
82 extern input_item_t * GetCurrentItem(demux_t *p_demux);
83
84 bool CheckContentType( stream_t * p_stream, const char * psz_ctype );
85
86 #define STANDARD_DEMUX_INIT_MSG( msg ) do { \
87     DEMUX_INIT_COMMON();                    \
88     msg_Dbg( p_demux, "%s", msg ); } while(0)
89
90 #define DEMUX_BY_EXTENSION_MSG( ext, msg ) \
91     demux_t *p_demux = (demux_t *)p_this; \
92     if( !demux_IsPathExtension( p_demux, ext ) ) \
93         return VLC_EGENERIC; \
94     STANDARD_DEMUX_INIT_MSG( msg );
95
96 #define DEMUX_BY_EXTENSION_OR_FORCED_MSG( ext, module, msg ) \
97     demux_t *p_demux = (demux_t *)p_this; \
98     if( !demux_IsPathExtension( p_demux, ext ) && !demux_IsForced( p_demux, module ) ) \
99         return VLC_EGENERIC; \
100     STANDARD_DEMUX_INIT_MSG( msg );
101
102 #define DEMUX_BY_EXTENSION_OR_MIMETYPE( ext, mime, msg ) \
103     demux_t *p_demux = (demux_t *)p_this; \
104     char* demux_mimetype = stream_ContentType( p_demux->s ); \
105     if(!( demux_IsPathExtension( p_demux, ext ) || (demux_mimetype && !strcasecmp( mime, demux_mimetype )) )) { \
106         free( demux_mimetype ); \
107         return VLC_EGENERIC; \
108     } \
109     free( demux_mimetype ); \
110     STANDARD_DEMUX_INIT_MSG( msg );
111
112 #define CHECK_PEEK( zepeek, size ) do { \
113     if( stream_Peek( p_demux->s , &zepeek, size ) < size ){ \
114         msg_Dbg( p_demux, "not enough data" ); return VLC_EGENERIC; } } while(0)
115
116 #define POKE( peek, stuff, size ) (strncasecmp( (const char *)peek, stuff, size )==0)
117