Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc-2-2
Commits
889c73d0
Commit
889c73d0
authored
Mar 28, 2008
by
Pierre d'Herbemont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
module: Allow multiple paths in --plugin-path (Separated by ':').
parent
21f7e7ea
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
16 deletions
+29
-16
src/libvlc-module.c
src/libvlc-module.c
+2
-1
src/modules/modules.c
src/modules/modules.c
+27
-15
No files found.
src/libvlc-module.c
View file @
889c73d0
...
...
@@ -985,7 +985,8 @@ static const char *ppsz_clock_descriptions[] =
#define PLUGIN_PATH_TEXT N_("Modules search path")
#define PLUGIN_PATH_LONGTEXT N_( \
"Additional path for VLC to look for its modules.")
"Additional path for VLC to look for its modules. You can add " \
"several paths by concatenating them using ':' as separator")
#define VLM_CONF_TEXT N_("VLM configuration file")
#define VLM_CONF_LONGTEXT N_( \
...
...
src/modules/modules.c
View file @
889c73d0
...
...
@@ -912,42 +912,53 @@ void module_PutConfig( module_config_t *config )
#ifdef HAVE_DYNAMIC_PLUGINS
static
void
AllocateAllPlugins
(
vlc_object_t
*
p_this
)
{
/* Yes, there are two NULLs because we replace one with "plugin-path". */
char
*
path
,
*
ppsz_path
,
*
psz_iter
;
#if defined( WIN32 ) || defined( UNDER_CE )
const
char
*
path
[]
=
{
"modules"
,
""
,
"plugins"
,
NULL
,
NULL
}
;
const
char
*
extra_path
=
""
;
#else
const
char
*
path
[]
=
{
"modules"
,
PLUGIN_PATH
,
"plugins"
,
NULL
,
NULL
}
;
const
char
*
extra_path
=
PLUGIN_PATH
;
#endif
const
char
*
const
*
ppsz_path
;
/* If the user provided a plugin path, we add it to the list */
char
*
userpath
=
config_GetPsz
(
p_this
,
"plugin-path"
);
path
[
sizeof
(
path
)
/
sizeof
(
path
[
0
])
-
2
]
=
userpath
;
char
*
userpath
=
config_GetPsz
(
p_this
,
"plugin-path"
);
bool
end
=
false
;
if
(
asprintf
(
&
path
,
"modules%s:plugins:%s"
,
extra_path
,
userpath
)
<
0
)
{
msg_Err
(
p_this
,
"Not enough memory"
);
free
(
userpath
);
return
;
}
for
(
ppsz_path
=
path
;
*
ppsz_path
!=
NULL
;
ppsz_path
++
)
/* Free plugin-path */
free
(
userpath
);
for
(
ppsz_path
=
path
;
!
end
;
)
{
char
*
psz_fullpath
;
if
(
!**
ppsz_path
)
continue
;
/* Look for a ':' */
for
(
psz_iter
=
ppsz_path
;
*
psz_iter
&&
*
psz_iter
!=
':'
;
psz_iter
++
);
if
(
!*
psz_iter
)
end
=
true
;
else
*
psz_iter
=
0
;
#if defined( SYS_BEOS ) || defined( __APPLE__ ) || defined( WIN32 )
/* Handle relative as well as absolute paths */
#ifdef WIN32
if
(
(
*
ppsz_path
)[
0
]
!=
'\\'
&&
(
*
ppsz_path
)[
0
]
!=
'/'
&&
(
*
ppsz_path
)[
1
]
!=
':'
)
if
(
ppsz_path
[
0
]
!=
'\\'
&&
ppsz_path
[
0
]
!=
'/'
)
#else
if
(
(
*
ppsz_path
)
[
0
]
!=
'/'
)
if
(
ppsz_path
[
0
]
!=
'/'
)
#endif
{
if
(
0
>=
asprintf
(
&
psz_fullpath
,
"%s"
DIR_SEP
"%s"
,
vlc_global
()
->
psz_vlcpath
,
*
ppsz_path
)
)
vlc_global
()
->
psz_vlcpath
,
ppsz_path
)
)
psz_fullpath
=
NULL
;
}
else
#endif
psz_fullpath
=
strdup
(
*
ppsz_path
);
psz_fullpath
=
strdup
(
ppsz_path
);
if
(
psz_fullpath
==
NULL
)
continue
;
...
...
@@ -958,10 +969,11 @@ static void AllocateAllPlugins( vlc_object_t *p_this )
AllocatePluginDir
(
p_this
,
psz_fullpath
,
5
);
free
(
psz_fullpath
);
if
(
!
end
)
ppsz_path
=
psz_iter
+
1
;
}
/* Free plugin-path */
free
(
user
path
);
free
(
path
);
}
/*****************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment