diff options
author | Lennart Poettering <lennart@poettering.net> | 2004-07-07 00:22:46 +0000 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2004-07-07 00:22:46 +0000 |
commit | e8d1185c4221fef9d712c1f375d8e592721b6943 (patch) | |
tree | 1fa6e0c9fb8543520f6223cc6fa23604c5cbccde /src/memblockq.h | |
parent | f8cbde54dab2783e2c6ba699dfaee9ef51b1e098 (diff) |
draining ind native protocol
fixes in callback code on object destruction
simple protocol
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@52 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/memblockq.h')
-rw-r--r-- | src/memblockq.h | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/memblockq.h b/src/memblockq.h index d8b9567f..bece4fd7 100644 --- a/src/memblockq.h +++ b/src/memblockq.h @@ -8,11 +8,18 @@ struct pa_memblockq; -/* Parameters: the maximum length of the memblock queue, a base value -for all operations (that is, all byte operations shall work on -multiples of this base value) and an amount of bytes to prebuffer -before having pa_memblockq_peek() succeed. */ -struct pa_memblockq* pa_memblockq_new(size_t maxlength, size_t base, size_t prebuf); +/* Parameters: + - maxlength: maximum length of queue. If more data is pushed into the queue, data from the front is dropped + - length: the target length of the queue. + - base: a base value for all metrics. Only multiples of this value are popped from the queue + - prebuf: before passing the first byte out, make sure that enough bytes are in the queue + - minreq: pa_memblockq_missing() will only return values greater than this value +*/ +struct pa_memblockq* pa_memblockq_new(size_t maxlength, + size_t tlength, + size_t base, + size_t prebuf, + size_t minreq); void pa_memblockq_free(struct pa_memblockq*bq); /* Push a new memory chunk into the queue. Optionally specify a value for future cancellation. This is currently not implemented, however! */ @@ -46,6 +53,9 @@ uint32_t pa_memblockq_get_delay(struct pa_memblockq *bq); uint32_t pa_memblockq_get_length(struct pa_memblockq *bq); /* Return how many bytes are missing in queue to the specified fill amount */ -uint32_t pa_memblockq_missing_to(struct pa_memblockq *bq, size_t qlen); +uint32_t pa_memblockq_missing(struct pa_memblockq *bq); + + +uint32_t pa_memblockq_get_minreq(struct pa_memblockq *bq); #endif |