Skip to content

Commit

Permalink
Initial commit, compilation works but the plugin is empty..
Browse files Browse the repository at this point in the history
  • Loading branch information
Guillaume BIENKOWSKI committed Oct 17, 2013
1 parent 2c3ff87 commit 646009c
Show file tree
Hide file tree
Showing 13 changed files with 1,000 additions and 0 deletions.
2 changes: 2 additions & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Copyright Belledonne Communications SARL.

340 changes: 340 additions & 0 deletions COPYING

Large diffs are not rendered by default.

Empty file added ChangeLog
Empty file.
128 changes: 128 additions & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
EXTRA_DIST=autogen.sh msisac.iss.in
isac_VERSION = 1.0.0
isac_DIR=$(top_builddir)/sdk/webrtc

SUBDIRS = sdk

# ISAC_FLAVOUR = main # use 'main' or 'fix'
ISAC_SRC_DIR = sdk/webrtc/modules/audio_coding/codecs/isac/$(ISAC_FLAVOUR)

pluginsdir = $(libdir)/mediastreamer/plugins

plugins_LTLIBRARIES=libmsisac.la

# Build the list of isac source files
ISAC_BASE_SRCS = $(ISAC_SRC_DIR)/source/fft.c \
$(ISAC_SRC_DIR)/source/arith_routines.c \
$(ISAC_SRC_DIR)/source/arith_routines_hist.c \
$(ISAC_SRC_DIR)/source/arith_routines_logist.c \
$(ISAC_SRC_DIR)/source/bandwidth_estimator.c \
$(ISAC_SRC_DIR)/source/decode.c \
$(ISAC_SRC_DIR)/source/decode_bwe.c \
$(ISAC_SRC_DIR)/source/encode.c \
$(ISAC_SRC_DIR)/source/entropy_coding.c \
$(ISAC_SRC_DIR)/source/filterbank_tables.c \
$(ISAC_SRC_DIR)/source/filterbanks.c \
$(ISAC_SRC_DIR)/source/lattice.c \
$(ISAC_SRC_DIR)/source/lpc_tables.c \
$(ISAC_SRC_DIR)/source/pitch_estimator.c \
$(ISAC_SRC_DIR)/source/pitch_filter.c \
$(ISAC_SRC_DIR)/source/pitch_gain_tables.c \
$(ISAC_SRC_DIR)/source/pitch_lag_tables.c \
$(ISAC_SRC_DIR)/source/spectrum_ar_model_tables.c \
$(ISAC_SRC_DIR)/source/transform.c

# some files are implementation specific

if ISAC_FLAVOUR_MAIN

# floating point implementation
ISAC_BASE_SRCS += $(ISAC_SRC_DIR)/source/intialize.c \
$(ISAC_SRC_DIR)/source/crc.c \
$(ISAC_SRC_DIR)/source/encode_lpc_swb.c \
$(ISAC_SRC_DIR)/source/filter_functions.c \
$(ISAC_SRC_DIR)/source/isac.c \
$(ISAC_SRC_DIR)/source/lpc_analysis.c \
$(ISAC_SRC_DIR)/source/lpc_gain_swb_tables.c \
$(ISAC_SRC_DIR)/source/lpc_shape_swb12_tables.c \
$(ISAC_SRC_DIR)/source/lpc_shape_swb16_tables.c \
$(ISAC_SRC_DIR)/util/utility.c

else

# fixed point implementation
ISAC_BASE_SRCS += $(ISAC_SRC_DIR)/source/decode_plc.c \
$(ISAC_SRC_DIR)/source/filters.c \
$(ISAC_SRC_DIR)/source/initialize.c \
$(ISAC_SRC_DIR)/source/isacfix.c \
$(ISAC_SRC_DIR)/source/lattice_c.c \
$(ISAC_SRC_DIR)/source/pitch_filter_c.c \
$(ISAC_SRC_DIR)/source/lpc_masking_model.c

