[gst-devel] Mixing signals
Ikke
eikke at eikke.com
Wed Apr 13 13:31:47 CEST 2005
> Tristan Van Berkom wrote:
> > Ikke wrote:
> [...]
>
> Slight update,
> I noticed that in gstreamer/examples/mixer/mixer.c, streams
> aren't "added" together before streaming begins; the code looks like
> this:
>
> while (adding streams) {
> pause_stream(); // set to PAUSED state
> create_new_input_stream();
> add_and_link_new_input_stream();
> resume_stream();// set to PLAYING state
> for (i = 0; i < 100; i++)
> gst_bin_iterate ();
> }
>
> And when I do similar, bingo ! I dont get the error about
> non-negotiated pads !
>
> But alas; what happens instead is:
>
> - The firstly added stream starts playin (I can hear about one second)
> - I get about 3 or 4 seconds of garbage mixing (sounds like pressing
> fast-forward on an old tape deck)
> - Only the secondly added stream remains (and plays untill EOS)
>
> The conclusion I'm drawing is that "adder" is an experimental
> spike and needs work (why cant streams be added once before playing ?
> why cant they be played together from frame 1 ?)
>
> Anyone have some tips on where I should start to fix adder ?
> (or is there still some obscenely obvious detail that I'm
> missing ?)
I must confess I did not work any further on this :-$ Thomas' sample
does work great (when changing esdsink to an alsasink because I got no
esd on my system), both the envelope and the adder.
If I find the time I will try playing every stream before adding a new
one. One possible solution for your problem (although I'm not 100% sure
it'll work): add the sources to the adder and start playback whilst you
got a fakesink linked to the src of the adder, then when everything is
added and has played for a while, pause and reset every stream (seek to
frame 0), disconnect the fakesink, link an alsasink or whatever instead,
and start iterating all sources.
This is purely hypothetic, I have no idea whether gstreamer actually
allows you to do this etc.
Regards,
Ikke
http://www.eikke.com
More information about the gstreamer-devel
mailing list