GNOME Bugzilla – Bug 659073
udpsink: send buffer size not correctly set/get
Last modified: 2012-10-23 18:45:25 UTC
Created attachment 196525 [details] [review] patch Context: last 0.10 commit in git goot plugins => udpsink When debug output is enabled, we get a warning "could not get udp buffer size". If we ask to set the buffer size, the code seems to no be able to do right (not tested). In the source code, set/getsockopt( ..., SO_SNDBUF, ...) fails because the first argument is wrong. We have to use sink->sock and not sink->sockfd. A patch is attached. By the way, on gst/udp/gstmultiudpsink.c line 630, we have: msg.msg_name = (void *) &client->theiraddr; msg.msg_namelen = sizeof (client->theiraddr); ret = sendmsg (*client->sock, &msg, 0); So, we use sizeof(sockaddr_storage) in struct msghdr and, in my opinion, it is not correct. For shure, this not works on osx with IP4 addresses. So, I put a TODO in the patch. Command used to produce the problem on osx: gst-launch-0.10 videotestsrc ! video/x-raw-rgb,framerate=30/1 ! ffmpegcolorspace ! vp8enc speed=2 ! rtpvp8pay ! udpsink port=1234 host=192.168.1.34 sync=false async=false --gst-debug=multiudpsink:9
Please use /* */ for comments. Also, please use 'git format-patch' to create patches from a git commit, as it includes author information and will be indented correctly.
Created attachment 196903 [details] [review] patch in the right format Patch reposted in the right format, sorry.
Looks like this is fixed now in 1.0 (where we ported things to the GLib/GIO socket API). Sorry we didn't get to this sooner. Please re-open or file a new bug if there are still things to fix in GStreamer with the 1.0 multiudpsink, thanks!