GsmCompress.h
资源名称:视频会议系统.rar [点击查看]
上传用户:popouu88
上传日期:2013-02-11
资源大小:2894k
文件大小:2k
源码类别:
IP电话/视频会议
开发平台:
Visual C++
- #ifndef _GSMCOMPRESS_H_
- #define _GSMCOMPRESS_H_
- #include "Compress.h"
- #ifndef GSM_H
- #define GSM_H
- #define NeedFunctionPrototypes 1
- #ifdef __cplusplus
- # define NeedFunctionPrototypes 1
- #endif
- #if __STDC__
- # define NeedFunctionPrototypes 1
- #endif
- #ifdef _NO_PROTO
- # undef NeedFunctionPrototypes
- #endif
- #undef GSM_P /* gnu stdio.h actually defines this... */
- #if NeedFunctionPrototypes
- # define GSM_P( protos ) protos
- #else
- # define GSM_P( protos ) ( /* protos */ )
- #endif
- #ifdef NeedFunctionPrototypes
- # include <stdio.h> /* for FILE * */
- #endif
- /* AUTO_SPARC_HACK added by John Walker. If defined, USE_FLOAT_MUL
- automatically set when compiling on a Sparc. This lets most
- people avoid editing the Makefile. */
- #ifdef AUTO_SPARC_HACK
- #ifdef sparc
- #define USE_FLOAT_MUL
- #define FAST
- #endif
- #endif
- /*
- * Interface
- */
- typedef struct gsm_state * gsm;
- typedef short gsm_signal; /* signed 16 bit */
- typedef unsigned char gsm_byte;
- typedef gsm_byte gsm_frame[33]; /* 33 * 8 bits */
- #define GSM_MAGIC 0xD /* 13 kbit/s RPE-LTP */
- #define GSM_PATCHLEVEL 2
- #define GSM_MINOR 0
- #define GSM_MAJOR 1
- // Gsm Option
- #define GSM_OPT_VERBOSE 1
- #define GSM_OPT_FAST 2
- #ifdef __cplusplus
- extern "C" {
- #endif
- gsm gsm_create GSM_P((void));
- void gsm_destroy GSM_P((gsm));
- int gsm_print GSM_P((FILE *, gsm, gsm_byte *));
- int gsm_option GSM_P((gsm, long, long *));
- void gsm_encode GSM_P((gsm, gsm_signal *, gsm_byte *));
- int gsm_decode GSM_P((gsm, gsm_byte *, gsm_signal *));
- int gsm_explode GSM_P((gsm, gsm_byte *, gsm_signal *));
- void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte *));
- #ifdef __cplusplus
- }
- #endif
- #undef GSM_P
- #endif /* GSM_H */
- class CGsmCompress : public CCompress
- {
- public:
- CGsmCompress();
- virtual ~CGsmCompress();
- virtual char * Compress(char* src,int * srclen);
- virtual char * UnCompress(char* src,int * srclen);
- private:
- gsm m_hGsm;
- };
- #endif