[vlc-devel] [PATCH] filter: add a pf_close callback
remi at remlab.net
Fri Jul 17 16:04:36 CEST 2020
Le perjantaina 17. heinäkuuta 2020, 16.58.26 EEST Alexandre Janniaux a écrit :
> I first switched filter_t to an op structure, which is painful too
> to bring at once (~80 filters), but I reached issues when it comes
> with function having multiple different pf_filter callback (especially,
> video converter) and didn't come up with a decision between not doing
> this, doing memory allocation of the vtable or a generic pf_filter
> switching the real filter functions.
> The last one seems reasonable, but is a bit ugly in comparison with
> the current implementation. But the goal of not switching all filters
> right now is especially to avoid doing this job twice yes.
There are two ways:
- recreate a pf_filter pointer in the private data for the affected cases, or
- maintain separate op objects for each case.
It's like deciding between function pointers or separate classes in C++.
I'm in favor of the patch. I just fear it creates more churn and work in that
More information about the vlc-devel