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 #ifndef MSMULAWDECODER_H
|
|
22 #define MSMULAWDECODER_H
|
|
23
|
|
24 #include <msfilter.h>
|
|
25 #include <mscodec.h>
|
|
26
|
|
27 /*this is the class that implements a MULAWdecoder filter*/
|
|
28
|
|
29 #define MSMULAWDECODER_MAX_INPUTS 1 /* max output per filter*/
|
|
30
|
|
31
|
|
32 typedef struct _MSMULAWDecoder
|
|
33 {
|
|
34 /* the MSMULAWDecoder derivates from MSFilter, so the MSFilter object MUST be the first of the MSMULAWDecoder object
|
|
35 in order to the object mechanism to work*/
|
|
36 MSFilter filter;
|
|
37 MSFifo *f_inputs[MSMULAWDECODER_MAX_INPUTS];
|
|
38 MSFifo *f_outputs[MSMULAWDECODER_MAX_INPUTS];
|
|
39 } MSMULAWDecoder;
|
|
40
|
|
41 typedef struct _MSMULAWDecoderClass
|
|
42 {
|
|
43 /* the MSMULAWDecoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSMULAWDecoder class
|
|
44 in order to the class mechanism to work*/
|
|
45 MSFilterClass parent_class;
|
|
46 } MSMULAWDecoderClass;
|
|
47
|
|
48 /* PUBLIC */
|
|
49 #define MS_MULAWDECODER(filter) ((MSMULAWDecoder*)(filter))
|
|
50 #define MS_MULAWDECODER_CLASS(klass) ((MSMULAWDecoderClass*)(klass))
|
|
51 MSFilter * ms_MULAWdecoder_new(void);
|
|
52
|
|
53 /* FOR INTERNAL USE*/
|
|
54 void ms_MULAWdecoder_init(MSMULAWDecoder *r);
|
|
55 void ms_MULAWdecoder_class_init(MSMULAWDecoderClass *klass);
|
|
56 void ms_MULAWdecoder_destroy( MSMULAWDecoder *obj);
|
|
57 void ms_MULAWdecoder_process(MSMULAWDecoder *r);
|
|
58
|
|
59 /* tuning parameters :*/
|
|
60 #define MULAW_DECODER_WMAXGRAN 320
|
|
61 #define MULAW_DECODER_RMAXGRAN 160
|
|
62
|
|
63 extern MSCodecInfo MULAWinfo;
|
|
64
|
|
65
|
|
66 #endif
|