queue2: avoid waiting for a filled buffer
authorWim Taymans <wim.taymans@collabora.co.uk>
Wed, 4 Apr 2012 11:07:27 +0000 (13:07 +0200)
committerWim Taymans <wim.taymans@collabora.co.uk>
Thu, 5 Apr 2012 08:16:46 +0000 (10:16 +0200)
commit0bb0c68566e53849583f6ce447d227ad3e9cd2a8
tree4f849bac5967869a7deca249e7bd1e0ad078a155
parent4d79cbe7ef959813854fca56b05d64b39ea2bea8
queue2: avoid waiting for a filled buffer

Use a threshold variable to hold the maximum distance from the current position
for with we will wait instead of doing a seek.
When using the ringbuffer and the requested offset is not available, avoid
waiting until the complete ringbuffer is filled but instead do a seek when the
requested data is further than the threshold.
Avoid doing the seek twice in the ringbuffer case.
Use the same threshold for ringbuffer and download buffering.
plugins/elements/gstqueue2.c