[vlc-devel] [PATCH 3/3] snapshot: fix copy of opaque pictures
remi at remlab.net
Mon Jun 5 20:58:44 CEST 2017
Le maanantaina 5. kesäkuuta 2017, 18.54.17 EEST Thomas Guillem a écrit :
> > > This will create issues with some hardwares.
> > No. The picture context has always had reference counting internally. It
> > just
> > was never exposed to the core.
> > In other words, a back-end without reference counting can´t use the
> > picture
> > context trick. And it has always been but a trick to make up for the lack
> > of
> > converter, filter and splitter pools.
> Ok but why no ?
> How do you prevent the vout and a filter to use the same
> context for display/reading at the same time ?
I don´t understand what that´s supposed to mean. The core has no means to know
or enforce those constraints, even as things already stand without snapshot
support. Synchronized access is a concern for the back-end to deal with, and
it would likely cause notable performance degradation already with decoder and
renderer running in separate threads.
If however the back-end really can only consume a picture only once at all (as
opposed to once at a time), snapshot would require synchronous copy to CPU,
then a copy back to GPU in a new identical picture for rendering. I would
argue that such a back-end should never be enabled by default and is not worth
supporting snapshot for.
More information about the vlc-devel