Commit cc47db8e authored by Christophe Massiot's avatar Christophe Massiot

* modules/demux/playlist: Exported symbols inside plug-ins must always be

   escaped with the E_() macro, to avoid namespace collisions between plug-ins.
parent 5f9a5f7c
......@@ -56,7 +56,7 @@ static void ShoutcastAdd( playlist_t *p_playlist, playlist_item_t* p_genre,
/*****************************************************************************
* Import_B4S: main import function
*****************************************************************************/
int Import_B4S( vlc_object_t *p_this )
int E_(Import_B4S)( vlc_object_t *p_this )
{
demux_t *p_demux = (demux_t *)p_this;
demux_sys_t *p_sys;
......@@ -87,7 +87,7 @@ int Import_B4S( vlc_object_t *p_this )
}
p_sys->b_shout = p_demux->psz_demux &&
!strcmp(p_demux->psz_demux, "shout-b4s");
p_sys->psz_prefix = FindPrefix( p_demux );
p_sys->psz_prefix = E_(FindPrefix)( p_demux );
p_sys->p_playlist = NULL;
p_sys->p_xml = NULL;
p_sys->p_xml_reader = NULL;
......@@ -98,7 +98,7 @@ int Import_B4S( vlc_object_t *p_this )
/*****************************************************************************
* Deactivate: frees unused data
*****************************************************************************/
void Close_B4S( vlc_object_t *p_this )
void E_(Close_B4S)( vlc_object_t *p_this )
{
demux_t *p_demux = (demux_t *)p_this;
demux_sys_t *p_sys = p_demux->p_sys;
......@@ -139,7 +139,7 @@ static int Demux( demux_t *p_demux )
}
p_sys->p_playlist = p_playlist;
b_play = FindItem( p_demux, p_playlist, &p_current );
b_play = E_(FindItem)( p_demux, p_playlist, &p_current );
playlist_ItemToNode( p_playlist, p_current );
p_current->input.i_type = ITEM_TYPE_PLAYLIST;
......
......@@ -48,7 +48,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args );
/*****************************************************************************
* Import_M3U: main import function
*****************************************************************************/
int Import_M3U( vlc_object_t *p_this )
int E_(Import_M3U)( vlc_object_t *p_this )
{
demux_t *p_demux = (demux_t *)p_this;
......@@ -87,7 +87,7 @@ int Import_M3U( vlc_object_t *p_this )
msg_Err( p_demux, "Out of memory" );
return VLC_ENOMEM;
}
p_demux->p_sys->psz_prefix = FindPrefix( p_demux );
p_demux->p_sys->psz_prefix = E_(FindPrefix)( p_demux );
return VLC_SUCCESS;
}
......@@ -95,7 +95,7 @@ int Import_M3U( vlc_object_t *p_this )
/*****************************************************************************
* Deactivate: frees unused data
*****************************************************************************/
void Close_M3U( vlc_object_t *p_this )
void E_(Close_M3U)( vlc_object_t *p_this )
{
demux_t *p_demux = (demux_t *)p_this;
......@@ -127,7 +127,7 @@ static int Demux( demux_t *p_demux )
return -1;
}
b_play = FindItem( p_demux, p_playlist, &p_current );
b_play = E_(FindItem)( p_demux, p_playlist, &p_current );
playlist_ItemToNode( p_playlist, p_current );
p_current->input.i_type = ITEM_TYPE_PLAYLIST;
......@@ -194,7 +194,7 @@ static int Demux( demux_t *p_demux )
psz_name = strdup( psz_parse );
}
psz_mrl = ProcessMRL( psz_parse, p_demux->p_sys->psz_prefix );
psz_mrl = E_(ProcessMRL)( psz_parse, p_demux->p_sys->psz_prefix );
b_cleanup = VLC_TRUE;
if( !psz_mrl ) goto error;
......
......@@ -37,14 +37,13 @@
/*****************************************************************************
* Local prototypes
*****************************************************************************/
int Import_Old ( vlc_object_t * );
static int Demux( demux_t *p_demux);
static int Control( demux_t *p_demux, int i_query, va_list args );
/*****************************************************************************
* Import_Old : main import function
*****************************************************************************/
int Import_Old( vlc_object_t *p_this )
int E_(Import_Old)( vlc_object_t *p_this )
{
demux_t *p_demux = (demux_t *)p_this;
uint8_t *p_peek;
......
......@@ -41,31 +41,31 @@ vlc_module_begin();
set_description( _("Old playlist open") );
add_shortcut( "old-open" );
set_capability( "demux2", 10 );
set_callbacks( Import_Old, NULL );
set_callbacks( E_(Import_Old), NULL );
#if 0
add_submodule();
set_description( _("Native playlist import") );
add_shortcut( "playlist" );
add_shortcut( "native-open" );
set_capability( "demux2", 10 );
set_callbacks( Import_Native, Close_Native );
set_callbacks( E_(Import_Native), E_(Close_Native) );
#endif
add_submodule();
set_description( _("M3U playlist import") );
add_shortcut( "m3u-open" );
set_capability( "demux2", 10 );
set_callbacks( Import_M3U, Close_M3U );
set_callbacks( E_(Import_M3U), E_(Close_M3U) );
add_submodule();
set_description( _("PLS playlist import") );
add_shortcut( "pls-open" );
set_capability( "demux2", 10 );
set_callbacks( Import_PLS, Close_PLS );
set_callbacks( E_(Import_PLS), E_(Close_PLS) );
add_submodule();
set_description( _("B4S playlist import") );
add_shortcut( "b4s-open" );
add_shortcut( "shout-b4s" );
set_capability( "demux2", 10 );
set_callbacks( Import_B4S, Close_B4S );
set_callbacks( E_(Import_B4S), E_(Close_B4S) );
vlc_module_end();
......@@ -73,7 +73,7 @@ vlc_module_end();
* Find directory part of the path to the playlist file, in case of
* relative paths inside
*/
char *FindPrefix( demux_t *p_demux )
char *E_(FindPrefix)( demux_t *p_demux )
{
char *psz_name;
char *psz_path = strdup( p_demux->psz_path );
......@@ -94,7 +94,7 @@ char *FindPrefix( demux_t *p_demux )
* Add the directory part of the playlist file to the start of the
* mrl, if the mrl is a relative file path
*/
char *ProcessMRL( char *psz_mrl, char *psz_prefix )
char *E_(ProcessMRL)( char *psz_mrl, char *psz_prefix )
{
/* Check for a protocol name.
* for URL, we should look for "://"
......@@ -118,7 +118,7 @@ char *ProcessMRL( char *psz_mrl, char *psz_prefix )
return psz_mrl;
}
vlc_bool_t FindItem( demux_t *p_demux, playlist_t *p_playlist,
vlc_bool_t E_(FindItem)( demux_t *p_demux, playlist_t *p_playlist,
playlist_item_t **pp_item )
{
vlc_bool_t b_play;
......
......@@ -21,21 +21,21 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
*****************************************************************************/
char *ProcessMRL( char *, char * );
char *FindPrefix( demux_t * );
char *E_(ProcessMRL)( char *, char * );
char *E_(FindPrefix)( demux_t * );
vlc_bool_t FindItem( demux_t *, playlist_t *, playlist_item_t **);
vlc_bool_t E_(FindItem)( demux_t *, playlist_t *, playlist_item_t **);
int Import_Old ( vlc_object_t * );
int E_(Import_Old) ( vlc_object_t * );
int Import_Native ( vlc_object_t * );
int Close_Native ( vlc_object_t * );
int E_(Import_Native) ( vlc_object_t * );
void E_(Close_Native) ( vlc_object_t * );
int Import_M3U ( vlc_object_t * );
void Close_M3U ( vlc_object_t * );
int E_(Import_M3U) ( vlc_object_t * );
void E_(Close_M3U) ( vlc_object_t * );
int Import_PLS ( vlc_object_t * );
void Close_PLS ( vlc_object_t * );
int E_(Import_PLS) ( vlc_object_t * );
void E_(Close_PLS) ( vlc_object_t * );
int Import_B4S ( vlc_object_t * );
void Close_B4S ( vlc_object_t * );
int E_(Import_B4S) ( vlc_object_t * );
void E_(Close_B4S) ( vlc_object_t * );
......@@ -48,7 +48,7 @@ static int Control( demux_t *p_demux, int i_query, va_list args );
/*****************************************************************************
* Import_PLS: main import function
*****************************************************************************/
int Import_PLS( vlc_object_t *p_this )
int E_(Import_PLS)( vlc_object_t *p_this )
{
demux_t *p_demux = (demux_t *)p_this;
......@@ -79,7 +79,7 @@ int Import_PLS( vlc_object_t *p_this )
msg_Err( p_demux, "Out of memory" );
return VLC_ENOMEM;
}
p_demux->p_sys->psz_prefix = FindPrefix( p_demux );
p_demux->p_sys->psz_prefix = E_(FindPrefix)( p_demux );
return VLC_SUCCESS;
}
......@@ -87,7 +87,7 @@ int Import_PLS( vlc_object_t *p_this )
/*****************************************************************************
* Deactivate: frees unused data
*****************************************************************************/
void Close_PLS( vlc_object_t *p_this )
void E_(Close_PLS)( vlc_object_t *p_this )
{
demux_t *p_demux = (demux_t *)p_this;
if( p_demux->p_sys->psz_prefix )
......@@ -121,7 +121,7 @@ static int Demux( demux_t *p_demux )
return -1;
}
b_play = FindItem( p_demux, p_playlist, &p_parent );
b_play = E_(FindItem)( p_demux, p_playlist, &p_parent );
p_parent->input.i_type = ITEM_TYPE_PLAYLIST;
/* Change the item to a node */
......@@ -220,7 +220,7 @@ static int Demux( demux_t *p_demux )
}
if( !strncasecmp( psz_key, "file", sizeof("file") -1 ) )
{
psz_mrl = ProcessMRL( psz_value, p_demux->p_sys->psz_prefix );
psz_mrl = E_(ProcessMRL)( psz_value, p_demux->p_sys->psz_prefix );
}
else if( !strncasecmp( psz_key, "title", sizeof("title") -1 ) )
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment