GStreamer-CRITICAL : gst_object_add_control_binding: assertion 'binding->pspec' failed.

vk_gst venkateshkuppan26 at gmail.com
Mon Aug 6 12:05:33 UTC 2018


I am using Gstreamer 1.0 with Python bindings. Below is the pipeline I am
trying to build :

gltestsrc -> gltransformation -> glimagesink
I am trying to modify the properties of element 'gltransformation'
dynamically based on the values received from external hardware device. 
Below is the snippet of the python script :

import gi
gi.require_version('Gst','1.0')
from gi.repository import Gst,GstController

#global variables 
#the values of a,b,c get updated for certain events dynamically based on
external hardware 
a = 0 
b= 0 
c = 0 


source = Gst.ElementFactory.make("gltestsrc", "source") 
gltrnsfrm = Gst.ElementFactory.make("gltransformation","gltrnsfrm") 
sink = Gst.ElementFactory.make("glimagesink", "sink") 

# create the empty pipeline 
pipeline = Gst.Pipeline.new("test-pipeline") 

if not pipeline or not source or not gltrnsfrm or not sink: 
    print("ERROR: Not all elements could be created") 
    sys.exit(1) 

# build the pipeline 
pipeline.add(source,gltrnsfrm,sink) 

if not source.link(gltrnsfrm): 
    print("ERROR: Could not link source to gltrsnfrm") 
    sys.exit(1) 

if not gltrnsfrm.link(sink): 
   print("ERROR: Could not link gltrsnfrm  to sink") 
   sys.exit(1) 

# modify the gltransformation's properties 
gltrnsfrm.set_property("rotation-z",a) 
gltrnsfrm.set_property("rotation-x",b) 
gltrnsfrm.set_property("rotation-y",c) 

#dynamic controller
cs = GstController.InterpolationControlSource()
cs.set_property('mode', GstController.InterpolationMode.LINEAR)
cb= Gstcontorller.DirectControlBinding.new(gltrnsfrm,"rotation-x",cs)
gltrnsfrm.add_control_binding(cb)

#modify the values
cs.set(0*Gst.SECOND,b)  #use updated values of b
cs.set(1*Gst.SECOND,b)

The above example shows only modification of 1 element property, however, I
have other properties as well to be modified based on the values of a,b & c.

Executing the above script gives me the following error:

GStreamer-CRITICAL : gst_object_add_control_binding: assertion
'binding->pspec' failed. 

I think I have to set certain more attributes in python to get this working.
Does anyone have a hand on this issue?



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


More information about the gstreamer-devel mailing list