Line | |
---|
1 | //codecfilter_vorbis.h: |
---|
2 | |
---|
3 | #ifndef _CODECFILTER_VORBIS_H_ |
---|
4 | #define _CODECFILTER_VORBIS_H_ |
---|
5 | |
---|
6 | #include <roaraudio.h> |
---|
7 | |
---|
8 | #ifdef ROAR_HAVE_LIBVORBISFILE |
---|
9 | |
---|
10 | #include <vorbis/codec.h> |
---|
11 | #include <vorbis/vorbisfile.h> |
---|
12 | #include <math.h> |
---|
13 | |
---|
14 | #ifdef ROAR_HAVE_LIBVORBISENC |
---|
15 | #include <vorbis/vorbisenc.h> |
---|
16 | #endif |
---|
17 | |
---|
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; |
---|
25 | int got_it_running; |
---|
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 |
---|
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_write(CODECFILTER_USERDATA_T inst, char * buf, int len); |
---|
49 | int cf_vorbis_read(CODECFILTER_USERDATA_T inst, char * buf, int len); |
---|
50 | |
---|
51 | int cf_vorbis_update_stream (struct codecfilter_vorbis_inst * self); |
---|
52 | |
---|
53 | #endif |
---|
54 | |
---|
55 | #endif |
---|
56 | |
---|
57 | //ll |
---|
Note: See
TracBrowser
for help on using the repository browser.