Pause and resume live video with latest frames without affecting the sink

vk_gst venkateshkuppan26 at gmail.com
Mon Aug 27 10:11:04 UTC 2018


Hi Nicolas,


I use the callback with the IDLE probe only for adding 'imagefreeze'
element. For deletion I do not use a probe callback. Based on user input, I
just unlink, set state to NULL for imagefreeze, and link back 'glupload' and
'identity'(The identity does nothing here, just passes the data without
blocking anything as opposed to previous trials I did). Here are excerpts
from my  dynamic_link.dynamic_link
<http://gstreamer-devel.966125.n4.nabble.com/file/t378365/dynamic_link.dynamic_link> 
:  

The pseudo code that I am following : 

def get(self):
	if user input == 1: #insert image freeze
		# get identity source pad, no toggling of identity element, so its just a
dummy element for now passing all the data that flows through it without
restricting.
		self.idsrcpad = self.identity.get_static_pad("src")
		# variable to restrict the probe callback to once
		self.in_idle_probe = False 
		self.probeID =
self.idsrcpad.add_probe(Gst.PadProbeType.IDLE,self.modify_pipeline)
	
	if user input == 2: #remove  image freeze
		self.shorten_pipeline()

def modify_pipeline(self,pad,info):
	# unlink upload and identity
	# insert  imagefreeze and link src and sink pads to identity and upload
respectively
	# works fine.


def shorten_pipeline(self):

	# 1. unlink identity - image freeze
	# 2. unlink image freeze - upload
	# 3. link identity - upload




1. Do you see any mistakes in this process ? 
2. Do I need a block probe callback for deletion of imagefreeze as well ? 
Please correct me accordingly.

Regards.



            




--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list