]> git.sesse.net Git - vlc/blobdiff - src/misc/modules.c
* ./src/misc/modules.c: added the --plugin-path option to give vlc an
[vlc] / src / misc / modules.c
index 8b59a3e64571500a68f17b5e933b2fb99be1baa9..0e6ce0d5596a15fd18be6720e205d8771f18aff5 100644 (file)
@@ -2,7 +2,7 @@
  * modules.c : Builtin and plugin modules management functions
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: modules.c,v 1.66 2002/06/07 14:30:41 sam Exp $
+ * $Id: modules.c,v 1.69 2002/06/27 19:05:17 sam Exp $
  *
  * Authors: Samuel Hocevar <sam@zoy.org>
  *          Ethan C. Baldridge <BaldridgeE@cadmus.com>
@@ -53,7 +53,7 @@
 #include "netutils.h"
 
 #include "interface.h"
-#include "playlist.h"
+#include "vlc_playlist.h"
 #include "intf_eject.h"
 
 #include "stream_control.h"
@@ -461,6 +461,7 @@ module_t * __module_Need( vlc_object_t *p_this,
                 break;
 
             case MODULE_CAPABILITY_VOUT:
+            case MODULE_CAPABILITY_VOUT_FILTER:
                 i_ret = p_tmp->p_module->p_functions->vout.functions.
                               vout.pf_create( (vout_thread_t *)p_data );
                 break;
@@ -577,7 +578,8 @@ void module_Unneed( module_t * p_module )
 #ifdef HAVE_DYNAMIC_PLUGINS
 static void AllocateAllPlugins( vlc_object_t *p_this )
 {
-    static char * path[] = { ".", "plugins", PLUGIN_PATH, NULL, NULL };
+    /* Yes, there are two NULLs because we replace one with "plugin-path". */
+    char *          path[] = { "plugins", PLUGIN_PATH, NULL, NULL };
 
     char **         ppsz_path = path;
     char *          psz_fullpath;
@@ -590,6 +592,10 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
     DIR *           dir;
     struct dirent * file;
 
+    /* If the user provided a plugin path, we add it to the list */
+    path[ sizeof(path)/sizeof(char*) - 2 ] = config_GetPsz( p_this,
+                                                            "plugin-path" );
+
     for( ; *ppsz_path != NULL ; ppsz_path++ )
     {
         /* Store strlen(*ppsz_path) for later use. */