# TODO: use assembly-optimized versions when possible
# $(ISAC_SRC_DIR)/source/filters_neon.c \
# $(ISAC_SRC_DIR)/source/lpc_masking_model_neon.S \
# $(ISAC_SRC_DIR)/source/pitch_filter_armv6.S \
# $(ISAC_SRC_DIR)/source/lattice_neon.S \
# $(ISAC_SRC_DIR)/source/lattice_armv7.S

endif


libmsisac_la_SOURCES= $(ISAC_BASE_SRCS) isac_dec.c isac_enc.c



libmsisac_la_LIBADD=\
$(ORTP_LIBS) \
$(MEDIASTREAMER_LIBS)

libmsisac_la_LDFLAGS=-module -no-undefined

isac_CFLAGS = -I$(isac_DIR) \
-I$(ISAC_SRC_DIR)/source -I$(ISAC_SRC_DIR)/util -I$(ISAC_SRC_DIR)/interface \
-Isdk/webrtc/common_audio/signal_processing/include


AM_CFLAGS= $(isac_CFLAGS) \
$(MEDIASTREAMER_CFLAGS) \
$(STRICT_CFLAGS)

INSTALLDIR=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-install
INSTALLDIR_WITH_PREFIX=$(INSTALLDIR)/$(prefix)
ZIPFILE=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-win32-$(VERSION).zip
ZIP_EXCLUDED=include

ISS_SCRIPT=msisac.iss
ISS_SCRIPT_PATH=$(shell cd $(top_srcdir) && pwd)/$(ISS_SCRIPT)
#path to Inno Setup 5 compiler
ISCC=ISCC.exe
PACKAGE_WIN32_FILELIST=$(PACKAGE)-win32.filelist

setup.exe: zip
cd $(INSTALLDIR_WITH_PREFIX) && \
rm -f $(PACKAGE_WIN32_FILELIST) && \
for file in `find` ; do \
if ! test -d $$file ; then \
echo "Source: $$file; Destdir: {app}\\`dirname $$file`; Flags: ignoreversion" \
>> $(PACKAGE_WIN32_FILELIST) ;\
fi \
done
cp $(ISS_SCRIPT) $(INSTALLDIR_WITH_PREFIX)/.
cd $(INSTALLDIR_WITH_PREFIX) && \
$(ISCC) $(ISS_SCRIPT)
mv $(INSTALLDIR_WITH_PREFIX)/Output/setup.exe $(PACKAGE)-$(VERSION)-setup.exe
rm -rf $(INSTALLDIR_WITH_PREFIX)/Output
rm -f $(INSTALLDIR_WITH_PREFIX)/$(PACKAGE_WIN32_FILELIST)
rm -f $(INSTALLDIR_WITH_PREFIX)/$(ISS_SCRIPT)

zip:
rm -f $(ZIPFILE)
rm -rf $(INSTALLDIR)
mkdir -p $(INSTALLDIR)
make install DESTDIR=$(INSTALLDIR)
cp -f $(top_srcdir)/README $(INSTALLDIR_WITH_PREFIX)/.
cp -f $(top_srcdir)/COPYING $(INSTALLDIR_WITH_PREFIX)/.
cd $(INSTALLDIR)/$(prefix) && rm -rf $(ZIP_EXCLUDED) && \
zip -r $(ZIPFILE) *

Empty file added NEWS
Empty file.
8 changes: 8 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
msisac - mediastreamer2 (linphone) plugin for iSAC codec.

This package downloads and builds the iSAC codec from the WebRTC repository.

By default, the upstream package installs into /usr/local. Please use
'./configure --prefix' to change it

To compile on Windows using Visual Studio you need to install wget and unzip from the GnuWin32 project and put them in your path. You can download them from http://gnuwin32.sourceforge.net/
32 changes: 32 additions & 0 deletions autogen.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/sh

#AM_VERSION="1.11"
if ! type aclocal-$AM_VERSION 1>/dev/null 2>&1; then
AUTOMAKE=automake
ACLOCAL=aclocal
else
ACLOCAL=aclocal-${AM_VERSION}
AUTOMAKE=automake-${AM_VERSION}
fi

