Commit 738eb0d8 authored by Petr Kulhavy's avatar Petr Kulhavy Committed by Nicolas Dufresne

udpsrc: switch to using a buffer pool

This exposes a new property, mtu, which is used to determine the
initial size of buffers from the buffer pool. If received data
exceeds this, the element gracefully handles that in a manner similar
to what we had previously: a large memory gets filled and reallocated
at the next call to "fill".

The default size is set to 1500, which should cover most use cases.

With contributions from Mathieu Duponchelle <mathieu@centricular.com>

https://bugzilla.gnome.org/show_bug.cgi?id=772841
parent 589019d8
This diff is collapsed.
......@@ -74,15 +74,11 @@ struct _GstUDPSrc {
gboolean external_socket;
gboolean made_cancel_fd;
/* memory management */
GstAllocator *allocator;
GstAllocationParams params;
GstMemory *mem;
GstMapInfo map;
GstMemory *mem_max;
GstMapInfo map_max;
GInputVector vec[2];
/* Initial size of buffers in the buffer pool */
guint mtu;
/* Extra memory for buffers with a size superior to max_packet_size */
GstMemory *extra_mem;
gchar *uri;
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment