Fixed #1064:
- Removed orphaned third_party/gsm/inc/gsm.h.orig file - Added support for external GSM header in /usr/include/gsm.h (rather than <gsm/gsm.h>) Thanks Christopher Zimmermann for the fixes git-svn-id: https://svn.pjsip.org/repos/pjproject/trunk@3158 74dad513-b988-da41-8d7b-12977e46ad98
This commit is contained in:
parent
d4933d7454
commit
d43064377b
11724
aconfigure
11724
aconfigure
File diff suppressed because it is too large
Load Diff
|
@ -408,17 +408,30 @@ AC_ARG_WITH(external-gsm,
|
|||
[Use external GSM codec library, not the one in "third_party" directory. When this option is set, make sure that the GSM include/lib files are accessible to use (hint: use CFLAGS and LDFLAGS env var to set the include/lib paths)]),
|
||||
[
|
||||
if test "x$with_external_gsm" != "xno"; then
|
||||
# Test GSM library installation
|
||||
AC_MSG_CHECKING([if external GSM devkit is installed])
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <gsm/gsm.h>
|
||||
]],
|
||||
[gsm_create(); ])
|
||||
],
|
||||
[AC_MSG_RESULT(yes!!)
|
||||
AC_DEFINE(PJMEDIA_EXTERNAL_GSM_CODEC, 1)
|
||||
ac_external_gsm="1"
|
||||
],
|
||||
[AC_MSG_ERROR([Unable to use external GSM library. If GSM development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])])
|
||||
# Test GSM library installation
|
||||
AC_MSG_CHECKING([if external GSM devkit is installed as gsm/gsm.h])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <gsm/gsm.h> ]], [gsm_create(); ]) ],
|
||||
[AC_MSG_RESULT(yes!!)
|
||||
AC_DEFINE(PJMEDIA_EXTERNAL_GSM_CODEC, 1)
|
||||
AC_DEFINE(PJMEDIA_EXTERNAL_GSM_GSM_H, 1)
|
||||
ac_external_gsm="1"
|
||||
],
|
||||
[
|
||||
AC_MSG_RESULT(no)
|
||||
AC_MSG_CHECKING([if external GSM devkit is installed as gsm.h])
|
||||
AC_COMPILE_IFELSE(
|
||||
[AC_LANG_PROGRAM([[#include <gsm.h> ]], [gsm_create(); ]) ],
|
||||
[AC_MSG_RESULT(yes!!)
|
||||
AC_DEFINE(PJMEDIA_EXTERNAL_GSM_CODEC, 1)
|
||||
AC_DEFINE(PJMEDIA_EXTERNAL_GSM_H, 1)
|
||||
ac_external_gsm="1"
|
||||
],
|
||||
[AC_MSG_ERROR([Unable to use external GSM library. If GSM development files are not available in the default locations, use CFLAGS and LDFLAGS env var to set the include/lib paths])
|
||||
]
|
||||
)
|
||||
]
|
||||
)
|
||||
fi
|
||||
]
|
||||
)
|
||||
|
|
|
@ -43,6 +43,8 @@
|
|||
#endif
|
||||
|
||||
#undef PJMEDIA_EXTERNAL_GSM_CODEC
|
||||
#undef PJMEDIA_EXTERNAL_GSM_GSM_H
|
||||
#undef PJMEDIA_EXTERNAL_GSM_H
|
||||
|
||||
/* Speex codec */
|
||||
#ifndef PJMEDIA_HAS_SPEEX_CODEC
|
||||
|
|
|
@ -35,7 +35,13 @@
|
|||
#if defined(PJMEDIA_HAS_GSM_CODEC) && PJMEDIA_HAS_GSM_CODEC != 0
|
||||
|
||||
#if defined(PJMEDIA_EXTERNAL_GSM_CODEC) && PJMEDIA_EXTERNAL_GSM_CODEC
|
||||
# if PJMEDIA_EXTERNAL_GSM_GSM_H
|
||||
# include <gsm/gsm.h>
|
||||
# elif PJMEDIA_EXTERNAL_GSM_H
|
||||
# include <gsm.h>
|
||||
# else
|
||||
# error Please set the location of gsm.h
|
||||
# endif
|
||||
#else
|
||||
# include "../../third_party/gsm/inc/gsm.h"
|
||||
#endif
|
||||
|
|
|
@ -1,71 +0,0 @@
|
|||
/*
|
||||
* Copyright 1992 by Jutta Degener and Carsten Bormann, Technische
|
||||
* Universitaet Berlin. See the accompanying file "COPYRIGHT" for
|
||||
* details. THERE IS ABSOLUTELY NO WARRANTY FOR THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/*$Header: /tmp_amd/presto/export/kbs/jutta/src/gsm/RCS/gsm.h,v 1.10 1996/07/02 10:15:22 jutta Exp $*/
|
||||
|
||||
#ifndef GSM_H
|
||||
#define GSM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
# define NeedFunctionPrototypes 1
|
||||
#endif
|
||||
|
||||
#if __STDC__
|
||||
# define NeedFunctionPrototypes 1
|
||||
#endif
|
||||
|
||||
#ifdef _NO_PROTO
|
||||
# undef NeedFunctionPrototypes
|
||||
#endif
|
||||
|
||||
#ifdef NeedFunctionPrototypes
|
||||
# include <stdio.h> /* for FILE * */
|
||||
#endif
|
||||
|
||||
#undef GSM_P
|
||||
#if NeedFunctionPrototypes
|
||||
# define GSM_P( protos ) protos
|
||||
#else
|
||||
# define GSM_P( protos ) ( /* protos */ )
|
||||
#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 9
|
||||
#define GSM_MINOR 0
|
||||
#define GSM_MAJOR 1
|
||||
|
||||
#define GSM_OPT_VERBOSE 1
|
||||
#define GSM_OPT_FAST 2
|
||||
#define GSM_OPT_LTP_CUT 3
|
||||
#define GSM_OPT_WAV49 4
|
||||
#define GSM_OPT_FRAME_INDEX 5
|
||||
#define GSM_OPT_FRAME_CHAIN 6
|
||||
|
||||
extern gsm gsm_create GSM_P((void));
|
||||
extern void gsm_destroy GSM_P((gsm));
|
||||
|
||||
extern int gsm_print GSM_P((FILE *, gsm, gsm_byte *));
|
||||
extern int gsm_option GSM_P((gsm, int, int *));
|
||||
|
||||
extern void gsm_encode GSM_P((gsm, gsm_signal *, gsm_byte *));
|
||||
extern int gsm_decode GSM_P((gsm, gsm_byte *, gsm_signal *));
|
||||
|
||||
extern int gsm_explode GSM_P((gsm, gsm_byte *, gsm_signal *));
|
||||
extern void gsm_implode GSM_P((gsm, gsm_signal *, gsm_byte *));
|
||||
|
||||
#undef GSM_P
|
||||
|
||||
#endif /* GSM_H */
|
Loading…
Reference in New Issue