[vlc-commits] playlist: remove no-op pf_deactivate functions
Rémi Denis-Courmont
git at videolan.org
Thu Mar 29 19:50:13 CEST 2012
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Thu Mar 29 20:44:02 2012 +0300| [163b142d90bfc454bae7bb43fb486ad3868acd4f] | committer: Rémi Denis-Courmont
playlist: remove no-op pf_deactivate functions
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=163b142d90bfc454bae7bb43fb486ad3868acd4f
---
modules/demux/playlist/b4s.c | 20 ++++++++------------
modules/demux/playlist/dvb.c | 8 --------
modules/demux/playlist/ifo.c | 8 --------
modules/demux/playlist/playlist.c | 14 +++++++-------
modules/demux/playlist/playlist.h | 5 -----
modules/demux/playlist/podcast.c | 8 --------
modules/demux/playlist/qtl.c | 8 --------
modules/demux/playlist/shoutcast.c | 8 --------
8 files changed, 15 insertions(+), 64 deletions(-)
diff --git a/modules/demux/playlist/b4s.c b/modules/demux/playlist/b4s.c
index cbf7beb..801dfb8 100644
--- a/modules/demux/playlist/b4s.c
+++ b/modules/demux/playlist/b4s.c
@@ -51,20 +51,16 @@ static bool IsWhitespace( const char *psz_string );
*****************************************************************************/
int Import_B4S( vlc_object_t *p_this )
{
- DEMUX_BY_EXTENSION_OR_FORCED_MSG( ".b4s", "b4s-open",
- "using B4S playlist reader" );
- return VLC_SUCCESS;
-}
+ demux_t *demux = (demux_t *)p_this;
-/*****************************************************************************
- * Deactivate: frees unused data
- *****************************************************************************/
-void Close_B4S( vlc_object_t *p_this )
-{
- demux_t *p_demux = (demux_t *)p_this;
- demux_sys_t *p_sys = p_demux->p_sys;
+ if( !demux_IsPathExtension( demux, ".b4s" )
+ && !demux_IsForced( demux, "b4s-open" ) )
+ return VLC_EGENERIC;
+
+ demux->pf_demux = Demux;
+ demux->pf_control = Control;
- free( p_sys );
+ return VLC_SUCCESS;
}
static int Demux( demux_t *p_demux )
diff --git a/modules/demux/playlist/dvb.c b/modules/demux/playlist/dvb.c
index a014fb3..2c0c764 100644
--- a/modules/demux/playlist/dvb.c
+++ b/modules/demux/playlist/dvb.c
@@ -86,14 +86,6 @@ int Import_DVB( vlc_object_t *p_this )
}
/*****************************************************************************
- * Deactivate: frees unused data
- *****************************************************************************/
-void Close_DVB( vlc_object_t *p_this )
-{
- VLC_UNUSED(p_this);
-}
-
-/*****************************************************************************
* Demux: The important stuff
*****************************************************************************/
static int Demux( demux_t *p_demux )
diff --git a/modules/demux/playlist/ifo.c b/modules/demux/playlist/ifo.c
index 6e8dc10..0738cb5 100644
--- a/modules/demux/playlist/ifo.c
+++ b/modules/demux/playlist/ifo.c
@@ -93,14 +93,6 @@ int Import_IFO( vlc_object_t *p_this )
return VLC_SUCCESS;
}
-/*****************************************************************************
- * Deactivate: frees unused data
- *****************************************************************************/
-void Close_IFO( vlc_object_t *p_this )
-{
- VLC_UNUSED(p_this);
-}
-
static int Demux( demux_t *p_demux )
{
char *psz_url, *psz_dir;
diff --git a/modules/demux/playlist/playlist.c b/modules/demux/playlist/playlist.c
index 00b44a3..e42a3d1 100644
--- a/modules/demux/playlist/playlist.c
+++ b/modules/demux/playlist/playlist.c
@@ -81,17 +81,17 @@ vlc_module_begin ()
set_description( N_("B4S playlist import") )
add_shortcut( "playlist", "b4s-open", "shout-b4s" )
set_capability( "demux", 10 )
- set_callbacks( Import_B4S, Close_B4S )
+ set_callbacks( Import_B4S, NULL )
add_submodule ()
set_description( N_("DVB playlist import") )
add_shortcut( "playlist", "dvb-open" )
set_capability( "demux", 10 )
- set_callbacks( Import_DVB, Close_DVB )
+ set_callbacks( Import_DVB, NULL )
add_submodule ()
set_description( N_("Podcast parser") )
add_shortcut( "playlist", "podcast" )
set_capability( "demux", 10 )
- set_callbacks( Import_podcast, Close_podcast )
+ set_callbacks( Import_podcast, NULL )
add_submodule ()
set_description( N_("XSPF playlist import") )
add_shortcut( "playlist", "xspf-open" )
@@ -101,7 +101,7 @@ vlc_module_begin ()
set_description( N_("New winamp 5.2 shoutcast import") )
add_shortcut( "playlist", "shout-winamp" )
set_capability( "demux", 10 )
- set_callbacks( Import_Shoutcast, Close_Shoutcast )
+ set_callbacks( Import_Shoutcast, NULL )
add_bool( "shoutcast-show-adult", false,
SHOW_ADULT_TEXT, SHOW_ADULT_LONGTEXT, false )
add_submodule ()
@@ -118,17 +118,17 @@ vlc_module_begin ()
set_description( N_("QuickTime Media Link importer") )
add_shortcut( "playlist", "qtl" )
set_capability( "demux", 10 )
- set_callbacks( Import_QTL, Close_QTL )
+ set_callbacks( Import_QTL, NULL )
add_submodule ()
set_description( N_("Google Video Playlist importer") )
add_shortcut( "playlist", "gvp" )
set_capability( "demux", 10 )
set_callbacks( Import_GVP, Close_GVP )
add_submodule ()
- set_description( N_("Dummy ifo demux") )
+ set_description( N_("Dummy IFO demux") )
add_shortcut( "playlist" )
set_capability( "demux", 12 )
- set_callbacks( Import_IFO, Close_IFO )
+ set_callbacks( Import_IFO, NULL )
add_submodule ()
set_description( N_("iTunes Music Library importer") )
add_shortcut( "playlist", "itml" )
diff --git a/modules/demux/playlist/playlist.h b/modules/demux/playlist/playlist.h
index 3c3c807..b264c39 100644
--- a/modules/demux/playlist/playlist.h
+++ b/modules/demux/playlist/playlist.h
@@ -42,19 +42,15 @@ int Import_PLS ( vlc_object_t * );
void Close_PLS ( vlc_object_t * );
int Import_B4S ( vlc_object_t * );
-void Close_B4S ( vlc_object_t * );
int Import_DVB ( vlc_object_t * );
-void Close_DVB ( vlc_object_t * );
int Import_podcast ( vlc_object_t * );
-void Close_podcast ( vlc_object_t * );
int Import_xspf ( vlc_object_t * );
void Close_xspf ( vlc_object_t * );
int Import_Shoutcast ( vlc_object_t * );
-void Close_Shoutcast ( vlc_object_t * );
int Import_ASX ( vlc_object_t * );
void Close_ASX ( vlc_object_t * );
@@ -63,7 +59,6 @@ int Import_SGIMB ( vlc_object_t * );
void Close_SGIMB ( vlc_object_t * );
int Import_QTL ( vlc_object_t * );
-void Close_QTL ( vlc_object_t * );
int Import_GVP ( vlc_object_t * );
void Close_GVP ( vlc_object_t * );
diff --git a/modules/demux/playlist/podcast.c b/modules/demux/playlist/podcast.c
index f346a0b..8ef8e50 100644
--- a/modules/demux/playlist/podcast.c
+++ b/modules/demux/playlist/podcast.c
@@ -58,14 +58,6 @@ int Import_podcast( vlc_object_t *p_this )
return VLC_SUCCESS;
}
-/*****************************************************************************
- * Deactivate: frees unused data
- *****************************************************************************/
-void Close_podcast( vlc_object_t *p_this )
-{
- (void)p_this;
-}
-
/* "specs" : http://phobos.apple.com/static/iTunesRSS.html */
static int Demux( demux_t *p_demux )
{
diff --git a/modules/demux/playlist/qtl.c b/modules/demux/playlist/qtl.c
index 4aaf0b9..7dd9caf 100644
--- a/modules/demux/playlist/qtl.c
+++ b/modules/demux/playlist/qtl.c
@@ -92,14 +92,6 @@ int Import_QTL( vlc_object_t *p_this )
return VLC_SUCCESS;
}
-/*****************************************************************************
- * Deactivate: frees unused data
- *****************************************************************************/
-void Close_QTL( vlc_object_t *p_this )
-{
- (void)p_this;
-}
-
static int Demux( demux_t *p_demux )
{
xml_reader_t *p_xml_reader;
diff --git a/modules/demux/playlist/shoutcast.c b/modules/demux/playlist/shoutcast.c
index 211612e..621ae86 100644
--- a/modules/demux/playlist/shoutcast.c
+++ b/modules/demux/playlist/shoutcast.c
@@ -69,14 +69,6 @@ int Import_Shoutcast( vlc_object_t *p_this )
return VLC_SUCCESS;
}
-/*****************************************************************************
- * Deactivate: frees unused data
- *****************************************************************************/
-void Close_Shoutcast( vlc_object_t *p_this )
-{
- (void)p_this;
-}
-
static int Demux( demux_t *p_demux )
{
xml_reader_t *p_xml_reader = NULL;
More information about the vlc-commits
mailing list