After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 348752 - [udpsrc] add property to set buffer size for udp socket
[udpsrc] add property to set buffer size for udp socket
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal enhancement
: 0.10.4
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-07-26 09:13 UTC by Thijs Vermeir
Modified: 2006-07-27 10:13 UTC
See Also:
GNOME target: ---
GNOME version: Unversioned Enhancement


Attachments
udpbuffer patch (3.70 KB, patch)
2006-07-26 09:15 UTC, Thijs Vermeir
committed Details | Review

Description Thijs Vermeir 2006-07-26 09:13:36 UTC
It is possible to implement a buffer on the udp socket.
This will increase speed on embedded devices.

If the buffer size is not given no additional space will be asked and the element will behave as before. If the buffer parameter is set then this MB will be asked to the kernel to use as udp buffer.

patch attached.
Comment 1 Thijs Vermeir 2006-07-26 09:15:42 UTC
Created attachment 69647 [details] [review]
udpbuffer patch

Udpbuffer to increase speed on embedded devices. (other too)
No change in behavior if not set.
Comment 2 Wim Taymans 2006-07-27 09:07:47 UTC
Thanks! Changed property to be in byte units since the kernel typically accepts
buffer sizes from 128 bytes to 102K. Also print the configured buffer in the
debug.

            Patch by: Thijs Vermeir <thijs dot vermeir at barco dot com>

            * gst/udp/gstudpsrc.c: (gst_udpsrc_class_init), (gst_udpsrc_init),
            (gst_udpsrc_create), (gst_udpsrc_set_property),
            (gst_udpsrc_get_property), (gst_udpsrc_start):
            * gst/udp/gstudpsrc.h:
            Added "buffer" property to control the kernel receive buffer size.
            Update documentation.
            Small cleanups. Fixes #348752.
            API: buffer property

Comment 3 Thijs Vermeir 2006-07-27 09:30:25 UTC
Thanks, for accepting my patch.

But I think you made a mistake :
now there is twice 
setsockopt (src->sock, SOL_SOCKET, SO_RCVBUF, (void *) &rcvsize, len)
I think the second one can be discarded because &rcvsize not always have the wright value in it.

Gr,
Comment 4 Wim Taymans 2006-07-27 09:52:04 UTC
I think you misread that getsockopt for a setsockopt, the getsockopt is there to print the configured buffer (with or without the custom setsockopt).
Comment 5 Thijs Vermeir 2006-07-27 10:13:28 UTC
Oops, indeed. my mistake.