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 | |
---|
10 | struct roar_stream_server; |
---|
11 | |
---|
12 | struct roar_codecfilter { |
---|
13 | int codec; |
---|
14 | char * name; |
---|
15 | char * desc; |
---|
16 | char * options; |
---|
17 | int (*open )(CODECFILTER_USERDATA_T * inst, int codec, |
---|
18 | struct roar_stream_server * info, |
---|
19 | struct roar_codecfilter * filter); |
---|
20 | int (*close)(CODECFILTER_USERDATA_T inst); |
---|
21 | int (*pause)(CODECFILTER_USERDATA_T inst, int newstate); |
---|
22 | int (*write)(CODECFILTER_USERDATA_T inst, char * buf, int len); |
---|
23 | int (*read )(CODECFILTER_USERDATA_T inst, char * buf, int len); |
---|
24 | int (*flush)(CODECFILTER_USERDATA_T inst); |
---|
25 | }; |
---|
26 | |
---|
27 | |
---|
28 | #include "codecfilter_cmd.h" |
---|
29 | #ifdef ROAR_HAVE_LIBVORBISFILE |
---|
30 | #include "codecfilter_vorbis.h" |
---|
31 | #endif |
---|
32 | |
---|
33 | #ifdef ROAR_HAVE_LIBCELT |
---|
34 | #include "codecfilter_celt.h" |
---|
35 | #endif |
---|
36 | |
---|
37 | void print_codecfilterlist (void); |
---|
38 | |
---|
39 | int codecfilter_open (CODECFILTER_USERDATA_T * inst, |
---|
40 | int * codecfilter_id, char * codecfilter /* NOTE: this is not part of struct roar_codecfilter's def! */, |
---|
41 | int codec, struct roar_stream_server * info); |
---|
42 | int codecfilter_close(CODECFILTER_USERDATA_T inst, int codecfilter); |
---|
43 | int codecfilter_pause(CODECFILTER_USERDATA_T inst, int codecfilter, int newstate); |
---|
44 | int codecfilter_write(CODECFILTER_USERDATA_T inst, int codecfilter, char * buf, int len); |
---|
45 | int codecfilter_read (CODECFILTER_USERDATA_T inst, int codecfilter, char * buf, int len); |
---|
46 | int codecfilter_flush(CODECFILTER_USERDATA_T inst, int codecfilter); |
---|
47 | |
---|
48 | |
---|
49 | #endif |
---|
50 | |
---|
51 | //ll |
---|