mirror of
https://gitlab.xiph.org/xiph/icecast-server.git
synced 2024-09-22 04:15:54 -04:00
ea47fdf504
Requires a change to the format plugin interface - jack: if you want this done differently, feel free to change it (or ask me to). svn path=/trunk/httpp/; revision=3219
47 lines
879 B
C
47 lines
879 B
C
/* format.h
|
|
**
|
|
** format plugin header
|
|
**
|
|
*/
|
|
#ifndef __FORMAT_H__
|
|
#define __FORMAT_H__
|
|
|
|
typedef enum _format_type_tag
|
|
{
|
|
FORMAT_TYPE_VORBIS,
|
|
FORMAT_TYPE_MP3
|
|
} format_type_t;
|
|
|
|
typedef struct _format_plugin_tag
|
|
{
|
|
format_type_t type;
|
|
|
|
/* we need to know the mount to report statistics */
|
|
char *mount;
|
|
|
|
/* set this is the data format has a header that
|
|
** we must send before regular data
|
|
*/
|
|
int has_predata;
|
|
|
|
int (*get_buffer)(struct _format_plugin_tag *self, char *data, unsigned long
|
|
len, refbuf_t **buffer);
|
|
refbuf_queue_t *(*get_predata)(struct _format_plugin_tag *self);
|
|
void (*free_plugin)(struct _format_plugin_tag *self);
|
|
|
|
/* for internal state management */
|
|
void *_state;
|
|
} format_plugin_t;
|
|
|
|
format_type_t format_get_type(char *contenttype);
|
|
format_plugin_t *format_get_plugin(format_type_t type, char *mount);
|
|
|
|
#endif /* __FORMAT_H__ */
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|