Dynamic mixing using Adder

SimonKay simon.Kraushaar at callvision-tech.com
Fri Oct 24 04:48:29 PDT 2014


I have what i believe should be a very straightforward problem. I've searched
the mailing list and while there do seem to be some people with a similar
issue I can't find a resolution.

What i'm trying to do is to dynamically link and unlink my own custom
sourcebin to an adder . this allows me to dynamically add and remove
different sources in real time and produce meraged audio. Each sourcebin has
its own volume module so I can control the levels like a recording studios
desk mixer.

the sink end of the pipe is as follows :

adder ! autoaudiosink

I have not added this to a bin( only the pipeline) as I want to make use of
the request pad creation in the adder.

the Source bin is as follows : 

appsrc ! audioparse ! mulawdec ! volume --> ghostpad

I create a ghost pad which i link to the volume and the adder request pad
which seems to be created dynamically upon linking.

When my application detects a new inbound audio stream I create a new
instance of my bin, add it to the pipeline and link it to my adder. I then
start pushing data into the appsrc. This all works fantastic with a single
source bin. I can add and remove the bin ( I use a pad_probe on the adder
pad to do this and send an eos to it, when that recieved I unlink and remove
the bin from the pipeline at the same time, setting it to GST_STATE_NULL)
and the stream starts and stops as expected.

I can also add a second bin to the pipe, the adder merges the channels as
expected. I can control the volume independantly on each stream. All
fantastic.

The problem comes when I have multiple srcbins, remove one but then try and
add another. I can still hear the connected stream , but nothing from the
new bin. Now I've checked and the bin is in the playing state, and is linked
as expected. it all looks fine from what I can tell. However when i try and
send eos to this new stream i get a negative response from the call;

gst_pad_send_event(adderpad, gst_event_new_eos());

Its as if the second srcbin never successfully linked to the sinkbin after
all but at no point can i identify during the linking process that this has
been the case.

If anyone can help with this I'd really appreciate some guidance. I'm using
the latest and greatest (1.4.3) and assumed this is a perfect normal thing
to be trying to do?

 









--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Dynamic-mixing-using-Adder-tp4669147.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.


More information about the gstreamer-devel mailing list