[gst-devel] adder with multiple RTP multicast streams.

Herb Peyerl hpeyerl+gst at beer.org
Thu Oct 14 23:25:00 CEST 2010


So I'm struggling with this ... Imagine a network of devices with
microphones and speakers.  Each device is running gstreamer.
Devices can come and go over time and the number of devices is not
known in advance... Each device transmits its audio on 224.1.1.1:5000.
Each device receives multiple streams on 224.1.1.1:5000 and uses
gstrtpbin to demux them based on SSRC and wants to feed them into
an adder and sink them on an alsasink.

I understand there's a problem with 'adder' in that it wants to
collect data from all pads before adding anything which violates
my usage model.  I see also that 'liveadder' can accomplish this
in theory.

So as a test, my rtp sources look like this:

gst-launch audiotestsrc is-live=true freq=660 ! audioconvert ! audio/x-raw-int,channels=1,depth=16,width=16,rate=8000 ! rtpL16pay ! udpsink host=224.1.1.1 port=5000
gst-launch audiotestsrc is-live=true freq=330 ! audioconvert ! audio/x-raw-int,channels=1,depth=16,width=16,rate=8000 ! rtpL16pay ! udpsink host=224.1.1.1 port=5000

And I'm using 'adder' in this manner:

gst-launch-0.10 udpsrc multicast-group=224.1.1.1 port=5000 caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)L16,channels=(int)1" !
gstrtpbin ! rtpL16depay ! audioconvert ! adder ! alsasink

my problem is that it only 'works' if I start one of the sources
first, then launch the adder pipeline. Then I get a tone. If I
launch the adder pipeline first and then launch a single audiotestsrc
pipeline next, I get a short 50ms 'bleep' and then silence; presumably
because adder is confused about the sources...

I can't actually seem to add/remove RTP streams dynamically...

The same sort of thing happens with liveadder except that it doesn't
matter the order in which I start the audiotestsrc stream.. But as
soon as I add the second stream, I get the following:

$ gst-launch-0.10 udpsrc multicast-group=224.1.1.1 port=5000 caps="application/x-rtp, media=(string)audio, clock-rate=(int)8000, encoding-name=(string)L16,channels=(int)1" !
gstrtpbin ! rtpL16depay ! audioconvert ! adder ! alsasink
Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
ERROR: from element /GstPipeline:pipeline0/GstUDPSrc:udpsrc0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2507): gst_base_src_loop (): /GstPipeline:pipeline0/GstUDPSrc:udpsrc0:
streaming task paused, reason not-linked (-1)
Execution ended after 245538038 ns.
Setting pipeline to PAUSED ...
Setting pipeline to READY ...
Setting pipeline to NULL ...
Freeing pipeline ...

or more precisely:

0:00:09.701670986 23790 0xb4d11818 LOG           GST_SCHEDULING gstpad.c:4408:gst_pad_push_data:<rtpbin0:recv_rtp_src_0_4055336445_96> pushing, but it was not linked

So I speculate that what I need to do is build a new container that
can catch on-new-ssrc and payload-type-change which will allow me
to construct the recv_rtp_src_%d_%d_%d pad and link it to something...
But I don't know what ...

Anyway, I feel like I'm barking up the wrong tree but it's a big forest
and I can't make sense of the map..

Does anyone have a better pipeline or approach to solving my problem?




More information about the gstreamer-devel mailing list