[vlc-devel] vlc: svn commit r25242 (damienf)

Remi Denis-Courmont rem at videolan.org
Thu Feb 21 17:33:05 CET 2008


On Thu, 21 Feb 2008 15:51:48 +0100, Olivier Aubert
<olivier.aubert at liris.cnrs.fr> wrote:
>> libvlc: document that libvlc_new() MUST have a program path in argv[0]
>>From my point of view, using argv[0] to deduce module paths is a lame
> hack, and should be removed in favor of an explicit way of setting this
> (for instance, the --plugin-path option already allows to pass a
> directory to search for plugins).
> 
> An API is intended to provide some level of abstraction over its
> internal mechanism. The argv[0] is an internal mechanism, which should
> be abstracted.

+1

Besides, this makes absolutely no sense. If my program does not know (e.g.
DotNet does not have argv[0], while POSIX does not correlate argv[0] to the
real binary path) or does not care where it's running from, what the heck
can it pass as VLC argv[0]?! putting some dummy value will only cause an
incorrect behavior, as it would be taken as a path hint.

Use --plugin-path, if you need to. If you have a broken platform and don't
want to bother with --plugin-path, then patch LibVLC to find itself
automatically.

-- 
Rémi Denis-Courmont




More information about the vlc-devel mailing list