if test -f /opt/local/bin/glibtoolize ; then
# darwin
LIBTOOLIZE=/opt/local/bin/glibtoolize
else
LIBTOOLIZE=libtoolize
fi
if test -d /opt/local/share/aclocal ; then
ACLOCAL_ARGS="-I /opt/local/share/aclocal"
fi
if test -d /share/aclocal ; then
ACLOCAL_ARGS="$ACLOCAL_ARGS -I /share/aclocal"
fi

echo "Generating build scripts for iSAC mediastreamer2 plugin..."
set -x
$LIBTOOLIZE --copy --force
$ACLOCAL $ACLOCAL_ARGS
#autoheader
$AUTOMAKE --force-missing --add-missing --copy
autoconf

117 changes: 117 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_INIT([msisac],[1.0.0])
AC_PREREQ(2.63)
# AC_CONFIG_SRCDIR([sdk/known_checksums/SILK_SDK_SRC_v1.0.8.zip.md5])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([tar-ustar --warnings=no-portability])

AC_CANONICAL_SYSTEM

AC_ARG_ENABLE(strict,
[ --enable-strict Enable error on compilation warning [default=no]],
[wall_werror=$enableval],
[wall_werror=yes]
)


CFLAGS="$CFLAGS -Wall"

if test "$wall_werror" = "yes" ; then
STRICT_CFLAGS="-Werror"
fi

AC_SUBST(STRICT_CFLAGS)


# case $host in
# arm*)
# case $CC in
# *clang*) # clang doesn't like the old ARM assembly
# ISAC_FLAVOUR=fix
# ;;
# *)
# ISAC_FLAVOUR=fix
# ;;
# esac
# ;;
# *)
# ISAC_FLAVOUR=fix
# ;;
# esac

# we use fixed point implementation for speed
ISAC_FLAVOUR=fix

AC_SUBST([ISAC_FLAVOUR])
AM_CONDITIONAL(ISAC_FLAVOUR_MAIN, test $ISAC_FLAVOUR = main)

# case $host in
# armv6-apple*)
# ISAC_MAKE_OPTIONS="ADDED_DEFINES+=IPHONE TOOLCHAIN_PREFIX=XXXX"
# CFLAGS="$CFLAGS -mno-thumb"
# ;;
# armv7-apple*)
# ISAC_MAKE_OPTIONS="USE_NEON=yes ADDED_DEFINES+=IPHONE TOOLCHAIN_PREFIX=XXXX"
# CFLAGS="$CFLAGS -mno-thumb"
# ;;
# *)
# ;;
# esac

#AC_SUBST([ISAC_MAKE_OPTIONS])


# Checks for programs.
AC_PATH_PROG([GIT],[git])
if test -z "$GIT"; then
AC_MSG_ERROR(['git' is required to build this package])
fi

LT_INIT([disable-static])

# check for libraries that have pkg-config files installed
PKG_CHECK_MODULES(MEDIASTREAMER, mediastreamer >= 2.0.0)


# Checks for libraries.
# AC_CHECK_LIB([m],[cosf])

# initialize libtool
AC_LIBTOOL_WIN32_DLL
LT_INIT([disable-static])

case $target_os in
*mingw*)
mingw_found=yes
;;
esac

AM_CONDITIONAL(BUILD_WIN32, test x$mingw_found = xyes)


AC_CONFIG_COMMANDS([libtool-hacking],[
if test "$mingw_found" = "yes" ; then
AC_MSG_NOTICE([Hacking libtool to work with mingw...])
sed -e 's/\*\" \$a_deplib \"\*/\*/' < ./libtool > libtool.tmp
cp -f ./libtool.tmp ./libtool
rm -f ./libtool.tmp
fi
],[mingw_found=$mingw_found])

# Checks for library functions.

# Create the following files from their .in counterparts
AC_CONFIG_FILES([
Makefile
sdk/Makefile
msisac.iss
])

# src/Makefile
# pkgconfig/Makefile
# pkgconfig/silk.pc
# man/Makefile
AC_OUTPUT
Loading

0 comments on commit 646009c

Please sign in to comment.