Commit 589019d8 authored by Petr Kulhavy's avatar Petr Kulhavy Committed by Nicolas Dufresne

udpsrc: optimize GstUdpSrc object for cache performance

Optimize GstUdpSrc for cache performance.

Move the hot properties, which are used by the read function, to the top:
@used_socket, @addr, @cancellable, @skip_first_bytes, @timeout,

Remove the unused property @ttl.

Where needed reorder so that holes are avoided (the 64-bit @timeout)
parent 850e6788
......@@ -47,32 +47,32 @@ typedef struct _GstUDPSrcClass GstUDPSrcClass;
struct _GstUDPSrc {
GstPushSrc parent;
/* our sockets */
GSocket *used_socket; /* hot */
GInetSocketAddress *addr; /* hot */
GCancellable *cancellable; /* hot */
/* properties */
gint skip_first_bytes; /* hot */
guint64 timeout; /* hot */
gboolean retrieve_sender_address; /* hot */
gchar *address;
gint port;
gchar *multi_iface;
gint ttl;
GstCaps *caps;
gint buffer_size;
guint64 timeout;
gint skip_first_bytes;
GSocket *socket;
gboolean close_socket;
gboolean auto_multicast;
gboolean reuse;
gboolean loop;
gboolean retrieve_sender_address;
/* stats */
guint max_size;
/* our sockets */
GSocket *used_socket;
GInetSocketAddress *addr;
gboolean external_socket;
gboolean made_cancel_fd;
GCancellable *cancellable;
/* memory management */
GstAllocator *allocator;
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