diff options
author | Mihael Koep <koep@schneide.com> | 2012-10-19 17:03:49 +0200 |
---|---|---|
committer | Mihael Koep <koep@schneide.com> | 2012-10-19 17:03:49 +0200 |
commit | 9866002f3f569f6da886d71964d3298183cd1646 (patch) | |
tree | 968097e2f5fa11a094238ead6469739a725d8ce2 /tools/gui/ring-buffer.h | |
parent | 37f48ae1b67b1205ba4884ec350afdf5ab7dd2d3 (diff) | |
parent | 6f12303cf4c4130d544c30f8ad5e2445a1fa3e61 (diff) | |
download | uca-9866002f3f569f6da886d71964d3298183cd1646.tar.gz uca-9866002f3f569f6da886d71964d3298183cd1646.tar.bz2 uca-9866002f3f569f6da886d71964d3298183cd1646.tar.xz uca-9866002f3f569f6da886d71964d3298183cd1646.zip |
Merge remote branch 'origin/master' into dexela
Conflicts:
CMakeLists.txt
src/CMakeLists.txt
src/uca-camera.c
Diffstat (limited to 'tools/gui/ring-buffer.h')
-rw-r--r-- | tools/gui/ring-buffer.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tools/gui/ring-buffer.h b/tools/gui/ring-buffer.h new file mode 100644 index 0000000..9966eb7 --- /dev/null +++ b/tools/gui/ring-buffer.h @@ -0,0 +1,28 @@ +#ifndef RING_BUFFER_H +#define RING_BUFFER_H + +#include <glib.h> + +G_BEGIN_DECLS + +typedef struct { + guchar *data; + gsize block_size; + guint n_blocks_total; + guint n_blocks_used; + guint current_index; +} RingBuffer; + +RingBuffer * ring_buffer_new (gsize block_size, + gsize n_blocks); +void ring_buffer_free (RingBuffer *buffer); +void ring_buffer_reset (RingBuffer *buffer); +gpointer ring_buffer_get_current_pointer (RingBuffer *buffer); +gpointer ring_buffer_get_pointer (RingBuffer *buffer, + guint index); +guint ring_buffer_get_num_blocks (RingBuffer *buffer); +void ring_buffer_proceed (RingBuffer *buffer); + +G_END_DECLS + +#endif |