v4l2src capture/render with single png image captures (dangling reference)

Nicolas Dufresne nicolas.dufresne at collabora.com
Sat Dec 5 08:18:36 PST 2015


Le vendredi 04 décembre 2015 à 22:47 +0000, Steve Evers a écrit :
> Any ideas on what the object reference problem can be when the valve
> is used in this manor?

Maybe worth on which version of GStreamer this is based on. The
references that matters is the device FD that may still be Open. The
most common cause is when a buffer is leaked (or still being used in
your pipeline). If ising GStreamer 1.4+, trace the v4l2allocator
section, and watch for finalize function to be called. If that does not
occure, you have a buffer leak. Sometimes, in dynamic pipeline, it may
happen late, which can be solve by draining the pipeline.

A note on the method to take snapshot. Using valve is a bit racy and
require extra work, which may lead issues like you are facing. The
method I usually recommend is to enable the last-sample property on the
sink. To capture, create a separate encoding pipeline with an appsrc,
read the last-sample and push it through the appsrc.

cheers,
Nicolas
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20151205/4bba0e45/attachment.sig>


More information about the gstreamer-devel mailing list