Skip to content

Commit 5eea571

Browse files
author
jejbgo
committed
sipdroid: add the speex codec
This patch adds some of the speex-1.2rc1 files (enough to build a narrow band codec) to our JNI. The licence appears to be compatible with GPL. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
1 parent db3e892 commit 5eea571

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+11817
-1
lines changed

jni/Android.mk

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,43 @@
11
LOCAL_PATH := $(call my-dir)
2+
SPEEX := speex-1.2rc1
23

34
include $(CLEAR_VARS)
45

56
LOCAL_MODULE := OSNetworkSystem
67
LOCAL_SRC_FILES := OSNetworkSystem.cpp
78

89
include $(BUILD_SHARED_LIBRARY)
10+
11+
include $(CLEAR_VARS)
12+
13+
LOCAL_MODULE := speex_jni
14+
LOCAL_SRC_FILES := speex_jni.cpp \
15+
$(SPEEX)/libspeex/speex.c \
16+
$(SPEEX)/libspeex/speex_callbacks.c \
17+
$(SPEEX)/libspeex/bits.c \
18+
$(SPEEX)/libspeex/modes.c \
19+
$(SPEEX)/libspeex/nb_celp.c \
20+
$(SPEEX)/libspeex/exc_20_32_table.c \
21+
$(SPEEX)/libspeex/exc_5_256_table.c \
22+
$(SPEEX)/libspeex/exc_5_64_table.c \
23+
$(SPEEX)/libspeex/exc_8_128_table.c \
24+
$(SPEEX)/libspeex/exc_10_32_table.c \
25+
$(SPEEX)/libspeex/exc_10_16_table.c \
26+
$(SPEEX)/libspeex/filters.c \
27+
$(SPEEX)/libspeex/quant_lsp.c \
28+
$(SPEEX)/libspeex/ltp.c \
29+
$(SPEEX)/libspeex/lpc.c \
30+
$(SPEEX)/libspeex/lsp.c \
31+
$(SPEEX)/libspeex/vbr.c \
32+
$(SPEEX)/libspeex/gain_table.c \
33+
$(SPEEX)/libspeex/gain_table_lbr.c \
34+
$(SPEEX)/libspeex/lsp_tables_nb.c \
35+
$(SPEEX)/libspeex/cb_search.c \
36+
$(SPEEX)/libspeex/vq.c \
37+
$(SPEEX)/libspeex/window.c \
38+
$(SPEEX)/libspeex/high_lsp_tables.c
39+
40+
LOCAL_C_INCLUDES += $(LOCAL_PATH)/$(SPEEX)/include
41+
LOCAL_CFLAGS = -DFIXED_POINT -DEXPORT="" -UHAVE_CONFIG_H
42+
43+
include $(BUILD_SHARED_LIBRARY)

jni/Application.mk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
1-
APP_PROJECT_PATH := /cygdrive/c/android/sipdroid/
1+
APP_PROJECT_PATH := $(call my-dir)
22
APP_MODULES := OSNetworkSystem
3+
APP_MODULES += speex_jni

jni/speex-1.2rc1/COPYING

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
Copyright 2002-2008 Xiph.org Foundation
2+
Copyright 2002-2008 Jean-Marc Valin
3+
Copyright 2005-2007 Analog Devices Inc.
4+
Copyright 2005-2008 Commonwealth Scientific and Industrial Research
5+
Organisation (CSIRO)
6+
Copyright 1993, 2002, 2006 David Rowe
7+
Copyright 2003 EpicGames
8+
Copyright 1992-1994 Jutta Degener, Carsten Bormann
9+
10+
Redistribution and use in source and binary forms, with or without
11+
modification, are permitted provided that the following conditions
12+
are met:
13+
14+
- Redistributions of source code must retain the above copyright
15+
notice, this list of conditions and the following disclaimer.
16+
17+
- Redistributions in binary form must reproduce the above copyright
18+
notice, this list of conditions and the following disclaimer in the
19+
documentation and/or other materials provided with the distribution.
20+
21+
- Neither the name of the Xiph.org Foundation nor the names of its
22+
contributors may be used to endorse or promote products derived from
23+
this software without specific prior written permission.
24+
25+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26+
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
27+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
28+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
29+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
32+
PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
33+
LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
34+
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
35+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

jni/speex-1.2rc1/README.android

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
libspeex version 1.2 rc1
2+
see http://www.speex.org/
3+
4+
This copy is not complete, it only contains enough files to
5+
compile a narrow band speex codec (which is all SIP needs)

0 commit comments

Comments
 (0)