Commit 646009c2 authored by Guillaume BIENKOWSKI's avatar Guillaume BIENKOWSKI

Initial commit, compilation works but the plugin is empty..

parent 2c3ff870
Copyright Belledonne Communications SARL.
This diff is collapsed.
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) *
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/
#!/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
# -*- 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
/*
isac_dec.c
Copyright (C) 2013 Belledonne Communications, Grenoble, France
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifdef ISAC_FLAVOUR_MAIN
#include "isac.h"
#else
#include "isacfix.h"
#endif
#include "mediastreamer2/mscodecutils.h"
#include "mediastreamer2/msfilter.h"
#include "mediastreamer2/msticker.h"
#include "ortp/rtp.h"
#include <stdint.h>
static void filter_init(MSFilter *f){
}
static void filter_preprocess(MSFilter *f){
}
/**
put im to NULL for PLC
*/
// static void decode(MSFilter *f, mblk_t *im) {
// }
static void filter_process(MSFilter *f){
}
static void filter_postprocess(MSFilter *f){
}
static void filter_unit(MSFilter *f){
}
/*filter specific method*/
static int filter_set_sample_rate(MSFilter *f, void *arg) {
return 0;
}
static int filter_get_sample_rate(MSFilter *f, void *arg) {
return 0;
}
static int filter_set_rtp_picker(MSFilter *f, void *arg) {
return 0;
}
static int filter_have_plc(MSFilter *f, void *arg)
{
return 0;
}
static MSFilterMethod filter_methods[]={
{ MS_FILTER_SET_SAMPLE_RATE, filter_set_sample_rate },
{ MS_FILTER_GET_SAMPLE_RATE, filter_get_sample_rate },
{ MS_FILTER_SET_RTP_PAYLOAD_PICKER, filter_set_rtp_picker },
{ MS_DECODER_HAVE_PLC, filter_have_plc },
{ 0, NULL}
};
#ifdef _MSC_VER
MSFilterDesc ms_isac_dec_desc={
MS_FILTER_PLUGIN_ID, /* from Allfilters.h*/
"MSiSACDec",
"isac decoder filter.",
MS_FILTER_DECODER,
"iSAC",
1, /*number of inputs*/
1, /*number of outputs*/
filter_init,
filter_preprocess,
filter_process,
filter_postprocess,
filter_unit,
filter_methods,
MS_FILTER_IS_PUMP
};
#else
MSFilterDesc ms_isac_dec_desc={
.id=MS_FILTER_PLUGIN_ID, /* from Allfilters.h*/
.name="MSiSACDec",
.text="iSAC decoder filter.",
.category=MS_FILTER_DECODER,
.enc_fmt="iSAC",
.ninputs=1, /*number of inputs*/
.noutputs=1, /*number of outputs*/
.init=filter_init,
.preprocess=filter_preprocess,
.process=filter_process,
.postprocess=filter_postprocess,
.uninit=filter_unit,
.methods=filter_methods,
.flags=MS_FILTER_IS_PUMP
};
#endif
MS_FILTER_DESC_EXPORT(ms_isac_dec_desc)
/*
isac_enc.c
Copyright (C) 2013 Belledonne Communications, Grenoble, France
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifdef ISAC_FLAVOUR_MAIN
#include "isac.h"
#else
#include "isacfix.h"
#endif
#include "mediastreamer2/msfilter.h"
#include "mediastreamer2/mscodecutils.h"
/* Define codec specific settings */
#define MAX_BYTES_PER_FRAME 250 // Equals peak bitrate of 100 kbps
#define MAX_INPUT_FRAMES 5
/*filter common method*/
static void filter_init ( MSFilter *f ) {
}
static void filter_preprocess ( MSFilter *f ) {
}
static void filter_process ( MSFilter *f ) {
}
static void filter_postprocess ( MSFilter *f ) {
}
static void filter_uninit ( MSFilter *f ) {
}
/*filter specific method*/
static int filter_set_sample_rate ( MSFilter *f, void *arg ) {
return 0;
}
static int filter_get_sample_rate ( MSFilter *f, void *arg ) {
return 0;
}
static int filter_set_bitrate ( MSFilter *f, void *arg );
#ifdef MS_AUDIO_ENCODER_SET_PTIME
static int filter_get_ptime(MSFilter *f, void *arg){
return 0;
}
#endif
static int filter_set_ptime(MSFilter *f, void *arg){
return 0;
}
static int filter_add_fmtp ( MSFilter *f, void *arg ) {
return 0;
}
static int filter_set_bitrate ( MSFilter *f, void *arg ) {
return 0;
}
static int filter_get_bitrate ( MSFilter *f, void *arg ) {
return 0;
}
#ifdef MS_AUDIO_ENCODER_SET_PACKET_LOSS
static int filter_set_packetloss(MSFilter *f, void *arg){
return 0;
}
static int filter_enable_inband_fec(MSFilter *f, void *arg){
return 0;
}
#endif /*MS_AUDIO_ENCODER_SET_PACKET_LOSS*/
static MSFilterMethod filter_methods[]= {
{MS_FILTER_SET_SAMPLE_RATE, filter_set_sample_rate },
{MS_FILTER_GET_SAMPLE_RATE, filter_get_sample_rate },
{MS_FILTER_SET_BITRATE, filter_set_bitrate },
{MS_FILTER_GET_BITRATE, filter_get_bitrate },
{MS_FILTER_ADD_FMTP, filter_add_fmtp },
#ifdef MS_AUDIO_ENCODER_SET_PTIME
{MS_AUDIO_ENCODER_SET_PTIME, filter_set_ptime },
{MS_AUDIO_ENCODER_GET_PTIME, filter_get_ptime },
#endif
#ifdef MS_AUDIO_ENCODER_SET_PACKET_LOSS
{MS_AUDIO_ENCODER_SET_PACKET_LOSS, filter_set_packetloss },
{MS_AUDIO_ENCODER_ENABLE_FEC, filter_enable_inband_fec },
#endif
{0, NULL}
};
#ifdef _MSC_VER
MSFilterDesc ms_isac_enc_desc= {
MS_FILTER_PLUGIN_ID, /* from Allfilters.h*/
"MSiSACEnc",
"iSAC audio encoder filter.",
MS_FILTER_ENCODER,
"iSAC",
1, /*number of inputs*/
1, /*number of outputs*/
filter_init,
filter_preprocess,
filter_process,
filter_postprocess,
filter_uninit,
filter_methods,
0
};
#else
MSFilterDesc ms_isac_enc_desc = {
.id=MS_FILTER_PLUGIN_ID, /* from Allfilters.h*/
.name="MSiSACEnc",
.text="iSAC audio encoder filter.",
.category=MS_FILTER_ENCODER,
.enc_fmt="iSAC",
.ninputs=1, /*number of inputs*/
.noutputs=1, /*number of outputs*/
.init=filter_init,
.preprocess=filter_preprocess,
.process=filter_process,
.postprocess=filter_postprocess,
.uninit=filter_uninit,
.methods=filter_methods
};
#endif
MS_FILTER_DESC_EXPORT ( ms_isac_enc_desc )
extern MSFilterDesc ms_isac_dec_desc;
#ifndef VERSION
#define VERSION "debug"
#endif
#ifdef _MSC_VER
#define MS_PLUGIN_DECLARE(type) __declspec(dllexport) type
#else
#define MS_PLUGIN_DECLARE(type) type
#endif
MS_PLUGIN_DECLARE ( void ) libmsisac_init() {
ms_filter_register ( &ms_isac_enc_desc );
ms_filter_register ( &ms_isac_dec_desc );
ms_message ( " libmsisac " VERSION " plugin loaded" );
}
source/arith_routines.c
source/arith_routines_hist.c
source/arith_routines_logist.c
source/bandwidth_estimator.c
source/decode.c
source/decode_bwe.c
source/encode.c
source/entropy_coding.c
source/fft.c
source/filterbank_tables.c
source/filterbanks.c
source/intialize.c
source/isac.c
source/lattice.c
source/lpc_analysis.c
source/lpc_gain_swb_tables.c
source/lpc_shape_swb12_tables.c
source/lpc_shape_swb16_tables.c
source/lpc_tables.c
source/pitch_estimator.c
source/pitch_filter.c
source/pitch_gain_tables.c
source/pitch_lag_tables.c
source/spectrum_ar_model_tables.c
source/transform.c
test/simpleKenny.c
util/utility.c
source/crc.c
source/encode_lpc_swb.c
source/filter_functions.c
\ No newline at end of file
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
[Setup]
AppName=msisac
AppVerName=msisac version @VERSION@ , plugin for linphone.
AppPublisher=linphone.org
AppPublisherURL=http://www.linphone.org
AppSupportURL=http://www.linphone.org
AppUpdatesURL=http://www.linphone.org
DefaultDirName={pf}\Linphone
DefaultGroupName=Linphone
LicenseFile=COPYING
;InfoBeforeFile=README
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
;Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
#include "msisac-win32.filelist"
isac_dir = $(srcdir)/webrtc
webrtc_repo = git://git.linphone.org/webrtc
BUILT_SOURCES = $(isac_dir)
GIT=$(shell which git)
$(isac_dir):
$(GIT) clone $(webrtc_repo)
extract-sources: $(isac_dir)
# Call Skype Makefile to build the library
all-local: $(isac_dir)
# cd $(isac_dir) && $(MAKE) AS="$(AS)" AR="$(AR)" RANLIB="$(RANLIB)" CC="$(CC) $(CFLAGS)" LD="$(LD)" $(ISAC_MAKE_OPTIONS) $(AM_MAKEFLAGS) lib
check-local: $(isac_dir)
# cd $(isac_dir) && $(MAKE) $(AM_MAKEFLAGS) test
clean-local: $(isac_dir)
install-data-local: $(isac_dir)
distclean-local:
rm -rf $(isac_dir)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment