memblockq: implement new call pa_memblockq_peek_fixed_size()

This commit is contained in:
Lennart Poettering 2010-02-25 02:10:45 +01:00
parent 5030852c8e
commit 87cc741d0e
4 changed files with 109 additions and 17 deletions

View file

@ -95,6 +95,11 @@ void pa_memblockq_seek(pa_memblockq *bq, int64_t offset, pa_seek_mode_t seek, pa
* was passed we return the length of the hole in chunk->length. */
int pa_memblockq_peek(pa_memblockq* bq, pa_memchunk *chunk);
/* Much like pa_memblockq_peek, but guarantees that the returned chunk
* will have a length of the block size passed. You must configure a
* silence memchunk for this memblockq if you use this call. */
int pa_memblockq_peek_fixed_size(pa_memblockq *bq, size_t block_size, pa_memchunk *chunk);
/* Drop the specified bytes from the queue. */
void pa_memblockq_drop(pa_memblockq *bq, size_t length);