[vlc-devel] Misuses of vout_Control
rdenis at simphalempin.com
Sat Feb 14 20:47:11 CET 2009
vout_Control() and vout_vaControl() are really just a convenience wrappers
around vout_thread_t->pf_control. As such, it can only -safely- be used:
- after a succesful module_need(),
- before module_unneed(),
- from the video output thread.
Control requests chaining from some video filters is one valid (should be) use
However, the following usages are invalid:
* Maemo and Skins interfaces are reparenting when quitting. They have to
ensure it does not destroy the window too early instead. As of VLC 1.0, the
core ensures video outputs are cleaned up before interfaces.
* WinCE interface is controlling the video window focus this way. This is the
only use of VOUT_SET_FOCUS in the entire tree, and seems to be a hack.
* The zoom and video on top variable handlers in the core are not serialized
properly. They should be synchronized with the video output thread.
* Libvlc provides a video redraw function. I find this request silly. The
video output should redraw transparently as appropriate. The back-end is only
implemented on OSX.
* Libvlc provides two (!!!) video resize functions. I wonder if they ever
worked, as at least the X11 output will automatically resize according to
changes to the parent window size. In any case, these functions should sync
with the video output thread instead of calling vout_Control() directly.
* Libvlc provides a reparenting function. This is known not to work properly.
Also, it will explode if there are several video outputs.
* Libvlc provides an OSX-only window-less output function, which is similarly
I have already fixed snapshots, and removed the VOUT_CLOSE request.
Otherwise, all these bugs may result in crashes and need to be fixed/removed
More information about the vlc-devel