Controller doesn't work with volume element.
Nox Deleo
noxdeleo at googlemail.com
Fri Mar 8 13:22:15 PST 2013
If I set up a control binding to the 'volume' property of the volume
element, it reports 'Failed to get values from controller'.
I'm using the following (Python) code.
self.volume_1 = Gst.ElementFactory.make('volume', 'volume_1')
self.volume_2 = Gst.ElementFactory.make('volume', 'volume_2')
self.volume_1_cs = GstController.InterpolationControlSource.new()
self.volume_2_cs = GstController.InterpolationControlSource.new()
self.volume_1.add_control_binding(GstController.DirectControlBinding.new(self.volume_1,
'volume', self.volume_1_cs))
self.volume_2.add_control_binding(GstController.DirectControlBinding.new(self.volume_2,
'volume', self.volume_2_cs))
self.volume_1_cs.set_property('mode', GstController.InterpolationMode.CUBIC)
self.volume_2_cs.set_property('mode', GstController.InterpolationMode.CUBIC)
Could this be related to this thread?:
http://gstreamer-devel.966125.n4.nabble.com/1-0-controller-API-td4571962.html
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.
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:
self.volume_1_cs.set(1 * Gst.SECOND, 1.0)
...and...
successful, time = self.src_1.query_position(Gst.Format.TIME)
self.volume_1_cs.set(time + (1 * Gst.SECOND), 0.0)
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20130308/6107c093/attachment.html>
More information about the gstreamer-devel
mailing list