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 MSALAWENCODER_H
|
|
22 #define MSALAWENCODER_H
|
|
23
|
|
24 #include "mscodec.h"
|
|
25
|
|
26
|
|
27 /*this is the class that implements a ALAWencoder filter*/
|
|
28
|
|
29 #define MSALAWENCODER_MAX_INPUTS 1 /* max output per filter*/
|
|
30
|
|
31
|
|
32 typedef struct _MSALAWEncoder
|
|
33 {
|
|
34 /* the MSALAWEncoder derivates from MSFilter, so the MSFilter object MUST be the first of the MSALAWEncoder object
|
|
35 in order to the object mechanism to work*/
|
|
36 MSFilter filter;
|
|
37 MSFifo *f_inputs[MSALAWENCODER_MAX_INPUTS];
|
|
38 MSFifo *f_outputs[MSALAWENCODER_MAX_INPUTS];
|
|
39 } MSALAWEncoder;
|
|
40
|
|
41 typedef struct _MSALAWEncoderClass
|
|
42 {
|
|
43 /* the MSALAWEncoder derivates from MSFilter, so the MSFilter class MUST be the first of the MSALAWEncoder class
|
|
44 in order to the class mechanism to work*/
|
|
45 MSFilterClass parent_class;
|
|
46 } MSALAWEncoderClass;
|
|
47
|
|
48 /* PUBLIC */
|
|
49 #define MS_ALAWENCODER(filter) ((MSALAWEncoder*)(filter))
|
|
50 #define MS_ALAWENCODER_CLASS(klass) ((MSALAWEncoderClass*)(klass))
|
|
51 MSFilter * ms_ALAWencoder_new(void);
|
|
52
|
|
53 /* FOR INTERNAL USE*/
|
|
54 void ms_ALAWencoder_init(MSALAWEncoder *r);
|
|
55 void ms_ALAWencoder_class_init(MSALAWEncoderClass *klass);
|
|
56 void ms_ALAWencoder_destroy( MSALAWEncoder *obj);
|
|
57 void ms_ALAWencoder_process(MSALAWEncoder *r);
|
|
58
|
|
59 /* tuning parameters :*/
|
|
60 #define ALAW_ENCODER_WMAXGRAN 160
|
|
61 #define ALAW_ENCODER_RMAXGRAN 320
|
|
62
|
|
63
|
|
64 #endif
|