[vlc-commits] Remove WPL module

Hugo Beauzée-Luyssen git at videolan.org
Fri Mar 13 15:21:00 CET 2015


vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Mar 13 15:13:09 2015 +0100| [9d73a00bb9b06de00059407b813fdc8bfa7a2255] | committer: Hugo Beauzée-Luyssen

Remove WPL module

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=9d73a00bb9b06de00059407b813fdc8bfa7a2255
---

 modules/demux/Makefile.am         |    1 -
 modules/demux/playlist/playlist.c |    5 --
 modules/demux/playlist/wpl.c      |  124 -------------------------------------
 3 files changed, 130 deletions(-)

diff --git a/modules/demux/Makefile.am b/modules/demux/Makefile.am
index 78dc915..b5d2d8a 100644
--- a/modules/demux/Makefile.am
+++ b/modules/demux/Makefile.am
@@ -220,7 +220,6 @@ libplaylist_plugin_la_SOURCES = \
 	demux/playlist/ram.c \
 	demux/playlist/sgimb.c \
 	demux/playlist/shoutcast.c \
-	demux/playlist/wpl.c \
 	demux/playlist/xspf.c \
 	demux/playlist/directory.c \
 	demux/playlist/playlist.c demux/playlist/playlist.h
diff --git a/modules/demux/playlist/playlist.c b/modules/demux/playlist/playlist.c
index 07e47e1..92d30aa 100644
--- a/modules/demux/playlist/playlist.c
+++ b/modules/demux/playlist/playlist.c
@@ -136,11 +136,6 @@ vlc_module_begin ()
         set_capability( "demux", 10 )
         set_callbacks( Import_iTML, Close_iTML )
     add_submodule ()
-        set_description( N_("WPL playlist import") )
-        add_shortcut( "playlist", "wpl" )
-        set_capability( "demux", 10 )
-        set_callbacks( Import_WPL, Close_WPL )
-    add_submodule ()
         set_description( N_("Directory import") )
         add_shortcut( "playlist", "directory" )
         set_capability( "demux", 10 )
diff --git a/modules/demux/playlist/wpl.c b/modules/demux/playlist/wpl.c
deleted file mode 100644
index c2c209a..0000000
--- a/modules/demux/playlist/wpl.c
+++ /dev/null
@@ -1,124 +0,0 @@
-/*****************************************************************************
- * wpl.c : WPL playlist format import
- *****************************************************************************
- * Copyright (C) 2009 the VideoLAN team
- *
- * Authors: Su Heaven <suheaven at gmail.com>
- *
- * 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
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * 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., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-/*****************************************************************************
- * Preamble
- *****************************************************************************/
-
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <vlc_common.h>
-#include <vlc_demux.h>
-#include <vlc_strings.h>
-
-#include "playlist.h"
-
-struct demux_sys_t
-{
-    char *psz_prefix;
-};
-
-/*****************************************************************************
- * Local prototypes
- *****************************************************************************/
-static int Demux( demux_t *p_demux);
-
-/*****************************************************************************
- * Import_WPL: main import function
- *****************************************************************************/
-int Import_WPL( vlc_object_t *p_this )
-{
-    demux_t *p_demux = (demux_t *)p_this;
-
-    if(! ( demux_IsPathExtension( p_demux, ".wpl" ) || demux_IsForced( p_demux,  "wpl" )))
-        return VLC_EGENERIC;
-
-    STANDARD_DEMUX_INIT_MSG( "found valid WPL playlist" );
-    p_demux->p_sys->psz_prefix = FindPrefix( p_demux );
-
-    return VLC_SUCCESS;
-}
-
-
-
-/*****************************************************************************
- * Deactivate: frees unused data
- *****************************************************************************/
-void Close_WPL( vlc_object_t *p_this )
-{
-    demux_t *p_demux = (demux_t *)p_this;
-    free( p_demux->p_sys->psz_prefix );
-    free( p_demux->p_sys );
-}
-
-static int Demux( demux_t *p_demux )
-{
-    char       *psz_line;
-    input_item_t *p_current_input = GetCurrentItem(p_demux);
-
-    input_item_node_t *p_subitems = input_item_node_Create( p_current_input );
-
-    while( (psz_line = stream_ReadLine( p_demux->s )) )
-    {
-        char *psz_parse = psz_line;
-        /* Skip leading tabs and spaces */
-        while( *psz_parse == ' '  || *psz_parse == '\t' ||
-               *psz_parse == '\n' || *psz_parse == '\r' )
-            psz_parse++;
-
-        /* if the line is the uri of the media item */
-        if( !strncasecmp( psz_parse, "<media src=\"", strlen( "<media src=\"" ) ) )
-        {
-            char *psz_uri = psz_parse + strlen( "<media src=\"" );
-
-            psz_parse = strchr( psz_uri, '"' );
-            if( psz_parse != NULL )
-            {
-                *psz_parse = '\0';
-                resolve_xml_special_chars( psz_uri );
-                psz_uri = ProcessMRL( psz_uri, p_demux->p_sys->psz_prefix );
-                if( psz_uri != NULL )
-                {
-                    input_item_t *p_input;
-
-                    p_input = input_item_NewExt( psz_uri, psz_uri,
-                                                 0, NULL, 0, -1 );
-                    input_item_node_AppendItem( p_subitems, p_input );
-                    vlc_gc_decref( p_input );
-                    free( psz_uri );
-                }
-            }
-        }
-
-        /* Fetch another line */
-        free( psz_line );
-
-    }
-
-    input_item_node_PostAndDelete( p_subitems );
-
-    vlc_gc_decref(p_current_input);
-    var_Destroy( p_demux, "wpl-extvlcopt" );
-    return 0; /* Needed for correct operation of go back */
-}



More information about the vlc-commits mailing list