[vlc-devel] Abuses of FIND_ANYWHERE

Rémi Denis-Courmont rdenis at simphalempin.com
Sat May 17 11:52:06 CEST 2008


	Hello,

There are a lot of places (in core and in plugins) using FIND_ANYWHERE.

Unfortunately, when there are multiples instances of VLC in the same process, 
this breaks. The object space is currently per-process, not per-instance. 
Hence, one may end up getting an object from a separate instance.

There are a bunch of patologically broken cases:
# The input should be found as a children of the playlist instead. 
FIND_ANYWHERE not only breaks multiple instances, it also breaks VLM.
# The playlist should be found using the dedicated API.
# vouts and aouts should be found as children of the libvlc object, but I 
suppose that might break VLM...
# Interfaces should also be found as children of libvlc object.

There are a few other objects types with similar issues.

As far as I can tell, FIND_ANYWHERE should be used when_and_only_when looking 
up the modules list. Modules are currently attached to module bank singleton, 
which is attached to the global root object.

Most of the abuses of FIND_ANYWHERE are in the interface code. That's bad, but 
not a top priority as interfaces are typically NOT used with multiple VLC 
instances. There are however a few other cases that are just seem plain 
broken: lua, goom, galaktos, record, cmml and most video outputs.

-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list