gstreamer/gst/udp
Tim-Philipp Müller e6f77948ac udpsrc: more efficient memory handling
Drop use of g_socket_get_available_bytes() which is
not useful on all systems (where it returns the size
of the entire buffer not that of the next pending
packet), and is yet another syscall and apparently
very inefficient on Windows in the UDP case.

Instead, when reading UDP packets, use the more featureful
g_socket_receive_message() call that allows to read into
scattered memory, and allocate one memory chunk which is
likely to be large enough for a packet, while also providing
a larger allocated memory chunk just in case the packet
is larger than expected. If the received data fits into the
first chunk, we'll just add that to the buffer we return
and re-use the fallback buffer for next time, otherwise we
add both chunks to the buffer.

This reduces memory waste more reliably on systems where
get_available_bytes() doesn't work properly.

In a multimedia streaming scenario, incoming UDP packets
are almost never fragmented and thus almost always smaller
than the MTU size, which is also why we don't try to do
something smarter with more fallback memory chunks of
different sizes. The fallback scenario is just for when
someone built a broken sender pipeline (not using a
payloader or somesuch)

https://bugzilla.gnome.org/show_bug.cgi?id=610364
2014-09-09 17:38:52 +01:00
..
gstdynudpsink.c udp: improve element descriptions for dynudpsink and multiudpsink 2014-06-18 14:54:58 +01:00
gstdynudpsink.h (dyn|multi)udpsink: Add properties to specify the bind address and port 2013-05-23 18:42:09 +02:00
gstmultiudpsink.c multiudpsink: optimisation: avoid unnecessary memory ref/unrefs 2014-06-20 12:21:05 +01:00
gstmultiudpsink.h multiudpsink: avoid some unnecessary run-time type checks 2014-06-20 12:06:57 +01:00
gstudp.c udp: log WARNING debug message if UDP multicast is likely to be broken 2013-04-27 11:25:12 +01:00
gstudpnetutils.c Fix FSF address 2012-11-04 00:07:18 +00:00
gstudpnetutils.h Fix FSF address 2012-11-04 00:07:18 +00:00
gstudpsink.c udpsink: avoid leaking the host 2013-06-05 12:14:01 +02:00
gstudpsink.h udp: Remove unused enum type 2013-04-25 09:16:14 +02:00
gstudpsrc.c udpsrc: more efficient memory handling 2014-09-09 17:38:52 +01:00
gstudpsrc.h udpsrc: rework memory allocation bits and ensure we always have two chunks of memories to read into 2014-09-09 17:35:38 +01:00
Makefile.am udp: Don't include removed gstudp.h in noinst_HEADERS 2013-04-25 10:43:56 +02:00
README gst/udp/: Update README, simple cleanup. 2006-09-21 09:50:41 +00:00
udp.vcproj more working plugins 2004-07-27 21:41:30 +00:00

* What is UDP src/sink?

It is a set of element to transfer data using UDP, nothing more, nothing less.
Its main purpose is to be used in conjunction with RTP but they are kept as
separate elements because we can.