2004-01-28 20:02:12 -05:00
|
|
|
/* Icecast
|
|
|
|
*
|
|
|
|
* This program is distributed under the GNU General Public License, version 2.
|
|
|
|
* A copy of this license is included with this source.
|
|
|
|
*
|
|
|
|
* Copyright 2000-2004, Jack Moffitt <jack@xiph.org,
|
|
|
|
* Michael Smith <msmith@xiph.org>,
|
|
|
|
* oddsock <oddsock@xiph.org>,
|
|
|
|
* Karl Heyes <karl@xiph.org>
|
|
|
|
* and others (see AUTHORS for details).
|
|
|
|
*/
|
|
|
|
|
2001-09-09 22:21:46 -04:00
|
|
|
/* refbuf.h
|
|
|
|
**
|
|
|
|
** reference counting data buffer
|
|
|
|
**
|
|
|
|
*/
|
|
|
|
#ifndef __REFBUF_H__
|
|
|
|
#define __REFBUF_H__
|
|
|
|
|
|
|
|
typedef struct _refbuf_tag
|
|
|
|
{
|
2003-03-14 21:10:19 -05:00
|
|
|
char *data;
|
2005-05-25 23:04:48 -04:00
|
|
|
unsigned long len;
|
2004-12-07 16:06:26 -05:00
|
|
|
int sync_point;
|
2004-08-20 11:13:59 -04:00
|
|
|
struct _refbuf_tag *associated;
|
|
|
|
struct _refbuf_tag *next;
|
2001-09-09 22:21:46 -04:00
|
|
|
|
2003-03-14 21:10:19 -05:00
|
|
|
unsigned long _count;
|
2001-09-09 22:21:46 -04:00
|
|
|
} refbuf_t;
|
|
|
|
|
|
|
|
void refbuf_initialize(void);
|
|
|
|
void refbuf_shutdown(void);
|
|
|
|
|
|
|
|
refbuf_t *refbuf_new(unsigned long size);
|
|
|
|
void refbuf_addref(refbuf_t *self);
|
|
|
|
void refbuf_release(refbuf_t *self);
|
|
|
|
|
2005-08-07 10:50:59 -04:00
|
|
|
#define PER_CLIENT_REFBUF_SIZE 4096
|
|
|
|
|
2001-09-09 22:21:46 -04:00
|
|
|
#endif /* __REFBUF_H__ */
|
|
|
|
|