[169] | 1 | //codecfilter.h: |
---|
| 2 | |
---|
| 3 | #ifndef _CODECFILTER_H_ |
---|
| 4 | #define _CODECFILTER_H_ |
---|
| 5 | |
---|
| 6 | #include <roaraudio.h> |
---|
| 7 | |
---|
[170] | 8 | #define CODECFILTER_USERDATA_T void * |
---|
| 9 | |
---|
[195] | 10 | struct roar_stream_server; |
---|
[170] | 11 | |
---|
| 12 | struct roar_codecfilter { |
---|
[176] | 13 | int codec; |
---|
[170] | 14 | char * name; |
---|
| 15 | char * desc; |
---|
[171] | 16 | char * options; |
---|
[193] | 17 | int (*open )(CODECFILTER_USERDATA_T * inst, int codec, |
---|
[171] | 18 | struct roar_stream_server * info, |
---|
| 19 | struct roar_codecfilter * filter); |
---|
[170] | 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 | |
---|
[172] | 27 | |
---|
| 28 | #include "codecfilter_cmd.h" |
---|
[204] | 29 | #ifdef ROAR_HAVE_LIBVORBISFILE |
---|
| 30 | #include "codecfilter_vorbis.h" |
---|
| 31 | #endif |
---|
[172] | 32 | |
---|
[323] | 33 | #ifdef ROAR_HAVE_LIBCELT |
---|
| 34 | #include "codecfilter_celt.h" |
---|
| 35 | #endif |
---|
[172] | 36 | |
---|
[170] | 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! */, |
---|
[193] | 41 | int codec, struct roar_stream_server * info); |
---|
[170] | 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 | |
---|
[169] | 49 | #endif |
---|
| 50 | |
---|
| 51 | //ll |
---|