GNOME Bugzilla – Bug 348752
[udpsrc] add property to set buffer size for udp socket
Last modified: 2006-07-27 10:13:28 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.
Created attachment 69647 [details] [review] udpbuffer patch Udpbuffer to increase speed on embedded devices. (other too) No change in behavior if not set.
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
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,
I think you misread that getsockopt for a setsockopt, the getsockopt is there to print the configured buffer (with or without the custom setsockopt).
Oops, indeed. my mistake.