blob: 97d6fbc533cf855a24a0bc7c5b3b1ea570d3a13c
1 | #ifndef DSP_CODEC_HEADER |
2 | #define DSP_CODEC_HEADER |
3 | #include "codec_message.h" |
4 | |
5 | struct codec_type { |
6 | char *name; |
7 | int (*init)(struct frame_fmt *); |
8 | int (*release)(void); |
9 | // return BYTEs number for the samples |
10 | int (*decode_frame)(unsigned char *, int, struct frame_fmt *); |
11 | }; |
12 | |
13 | /*data in*/ |
14 | int read_bits(int bits); |
15 | int bits_left(void); |
16 | int reset_bits(void); |
17 | int read_byte(void); |
18 | int read_buffer(unsigned char *buffer, int size); |
19 | int get_inbuf_data_size(void); |
20 | unsigned long get_stream_in_offset(void); |
21 | int stream_in_buffer_init(void); |
22 | |
23 | /*data out*/ |
24 | int write_buffer(unsigned char *buf, int size); |
25 | int get_outbuf_space(void); |
26 | int out_buffer_init(void); |
27 | |
28 | /*mgt*/ |
29 | int codec_start(void); |
30 | int codec_resume(void); |
31 | int codec_pause(void); |
32 | int register_codec(const struct codec_type *mc); |
33 | void decode_error_msg(int error); |
34 | void trans_err_code(error_code_t error); |
35 | |
36 | #endif |
37 |