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
|
|
|
|
{
|
2007-12-15 12:02:16 -05:00
|
|
|
unsigned int len;
|
|
|
|
unsigned int _count;
|
2003-03-14 21:10:19 -05:00
|
|
|
char *data;
|
2004-08-20 11:13:59 -04:00
|
|
|
struct _refbuf_tag *associated;
|
|
|
|
struct _refbuf_tag *next;
|
2007-12-15 12:02:16 -05:00
|
|
|
int sync_point;
|
2001-09-09 22:21:46 -04:00
|
|
|
|
|
|
|
} refbuf_t;
|
|
|
|
|
|
|
|
void refbuf_initialize(void);
|
|
|
|
void refbuf_shutdown(void);
|
|
|
|
|
2007-12-15 12:02:16 -05:00
|
|
|
refbuf_t *refbuf_new(unsigned int size);
|
2001-09-09 22:21:46 -04:00
|
|
|
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__ */
|
|
|
|
|