[vlc-devel] [PATCH] filter: add a pf_close callback

Alexandre Janniaux ajanni at videolabs.io
Fri Jul 17 12:00:48 CEST 2020


Hi,

IMHO this is too much work to do it in one time, and then
we might also move the pf_ callbacks into a dedicated vtable.

I particularily know it's very long because I already tried
moving those, and basically spent 3 hours on it. And I don't
think the work is worth it to do it multiple time or just for
the pf_close callback.

I'd prefer doing this incrementally since it will always be
possible to define the module deactivate callback, and add
an assert when it's done.

Regards,
--
Alexandre Janniaux
Videolabs

On Fri, Jul 17, 2020 at 11:35:13AM +0200, Thomas Guillem wrote:
> Yes, specific close callbacks are the new way to go, but I don't like having both pf_close and module deactivate for filters.
>
> You should replace all module deactivate callbacks by pf_close in your commit.
>
>
> On Fri, Jul 17, 2020, at 11:24, Alexandre Janniaux wrote:
> > Hi,
> >
> > For now it's conservative, it calls pf_close() if it is set
> > before calling filter's deactivate if there is one.
> >
> > One can port any filter from deactivate to pf_close by setting
> > pf_close and using set_callback instead of set_callbacks, without
> > modifying the other filter.
> >
> > What we need to keep in mind is that module_unneed is calling
> > vlc_objres_clear() which we cannot call outside of the core.
> >
> > Regards,
> > --
> > Alexandre Janniaux
> > Videolabs
> >
> > On Fri, Jul 17, 2020 at 10:55:18AM +0200, Francois Cartegnie wrote:
> > > Le 17/07/2020 à 10:30, Alexandre Janniaux a écrit :
> > > > Having a pf_close callback associated to the object instead of the
> > > > module allows a filter to wrap any other filter transparently.
> > > >
> > > > In particular, this is a central piece in order to expose other
> > > > capability kind of filter as a filter_t video filter using a wrapping
> > > > filter_t video filter implementation.
> > > > ---
> > >
> > > Does it need to change the whole (activate deactivate) for (open close
> > > filter) ?
> > >
> > > --
> > > Francois Cartegnie
> > > VideoLAN - VLC Developer
> > > _______________________________________________
> > > vlc-devel mailing list
> > > To unsubscribe or modify your subscription options:
> > > https://mailman.videolan.org/listinfo/vlc-devel
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list