udpsrc has no data for windows

William Salibrici bsalibrici at latticeinc.com
Wed Jun 29 17:07:07 UTC 2016


Hi Sebastian,
I did as you suggested. I set the samplesperbuffer=512 on the audiotestsrc. I also set the buffer-size property on udpsrc/udpsink to 1MB. 

Send pipeline now is:
gst-launch-1.0 -e audiotestsrc wave=2 samplesperbuffer=512 ! audio/x-raw,format=S16LE,rate=8000,channels=1 ! udpsink buffer-size=1000000 clients="192.168.1.101:5018"

Receive pipeline now is:
gst-launch-1.0 -e udpsrc address="192.168.1.101" buffer-size=1000000 port=5018 caps="audio/x-raw,format=S16LE,rate=8000,channels=1" ! fakesink dump=TRUE

Still no data displayed for the receiver pipeline on my windows 7 machine!

I attached the new wireshark capture file obtained from the receiver machine which now shows no fragmentation. I think the IP layer does support fragmentation and reassembly but there are a number of possible drawbacks there as well.
 
I followed the udp stream in wireshark [40 packets total for test session] and saved the raw packet data to a file [size 40960 bytes]. I used Audacity [a free, open source, cross-platform software for recording and editing sounds from here:  http://audacity.sourceforge.net/ ] to import the raw audio data, gave it the audio data format, and it plays just fine. 

I used my own C++ udp receiver test app to capture data during the same test session as above and also saved it to a raw file. I compared it to the wireshark capture file and it is identical. This shows that my test app is in fact receiving all the udp data for the no-fragmentation case. 

As I mentioned in an earlier email of our conversation, if I run the sender and receiver on the same machine [windows 7 at gstreamer version 1.8.1] all works well!
 
Regards,
Bill

-----Original Message-----
From: gstreamer-devel [mailto:gstreamer-devel-bounces at lists.freedesktop.org] On Behalf Of Sebastian Dröge
Sent: Tuesday, June 28, 2016 3:34 AM
To: Discussion of the development of and with GStreamer <gstreamer-devel at lists.freedesktop.org>
Subject: Re: udpsrc has no data for windows

On Mo, 2016-06-27 at 15:04 +0000, William Salibrici wrote:

> Sebastian,
> Here is my sender pipeline running on a separate machine:
> 
> gst-launch-1.0 -e audiotestsrc wave=2 ! audio/x-raw,format=S16LE,rate=8000,channels=1 ! udpsink clients="192.168.1.101:5018"
> 
> I'm not sure what the default udp packet size would be for this pipeline.

2048 bytes: 16 bits per sample, 1024 samples per buffer.
Does it work better with samplesperbuffer=512 on the audiotestsrc?

In general it's a bad idea to send UDP packets that are bigger than the MTU, which usually is 1500 bytes (minus UDP header size) or less.


Also try setting the buffer-size property on udpsrc (and maybe the
sink) to some higher value, like 1MB.

> I see from the inspect tool that udpsink has bytes-to-serve and buffer-size properties.
> They both have default values of 0 so it doesn't seem like they would affect the udp packet size.

They are unrelated to the packet size. The packet size is defined by the buffer size that goes into udpsink.

> My own C++ udp receiver test app receives and displays data from the sender pipeline above just fine.

Unlikely that it did with the wireshark capture you just sent though.
However if there is no packet loss, it should indeed work :)

-- 

Sebastian Dröge, Centricular Ltd · http://www.centricular.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: udp-recv-test-2.pcap
Type: application/octet-stream
Size: 43304 bytes
Desc: udp-recv-test-2.pcap
URL: <https://lists.freedesktop.org/archives/gstreamer-devel/attachments/20160629/1a0bc2a9/attachment-0001.obj>


More information about the gstreamer-devel mailing list