2002-01-05 01:25:28 +00:00
|
|
|
|
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
typedef struct _GstMemChunk GstMemChunk;
|
|
|
|
typedef struct _GstMemChunkElement GstMemChunkElement;
|
|
|
|
|
|
|
|
struct _GstMemChunkElement
|
|
|
|
{
|
2004-03-15 14:43:35 +00:00
|
|
|
GstMemChunkElement *link; /* next cell in the lifo */
|
2002-01-05 01:25:28 +00:00
|
|
|
GstMemChunkElement *area;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct _GstMemChunk
|
|
|
|
{
|
|
|
|
volatile GstMemChunkElement *free; /* the first free element */
|
2004-03-15 14:43:35 +00:00
|
|
|
volatile gulong cnt; /* used to avoid ABA problem */
|
2002-01-05 01:25:28 +00:00
|
|
|
|
|
|
|
gchar *name;
|
|
|
|
gulong area_size;
|
|
|
|
gulong chunk_size;
|
|
|
|
gulong atom_size;
|
|
|
|
gboolean cleanup;
|
|
|
|
};
|
|
|
|
|
2004-03-15 14:43:35 +00:00
|
|
|
GstMemChunk* gst_mem_chunk_new (gchar *name,
|
|
|
|
gint atom_size,
|
|
|
|
gulong area_size,
|
|
|
|
gint type);
|
2002-01-05 01:25:28 +00:00
|
|
|
|
2004-03-15 14:43:35 +00:00
|
|
|
void gst_mem_chunk_destroy (GstMemChunk *mem_chunk);
|
2002-01-05 01:25:28 +00:00
|
|
|
|
2004-03-15 14:43:35 +00:00
|
|
|
gpointer gst_mem_chunk_alloc (GstMemChunk *mem_chunk);
|
|
|
|
void gst_mem_chunk_free (GstMemChunk *mem_chunk,
|
|
|
|
gpointer mem);
|