libobs/util: Add funcs to push zeroed data to circlebufs

Adds circlebuf_push_front_zero and circlebuf_push_back_zero to
conveniently push zeroed data to the front/back of the buffer without
having to create an intermediary buffer to accomplish the same thing.
This commit is contained in:
jp9000
2017-12-02 13:51:21 -08:00
parent 895814aa8e
commit 5d9854ea44
2 changed files with 60 additions and 0 deletions

View File

@@ -91,6 +91,24 @@ Circular Buffer Inline Functions
---------------------
.. function:: void circlebuf_push_back_zero(struct circlebuf *cb, size_t size)
Pushes zeroed data to the end of the circular buffer.
:param cb: The circular buffer
:param size: Size
---------------------
.. function:: void circlebuf_push_front_zero(struct circlebuf *cb, size_t size)
Pushes zeroed data to the front of the circular buffer.
:param cb: The circular buffer
:param size: Size
---------------------
.. function:: void circlebuf_peek_front(struct circlebuf *cb, void *data, size_t size)
Peeks data at the front of the circular buffer.