[vlc-devel] [PATCH 3/3] snapshot: fix copy of opaque pictures

Thomas Guillem thomas at gllm.fr
Mon Jun 5 18:19:13 CEST 2017

On Mon, Jun 5, 2017, at 18:10, Rémi Denis-Courmont wrote:
> Le maanantaina 5. kesäkuuta 2017, 19.02.22 EEST Rémi Denis-Courmont a
> écrit :
> > Stating the obvious here, but the patch does not do what the commit title
> > implies.
> > 
> > AFAICT, there are essentially only two way to handle copying of pictures
> > with an opaque context: the very obvious but very slow way and the rather
> > obvious and very fast way. And that means either adding a copy callback
> > (slow), or replacing the destroy callback with a pair hold/release
> > callbacks.
> (The "correct" way is to perform a shallow copy of the context. A pure 
> reference counter would interfere with context changes in VDPAU filters.)

This means that the same context will be used simultaneously by the
video output and by a video filter (via the video converter needed for
the image encoder).

This will create issues with some hardwares. For example, I don't know
if we can display directly a apple CVPX buffer while the same buffer is
mapped for readonly by a filter.
That is why I didn't want to copy the context.

An other way is to wait for the picture to be released by the vout and
pass the ownership to the snaphost handler, but this will trigger some
delays when the video is paused or laggy.

> -- 
> 雷米‧德尼-库尔蒙
> https://www.remlab.net/
> _______________________________________________
> 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