gstreamer/gst
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
..
alpha alpha: use POFFSET instead of OFFSET 2013-09-23 14:45:23 +02:00
apetag g_memmove() is deprecated 2013-11-21 15:30:34 +00:00
audiofx audioecho: fix example command line 2014-09-08 16:15:32 +01:00
audioparsers aacparse: Fix parsing issue when the buffer does not have a complete ADTS/LOAS frame 2014-09-02 09:43:14 +03:00
auparse gst: Add better support for static plugins 2013-04-15 15:54:11 +02:00
autodetect autovideosrc: use videotestsrc as fallback element instead of fakesrc 2014-06-28 14:25:25 +01:00
avi avidemux: fix crash with certain videos 2014-09-07 12:48:16 +01:00
cutter gst: Don't use endianness-specific S8 audio format 2014-02-04 13:44:29 +01:00
debugutils navseek: Unref peer pad after usage 2014-08-08 15:50:55 -03:00
deinterlace deinterlace: Fix compiler warnings when compiling with G_DISABLE_ASSERT 2014-06-29 19:54:44 +02:00
dtmf g_memmove() is deprecated 2013-11-21 15:30:34 +00:00
effectv effectv: fix doc section of revtv element 2014-02-06 12:21:07 +01:00
equalizer gst: Add better support for static plugins 2013-04-15 15:54:11 +02:00
flv flvmux: Fallback to PTS if DTS is missing 2014-08-28 15:05:56 -04:00
flx flxdec: fix integer overflow 2014-05-02 14:18:08 +01:00
goom goom: Use fabs() instead of abs() to calculate the floating point absolute value 2014-05-19 11:24:06 +02:00
goom2k1 goom: Remove unused functions 2014-02-09 23:38:44 +01:00
icydemux icydemux: Unref dropped events 2014-04-16 18:50:50 +02:00
id3demux gst: Add better support for static plugins 2013-04-15 15:54:11 +02:00
imagefreeze imagefreeze: replace with gst_buffer_copy 2014-09-03 21:33:09 -03:00
interleave interleave: set output caps layout to interleaved 2014-07-29 11:49:32 +02:00
isomp4 qtdemux: mark jpeg and png as parsed so avdec_mjpeg can be used too 2014-09-03 23:08:16 +01:00
law mulawdec: Require caps to be set before accepting any data 2013-12-05 12:15:29 +01:00
level level: Use the correct number of samples to iterate over the input array 2014-04-16 18:50:50 +02:00
matroska matroska-demux: Don't handle parse errors at the end of file as an error 2014-09-05 11:36:30 +03:00
monoscope monoscope: Fix debug statement 2013-04-26 12:16:49 +02:00
multifile docs: remove outdated and pointless 'Last reviewed' lines from docs 2014-04-26 23:35:17 +01:00
multipart multipartdemux: Ensure caps before pad added. 2014-08-29 11:38:19 +03:00
replaygain rgvolume: Avoid taking unnecessary refs 2014-07-16 16:45:43 +02:00
rtp rtph263ppay: Unref pad template caps after use 2014-08-08 16:02:24 -03:00
rtpmanager jitterbuffer: Allow rtp caps without clock-rate 2014-08-21 18:32:58 -04:00
rtsp rtspsrc: Push the correct segment in TCP mode when seeking 2014-08-05 16:28:04 +02:00
shapewipe shapewipe: Unref caps and element after usage 2014-08-10 11:09:09 +01:00
smpte smpte: Check if input caps are the same and create output caps from video info 2014-09-04 10:47:34 +03:00
spectrum docs: remove outdated and pointless 'Last reviewed' lines from docs 2014-04-26 23:35:17 +01:00
udp udpsrc: more efficient memory handling 2014-09-09 17:38:52 +01:00
videobox videobox: Don't overwrite the first component with the alpha value for BGRx 2014-07-19 11:31:45 +02:00
videocrop videocrop: Add support for GRAY16_LE/GRAY16_BE 2013-05-15 09:29:30 +02:00
videofilter videobalance: Allow any raw caps in passthrough mode, not just the ones we handle 2014-08-13 13:25:36 +03:00
videomixer videomixer: Fix synchronization if dynamically changing the FPS 2014-09-04 11:34:26 +03:00
wavenc wavenc: Return not-negotiated if we got no caps or caps negotiation failed 2014-07-10 14:37:31 +02:00
wavparse wavparse: Store size of data tag in a 64 bit integer locally too 2014-08-29 11:55:26 +03:00
y4m y4mencode: Remove dead code 2013-12-30 13:50:35 +01:00
Makefile.am