12024
|
1 /*
|
|
2 The mediastreamer library aims at providing modular media processing and I/O
|
|
3 for linphone, but also for any telephony application.
|
|
4 Copyright (C) 2001 Simon MORLAT simon.morlat@linphone.org
|
|
5
|
|
6 This library is free software; you can redistribute it and/or
|
|
7 modify it under the terms of the GNU Lesser General Public
|
|
8 License as published by the Free Software Foundation; either
|
|
9 version 2.1 of the License, or (at your option) any later version.
|
|
10
|
|
11 This library is distributed in the hope that it will be useful,
|
|
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
14 Lesser General Public License for more details.
|
|
15
|
|
16 You should have received a copy of the GNU Lesser General Public
|
|
17 License along with this library; if not, write to the Free Software
|
|
18 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
19 */
|
|
20
|
|
21
|
|
22 #ifndef MSSPEEXDEC_H
|
|
23 #define MSSPEEXDEC_H
|
|
24
|
|
25 #include <mscodec.h>
|
|
26 #include <speex.h>
|
|
27
|
|
28 struct _MSSpeexDec
|
|
29 {
|
|
30 MSFilter parent;
|
|
31 MSQueue *inq[1]; /* speex has an input q because it can be variable bit rate */
|
|
32 MSFifo *outf[1];
|
|
33 void *speex_state;
|
|
34 SpeexBits bits;
|
|
35 int frequency;
|
|
36 int frame_size;
|
|
37 int initialized;
|
|
38 };
|
|
39
|
|
40 typedef struct _MSSpeexDec MSSpeexDec;
|
|
41
|
|
42
|
|
43 struct _MSSpeexDecClass
|
|
44 {
|
|
45 MSFilterClass parent;
|
|
46 };
|
|
47
|
|
48 typedef struct _MSSpeexDecClass MSSpeexDecClass;
|
|
49
|
|
50
|
|
51 #define MS_SPEEX_DEC(o) ((MSSpeexDec*)(o))
|
|
52 #define MS_SPEEX_DEC_CLASS(o) ((MSSpeexDecClass*)(o))
|
|
53
|
|
54 /* call this before if don't load the plugin dynamically */
|
|
55 void ms_speex_codec_init();
|
|
56
|
|
57 /* mediastreamer compliant constructor */
|
|
58 MSFilter * ms_speex_dec_new();
|
|
59
|
|
60 void ms_speex_dec_init(MSSpeexDec *obj);
|
|
61 void ms_speex_dec_init_core(MSSpeexDec *obj,const SpeexMode *mode);
|
|
62 void ms_speex_dec_class_init(MSSpeexDecClass *klass);
|
|
63 void ms_speex_dec_uninit(MSSpeexDec *obj);
|
|
64 void ms_speex_dec_uninit_core(MSSpeexDec *obj);
|
|
65
|
|
66 void ms_speex_dec_process(MSSpeexDec *obj);
|
|
67 void ms_speex_dec_destroy(MSSpeexDec *obj);
|
|
68
|
|
69 #endif
|