[vlc-devel] [PATCH] Remove --services-discovery

Rémi Denis-Courmont remi at remlab.net
Sat May 28 16:29:34 CEST 2011


Modules list was intended for plain static module names. It does not
work right for most SD plugins, including:
 - LUA (dependent on string chain),
 - udev (submodules),
 - media directories (submodules).

It works but is totally useless for those plugins that are fast,
including XCB screen capture and Windows optical drives.

For network-based discovery and MTP, it could be used to prefetch
items. But this is not necessarily a good idea as it sends extra
network traffic and consumes memory even when the services discovery
is not used. Furthermore, podcast can prevent Qt4 and Skins2 UI from
starting, as it depends on HTTP which depends on libproxy which
depends on Xlib.
---
 src/libvlc-module.c |    9 +--------
 src/libvlc.c        |   10 ----------
 2 files changed, 1 insertions(+), 18 deletions(-)

diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index 3756b10..fc08d33 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -1251,11 +1251,6 @@ static const char *const ppsz_albumart_descriptions[] =
       N_("When track starts playing"),
       N_("As soon as track is added") };
 
-#define SD_TEXT N_( "Services discovery modules")
-#define SD_LONGTEXT N_( \
-     "Specifies the services discovery modules to load, separated by " \
-     "colons. Typical values are sap, hal, ..." )
-
 #define RANDOM_TEXT N_("Play files randomly forever")
 #define RANDOM_LONGTEXT N_( \
     "VLC will randomly play files in the playlist until interrupted.")
@@ -2128,9 +2123,7 @@ vlc_module_begin ()
                              ppsz_albumart_descriptions )
 
     set_subcategory( SUBCAT_PLAYLIST_SD )
-    add_module_list_cat( "services-discovery", SUBCAT_PLAYLIST_SD, NULL,
-                         SD_TEXT, SD_LONGTEXT, false )
-        change_short('S')
+    add_obsolete_string( "services-discovery" ) /* Obsolete since 1.1.10 */
 
 /* Interface options */
     set_category( CAT_INTERFACE )
diff --git a/src/libvlc.c b/src/libvlc.c
index 6097529..59229f5 100644
--- a/src/libvlc.c
+++ b/src/libvlc.c
@@ -826,16 +826,6 @@ int libvlc_InternalInit( libvlc_int_t *p_libvlc, int i_argc,
     }
 #endif
 
-    /* Add service discovery modules */
-    psz_modules = var_InheritString( p_libvlc, "services-discovery" );
-    if( psz_modules )
-    {
-        char *p = psz_modules, *m;
-        while( ( m = strsep( &p, " :," ) ) != NULL )
-            playlist_ServicesDiscoveryAdd( p_playlist, m );
-        free( psz_modules );
-    }
-
 #ifdef ENABLE_VLM
     /* Initialize VLM if vlm-conf is specified */
     psz_parser = var_CreateGetNonEmptyString( p_libvlc, "vlm-conf" );
-- 
1.7.5.3




More information about the vlc-devel mailing list