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 670130 - udpsink: add "src-port" property to force UDP source port
udpsink: add "src-port" property to force UDP source port
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal enhancement
: 1.1.x
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2012-02-15 12:01 UTC by Marc Leeman
Modified: 2013-08-21 19:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch 1/2 (9.31 KB, patch)
2012-02-15 12:01 UTC, Marc Leeman
rejected Details | Review
patch 2/2 (4.90 KB, patch)
2012-02-15 12:01 UTC, Marc Leeman
rejected Details | Review

Description Marc Leeman 2012-02-15 12:01:01 UTC
Created attachment 207618 [details] [review]
patch 1/2

Allowing to force the UDP source port allows passing through restrictive firewalls e.g.

network A --> GST --> FW A ---...---> FW B --> GST --> network B

Enabling this option allows to use GST to tunnel the data over unicast through the firewalls.

Note that the src-port needs to be set before other options to avoid autobinding of the socket to a random port.
Comment 1 Marc Leeman 2012-02-15 12:01:24 UTC
Created attachment 207619 [details] [review]
patch 2/2
Comment 2 David Schleef 2012-02-15 21:10:18 UTC
Is the second patch on top of the first?

I don't think it's a good idea to fall back to a random port if the port requested cannot be bound (second patch).

First patch looks good.
Comment 3 Marc Leeman 2012-02-15 21:38:30 UTC
Yes, the second patch is on top of the first one.

From what I read; a socket is unusable once you try to bind to a wrong source port; hence the fall back to dynamic.

But simply failing could also work; the fallback can also be handled from the application or higher level bins.
Comment 4 Paul HENRYS 2012-12-19 21:56:52 UTC
In GStreamer 0.10, the property "sockfd" can be used with udpsink to pass a file descriptor from a socket previously allocated which could bind on a specific port.

In Gstreamer 1.0, the property "socket" can be used in the same goal to pass a GSocket instance which would bind on a specific port.

Then, it might be more straightforward to use a "src-port" property and not to have to instantiate the socket itself.
Comment 5 Sebastian Dröge (slomo) 2013-08-21 19:14:14 UTC
There's a "bind-port" and "bind-address" property for this now.