Rev | Line | |
---|
[204] | 1 | //codecfilter_vorbis.h: |
---|
| 2 | |
---|
| 3 | #ifndef _CODECFILTER_VORBIS_H_ |
---|
| 4 | #define _CODECFILTER_VORBIS_H_ |
---|
| 5 | |
---|
| 6 | #include <roaraudio.h> |
---|
[362] | 7 | |
---|
| 8 | #ifdef ROAR_HAVE_LIBVORBISFILE |
---|
| 9 | |
---|
[205] | 10 | #include <vorbis/codec.h> |
---|
| 11 | #include <vorbis/vorbisfile.h> |
---|
[222] | 12 | #include <math.h> |
---|
[205] | 13 | |
---|
[569] | 14 | #ifdef ROAR_HAVE_LIBVORBISENC |
---|
| 15 | #include <vorbis/vorbisenc.h> |
---|
| 16 | #endif |
---|
| 17 | |
---|
[205] | 18 | struct codecfilter_vorbis_inst { |
---|
| 19 | int current_section; |
---|
| 20 | int last_section; |
---|
| 21 | int opened; |
---|
| 22 | FILE * in; |
---|
| 23 | struct roar_stream_server * stream; |
---|
| 24 | OggVorbis_File vf; |
---|
[382] | 25 | int got_it_running; |
---|
[569] | 26 | #ifdef ROAR_HAVE_LIBVORBISENC |
---|
| 27 | int encoding; |
---|
| 28 | struct { |
---|
| 29 | float v_base_quality; |
---|
| 30 | ogg_stream_state os; |
---|
| 31 | ogg_page og; |
---|
| 32 | ogg_packet op; |
---|
| 33 | |
---|
| 34 | vorbis_dsp_state vd; |
---|
| 35 | vorbis_block vb; |
---|
| 36 | vorbis_info vi; |
---|
| 37 | vorbis_comment vc; |
---|
| 38 | } encoder; |
---|
| 39 | #endif |
---|
[205] | 40 | }; |
---|
| 41 | |
---|
| 42 | int cf_vorbis_open(CODECFILTER_USERDATA_T * inst, int codec, |
---|
| 43 | struct roar_stream_server * info, |
---|
| 44 | struct roar_codecfilter * filter); |
---|
| 45 | |
---|
| 46 | int cf_vorbis_close(CODECFILTER_USERDATA_T inst); |
---|
| 47 | |
---|
| 48 | int cf_vorbis_read(CODECFILTER_USERDATA_T inst, char * buf, int len); |
---|
[204] | 49 | |
---|
[207] | 50 | int cf_vorbis_update_stream (struct codecfilter_vorbis_inst * self); |
---|
| 51 | |
---|
[204] | 52 | #endif |
---|
| 53 | |
---|
[362] | 54 | #endif |
---|
| 55 | |
---|
[204] | 56 | //ll |
---|
Note: See
TracBrowser
for help on using the repository browser.