[gst-devel] help: udpsrc with ip address.

Zibo SHI shizibo at gmail.com
Sat Mar 28 04:12:53 CET 2009


Thank you very much for your reply, Lin.
I change the order of "host=" and "port=" as you said, but the same error
occurs.
The server side seems working normally as before, after I start the server:

gst-launch filesrc location=new0.mpg ! mpegdemux mpegdemux0.video_00 ! {
queue ! udpsink host=127.0.0.1 port=4400 } \
mpegdemux0.audio_00 ! { queue ! udpsink host=127.0.0.1 port=4401 }

Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock

Then the client:
gst-launch udpsrc uri=udp://127.0.0.1:4400 ! { queue ! mpeg2dec !
xvimagesink } \
udpsrc uri=udp://127.0.0.1:4401 ! { queue ! decodebin ! audioconvert !
audioresample ! autoaudiosink }

Setting pipeline to PAUSED ...
JACK tmpdir identified as [/dev/shm]
ERROR: Pipeline doesn't want to pause.
Error: from element:  /pipeline0/udpsrc0:can't get the resource specified.
Debug information:
gstudpsrc.c(825): gst_udpsrc_start (): /pipeline0/udpsrc0:
could add membership -1: invalid parameter (22)
Setting pipeline to NULL ...
FREEING pipeline ...

If I don't use "uri=upd://..." , just "port=" on the client side, everything
goes well.
Where am I wrong, can anybody help me ?

Thanks very much.
=====================================================
Lin wrote:
>
> Hi shirie,
>
> Just tested your pipeline on my machine. It crashes in the latter 3 cases.
>
> However, if we specify the host first and then the port in the udpsink
> properties of server side, the pipeline works just fine. That is, to write
> "host=...." first and  then "port=...."
>
> IMHO, there seems to be a default order in the modification of udpsink's
> properties. I don't know if this is true, but you can refer to the
following
> source: $PLUGIN_GOOD/gst/udp/gstudpsink.c, in function
> gst_udpsink_set_property(). The code is modifying host iff parameter
prop_id
> =1, while prop_id is susceptible to be the order of the modification
> expression.
> I'm using the latest release of plugins-good. Don't know if it is the same
> case for more stable versions.
>
> I'll be very happy to see anyone to prove or disprove my guess.
>
>
> Regards,
> Lin

==================================================================
shirie wrote:
>
> Hi, all. I am a newbie to gstreamer.  I am now trying build a simple
> pipeline to transmit video with udp between two machines.
> Here are what I have done now.
>
> server:
> gst-launch filesrc location=new0.mpg ! mpegdemux mpegdemux0.video_00 ! {
> queue ! udpsink port=4400 } \
> mpegdemux0.audio_00 ! { queue ! udpsink port=4401 }
>
> client:
> gst-launch udpsrc port=4400 ! { queue ! mpeg2dec ! xvimagesink } \
> udpsrc port=4401 ! { queue ! decodebin ! audioconvert ! audioresample !
> autoaudiosink }
>
> I test them in one machine. They work well.
>
> But when I tried to specify the ip address as:
>
> server:
> gst-launch filesrc location=new0.mpg ! mpegdemux mpegdemux0.video_00 ! {
> queue ! udpsink port=4400 host=192.168.0.1} \
> mpegdemux0.audio_00 ! { queue ! udpsink port=4401 host=192.168.0.1 }
> client:
> gst-launch udpsrc uri=udp://192.168.0.1:4400 ! { queue ! mpeg2dec !
> xvimagesink } \
> udpsrc uri=udp://192.168.0.1:4401 ! { queue ! decodebin ! audioconvert !
> audioresample ! autoaudiosink }
>
> Error occurs in the client.
> error: from element /pipeline0/udpsrc0?can't get the resource specified.
> (I
> translate the message from my local language)
>
> gstudpsrc.c(825): gst_udpsrc_start (): /pipeline0/udpsrc0:
> could add membership -1: invalid parameter (22)
>
>
> Even cannot work with using 127.0.0.1 in one machine.
> server:
> gst-launch filesrc location=new0.mpg ! mpegdemux mpegdemux0.video_00 ! {
> queue ! udpsink port=4400 host=127.0.0.1 } \
> mpegdemux0.audio_00 ! { queue ! udpsink port=4401 host=127.0.0.1 }
> client:
> gst-launch udpsrc uri=udp://127.0.0.1 :4400 ! { queue ! mpeg2dec !
> xvimagesink } \
> udpsrc uri=udp://127.0.0.1 :4401 ! { queue ! decodebin ! audioconvert !
> audioresample ! autoaudiosink }
>
> But using "localhost" works,
> gst-launch filesrc location=new0.mpg ! mpegdemux mpegdemux0.video_00 ! {
> queue ! udpsink port=4400 host=localhost } \
> mpegdemux0.audio_00 ! { queue ! udpsink port=4401 host=localhost }
> client:
> gst-launch udpsrc uri=udp://localhost :4400 ! { queue ! mpeg2dec !
> xvimagesink } \
> udpsrc uri=udp://localhost :4401 ! { queue ! decodebin ! audioconvert !
> audioresample ! autoaudiosink }
>
> I'm confused. Can anybody help me?
> Thanks very much.
>
>
------------------------------------------------------------------------------
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
>
>

--
View this message in context:
http://www.nabble.com/help%3A-udpsrc-with-ip-address.-tp22735354p22736689.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090328/c203c306/attachment.htm>


More information about the gstreamer-devel mailing list