2004-01-29 01:02:12 +00: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-10 02:21:46 +00:00
|
|
|
/* refbuf.h
|
|
|
|
**
|
|
|
|
** reference counting data buffer
|
|
|
|
**
|
|
|
|
*/
|
|
|
|
#ifndef __REFBUF_H__
|
|
|
|
#define __REFBUF_H__
|
|
|
|
|
|
|
|
typedef struct _refbuf_tag
|
|
|
|
{
|
2007-12-15 17:02:16 +00:00
|
|
|
unsigned int len;
|
|
|
|
unsigned int _count;
|
2003-03-15 02:10:19 +00:00
|
|
|
char *data;
|
2004-08-20 15:13:59 +00:00
|
|
|
struct _refbuf_tag *associated;
|
|
|
|
struct _refbuf_tag *next;
|
2007-12-15 17:02:16 +00:00
|
|
|
int sync_point;
|
2001-09-10 02:21:46 +00:00
|
|
|
|
|
|
|
} refbuf_t;
|
|
|
|
|
|
|
|
void refbuf_initialize(void);
|
|
|
|
void refbuf_shutdown(void);
|
|
|
|
|
2007-12-15 17:02:16 +00:00
|
|
|
refbuf_t *refbuf_new(unsigned int size);
|
2001-09-10 02:21:46 +00:00
|
|
|
void refbuf_addref(refbuf_t *self);
|
|
|
|
void refbuf_release(refbuf_t *self);
|
|
|
|
|
2005-08-07 14:50:59 +00:00
|
|
|
#define PER_CLIENT_REFBUF_SIZE 4096
|
|
|
|
|
2001-09-10 02:21:46 +00:00
|
|
|
#endif /* __REFBUF_H__ */
|
|
|
|
|