Probing the element UDP source when no data exists on the port.
vk_gst
venkateshkuppan26 at gmail.com
Wed Sep 19 12:05:13 UTC 2018
Hi James,
With the timeout, I can detect the loss of connection and take appropriate
actions. But once the connection is back, I am unable to resume the live
feed. The detection mechanism for the flow I used is adding probes on the
udpsrc, which does not work in my case.
For eg: my pipeline is a decoupled pipeline.
Pipeline_src = udpsrc ! rtph264depay ! h264parse ! avdec_h264 !
intervideosink
Pipeline_sink = intervideosrc ! gltransformation ! glimagesink
When the timeout at udp source occurs, I pause the 'pipeline_src'(in the
callback function), because I need to apply gltransformation on the last
received video frame. This works perfectly fine, with the udpsrc timeout and
timeout callback.
Now to detect, the flow of data through udpsrc, I installed a probe that
probes each BUFFER. But since the pipeline is in paused state, I think the
probes do not work when there is data again at the udpsrc.
#psuedo code :
# __init__(self):
#add probe on UDP src
self.mainsrc = self.pipeline_src.get_by_name('source')
self.srcpad = self.mainsrc.get_static_pad('src')
self.probeID = self.srcpad.add_probe(Gst.PadProbeType.PUSH,
self.probe_cb)
# udp source timeout callback
def on_timeout(self, bus, msg):
print("UDP timeout occured")
Pipeline_src.set_state(Gst.State.PAUSED)
#loop that applies gltansformation
def apply_gl(self):
self.trnsfrm.set_property("translation-x",xxx)
#probe callback
def probe_cb(self):
Pipeline_src.set_state(Gst.State.PLAYING)
So is there a way to make the probes work even when the pipeline is PAUSED.
Or is there a workaround?
Regards
--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/
More information about the gstreamer-devel
mailing list