source: roaraudio/roard/include/codecfilter.h @ 612:5ab0ccdc9e13

Last change on this file since 612:5ab0ccdc9e13 was 612:5ab0ccdc9e13, checked in by phi, 16 years ago

added flags to codecfilter list

File size: 1.8 KB
Line 
1//codecfilter.h:
2
3#ifndef _CODECFILTER_H_
4#define _CODECFILTER_H_
5
6#include <roaraudio.h>
7
8#define CODECFILTER_USERDATA_T void *
9
10struct roar_stream_server;
11
12#define ROAR_CODECFILTER_NONE  0
13#define ROAR_CODECFILTER_READ  1
14#define ROAR_CODECFILTER_WRITE 2
15
16struct roar_codecfilter {
17 int    codec;
18 char * name;
19 char * desc;
20 char * options;
21 int    flags;
22 int (*open )(CODECFILTER_USERDATA_T * inst, int codec,
23                                             struct roar_stream_server * info,
24                                             struct roar_codecfilter   * filter);
25 int (*close)(CODECFILTER_USERDATA_T   inst);
26 int (*pause)(CODECFILTER_USERDATA_T   inst, int newstate);
27 int (*write)(CODECFILTER_USERDATA_T   inst, char * buf, int len);
28 int (*read )(CODECFILTER_USERDATA_T   inst, char * buf, int len);
29 int (*flush)(CODECFILTER_USERDATA_T   inst);
30};
31
32
33#include "codecfilter_cmd.h"
34#include "codecfilter_wave.h"
35
36
37#ifdef ROAR_HAVE_LIBVORBISFILE
38#include "codecfilter_vorbis.h"
39#endif
40
41#ifdef ROAR_HAVE_LIBCELT
42#include "codecfilter_celt.h"
43#endif
44
45#ifdef ROAR_HAVE_LIBSPEEX
46#include "codecfilter_speex.h"
47#endif
48
49void print_codecfilterlist (void);
50
51int codecfilter_open (CODECFILTER_USERDATA_T * inst,
52                 int * codecfilter_id, char * codecfilter /* NOTE: this is not part of struct roar_codecfilter's def! */,
53                 int codec, struct roar_stream_server * info);
54int codecfilter_close(CODECFILTER_USERDATA_T   inst, int codecfilter);
55int codecfilter_pause(CODECFILTER_USERDATA_T   inst, int codecfilter, int newstate);
56int codecfilter_write(CODECFILTER_USERDATA_T   inst, int codecfilter, char * buf, int len);
57int codecfilter_read (CODECFILTER_USERDATA_T   inst, int codecfilter, char * buf, int len);
58int codecfilter_flush(CODECFILTER_USERDATA_T   inst, int codecfilter);
59
60
61#endif
62
63//ll
Note: See TracBrowser for help on using the repository browser.