[Bug 563323] [udpsink] reduced cpu usage when using a connected socket

GStreamer (bugzilla.gnome.org) bugzilla at gnome.org
Thu Jul 7 15:23:52 PDT 2011


https://bugzilla.gnome.org/show_bug.cgi?id=563323
  GStreamer | gst-plugins-good | git

Aurelien Grimaud <gstelzz> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |gstelzz at yahoo.fr

--- Comment #6 from Aurelien Grimaud <gstelzz at yahoo.fr> 2011-07-07 22:23:45 UTC ---
For udpsrc, recvfrom with no address is ok.
When receiving RTP packets, I do not need the sender address because I already
know it (that's why I connected my socket).
PROP_IS_CONNECTED is therefore a mean to say we do not need the source address,
and enhance performance by not copying address.
Maybe a better name would be PROP_GET_SOURCE_ADDRESS ?

For udpsink, sendto with no address will fail, so there is a need to know
wether socket is connected or no.
There is sure a way to check wether the socket is connected or not (available
in /proc/net/udp for instance).

Checking wether socket is connected or not each time one must send a packet
will not improve performance as expected by removing the address from sendto.

Checking wether the socket is connected or not the first time one send a packet
could be ok, but socket can be un-connected and sendto will fail. The fall back
mechanism is a bit too complicated for the goal to achieve : do not set address
in sendto ...

The application is the one connecting and unconnecting the socket, it should
set the flag IS_CONNECTED to true or false whenever doing it if it looks for
performance enhancement. This is the simpliest way to do it.

In fact, I do not use udpsrc nor udpsink but appsrc fed by epoll/recv and
fakesink with a handoff signal.

-- 
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the gstreamer-bugs mailing list