Go to the documentation of this file.
37 #define FULL_BUFFER (-1000)
38 #define EMPTY_BUFFER (-1000)
47 #define DBUF_INDEX 10000
88 int diff = (pos2%rbuf->
size) - (pos1%rbuf->
size);
89 if (diff < 0) diff += rbuf->
size;
103 if (free <= 0) free += rbuf->
size;
110 if (avail < 0) avail += rbuf->
size;
static unsigned int ring_free(ringbuffer *rbuf)
static int ring_posdiff(ringbuffer *rbuf, int pos1, int pos2)
int ring_init(ringbuffer *rbuf, int size)
int ring_reinit(ringbuffer *rbuf, int size)
int ring_write(ringbuffer *rbuf, uint8_t *data, int count)
void ring_show(ringbuffer *rbuf, unsigned int count, uint32_t off)
int ring_peek(ringbuffer *rbuf, uint8_t *data, unsigned int count, uint32_t off)
int dummy_delete(dummy_buffer *dbuf, uint64_t time)
static int ring_wdiff(ringbuffer *rbuf, int pos)
static int ring_rpos(ringbuffer *rbuf)
static int ring_wpos(ringbuffer *rbuf)
int ring_skip(ringbuffer *rbuf, int count)
int ring_read_file(ringbuffer *rbuf, int fd, int count)
void dummy_clear(dummy_buffer *dbuf)
static unsigned int ring_avail(ringbuffer *rbuf)
void dummy_destroy(dummy_buffer *dbuf)
int ring_poke(ringbuffer *rbuf, uint8_t *data, unsigned int count, uint32_t off)
static uint32_t dummy_space(dummy_buffer *dbuf)
int ring_write_file(ringbuffer *rbuf, int fd, int count)
void ring_clear(ringbuffer *rbuf)
int ring_read(ringbuffer *rbuf, uint8_t *data, int count)
int dummy_add(dummy_buffer *dbuf, uint64_t time, uint32_t size)
void ring_destroy(ringbuffer *rbuf)
std::vector< uint8_t > peek_poke_vec
int dummy_init(dummy_buffer *dbuf, int s)
static int ring_rdiff(ringbuffer *rbuf, int pos)