Getting data from buffer to pass to another function/process outside of Gstreamer

Nicolas Dufresne nicolas at ndufresne.ca
Fri May 19 08:10:27 UTC 2017


Le jeudi 18 mai 2017 à 12:45 -0700, dayunbao a écrit :
> Hi all,
> 
> I have a pipeline that basically looks like this:
> 
> v4l2src -> videorate -> jpegenc -> queue -> jifmux -> multifilesink
> 
> I'm capturing a frame once a second from a web cam, and saving is as
> a JPEG. 
> I've also added a probe to the source pad of the JPEG encoder, so
> whenever
> the buffer is pushed downstream I can have a function called to do
> something.  What I'd also like to do is copy the data from the buffer
> /before it is encoded by the JPEG encoder/ so I can pass it off to
> another
> program for some separate image processing.  I think this should be
> relatively easy, and I've read about the identity plug in, and its
> dump
> function, as well as the GSTBuffer's gst_buffer_copy_deep ()
> function, but
> I'm not sure what is the best way to do this.  Does anyone have any
> suggestions?

You could also use tee and appsink:

 v42lsrc ! tee name=t
    t. ! queue ! jpegenc ! ...
    t. ! queue ! appsink

> 
> Thanks!
> 
> 
> 
> --
> View this message in context: http://gstreamer-devel.966125.n4.nabble
> .com/Getting-data-from-buffer-to-pass-to-another-function-process-
> outside-of-Gstreamer-tp4683038.html
> Sent from the GStreamer-devel mailing list archive at Nabble.com.
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
-------------- 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: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20170519/ceb9fbd7/attachment.sig>


More information about the gstreamer-devel mailing list