bufferpool: avoid excessive GstPoll activity
authorWim Taymans <wtaymans@redhat.com>
Thu, 30 Jan 2014 11:26:05 +0000 (12:26 +0100)
committerWim Taymans <wtaymans@redhat.com>
Thu, 30 Jan 2014 11:31:48 +0000 (12:31 +0100)
commit878621f6f5f3090bea9aa78dc4a399b1cabbefb7
treefd5698de220df93e65de1fa38dea1049277035ea
parentfb44b4d2ecf9432442582a157f3e025aa54559cc
bufferpool: avoid excessive GstPoll activity

Keep an extra write ref on the control socket. This ensures that we
avoid a read/write on the socket when going from non-empty->empty->not-empty.
We remove the write ref only when we actually are empty and we need to
wait for flushing or a new buffer.

This makes the bufferpool benchmark about 30% faster than the pure
malloc implementation.
gst/gstbufferpool.c