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 659073 - udpsink: send buffer size not correctly set/get
udpsink: send buffer size not correctly set/get
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Mac OS
: Normal normal
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-09-14 16:41 UTC by Gabriele Mondada
Modified: 2012-10-23 18:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch (1.62 KB, patch)
2011-09-14 16:41 UTC, Gabriele Mondada
none Details | Review
patch in the right format (1.98 KB, patch)
2011-09-19 08:24 UTC, Gabriele Mondada
none Details | Review

Description Gabriele Mondada 2011-09-14 16:41:13 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
Comment 1 David Schleef 2011-09-17 19:48:33 UTC
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.
Comment 2 Gabriele Mondada 2011-09-19 08:24:58 UTC
Created attachment 196903 [details] [review]
patch in the right format

Patch reposted in the right format, sorry.
Comment 3 Tim-Philipp Müller 2012-10-23 18:45:25 UTC
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!