<div dir="ltr">If I set up a control binding to the 'volume' property of the volume element, it reports 'Failed to get values from controller'.<div><br></div><div>I'm using the following (Python) code.<br>
<div><div><br></div><div><div>self.volume_1 = Gst.ElementFactory.make('volume', 'volume_1')</div><div>self.volume_2 = Gst.ElementFactory.make('volume', 'volume_2')</div></div><div><br></div>
<div><div>self.volume_1_cs = GstController.InterpolationControlSource.new()</div><div>self.volume_2_cs = GstController.InterpolationControlSource.new()</div><div>self.volume_1.add_control_binding(GstController.DirectControlBinding.new(self.volume_1, 'volume', self.volume_1_cs))</div>
<div>self.volume_2.add_control_binding(GstController.DirectControlBinding.new(self.volume_2, 'volume', self.volume_2_cs))</div><div>self.volume_1_cs.set_property('mode', GstController.InterpolationMode.CUBIC)</div>
<div>self.volume_2_cs.set_property('mode', GstController.InterpolationMode.CUBIC)</div></div><div><br></div><div>Could this be related to this thread?:</div><div><a href="http://gstreamer-devel.966125.n4.nabble.com/1-0-controller-API-td4571962.html" target="_blank">http://gstreamer-devel.966125.n4.nabble.com/1-0-controller-API-td4571962.html</a></div>
</div></div><div><br></div><div style>I'm able to work around this using the audioamplify plugin for now, but it seems I'm still not getting the controller stuff to work. I don't think I'm grasping exactly how the whole controller thing works, despite taking a look at a design doc and a few code examples.</div>
<div style><br></div><div style>What I'm trying to do is implement a smooth crossfade between two audio sources a few seconds before the end of the currently playing one. So I've set up control sources as above (save for using linear interpolation with audioamplify instead), and I've been trying to get the volumes to change using code like this:</div>
<div style><br></div><div style>self.volume_1_cs.set(1 * Gst.SECOND, 1.0)<br></div><div style>...and...</div><div style><div>successful, time = self.src_1.query_position(Gst.Format.TIME)</div><div>self.volume_1_cs.set(time + (1 * Gst.SECOND), 0.0)</div>
<div><br></div><div style>The functions return true, so they say they're doing things, but I can't hear any difference. I just can't get my head around how this all works. Apologies if I'm just being dense.</div>
</div>
</div>