~ubuntu-branches/ubuntu/quantal/linphone/quantal

« back to all changes in this revision

Viewing changes to mediastreamer/msspeexenc.h

  • Committer: Bazaar Package Importer
  • Author(s): Samuel Mimram
  • Date: 2006-11-15 10:34:50 UTC
  • mfrom: (1.2.1 upstream) (2.1.8 feisty)
  • Revision ID: james.westby@ubuntu.com-20061115103450-qgafwcks2lkhctlj
* New upstream release.
* Enable video support.
* Fix mismatched #endif in mscommon.h, closes: #398307.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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 MSSPEEXENC_H
23
 
#define MSSPEEXENC_H
24
 
 
25
 
#include <mscodec.h>
26
 
#include <speex.h>
27
 
 
28
 
struct _MSSpeexEnc
29
 
{
30
 
        MSFilter parent;
31
 
        MSFifo *inf[1];
32
 
        MSQueue *outq[1];       /* speex has an output q because it can be variable bit rate */
33
 
        void *speex_state;
34
 
        float *inbuf;
35
 
        SpeexBits bits;
36
 
        int frequency;
37
 
        int bitrate;
38
 
        int initialized;
39
 
};
40
 
 
41
 
typedef struct _MSSpeexEnc MSSpeexEnc;
42
 
        
43
 
 
44
 
struct _MSSpeexEncClass
45
 
{
46
 
        MSFilterClass parent;
47
 
};
48
 
 
49
 
typedef struct _MSSpeexEncClass MSSpeexEncClass;
50
 
 
51
 
 
52
 
#define MS_SPEEX_ENC(o) ((MSSpeexEnc*)(o))
53
 
#define MS_SPEEX_ENC_CLASS(o)   ((MSSpeexEncClass*)(o))
54
 
 
55
 
/* generic constructor */
56
 
MSFilter * ms_speex_enc_new();
57
 
 
58
 
void ms_speex_enc_init_core(MSSpeexEnc *obj,SpeexMode *mode, gint quality);
59
 
void ms_speex_enc_uninit_core(MSSpeexEnc *obj);
60
 
void ms_speex_enc_init(MSSpeexEnc *obj);
61
 
void ms_speex_enc_class_init(MSSpeexEncClass *klass,SpeexMode *mode);
62
 
 
63
 
 
64
 
void ms_speex_enc_process(MSSpeexEnc *obj);
65
 
void ms_speex_enc_destroy(MSSpeexEnc *obj);
66
 
 
67
 
#endif