udpsrc: keep GCancellable fd around instead of re-creating it constantly
authorTim-Philipp Müller <tim@centricular.com>
Tue, 19 May 2015 17:13:16 +0000 (18:13 +0100)
committerTim-Philipp Müller <tim@centricular.com>
Wed, 27 May 2015 16:08:47 +0000 (17:08 +0100)
commit11bb21f3c2f9347b3eeac1f8d6814ebbcdc49f36
treef15f0bd61f8d049843fa4e5cbd4c02315b102889
parent6d06a74f7f0386a912362ed3caacc287b16412cb
udpsrc: keep GCancellable fd around instead of re-creating it constantly

Otherwise we constantly create/close event file descriptors,
every single time we call g_socket_condition_timed_wait() or
g_socket_receive_message(), i.e. twice per packet received!
This was not particularly good for performance.

Also only create GCancellable on start-up.
gst/udp/gstudpsrc.c
gst/udp/gstudpsrc.h