[gst-devel] udpsrc odd behaviour building a pipeline with two streams

Tiago Katcipis katcipis at inf.ufsc.br
Thu Nov 12 00:15:11 CET 2009


I'm building a pipeline to use on a voip application, i started building a
very simple one, one stream generates the audio and sends it with udpsink
the other receives audio at udpsrc and play it at pulsesink. For test
purposes i send the audio to myself. But the odd thing is that it only works
when i use separated pipelines to build the send and the receive streams.

For example, the following works fine:

*gst-launch -v audiotestsrc ! identity ! audioconvert !
audio/x-raw-int,rate=44100,channels=1,endianness=1234,width=16,depth=16,signed=true
! udpsink host=127.0.0.1 port=5000
gst-launch udpsrc port=5000
caps="audio/x-raw-int,rate=44100,channels=1,endianness=1234,width=16,depth=16,signed=true"
! identity ! pulsesink*

But if i use only one pipeline to do the work, it starts just ok....but
nothing happens (and no data pass through the identity0 or identity1)

*gst-launch -v audiotestsrc ! identity ! audioconvert !
audio/x-raw-int,rate=44100,channels=1,endianness=1234,width=16,depth=16,signed=true
! udpsink host=127.0.0.1 port=5000 udpsrc port=5000
caps="audio/x-raw-int,rate=44100,channels=1,endianness=1234,width=16,depth=16,signed=true"
! identity ! pulsesink

*I think it is something with udpsrc because if i try:*
*
*gst-launch -v audiotestsrc ! identity ! audioconvert !
audio/x-raw-int,rate=44100,channels=1,endianness=1234,width=16,depth=16,signed=true
! fakesink udpsrc port=5000
caps="audio/x-raw-int,rate=44100,channels=1,endianness=1234,width=16,depth=16,signed=true"
! identity ! pulsesink*

it will not work too, no data reaches the fakesink.

but if i try

*gst-launch -v audiotestsrc ! identity ! audioconvert !
audio/x-raw-int,rate=44100,channels=1,endianness=1234,width=16,depth=16,signed=true
! udpsink host=127.0.0.1 port=5000 audiotestsrc ! identity ! pulsesink*

it works just fine. It sens that for some reason the udpsrc makes the entire
pipeline stop, no data flows on either streams.

I tought it could be some error on pulse with udpsrc, but:

*gst-launch -v audiotestsrc ! identity !
audio/x-raw-int,rate=44100,channels=1,endianness=1234,width=16,depth=16,signed=true
! fakesink udpsrc port=5000
caps="audio/x-raw-int,rate=44100,channels=1,endianness=1234,width=16,depth=16,signed=true"
! identity ! fakesink*

wont work either, but if i run on separated gst-launch, it works fine.


i even have made some source code to test this, the same example that works
on different pipelines wont work if it is made on only one pipeline.

The ok code:
https://svn.inf.ufsc.br/katcipis/c/gstreamer/pipe_voip_ok

The error code:
https://svn.inf.ufsc.br/katcipis/c/gstreamer/pipe_voip_error

the odd thing is that even if udpsrc didn't receive any data, why is udpsrc
blocking the entire pipe?

hope someone can help me see what I'm doing wrong.


best regards,
Katcipis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20091111/efe75fe0/attachment.htm>


More information about the gstreamer-devel mailing list