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

dayunbao dayunbao at gmail.com
Tue May 23 18:36:38 UTC 2017


Thanks for input everyone.  I think I'm going to go with using an identity
element, as it seems simpler.  I'm not entirely sure how to catch and manage
the identity's handoff signal, though.  There seems to be a few different
ways of dealing with signals/callbacks/handoffs in GStreamer.  In my code so
far, I have a call to add_signal_watch() and connect() on the bus element. 
I also have an add_probe() call that takes a callback function as an
argument.  However, I'm not sure what to use for the identity element's
handoff signal.  I'm using Python bindings for GStreamer, by the way.

Excluding the code for all the other elements in my pipeline, here's what I
know to do for the identity element:

#Create it
self.identity = Gst.ElementFactory.make('identity', 'identity')

#I know it defaults to True, but explicitly setting it for documentation
purposes
self.identity.set_property('signal_handoffs', True)

#add it to the pipeline
self.pipeline.add(self.identity)

#link it with other elements
self.previousElementInPipeline.link(self.identity)
self.identity.link(self.nextElementInPipeline)

def functionToBeCalledWhenHandoffMessageReceived(self, args):
   doSomething()

#How do I link the above function with the identity element's handoff
message?
#Like this???
self.identity.connect('handoff',
self.functionToBeCalledWhenHandoffMessageReceived)

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-tp4683038p4683084.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list