[MPlayer-dev-eng] Question regarding persistence in vf_overlay
Aleks Huson
aleks.huson at gmail.com
Thu Aug 27 08:24:59 CEST 2009
I've managed to get the vf_overlay patch compiled in and working, however
the filter is being reset on play tree iterations (as per my recent email to
the users list at
http://lists.mplayerhq.hu/pipermail/mplayer-users/2009-August/077632.html).
I'm new to the mplayer codebase, so don't quite understand the order of
things and have been trying to work out why/where this is occurring.
I looked through vf_overlay.c and found the ov_open function which is listed
in the vf_info_t stuct as the open function for the filter instance, and
found libmpcodecs.txt which says that "open() is called when the filter is
appended/inserted in the filter chain"...
My first question is: is it expected that this is called for each file in a
play tree (be it a play list or single file looped)? because it appears to
be in my case.
If it is, then my second question is: within ov_open, should vf->priv be
cleared? the comments at the start of ov_open state:
'vf_overlay instances are intended to be "persistent"; in other words,
they never get ununitialized. This is to allow overlay buffers to survive
loadfile or a loop.'
This implies that the data in vf->priv should remain, however within the
function, vf->priv is cleared, just below a comment: "New filter, so create
and initialize the private data", which implies that ov_open is not
expecting to be called for each file.
This is all most likely down to my lack of understanding about how this all
fits together... but I'd appreciate any light people can shed on this so I
know where to look next.
More information about the MPlayer-dev-eng
mailing list