[gst-devel] Mixing signals

Tristan Van Berkom tvb at gnome.org
Wed Apr 13 11:26:44 CEST 2005


Ikke wrote:
> Hija,
> 
> Today I've been playing around with the different elements in GStreamer
> I'd need to create some sort of "sound mixer", mixing several input
> signals together to one output (alsasink).
> 
> The setup I tried to produce:
> 
> src1  ---->   volume control 1   \
>                                   \---->   adder   ---->   alsasink
>                                   / 
> src2  ---->   volume control 2   /
> 
> (I hope this renders correctly in your mail reader)
> 
> First I tried to get 2 sinesrc's (with a different frequency, playing
> with sines is easy) working together. I *think* that worked (the output
> was crippled though, I guess because of phase differences before the
> adder).
> 
> Now I tried mixing 2 MP3 files together (source code attached, you need
> "test1.mp3" and "test2.mp3" in PWD of course). This just doesn't work. I
> can play one file or the other, just by not linking one of the volume
> controls to the adder (but I do register a sink on the adder), but when
> I link both volume src's to 2 sinks of the adder, I get this GStreamer
> message:
> 
> (process:17870): GStreamer-WARNING **: pushing data on non-negotiated
> pad decoder1:src, not allowed.
> 
> No output is generated at all.

I second that motion, I have a setup like this:

+----------------------------------------------------------------------+
| +---------------------------+                                        |
| | filesrc -> decrypt -> mad |                                        |
| +---------------------------+                                        |
|                            \                                         |
|                           adder -> scaler -> converter -> alsasink   |
|                            /                                         |
| +---------------------------+                                        |
| | filesrc -> decrypt -> mad |                                        |
| +---------------------------+                                        |
+----------------------------------------------------------------------+

(Note that decrypt is just a simple plugin I wrote to
decrypt encrypted mp3 streams)

And I get the same behaviour, I use a GstBin for the
"filesrc -> decrypt -> mad" part and use src ghostpads to
link with the adder (similar to the mixer example in gstreamer
package) and still the same results.

Ikke, did you end up solving this problem on your own ?

anyone have an idea what we are doing wrong with the adder ?

Cheers,
                           -Tristan





More information about the gstreamer-devel mailing list