refbuf.h 964 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12
/* 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).
 */

Jack Moffitt's avatar
Jack Moffitt committed
13 14 15 16 17 18 19 20 21 22
/* refbuf.h
**
** reference counting data buffer
**
*/
#ifndef __REFBUF_H__
#define __REFBUF_H__

typedef struct _refbuf_tag
{
23 24
    unsigned int len;
    unsigned int _count;
25
    char *data;
26 27
    struct _refbuf_tag *associated;
    struct _refbuf_tag *next;
28
    int sync_point;
Jack Moffitt's avatar
Jack Moffitt committed
29 30 31 32 33 34

} refbuf_t;

void refbuf_initialize(void);
void refbuf_shutdown(void);

35
refbuf_t *refbuf_new(unsigned int size);
Jack Moffitt's avatar
Jack Moffitt committed
36 37 38
void refbuf_addref(refbuf_t *self);
void refbuf_release(refbuf_t *self);

39 40
#define PER_CLIENT_REFBUF_SIZE  4096

Jack Moffitt's avatar
Jack Moffitt committed
41 42
#endif  /* __REFBUF_H__ */