From e1bcdb20e9ac3e2f13c45a76a3e94dd5bebbba6f Mon Sep 17 00:00:00 2001 From: jehan monnier Date: Tue, 20 Oct 2009 22:34:02 +0200 Subject: [PATCH 01/14] start mingw32ce port --- linphone/oRTP/configure.ac | 2 ++ linphone/oRTP/src/port.c | 2 +- linphone/scripts/cegcc-config.site | 14 ++++++++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 linphone/scripts/cegcc-config.site diff --git a/linphone/oRTP/configure.ac b/linphone/oRTP/configure.ac index 90da008aa..1412c23b4 100644 --- a/linphone/oRTP/configure.ac +++ b/linphone/oRTP/configure.ac @@ -98,6 +98,8 @@ case "$target_os" in AC_DEFINE(NOCONNECT,1,[Defined if we should not use connect() on udp sockets]) PTHREAD_LDFLAGS="-pthread" ;; + *mingw32ce) + CFLAGS="$CFLAGS -D_WIN32_WCE";; *mingw*) CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501 -DORTP_STATIC" LIBS="$LIBS -lws2_32 -liphlpapi -lwinmm" diff --git a/linphone/oRTP/src/port.c b/linphone/oRTP/src/port.c index 88ef75b21..73680f659 100644 --- a/linphone/oRTP/src/port.c +++ b/linphone/oRTP/src/port.c @@ -225,7 +225,7 @@ int WIN_thread_create(ortp_thread_t *th, void *attr, void * (*func)(void *), voi thread_param_t *params=ortp_new(thread_param_t,1); params->func=func; params->arg=data; - *th=(HANDLE)_beginthreadex( NULL, 0, thread_starter, params, 0, NULL); + *th=(HANDLE)_beginthreadex( NULL, 0, (LPTHREAD_START_ROUTINE)thread_starter, params, 0, NULL); return 0; } diff --git a/linphone/scripts/cegcc-config.site b/linphone/scripts/cegcc-config.site new file mode 100644 index 000000000..f682f17bb --- /dev/null +++ b/linphone/scripts/cegcc-config.site @@ -0,0 +1,14 @@ +# -*- shell-script -*- + + +ARCH=arm4l +SDK_BIN_PATH=/opt/mingw32ce/bin +SYSROOT_PATH=/opt/mingw32ce + +CC="${SDK_BIN_PATH}/arm-mingw32ce-gcc -std=c99 -isysroot=${SYSROOT_PATH}" +LD="${SDK_BIN_PATH}/arm-mingw32ce-ld " +AR=${SDK_BIN_PATH}/arm-mingw32ce-ar +RANLIB=${SDK_BIN_PATH}/arm-mingw32ce-ranlib + +CPPFLAGS="-Dasm=__asm" +#LDFLAGS="-Wl,-syslibroot ${SYSROOT_PATH}" From f37843dcbc1fe441c669ad76f58f821fb24c8704 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Wed, 21 Oct 2009 18:17:12 +0200 Subject: [PATCH 02/14] add generic builder for wince --- linphone/scripts/builder-arm-ming32ce.mk | 5 + linphone/scripts/builder-generic.mk | 165 +++++++++++++++++++++++ linphone/scripts/cegcc-config.site | 3 +- 3 files changed, 172 insertions(+), 1 deletion(-) create mode 100644 linphone/scripts/builder-arm-ming32ce.mk create mode 100644 linphone/scripts/builder-generic.mk diff --git a/linphone/scripts/builder-arm-ming32ce.mk b/linphone/scripts/builder-arm-ming32ce.mk new file mode 100644 index 000000000..3b96f9821 --- /dev/null +++ b/linphone/scripts/builder-arm-ming32ce.mk @@ -0,0 +1,5 @@ +host:=armv4-mingw32ce +config_site:=cegcc-config.site +library_mode:="" + +include builder-generic.mk diff --git a/linphone/scripts/builder-generic.mk b/linphone/scripts/builder-generic.mk new file mode 100644 index 000000000..4c055fc00 --- /dev/null +++ b/linphone/scripts/builder-generic.mk @@ -0,0 +1,165 @@ +host?=armv6-apple-darwin +config_site?=iphone-config.site +library_mode?= --disable-shared +libosip2_version=3.3.0 +libeXosip2_version=3.3.0 +libspeex_version=1.2rc1 +libgsm_version=1.0.13 +ifeq ($(target_arch),armv6) + SPEEX_CONFIGURE_OPTION := --enable-fixed-point + #SPEEX_CONFIGURE_OPTION := --enable-arm5e-asm --enable-fixed-point +endif + +LINPHONE_SRC_DIR=$(shell pwd)/../ +prefix=$(LINPHONE_SRC_DIR)/liblinphone-sdk/$(host) + +all: build-linphone +clean-makefile: clean-makefile-linphone +clean: clean-linphone + +delivery: + cd $(LINPHONE_SRC_DIR) \ + && zip -r linphone-iphone.zip \ + liblinphone-sdk xcode/linphone/ pixmaps/red.png \ + pixmaps/green.png share/ringback.wav \ + share/rings/oldphone-mono.wav \ + -x xcode/linphone/build/Debug-iphoneos/\* \ + xcode/linphone/build/Debug-iphonesimulator/\* \ + xcode/linphone/build/Release-iphoneos/\* \ + xcode/linphone/build/Release-iphonesimulator/\* \ + xcode/linphone/build/linphone.build/\* + + +$(LINPHONE_SRC_DIR)/configure: + cd $(LINPHONE_SRC_DIR) && ./autogen.sh + +$(LINPHONE_SRC_DIR)/Makefile: $(LINPHONE_SRC_DIR)/configure + cd $(LINPHONE_SRC_DIR) && \ + PKG_CONFIG_PATH=$(prefix)/ CONFIG_SITE=$(LINPHONE_SRC_DIR)/scripts/$(config_site) \ + ./configure -prefix=$(prefix) --host=$(host) ${library_mode} \ + --disable-video --with-readline=none --enable-gtk_ui=no --enable-ssl-hmac=no --with-osip=$(prefix) \ + --enable-nonstandard-gsm --with-gsm=$(prefix) \ + SPEEX_CFLAGS="-I$(prefix)/include" \ + SPEEX_LIBS="-L$(prefix)/lib -lspeex " + +build-linphone: build-osip2 build-eXosip2 build-speex build-libgsm $(LINPHONE_SRC_DIR)/Makefile + cd $(LINPHONE_SRC_DIR) && make newdate && make && make install + +clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-libgsm + cd $(LINPHONE_SRC_DIR) && make clean + +veryclean-linphone: clean-linphone veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-libgsm + cd $(LINPHONE_SRC_DIR) && make distclean + cd $(LINPHONE_SRC_DIR) && rm configure + +clean-makefile-linphone: clean-makefile-osip2 clean-makefile-eXosip2 clean-makefile-speex + cd $(LINPHONE_SRC_DIR) && rm Makefile && rm oRTP/Makefile && rm mediastreamer2/Makefile + + +get_dependencies: get_osip2_src get_eXosip2_src get_speex_src get_libgsm_src + +#osip2 + +get_osip2_src: + cd $(LINPHONE_SRC_DIR)/ \ + && rm -f libosip2-$(libosip2_version).tar.gz \ + && wget http://ftp.gnu.org/gnu/osip/libosip2-$(libosip2_version).tar.gz \ + && tar xvzf libosip2-$(libosip2_version).tar.gz \ + && rm -rf libosip2-$(libosip2_version).tar.gz \ + && cd libosip2-$(libosip2_version) \ + && patch -p1 < $(LINPHONE_SRC_DIR)/patches/libosip2-iphone.patch + +$(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/configure: + cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version) && ./autogen.sh + +$(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/Makefile: $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/configure + cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/ \ + && CONFIG_SITE=$(LINPHONE_SRC_DIR)/scripts/$(config_site) \ + ./configure -prefix=$(prefix) --host=$(host) ${library_mode} --enable-pthread=yes + +build-osip2: $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/Makefile + cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version) && make && make install + +clean-osip2: + cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version) && make clean + +veryclean-osip2: + cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version) && make distclean + cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version) && rm configure + +clean-makefile-osip2: + cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version) && rm Makefile +#eXosip + +get_eXosip2_src: + cd $(LINPHONE_SRC_DIR)/ \ + && rm -f libeXosip2-$(libeXosip2_version).tar.gz \ + && wget http://nongnu.askapache.com/exosip/libeXosip2-$(libeXosip2_version).tar.gz \ + && tar xvzf libeXosip2-$(libeXosip2_version).tar.gz \ + && rm -rf libeXosip2-$(libeXosip2_version).tar.gz + +$(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version)/Makefile: + cd $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version)/\ + && CONFIG_SITE=$(LINPHONE_SRC_DIR)/scripts/$(config_site) \ + ./configure -prefix=$(prefix) --host=$(host) ${library_mode} --enable-pthread + +build-eXosip2: $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version)/Makefile + cd $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version) && make && make install + +clean-eXosip2: + cd $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version) && make clean + +veryclean-eXosip2: + cd $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version) && make distclean + +clean-makefile-eXosip2: + cd $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version) && rm Makefile + +#speex + +get_speex_src: + cd $(LINPHONE_SRC_DIR)/\ + && rm -f speex-$(libspeex_version).tar.gz \ + && wget http://downloads.xiph.org/releases/speex/speex-$(libspeex_version).tar.gz \ + && tar xvzf speex-$(libspeex_version).tar.gz \ + && rm -f speex-$(libspeex_version).tar.gz + +$(LINPHONE_SRC_DIR)/speex-$(libspeex_version)/Makefile: + cd $(LINPHONE_SRC_DIR)/speex-$(libspeex_version)/\ + && CONFIG_SITE=$(LINPHONE_SRC_DIR)/scripts/$(config_site) \ + ./configure -prefix=$(prefix) --host=$(host) ${library_mode} --disable-oggtest $(SPEEX_CONFIGURE_OPTION) + +build-speex: $(LINPHONE_SRC_DIR)/speex-$(libspeex_version)/Makefile + cd $(LINPHONE_SRC_DIR)/speex-$(libspeex_version)/libspeex && make && make install + cd $(LINPHONE_SRC_DIR)/speex-$(libspeex_version)/include && make && make install + +clean-speex: + cd $(LINPHONE_SRC_DIR)/speex-$(libspeex_version) && make clean + +veryclean-speex: + cd $(LINPHONE_SRC_DIR)/speex-$(libspeex_version) && make distclean + +clean-makefile-speex: + cd $(LINPHONE_SRC_DIR)/speex-$(libspeex_version) && rm Makefile + +#GSM + +get_libgsm_src: + - cd $(LINPHONE_SRC_DIR)/\ + && rm -f gsm-$(libgsm_version).tar.gz \ + && wget http://user.cs.tu-berlin.de/~jutta/gsm/gsm-$(libgsm_version).tar.gz \ + && tar xvzf gsm-$(libgsm_version).tar.gz \ + && rm -f gsm-$(libgsm_version).tar.gz +build-libgsm: + cd $(LINPHONE_SRC_DIR)/gsm-1.0-pl13\ + && mkdir -p $(prefix)/include/gsm \ + && host_alias=$(host) . ../scripts/$(config_site) \ + && make CC="$${CC}" INSTALL_ROOT=$(prefix) GSM_INSTALL_INC=$(prefix)/include/gsm install + +clean-libgsm: + cd $(LINPHONE_SRC_DIR)/gsm-1.0-pl13 \ + && make clean + +veryclean-libgsm: clean-libgsm + cd $(LINPHONE_SRC_DIR)/gsm-1.0-pl13 \ + && make uninstall diff --git a/linphone/scripts/cegcc-config.site b/linphone/scripts/cegcc-config.site index f682f17bb..408355fad 100644 --- a/linphone/scripts/cegcc-config.site +++ b/linphone/scripts/cegcc-config.site @@ -10,5 +10,6 @@ LD="${SDK_BIN_PATH}/arm-mingw32ce-ld " AR=${SDK_BIN_PATH}/arm-mingw32ce-ar RANLIB=${SDK_BIN_PATH}/arm-mingw32ce-ranlib -CPPFLAGS="-Dasm=__asm" +CPPFLAGS="-Dasm=__asm -D_WIN32_WCE" +CFLAGS="-D_WIN32_WCE" #LDFLAGS="-Wl,-syslibroot ${SYSROOT_PATH}" From f5d363da60f60481608bc21a7cc1732913e4142e Mon Sep 17 00:00:00 2001 From: jehan monnier Date: Wed, 21 Oct 2009 20:39:45 +0200 Subject: [PATCH 03/14] add linker search path for wince --- linphone/README.mingwce | 6 ++++++ linphone/oRTP/configure.ac | 3 ++- linphone/scripts/cegcc-config.site | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 linphone/README.mingwce diff --git a/linphone/README.mingwce b/linphone/README.mingwce new file mode 100644 index 000000000..ce2dc0000 --- /dev/null +++ b/linphone/README.mingwce @@ -0,0 +1,6 @@ +install arm-mingw32ce from 0.55 from http://cegcc.sourceforge.net/ + + +for ortp: +cd oRTP +./configure --host=arm-mingw32ce --enable-strict=no --enable-ipv6=no diff --git a/linphone/oRTP/configure.ac b/linphone/oRTP/configure.ac index 1412c23b4..696a7973f 100644 --- a/linphone/oRTP/configure.ac +++ b/linphone/oRTP/configure.ac @@ -99,7 +99,8 @@ case "$target_os" in PTHREAD_LDFLAGS="-pthread" ;; *mingw32ce) - CFLAGS="$CFLAGS -D_WIN32_WCE";; + CFLAGS="$CFLAGS -D_WIN32_WCE" + LIBS="$LIBS -lws2 -liphlpapi";; *mingw*) CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501 -DORTP_STATIC" LIBS="$LIBS -lws2_32 -liphlpapi -lwinmm" diff --git a/linphone/scripts/cegcc-config.site b/linphone/scripts/cegcc-config.site index f682f17bb..63f4c6624 100644 --- a/linphone/scripts/cegcc-config.site +++ b/linphone/scripts/cegcc-config.site @@ -12,3 +12,4 @@ RANLIB=${SDK_BIN_PATH}/arm-mingw32ce-ranlib CPPFLAGS="-Dasm=__asm" #LDFLAGS="-Wl,-syslibroot ${SYSROOT_PATH}" +LDFLAGS="-L${SYSROOT_PATH}/arm-mingw32ce/lib" From 8b30b5cf9d903e27a3026a99c3ff9cd64b54a19c Mon Sep 17 00:00:00 2001 From: jehan monnier Date: Wed, 21 Oct 2009 21:59:47 +0200 Subject: [PATCH 04/14] debug mingw32ce build for libosip2 --- linphone/scripts/builder-arm-ming32ce.mk | 1 + linphone/scripts/builder-generic.mk | 7 +++++-- linphone/scripts/cegcc-config.site | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/linphone/scripts/builder-arm-ming32ce.mk b/linphone/scripts/builder-arm-ming32ce.mk index 3b96f9821..30d8c652a 100644 --- a/linphone/scripts/builder-arm-ming32ce.mk +++ b/linphone/scripts/builder-arm-ming32ce.mk @@ -1,5 +1,6 @@ host:=armv4-mingw32ce config_site:=cegcc-config.site library_mode:="" +libosip2_version:=svn include builder-generic.mk diff --git a/linphone/scripts/builder-generic.mk b/linphone/scripts/builder-generic.mk index 4c055fc00..61a498185 100644 --- a/linphone/scripts/builder-generic.mk +++ b/linphone/scripts/builder-generic.mk @@ -1,7 +1,7 @@ host?=armv6-apple-darwin config_site?=iphone-config.site library_mode?= --disable-shared -libosip2_version=3.3.0 +libosip2_version?=3.3.0 libeXosip2_version=3.3.0 libspeex_version=1.2rc1 libgsm_version=1.0.13 @@ -60,6 +60,9 @@ get_dependencies: get_osip2_src get_eXosip2_src get_speex_src get_libgsm_src #osip2 +get_osip2_svn: + cd $(LINPHONE_SRC_DIR)/ \ + && svn co svn://svn.sv.gnu.org/osip/trunk/osip libosip2-$(libosip2_version) get_osip2_src: cd $(LINPHONE_SRC_DIR)/ \ && rm -f libosip2-$(libosip2_version).tar.gz \ @@ -75,7 +78,7 @@ $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/configure: $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/Makefile: $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/configure cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/ \ && CONFIG_SITE=$(LINPHONE_SRC_DIR)/scripts/$(config_site) \ - ./configure -prefix=$(prefix) --host=$(host) ${library_mode} --enable-pthread=yes + ./configure -prefix=$(prefix) --host=$(host) ${library_mode} build-osip2: $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/Makefile cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version) && make && make install diff --git a/linphone/scripts/cegcc-config.site b/linphone/scripts/cegcc-config.site index d0fb3081a..d0b728026 100644 --- a/linphone/scripts/cegcc-config.site +++ b/linphone/scripts/cegcc-config.site @@ -13,4 +13,4 @@ RANLIB=${SDK_BIN_PATH}/arm-mingw32ce-ranlib CPPFLAGS="-Dasm=__asm -D_WIN32_WCE" CFLAGS="-D_WIN32_WCE" #LDFLAGS="-Wl,-syslibroot ${SYSROOT_PATH}" -LDFLAGS="-L${SYSROOT_PATH}/arm-mingw32ce/lib" +LDFLAGS="-Wl,-L${SYSROOT_PATH}/arm-mingw32ce/lib -lws2" From f5672d2dff8a84c4ef1c87a06d6ee99621db81c3 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Thu, 22 Oct 2009 18:20:38 +0200 Subject: [PATCH 05/14] yet and other step to wince compilation --- linphone/configure.in | 5 ++ linphone/mediastreamer2/configure.ac | 9 ++- .../include/mediastreamer2/mediastream.h | 1 + linphone/oRTP/configure.ac | 16 +++++- linphone/po/Makefile.in.in | 4 +- linphone/scripts/builder-arm-ming32ce.mk | 26 +++++++++ linphone/scripts/builder-generic.mk | 56 ++++++++++--------- linphone/scripts/cegcc-config.site | 7 ++- 8 files changed, 90 insertions(+), 34 deletions(-) diff --git a/linphone/configure.in b/linphone/configure.in index e996f9951..9730803bc 100644 --- a/linphone/configure.in +++ b/linphone/configure.in @@ -35,6 +35,11 @@ AC_HEADER_STDC AM_PROG_CC_C_O case $target_os in + *mingw32ce) + CFLAGS="$CFLAGS -D_WIN32_WCE" + LIBS="$LIBS -lws2 -liphlpapi" + mingw_found=yes + ;; *mingw*) CFLAGS="$CFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501" CXXFLAGS="$CXXFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501" diff --git a/linphone/mediastreamer2/configure.ac b/linphone/mediastreamer2/configure.ac index 6b288b76e..ea26ee637 100644 --- a/linphone/mediastreamer2/configure.ac +++ b/linphone/mediastreamer2/configure.ac @@ -134,7 +134,14 @@ case $target_os in macosx_found=yes LIBS="$LIBS -framework CoreFoundation -framework Cocoa" ;; - *mingw*) + *mingw32ce) + CFLAGS="$CFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -D_WIN32_WCE -DORTP_STATIC" + CXXFLAGS="$CXXFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -DORTP_STATIC -D_WIN32_WCE" +dnl ORTP_STATIC to tell ortp not to export its variable with dllexport, as if we were building statically, or dynamically on linux + LIBS="$LIBS -lws2" + mingw_found=yes + ;; + *mingw*) CFLAGS="$CFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -DORTP_STATIC" CXXFLAGS="$CXXFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -DORTP_STATIC" dnl ORTP_STATIC to tell ortp not to export its variable with dllexport, as if we were building statically, or dynamically on linux diff --git a/linphone/mediastreamer2/include/mediastreamer2/mediastream.h b/linphone/mediastreamer2/include/mediastreamer2/mediastream.h index 88544f655..eadff1495 100644 --- a/linphone/mediastreamer2/include/mediastreamer2/mediastream.h +++ b/linphone/mediastreamer2/include/mediastreamer2/mediastream.h @@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "mediastreamer2/msvideo.h" #include "ortp/ortp.h" #include "ortp/event.h" +#include typedef enum EchoLimiterType{ ELInactive, diff --git a/linphone/oRTP/configure.ac b/linphone/oRTP/configure.ac index 696a7973f..8e8a5a513 100644 --- a/linphone/oRTP/configure.ac +++ b/linphone/oRTP/configure.ac @@ -99,8 +99,11 @@ case "$target_os" in PTHREAD_LDFLAGS="-pthread" ;; *mingw32ce) - CFLAGS="$CFLAGS -D_WIN32_WCE" - LIBS="$LIBS -lws2 -liphlpapi";; + CFLAGS="$CFLAGS -D_WIN32_WCE -D_WIN32_WINNT=0x0501 -DORTP_STATIC" + LIBS="$LIBS -lws2 -liphlpapi" + build_tests=no + mingw_found=yes + ;; *mingw*) CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501 -DORTP_STATIC" LIBS="$LIBS -lws2_32 -liphlpapi -lwinmm" @@ -108,6 +111,15 @@ case "$target_os" in ;; esac +AC_CONFIG_COMMANDS([libtool-hacking],[ +if test "$mingw_found" = "yes" ; then + echo "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]) + dnl Checks for programs. AC_PROG_CC AC_LIBTOOL_WIN32_DLL diff --git a/linphone/po/Makefile.in.in b/linphone/po/Makefile.in.in index 57ef267b3..402a25f7a 100644 --- a/linphone/po/Makefile.in.in +++ b/linphone/po/Makefile.in.in @@ -21,7 +21,7 @@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ -SHELL = /bin/sh +SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -56,7 +56,7 @@ ALL_LINGUAS = @ALL_LINGUAS@ PO_LINGUAS=$(shell if test -r $(srcdir)/LINGUAS; then grep -v "^\#" $(srcdir)/LINGUAS; else echo "$(ALL_LINGUAS)"; fi) -USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep ^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep ^$$lang$$`"; then printf "$$lang "; fi; done; fi) +USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(srcdir)/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi) USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done) diff --git a/linphone/scripts/builder-arm-ming32ce.mk b/linphone/scripts/builder-arm-ming32ce.mk index 30d8c652a..495901f1b 100644 --- a/linphone/scripts/builder-arm-ming32ce.mk +++ b/linphone/scripts/builder-arm-ming32ce.mk @@ -2,5 +2,31 @@ host:=armv4-mingw32ce config_site:=cegcc-config.site library_mode:="" libosip2_version:=svn +libeXosip2_version:=svn +linphone_configure_controls?= --disable-video \ + --with-readline=none \ + --enable-gtk_ui=no \ + --enable-ssl-hmac=no \ + SPEEX_CFLAGS="-I$(prefix)/include" \ + SPEEX_LIBS="-L$(prefix)/lib -lspeex " include builder-generic.mk + + +build-linphone: build-osip2 build-eXosip2 build-speex $(LINPHONE_SRC_DIR)/Makefile + cd $(LINPHONE_SRC_DIR) && make newdate && make && make install + +clean-linphone: clean-osip2 clean-eXosip2 clean-speex + cd $(LINPHONE_SRC_DIR) && make clean + +veryclean-linphone: clean-linphone veryclean-osip2 veryclean-eXosip2 veryclean-speex + cd $(LINPHONE_SRC_DIR) && make distclean + cd $(LINPHONE_SRC_DIR) && rm configure + +clean-makefile-linphone: clean-makefile-osip2 clean-makefile-eXosip2 + cd $(LINPHONE_SRC_DIR) && rm Makefile && rm oRTP/Makefile && rm mediastreamer2/Makefile + + +get_dependencies: get_osip2_svn get_eXosip2_svn get_speex_src + + diff --git a/linphone/scripts/builder-generic.mk b/linphone/scripts/builder-generic.mk index 61a498185..59fc53e8e 100644 --- a/linphone/scripts/builder-generic.mk +++ b/linphone/scripts/builder-generic.mk @@ -2,11 +2,19 @@ host?=armv6-apple-darwin config_site?=iphone-config.site library_mode?= --disable-shared libosip2_version?=3.3.0 -libeXosip2_version=3.3.0 +libeXosip2_version?=3.3.0 libspeex_version=1.2rc1 libgsm_version=1.0.13 -ifeq ($(target_arch),armv6) - SPEEX_CONFIGURE_OPTION := --enable-fixed-point +linphone_configure_controls?= --disable-video \ + --with-readline=none \ + --enable-gtk_ui=no \ + --enable-ssl-hmac=no \ + --enable-nonstandard-gsm \ + --with-gsm=$(prefix) \ + SPEEX_CFLAGS="-I$(prefix)/include" \ + SPEEX_LIBS="-L$(prefix)/lib -lspeex " +ifneq (,$(findstring arm,$(host))) + SPEEX_CONFIGURE_OPTION := --enable-fixed-point --disable-float-api #SPEEX_CONFIGURE_OPTION := --enable-arm5e-asm --enable-fixed-point endif @@ -35,29 +43,18 @@ $(LINPHONE_SRC_DIR)/configure: $(LINPHONE_SRC_DIR)/Makefile: $(LINPHONE_SRC_DIR)/configure cd $(LINPHONE_SRC_DIR) && \ - PKG_CONFIG_PATH=$(prefix)/ CONFIG_SITE=$(LINPHONE_SRC_DIR)/scripts/$(config_site) \ + PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(LINPHONE_SRC_DIR)/scripts/$(config_site) \ ./configure -prefix=$(prefix) --host=$(host) ${library_mode} \ - --disable-video --with-readline=none --enable-gtk_ui=no --enable-ssl-hmac=no --with-osip=$(prefix) \ - --enable-nonstandard-gsm --with-gsm=$(prefix) \ - SPEEX_CFLAGS="-I$(prefix)/include" \ - SPEEX_LIBS="-L$(prefix)/lib -lspeex " - -build-linphone: build-osip2 build-eXosip2 build-speex build-libgsm $(LINPHONE_SRC_DIR)/Makefile - cd $(LINPHONE_SRC_DIR) && make newdate && make && make install - -clean-linphone: clean-osip2 clean-eXosip2 clean-speex clean-libgsm clean-libgsm - cd $(LINPHONE_SRC_DIR) && make clean - -veryclean-linphone: clean-linphone veryclean-osip2 veryclean-eXosip2 veryclean-speex veryclean-libgsm - cd $(LINPHONE_SRC_DIR) && make distclean - cd $(LINPHONE_SRC_DIR) && rm configure - -clean-makefile-linphone: clean-makefile-osip2 clean-makefile-eXosip2 clean-makefile-speex - cd $(LINPHONE_SRC_DIR) && rm Makefile && rm oRTP/Makefile && rm mediastreamer2/Makefile + ${linphone_configure_controls} -get_dependencies: get_osip2_src get_eXosip2_src get_speex_src get_libgsm_src +#libphone only (asume dependencies are met) +build-liblinphone: $(LINPHONE_SRC_DIR)/Makefile + cd $(LINPHONE_SRC_DIR) && make newdate && make && make install +clean-makefile-liblinphone: + cd $(LINPHONE_SRC_DIR) && rm Makefile && rm oRTP/Makefile && rm mediastreamer2/Makefile + #osip2 get_osip2_svn: @@ -93,7 +90,11 @@ veryclean-osip2: clean-makefile-osip2: cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version) && rm Makefile #eXosip - + +get_eXosip2_svn: + cd $(LINPHONE_SRC_DIR)/ \ + && svn co svn://svn.sv.gnu.org/exosip/trunk/exosip libeXosip2-$(libeXosip2_version) + get_eXosip2_src: cd $(LINPHONE_SRC_DIR)/ \ && rm -f libeXosip2-$(libeXosip2_version).tar.gz \ @@ -101,10 +102,13 @@ get_eXosip2_src: && tar xvzf libeXosip2-$(libeXosip2_version).tar.gz \ && rm -rf libeXosip2-$(libeXosip2_version).tar.gz -$(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version)/Makefile: +$(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version)/configure: + cd $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version) && ./autogen.sh + +$(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version)/Makefile: $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version)/configure cd $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version)/\ - && CONFIG_SITE=$(LINPHONE_SRC_DIR)/scripts/$(config_site) \ - ./configure -prefix=$(prefix) --host=$(host) ${library_mode} --enable-pthread + && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(LINPHONE_SRC_DIR)/scripts/$(config_site) \ + ./configure -prefix=$(prefix) --host=$(host) ${library_mode} --disable-tools build-eXosip2: $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version)/Makefile cd $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version) && make && make install diff --git a/linphone/scripts/cegcc-config.site b/linphone/scripts/cegcc-config.site index d0b728026..8ffc17354 100644 --- a/linphone/scripts/cegcc-config.site +++ b/linphone/scripts/cegcc-config.site @@ -5,12 +5,13 @@ ARCH=arm4l SDK_BIN_PATH=/opt/mingw32ce/bin SYSROOT_PATH=/opt/mingw32ce -CC="${SDK_BIN_PATH}/arm-mingw32ce-gcc -std=c99 -isysroot=${SYSROOT_PATH}" +CC="${SDK_BIN_PATH}/arm-mingw32ce-gcc -isysroot=${SYSROOT_PATH}" +CXX="${SDK_BIN_PATH}/arm-mingw32ce-g++ -isysroot=${SYSROOT_PATH}" LD="${SDK_BIN_PATH}/arm-mingw32ce-ld " AR=${SDK_BIN_PATH}/arm-mingw32ce-ar RANLIB=${SDK_BIN_PATH}/arm-mingw32ce-ranlib -CPPFLAGS="-Dasm=__asm -D_WIN32_WCE" -CFLAGS="-D_WIN32_WCE" +CPPFLAGS="-D_WIN32_WCE -DUNICODE -Drewind=" +#CFLAGS="-D_WIN32_WCE" #LDFLAGS="-Wl,-syslibroot ${SYSROOT_PATH}" LDFLAGS="-Wl,-L${SYSROOT_PATH}/arm-mingw32ce/lib -lws2" From fa2477edb46dfbd455e6bed4b9f74b76e62af21a Mon Sep 17 00:00:00 2001 From: jehan monnier Date: Thu, 22 Oct 2009 22:14:27 +0200 Subject: [PATCH 06/14] debug libtool hack for wince build --- linphone/configure.in | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/linphone/configure.in b/linphone/configure.in index 9730803bc..ca8b8f40b 100644 --- a/linphone/configure.in +++ b/linphone/configure.in @@ -39,6 +39,7 @@ case $target_os in CFLAGS="$CFLAGS -D_WIN32_WCE" LIBS="$LIBS -lws2 -liphlpapi" mingw_found=yes + mingwce_found=yes ;; *mingw*) CFLAGS="$CFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501" @@ -88,9 +89,15 @@ dnl gettext macro does not work properly under mingw. AM_GNU_GETTEXT([external]) LIBS="$LIBS $LIBINTL" else -AC_DEFINE(ENABLE_NLS,1,[Tells whether localisation is possible]) -AC_DEFINE(HAVE_GETTEXT,1,[Tells wheter localisation is possible]) -LIBS="$LIBS -L/usr/lib -lintl" + if test "$mingwce_found" != "yes" ; then + AC_DEFINE(ENABLE_NLS,1,[Tells whether localisation is possible]) + AC_DEFINE(HAVE_GETTEXT,1,[Tells wheter localisation is possible]) + LIBS="$LIBS -L/usr/lib -lintl" + else + dnl gettext macro does not work properly under mingw. + AM_GNU_GETTEXT([external]) + LIBS="$LIBS $LIBINTL" + fi fi GETTEXT_PACKAGE=linphone From 1b21c045f462e2f92ea892309217f0db20d3a0d1 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Fri, 23 Oct 2009 12:10:52 +0200 Subject: [PATCH 07/14] audio port to mingw32ce static libraries only --- linphone/README.mingwce | 27 +++- linphone/configure.in | 20 ++- linphone/coreapi/linphonecore.c | 156 +++++++++++----------- linphone/coreapi/misc.c | 47 ++++--- linphone/mediastreamer2/configure.ac | 7 +- linphone/mediastreamer2/tests/Makefile.am | 4 + linphone/patches/libeXosip2-wince.patch | 12 ++ linphone/patches/libosip2-wince.patch | 13 ++ linphone/scripts/builder-arm-ming32ce.mk | 30 ++++- linphone/scripts/builder-generic.mk | 32 ++++- linphone/scripts/cegcc-config.site | 17 --- linphone/scripts/mingw32ce-config.site | 34 +++++ 12 files changed, 270 insertions(+), 129 deletions(-) create mode 100644 linphone/patches/libeXosip2-wince.patch create mode 100644 linphone/patches/libosip2-wince.patch delete mode 100644 linphone/scripts/cegcc-config.site create mode 100644 linphone/scripts/mingw32ce-config.site diff --git a/linphone/README.mingwce b/linphone/README.mingwce index ce2dc0000..f6b038313 100644 --- a/linphone/README.mingwce +++ b/linphone/README.mingwce @@ -1,6 +1,25 @@ -install arm-mingw32ce from 0.55 from http://cegcc.sourceforge.net/ +install arm-mingw32ce 0.55 from from http://cegcc.sourceforge.net/ + +Modify the file errno.h found in +"/mingw/opt/mingw32ce/arm-wince-mingw32ce/include/errno.h" + +Remove lines 11-14: + +#ifdef __COREDLL__ +# include_next +#else /* __COREDLL__ */ + +and lines 106-107: + +#endif /* Not __COREDLL__ */ -for ortp: -cd oRTP -./configure --host=arm-mingw32ce --enable-strict=no --enable-ipv6=no + +get dependencies: + cd scripts + make -f builder-arm-ming32ce.mk get_dependencies + +build: +from scripts: + make -f builder-arm-ming32ce.mk build-linphone + diff --git a/linphone/configure.in b/linphone/configure.in index ca8b8f40b..273bf8e8e 100644 --- a/linphone/configure.in +++ b/linphone/configure.in @@ -36,13 +36,14 @@ AM_PROG_CC_C_O case $target_os in *mingw32ce) - CFLAGS="$CFLAGS -D_WIN32_WCE" - LIBS="$LIBS -lws2 -liphlpapi" + CFLAGS="$CFLAGS -D_WIN32_WCE -DORTP_STATIC -D_WIN32_WINNT=0x0501 -Dstrerror=" + CXXFLAGS="$CXXFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501" + LIBS="$LIBS -lws2 -liphlpapi" mingw_found=yes mingwce_found=yes ;; *mingw*) - CFLAGS="$CFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501" + CFLAGS="$CFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501 " CXXFLAGS="$CXXFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501" LIBS="$LIBS -lws2_32" GUI_FLAGS="-mwindows" @@ -326,6 +327,19 @@ dnl compilation of gtk-glade user interface AM_CONDITIONAL(BUILD_GLADE_UI, [test x$gtk_ui = xtrue ] ) AM_CONDITIONAL(BUILD_WIN32, test x$mingw_found = xyes ) +dnl check getenv +AH_TEMPLATE([HAVE_GETENV]) +AC_CHECK_FUNC([getenv], AC_DEFINE([HAVE_GETENV], [1], [If present, the getenv function allows fim to read environment variables.])) + +dnl +AC_MSG_CHECKING([for sighandler_t]) +AC_TRY_COMPILE([#include ],[sighandler_t *f;], +has_sighandler_t=yes,has_sighandler_t=no) +AC_MSG_RESULT($has_sighandler_t) +if test "$has_sighandler_t" = "yes" ; then + AC_DEFINE( HAVE_SIGHANDLER_T, 1, [Define if sighandler_t available] ) +fi + ################################################## # Stricter build options (after external packages) ################################################## diff --git a/linphone/coreapi/linphonecore.c b/linphone/coreapi/linphonecore.c index bbf5a8e04..661fc771e 100644 --- a/linphone/coreapi/linphonecore.c +++ b/linphone/coreapi/linphonecore.c @@ -31,9 +31,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "exevents.h" -#ifdef INET6 +#ifdef INET6 #ifndef WIN32 -#include +#include #endif #endif @@ -50,7 +50,7 @@ static void toggle_video_preview(LinphoneCore *lc, bool_t val); /* relative path where is stored local ring*/ #define LOCAL_RING "rings/oldphone.wav" /* same for remote ring (ringback)*/ -#define REMOTE_RING "ringback.wav" +#define REMOTE_RING "ringback.wav" sdp_handler_t linphone_sdphandler={ @@ -79,7 +79,7 @@ static void linphone_call_init_common(LinphoneCall *call, char *from, char *to) call->media_start_time=0; call->log=linphone_call_log_new(call, from, to); linphone_core_notify_all_friends(call->core,LINPHONE_STATUS_ONTHEPHONE); - if (linphone_core_get_firewall_policy(call->core)==LINPHONE_POLICY_USE_STUN) + if (linphone_core_get_firewall_policy(call->core)==LINPHONE_POLICY_USE_STUN) linphone_core_run_stun_tests(call->core,call); call->profile=rtp_profile_new("Call RTP profile"); } @@ -280,7 +280,7 @@ void _osip_trace_func(char *fi, int li, osip_trace_level_t level, char *chfr, va ortp_level=ORTP_FATAL; break; case END_TRACE_LEVEL: - break; + break; } if (ortp_log_level_enabled(level)){ int len=strlen(chfr); @@ -376,13 +376,13 @@ void sound_config_read(LinphoneCore *lc) devid=lp_config_get_string(lc->config,"sound","playback_dev_id",NULL); linphone_core_set_playback_device(lc,devid); - + devid=lp_config_get_string(lc->config,"sound","ringer_dev_id",NULL); linphone_core_set_ringer_device(lc,devid); - + devid=lp_config_get_string(lc->config,"sound","capture_dev_id",NULL); linphone_core_set_capture_device(lc,devid); - + /* tmp=lp_config_get_int(lc->config,"sound","play_lev",80); linphone_core_set_play_level(lc,tmp); @@ -393,7 +393,7 @@ void sound_config_read(LinphoneCore *lc) tmpbuf=lp_config_get_string(lc->config,"sound","source","m"); linphone_core_set_sound_source(lc,tmpbuf[0]); */ - + tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING; tmpbuf=lp_config_get_string(lc->config,"sound","local_ring",tmpbuf); if (access(tmpbuf,F_OK)==-1) { @@ -403,9 +403,9 @@ void sound_config_read(LinphoneCore *lc) /* it currently uses old sound files, so replace them */ tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING; } - + linphone_core_set_ring(lc,tmpbuf); - + tmpbuf=PACKAGE_SOUND_DIR "/" REMOTE_RING; tmpbuf=lp_config_get_string(lc->config,"sound","remote_ring",tmpbuf); if (access(tmpbuf,F_OK)==-1){ @@ -448,12 +448,16 @@ void sip_config_read(LinphoneCore *lc) linphone_core_enable_ipv6(lc,ipv6); port=lp_config_get_int(lc->config,"sip","sip_port",5060); linphone_core_set_sip_port(lc,port); - + tmpstr=lp_config_get_string(lc->config,"sip","contact",NULL); if (tmpstr==NULL || linphone_core_set_primary_contact(lc,tmpstr)==-1) { + char *hostname=NULL; + char *username=NULL; +#ifdef HAVE_GETENV char *hostname=getenv("HOST"); char *username=getenv("USER"); if (hostname==NULL) hostname=getenv("HOSTNAME"); +#endif /*HAVE_GETENV*/ if (hostname==NULL) hostname="unknown-host"; if (username==NULL){ @@ -466,8 +470,8 @@ void sip_config_read(LinphoneCore *lc) tmp=lp_config_get_int(lc->config,"sip","guess_hostname",1); linphone_core_set_guess_hostname(lc,tmp); - - + + tmp=lp_config_get_int(lc->config,"sip","inc_timeout",15); linphone_core_set_inc_timeout(lc,tmp); @@ -483,7 +487,7 @@ void sip_config_read(LinphoneCore *lc) /* get the default proxy */ tmp=lp_config_get_int(lc->config,"sip","default_proxy",-1); linphone_core_set_default_proxy_index(lc,tmp); - + /* read authentication information */ for(i=0;; i++){ LinphoneAuthInfo *ai=linphone_auth_info_new_from_config_file(lc->config,i); @@ -507,16 +511,16 @@ void rtp_config_read(LinphoneCore *lc) int nortp_timeout; port=lp_config_get_int(lc->config,"rtp","audio_rtp_port",7078); linphone_core_set_audio_port(lc,port); - + port=lp_config_get_int(lc->config,"rtp","video_rtp_port",9078); if (port==0) port=9078; linphone_core_set_video_port(lc,port); - + jitt_comp=lp_config_get_int(lc->config,"rtp","audio_jitt_comp",60); - linphone_core_set_audio_jittcomp(lc,jitt_comp); + linphone_core_set_audio_jittcomp(lc,jitt_comp); jitt_comp=lp_config_get_int(lc->config,"rtp","video_jitt_comp",60); nortp_timeout=lp_config_get_int(lc->config,"rtp","nortp_timeout",30); - linphone_core_set_nortp_timeout(lc,nortp_timeout); + linphone_core_set_nortp_timeout(lc,nortp_timeout); } @@ -525,14 +529,14 @@ PayloadType * get_codec(LpConfig *config, char* type,int index){ const char *mime,*fmtp; int rate,enabled; PayloadType *pt; - + snprintf(codeckey,50,"%s_%i",type,index); mime=lp_config_get_string(config,codeckey,"mime",NULL); if (mime==NULL || strlen(mime)==0 ) return NULL; - + pt=payload_type_new(); pt->mime_type=ms_strdup(mime); - + rate=lp_config_get_int(config,codeckey,"rate",8000); pt->clock_rate=rate; fmtp=lp_config_get_string(config,codeckey,"recv_fmtp",NULL); @@ -587,7 +591,7 @@ void video_config_read(LinphoneCore *lc) str=lp_config_get_string(lc->config,"video","device",NULL); if (str && str[0]==0) str=NULL; linphone_core_set_video_device(lc,str); - + linphone_core_set_preferred_video_size_by_name(lc, lp_config_get_string(lc->config,"video","size","cif")); @@ -607,7 +611,7 @@ void ui_config_read(LinphoneCore *lc) for (i=0;(lf=linphone_friend_new_from_config_file(lc,i))!=NULL;i++){ linphone_core_add_friend(lc,lf); } - + } void autoreplier_config_init(LinphoneCore *lc) @@ -681,7 +685,7 @@ void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vtable, co gstate_initialize(lc); gstate_new_state(lc, GSTATE_POWER_STARTUP, NULL); - + ortp_init(); linphone_core_assign_payload_type(&payload_type_lpc1015,115,NULL); linphone_core_assign_payload_type(&payload_type_speex_nb,110,"vbr=on"); @@ -715,9 +719,9 @@ void linphone_core_init (LinphoneCore * lc, const LinphoneCoreVTable *vtable, co #endif ms_init(); - + lc->config=lp_config_new(config_path); - + #ifdef VINCENT_MAURY_RSVP /* default qos parameters : rsvp on, rpc off */ lc->rsvp_enable = 1; @@ -796,7 +800,7 @@ void linphone_core_get_local_ip(LinphoneCore *lc, const char *dest, char *result if (eXosip_guess_localip(lc->sip_conf.ipv6_enabled ? AF_INET6 : AF_INET,result,LINPHONE_IPADDR_SIZE)<0){ /*default to something */ strncpy(result,lc->sip_conf.ipv6_enabled ? "::1" : "127.0.0.1",LINPHONE_IPADDR_SIZE); - ms_error("Could not find default routable ip address !"); + ms_error("Could not find default routable ip address !"); } } @@ -812,10 +816,10 @@ const char *linphone_core_get_primary_contact(LinphoneCore *lc) ms_free(lc->sip_conf.guessed_contact); lc->sip_conf.guessed_contact=NULL; } - + osip_from_init(&url); if (osip_from_parse(url,lc->sip_conf.contact)==0){ - + }else ms_error("Could not parse identity contact !"); linphone_core_get_local_ip(lc, NULL, tmp); if (strcmp(tmp,"127.0.0.1")==0 || strcmp(tmp,"::1")==0 ){ @@ -833,9 +837,9 @@ const char *linphone_core_get_primary_contact(LinphoneCore *lc) } osip_from_to_str(url,&guessed); lc->sip_conf.guessed_contact=guessed; - + osip_from_free(url); - + } identity=lc->sip_conf.guessed_contact; }else{ @@ -847,7 +851,7 @@ const char *linphone_core_get_primary_contact(LinphoneCore *lc) void linphone_core_set_guess_hostname(LinphoneCore *lc, bool_t val){ lc->sip_conf.guess_hostname=val; } - + bool_t linphone_core_get_guess_hostname(LinphoneCore *lc){ return lc->sip_conf.guess_hostname; } @@ -1040,11 +1044,11 @@ void linphone_core_iterate(LinphoneCore *lc) { eXosip_event_t *ev; bool_t disconnected=FALSE; - int disconnect_timeout = linphone_core_get_nortp_timeout(lc); + int disconnect_timeout = linphone_core_get_nortp_timeout(lc); time_t curtime=time(NULL); int elapsed; bool_t one_second_elapsed=FALSE; - + if (curtime-lc->prevtime>=1){ lc->prevtime=curtime; one_second_elapsed=TRUE; @@ -1056,7 +1060,7 @@ void linphone_core_iterate(LinphoneCore *lc) lc->ringstream=NULL; lc_callback_obj_invoke(&lc->preview_finished_cb,lc); } - + if (exosip_running){ while((ev=eXosip_event_wait(0,0))!=NULL){ linphone_core_process_event(lc,ev); @@ -1072,7 +1076,7 @@ void linphone_core_iterate(LinphoneCore *lc) if (lc->call!=NULL){ LinphoneCall *call=lc->call; - + if (call->dir==LinphoneCallIncoming && call->state==LCStateRinging){ elapsed=curtime-call->start_time; ms_message("incoming call ringing for %i seconds",elapsed); @@ -1167,7 +1171,7 @@ bool_t linphone_core_interpret_url(LinphoneCore *lc, const char *url, char **rea if (real_parsed_url!=NULL) *real_parsed_url=NULL; *route=NULL; tmproute=linphone_core_get_route(lc); - + if (is_enum(url,&enum_domain)){ lc->vtable.display_status(lc,_("Looking for telephone number destination...")); if (enum_lookup(enum_domain,&enumres)<0){ @@ -1335,7 +1339,7 @@ int linphone_core_invite(LinphoneCore *lc, const char *url) osip_to_t *real_parsed_url=NULL; char *real_url=NULL; LinphoneProxyConfig *dest_proxy=NULL; - + if (lc->call!=NULL){ lc->vtable.display_warning(lc,_("Sorry, having multiple simultaneous calls is not supported yet !")); return -1; @@ -1355,7 +1359,7 @@ int linphone_core_invite(LinphoneCore *lc, const char *url) ms_message("The used identity will be %s",linphone_proxy_config_get_identity(dest_proxy)); } - if (dest_proxy!=NULL) + if (dest_proxy!=NULL) from=linphone_proxy_config_get_identity(dest_proxy); else if (proxy!=NULL) from=linphone_proxy_config_get_identity(proxy); @@ -1374,10 +1378,10 @@ int linphone_core_invite(LinphoneCore *lc, const char *url) osip_message_set_supported(invite, "timer"); } /* make sdp message */ - + osip_from_init(&parsed_url2); osip_from_parse(parsed_url2,from); - + lc->call=linphone_call_new_outgoing(lc,parsed_url2,real_parsed_url); /*try to be best-effort in giving real local or routable contact address, except when the user choosed to override the ipaddress */ @@ -1404,7 +1408,7 @@ int linphone_core_invite(LinphoneCore *lc, const char *url) lc->call=NULL; linphone_core_stop_media_streams(lc); } - + goto end; end: if (real_url!=NULL) ms_free(real_url); @@ -1454,7 +1458,7 @@ int linphone_core_set_rpc_mode(LinphoneCore *lc, int on) { if (on==1) printf("RPC_ENABLE set on\n"); - else + else printf("RPC_ENABLE set off\n"); lc->rpc_enable = (on==1); /* need to tell eXosip the new setting */ @@ -1468,7 +1472,7 @@ int linphone_core_set_rsvp_mode(LinphoneCore *lc, int on) { if (on==1) printf("RSVP_ENABLE set on\n"); - else + else printf("RSVP_ENABLE set off\n"); lc->rsvp_enable = (on==1); /* need to tell eXosip the new setting */ @@ -1484,10 +1488,10 @@ int linphone_core_change_qos(LinphoneCore *lc, int answer) if (lc->call==NULL){ return -1; } - + if (lc->rsvp_enable && answer==1) { - /* answer is yes, local setting is with qos, so + /* answer is yes, local setting is with qos, so * the user chose to continue with no qos ! */ /* so switch in normal mode : ring and 180 */ lc->rsvp_enable = 0; /* no more rsvp */ @@ -1604,7 +1608,7 @@ static void post_configure_audio_streams(LinphoneCore *lc){ ms_filter_call_method(f,MS_VOLUME_SET_EA_FORCE,&force); if (sustain!=-1) ms_filter_call_method(f,MS_VOLUME_SET_EA_SUSTAIN,&sustain); - + } parametrize_equalizer(lc,st); if (lc->vtable.dtmf_received!=NULL){ @@ -1636,7 +1640,7 @@ void linphone_core_start_media_streams(LinphoneCore *lc, LinphoneCall *call){ ms_warning("No card defined for capture !"); goto end; } - if (audio_params->relay_session_id!=NULL) + if (audio_params->relay_session_id!=NULL) audio_stream_set_relay_session_id(lc->audiostream,audio_params->relay_session_id); audio_stream_start_now( lc->audiostream, @@ -1661,7 +1665,7 @@ void linphone_core_start_media_streams(LinphoneCore *lc, LinphoneCall *call){ lc->play_file, lc->rec_file); } - post_configure_audio_streams(lc); + post_configure_audio_streams(lc); audio_stream_set_rtcp_information(lc->audiostream, cname, tool); } #ifdef VIDEO_ENABLED @@ -1673,9 +1677,9 @@ void linphone_core_start_media_streams(LinphoneCore *lc, LinphoneCall *call){ } if (lc->video_conf.display || lc->video_conf.capture) { StreamParams *video_params=&call->video_params; - + if (video_params->remoteport>0){ - if (video_params->relay_session_id!=NULL) + if (video_params->relay_session_id!=NULL) video_stream_set_relay_session_id(lc->videostream,video_params->relay_session_id); video_stream_set_sent_video_size(lc->videostream,linphone_core_get_preferred_video_size(lc)); video_stream_enable_self_view(lc->videostream,lc->video_conf.selfview); @@ -1735,11 +1739,11 @@ int linphone_core_accept_call(LinphoneCore *lc, const char *url) LinphoneCall *call=lc->call; int err; bool_t offering=FALSE; - + if (call==NULL){ return -1; } - + if (lc->call->state==LCStateAVRunning){ /*call already accepted*/ return -1; @@ -1771,7 +1775,7 @@ int linphone_core_accept_call(LinphoneCore *lc, const char *url) offering=TRUE; ms_message("generating sdp offer"); sdpmesg=sdp_context_get_offer(call->sdpctx); - + if (sdpmesg==NULL){ ms_error("fail to generate sdp offer !"); return -1; @@ -1786,7 +1790,7 @@ int linphone_core_accept_call(LinphoneCore *lc, const char *url) eXosip_unlock(); lc->vtable.display_status(lc,_("Connected.")); gstate_new_state(lc, GSTATE_CALL_IN_CONNECTED, NULL); - + if (!offering) linphone_core_start_media_streams(lc, lc->call); ms_message("call answered."); return 0; @@ -1799,11 +1803,11 @@ int linphone_core_terminate_call(LinphoneCore *lc, const char *url) return -1; } lc->call=NULL; - + eXosip_lock(); eXosip_call_terminate(call->cid,call->did); eXosip_unlock(); - + /*stop ringing*/ if (lc->ringstream!=NULL) { ring_stop(lc->ringstream); @@ -1853,7 +1857,7 @@ void linphone_core_set_presence_info(LinphoneCore *lc,int minutes_away, ms_message("contact url is correct."); } osip_from_free(url); - + } if (contactok>=0){ if (lc->alt_contact!=NULL) ms_free(lc->alt_contact); @@ -1861,7 +1865,7 @@ void linphone_core_set_presence_info(LinphoneCore *lc,int minutes_away, } if (lc->presence_mode!=presence_mode){ linphone_core_notify_all_friends(lc,presence_mode); - /* + /* Improve the use of all LINPHONE_STATUS available. !TODO Do not mix "presence status" with "answer status code".. Use correct parameter to follow sip_if_match/sip_etag. @@ -1870,7 +1874,7 @@ void linphone_core_set_presence_info(LinphoneCore *lc,int minutes_away, } lc->prev_mode=lc->presence_mode; lc->presence_mode=presence_mode; - + } LinphoneOnlineStatus linphone_core_get_presence_info(const LinphoneCore *lc){ @@ -1915,7 +1919,7 @@ static MSSndCard *get_card_from_string_id(const char *devid, unsigned int cap){ MSSndCard *sndcard=NULL; if (devid!=NULL){ sndcard=ms_snd_card_manager_get_card(ms_snd_card_manager_get(),devid); - if (sndcard!=NULL && + if (sndcard!=NULL && (ms_snd_card_get_capabilities(sndcard) & cap)==0 ){ ms_warning("%s card does not have the %s capability, ignoring.", devid, @@ -1997,7 +2001,7 @@ const char * linphone_core_get_capture_device(LinphoneCore *lc) return lc->sound_conf.capt_sndcard ? ms_snd_card_get_string_id(lc->sound_conf.capt_sndcard) : NULL; } -/* returns a static array of string describing the sound devices */ +/* returns a static array of string describing the sound devices */ const char** linphone_core_get_sound_devices(LinphoneCore *lc){ build_sound_devices_table(lc); return lc->sound_conf.cards; @@ -2025,7 +2029,7 @@ void linphone_core_set_sound_source(LinphoneCore *lc, char source) ms_snd_card_set_capture(sndcard,MS_SND_CARD_LINE); break; } - + } void linphone_core_set_ring(LinphoneCore *lc,const char *path){ @@ -2128,7 +2132,7 @@ void linphone_core_send_dtmf(LinphoneCore *lc,char dtmf) osip_message_set_content_type(msg,"application/dtmf-relay"); snprintf(clen,sizeof(clen),"%lu",(unsigned long)strlen(dtmf_body)); osip_message_set_content_length(msg,clen); - + eXosip_lock(); eXosip_call_send_request(call->did,msg); eXosip_unlock(); @@ -2169,7 +2173,7 @@ static void apply_nat_settings(LinphoneCore *lc){ int err; struct addrinfo hints,*res; const char *addr=lc->net_conf.nat_address; - + if (lc->net_conf.firewall_policy==LINPHONE_POLICY_USE_NAT_ADDRESS){ if (addr==NULL || strlen(addr)==0){ lc->vtable.display_warning(lc,_("No nat/firewall address supplied !")); @@ -2179,7 +2183,7 @@ static void apply_nat_settings(LinphoneCore *lc){ memset(&hints,0,sizeof(struct addrinfo)); if (lc->sip_conf.ipv6_enabled) hints.ai_family=AF_INET6; - else + else hints.ai_family=AF_INET; hints.ai_socktype = SOCK_DGRAM; err=getaddrinfo(addr,NULL,&hints,&res); @@ -2227,7 +2231,7 @@ static void apply_nat_settings(LinphoneCore *lc){ } else { eXosip_set_option(EXOSIP_OPT_SET_IPV4_FOR_GATEWAY,NULL); - eXosip_masquerade_contact("",0); + eXosip_masquerade_contact("",0); } } @@ -2452,7 +2456,7 @@ void linphone_core_set_record_file(LinphoneCore *lc, const char *file){ } if (file!=NULL) { lc->rec_file=ms_strdup(file); - if (lc->audiostream) + if (lc->audiostream) audio_stream_record(lc->audiostream,file); } } @@ -2512,7 +2516,7 @@ void net_config_uninit(LinphoneCore *lc) net_config_t *config=&lc->net_conf; lp_config_set_int(lc->config,"net","download_bw",config->download_bw); lp_config_set_int(lc->config,"net","upload_bw",config->upload_bw); - + if (config->stun_server!=NULL) lp_config_set_string(lc->config,"net","stun_server",config->stun_server); if (config->nat_address!=NULL) @@ -2557,9 +2561,9 @@ void sip_config_uninit(LinphoneCore *lc) #endif } } - + linphone_proxy_config_write_to_config_file(lc->config,NULL,i); /*mark the end */ - + for(elem=lc->auth_info,i=0;elem!=NULL;elem=ms_list_next(elem),i++){ LinphoneAuthInfo *ai=(LinphoneAuthInfo*)(elem->data); linphone_auth_info_write_config(lc->config,ai,i); @@ -2581,9 +2585,9 @@ void sound_config_uninit(LinphoneCore *lc) { sound_config_t *config=&lc->sound_conf; ms_free(config->cards); - + lp_config_set_string(lc->config,"sound","remote_ring",config->remote_ring); - + if (config->local_ring) ms_free(config->local_ring); if (config->remote_ring) ms_free(config->remote_ring); ms_snd_card_manager_destroy(); @@ -2591,7 +2595,7 @@ void sound_config_uninit(LinphoneCore *lc) void video_config_uninit(LinphoneCore *lc) { - + } void codecs_config_uninit(LinphoneCore *lc) @@ -2670,7 +2674,7 @@ void linphone_core_uninit(LinphoneCore *lc) sip_setup_unregister_all(); linphone_core_free_payload_types(); - + ortp_exit(); eXosip_quit(); exosip_running=FALSE; diff --git a/linphone/coreapi/misc.c b/linphone/coreapi/misc.c index 0d4baf42f..eca072491 100644 --- a/linphone/coreapi/misc.c +++ b/linphone/coreapi/misc.c @@ -22,18 +22,21 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "mediastreamer2/mediastream.h" #include #include +#ifdef HAVE_SIGHANDLER_T #include +#endif /*HAVE_SIGHANDLER_T*/ #include #include #include #include #include - +#include #undef snprintf #include -#ifndef WIN32 + +#if !defined(WIN32) static char lock_name[80]; static char lock_set=0; @@ -41,7 +44,7 @@ static char lock_set=0; int set_lock_file() { FILE *lockfile; - + snprintf(lock_name,80,"/tmp/linphone.%i",getuid()); lockfile=fopen(lock_name,"w"); if (lockfile==NULL) @@ -60,7 +63,7 @@ int get_lock_file() { int pid; FILE *lockfile; - + snprintf(lock_name,80,"/tmp/linphone.%i",getuid()); lockfile=fopen(lock_name,"r"); if (lockfile==NULL) @@ -104,7 +107,7 @@ void check_sound_device(LinphoneCore *lc) char *snd_pcm_oss=NULL; char *snd_mixer_oss=NULL; char *snd_pcm=NULL; - + fd=open("/proc/modules",O_RDONLY); if (fd>0){ /* read the entire /proc/modules file and check if sound conf seems correct */ @@ -144,7 +147,7 @@ void check_sound_device(LinphoneCore *lc) } /* now check general volume. Some user forget to rise it and then complain that linphone is not working */ - /* but some other users complain that linphone should not change levels... + /* but some other users complain that linphone should not change levels... if (lc->sound_conf.sndcard!=NULL){ a=snd_card_get_level(lc->sound_conf.sndcard,SND_CARD_LEVEL_GENERAL); if (a<50){ @@ -164,12 +167,12 @@ void check_sound_device(LinphoneCore *lc) const char *payload_type_get_description(PayloadType *pt){ return _((const char *)pt->user_data); -} +} -void payload_type_set_enable(PayloadType *pt,int value) +void payload_type_set_enable(PayloadType *pt,int value) { if ((value)!=0) payload_type_set_flag(pt,PAYLOAD_TYPE_ENABLED); \ - else payload_type_unset_flag(pt,PAYLOAD_TYPE_ENABLED); + else payload_type_unset_flag(pt,PAYLOAD_TYPE_ENABLED); } @@ -266,7 +269,7 @@ bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, PayloadType /*let the video use all the bandwidth minus the maximum bandwidth used by audio */ if (min_video_bw>0) pt->normal_bitrate=min_video_bw*1000; - else + else pt->normal_bitrate=1500000; /*around 1.5 Mbit/s*/ ret=TRUE; } @@ -274,7 +277,7 @@ bool_t linphone_core_check_payload_type_usability(LinphoneCore *lc, PayloadType break; } /*if (!ret) ms_warning("Payload %s is not usable with your internet connection.",pt->mime_type);*/ - + return ret; } @@ -284,7 +287,7 @@ static PayloadType * find_payload(RtpProfile *prof, PayloadType *pt /*from confi PayloadType *it; for(i=0;i<127;++i){ it=rtp_profile_get_payload(prof,i); - if (it!=NULL && strcasecmp(pt->mime_type,it->mime_type)==0 + if (it!=NULL && strcasecmp(pt->mime_type,it->mime_type)==0 && (pt->clock_rate==it->clock_rate || pt->clock_rate<=0) && payload_type_get_user_data(it)==NULL ){ if ( (pt->recv_fmtp && it->recv_fmtp && strcasecmp(pt->recv_fmtp,it->recv_fmtp)==0) || @@ -316,7 +319,7 @@ static MSList *fix_codec_list(RtpProfile *prof, MSList *conflist) MSList *elem; MSList *newlist=NULL; PayloadType *payload,*confpayload; - + for (elem=conflist;elem!=NULL;elem=ms_list_next(elem)) { confpayload=(PayloadType*)elem->data; @@ -350,12 +353,12 @@ void linphone_core_setup_local_rtp_profile(LinphoneCore *lc) PayloadType *payload; bool_t prepend; lc->local_profile=rtp_profile_clone_full(&av_profile); - - /* first look at the list given by configuration file to see if + + /* first look at the list given by configuration file to see if it is correct */ audiopt=fix_codec_list(lc->local_profile,lc->codecs_conf.audio_codecs); videopt=fix_codec_list(lc->local_profile,lc->codecs_conf.video_codecs); - + /* now find and add payloads that are not listed in the configuration codec list */ for (i=0;i<127;i++) @@ -384,7 +387,7 @@ void linphone_core_setup_local_rtp_profile(LinphoneCore *lc) case PAYLOAD_AUDIO_CONTINUOUS: case PAYLOAD_AUDIO_PACKETIZED: if (prepend) - audiopt=ms_list_prepend(audiopt,(void *)payload); + audiopt=ms_list_prepend(audiopt,(void *)payload); else audiopt=ms_list_append(audiopt,(void *)payload); break; @@ -427,6 +430,7 @@ int from_2char_without_params(osip_from_t *from,char **str) } bool_t lp_spawn_command_line_sync(const char *command, char **result,int *command_ret){ +#if !defined(_WIN32_WCE) FILE *f=popen(command,"r"); if (f!=NULL){ int err; @@ -442,6 +446,7 @@ bool_t lp_spawn_command_line_sync(const char *command, char **result,int *comman if (command_ret!=NULL) *command_ret=err; return TRUE; } +#endif /*_WIN32_WCE*/ return FALSE; } @@ -454,12 +459,12 @@ bool_t host_has_ipv6_network() struct ifaddrs *ifp; struct ifaddrs *ifpstart; bool_t ipv6_present=FALSE; - + if (getifaddrs (&ifpstart) < 0) { return FALSE; } - + for (ifp=ifpstart; ifp != NULL; ifp = ifp->ifa_next) { if (!ifp->ifa_addr) @@ -467,7 +472,7 @@ bool_t host_has_ipv6_network() switch (ifp->ifa_addr->sa_family) { case AF_INET: - + break; case AF_INET6: ipv6_present=TRUE; @@ -608,7 +613,7 @@ void linphone_core_run_stun_tests(LinphoneCore *lc, LinphoneCall *call){ } if (lc->vtable.display_status!=NULL) lc->vtable.display_status(lc,_("Stun lookup in progress...")); - + /*create the two audio and video RTP sockets, and send STUN message to our stun server */ sock1=create_socket(linphone_core_get_audio_port(lc)); if (sock1<0) return; diff --git a/linphone/mediastreamer2/configure.ac b/linphone/mediastreamer2/configure.ac index ea26ee637..2dd9ed7e0 100644 --- a/linphone/mediastreamer2/configure.ac +++ b/linphone/mediastreamer2/configure.ac @@ -138,9 +138,10 @@ case $target_os in CFLAGS="$CFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -D_WIN32_WCE -DORTP_STATIC" CXXFLAGS="$CXXFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -DORTP_STATIC -D_WIN32_WCE" dnl ORTP_STATIC to tell ortp not to export its variable with dllexport, as if we were building statically, or dynamically on linux - LIBS="$LIBS -lws2" + LIBS="$LIBS -lws2" mingw_found=yes - ;; + build_tests=no + ;; *mingw*) CFLAGS="$CFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -DORTP_STATIC" CXXFLAGS="$CXXFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -DORTP_STATIC" @@ -158,6 +159,8 @@ esac AM_CONDITIONAL(BUILD_MACOSX, test x$macosx_found = xyes) +AM_CONDITIONAL(BUILD_TESTS,test x$build_tests != xno) + AC_CONFIG_COMMANDS([libtool-hacking],[ if test "$mingw_found" = "yes" ; then echo "Hacking libtool to work with mingw..." diff --git a/linphone/mediastreamer2/tests/Makefile.am b/linphone/mediastreamer2/tests/Makefile.am index b6e16f9cf..443b0edf1 100644 --- a/linphone/mediastreamer2/tests/Makefile.am +++ b/linphone/mediastreamer2/tests/Makefile.am @@ -1,3 +1,5 @@ +if BUILD_TESTS + noinst_PROGRAMS=echo ring mtudiscover bench if BUILD_VIDEO @@ -31,3 +33,5 @@ INCLUDES=-I$(top_srcdir)/include/ AM_CFLAGS=-I$(top_srcdir) $(ORTP_CFLAGS) $(STRICT_OPTIONS) $(VIDEO_CFLAGS) AM_LDFLAGS=-rdynamic + +endif diff --git a/linphone/patches/libeXosip2-wince.patch b/linphone/patches/libeXosip2-wince.patch new file mode 100644 index 000000000..a6b8244c3 --- /dev/null +++ b/linphone/patches/libeXosip2-wince.patch @@ -0,0 +1,12 @@ +Index: src/eXutils.c +=================================================================== +--- src/eXutils.c (revision 1047) ++++ src/eXutils.c (working copy) +@@ -26,6 +26,7 @@ + #include "eXosip2.h" + + #if defined(_WIN32_WCE) ++#include + #elif defined(WIN32) + #include + #include diff --git a/linphone/patches/libosip2-wince.patch b/linphone/patches/libosip2-wince.patch new file mode 100644 index 000000000..8925e6269 --- /dev/null +++ b/linphone/patches/libosip2-wince.patch @@ -0,0 +1,13 @@ +Index: include/osip2/internal.h +=================================================================== +--- include/osip2/internal.h (revision 797) ++++ include/osip2/internal.h (working copy) +@@ -216,7 +216,7 @@ + #include + #undef _WINSOCKAPI_ + +-#if (_WIN32_WINNT >= 0x0403) ++#if (_WIN32_WINNT >= 0x0403) && !defined(_WIN32_WCE) + + #define OSIP_CRITICALSECTION_SPIN 4000 + typedef struct diff --git a/linphone/scripts/builder-arm-ming32ce.mk b/linphone/scripts/builder-arm-ming32ce.mk index 495901f1b..d96b2ee0b 100644 --- a/linphone/scripts/builder-arm-ming32ce.mk +++ b/linphone/scripts/builder-arm-ming32ce.mk @@ -1,11 +1,33 @@ +############################################################################ +# builder-arm-mingw32ce.mk +# Copyright (C) 2009 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. + # +############################################################################ host:=armv4-mingw32ce -config_site:=cegcc-config.site -library_mode:="" -libosip2_version:=svn -libeXosip2_version:=svn +config_site:=mingw32ce-config.site +library_mode:= --disable-shared --enable-static +libosip2_version:=797 +libeXosip2_version:=1047 linphone_configure_controls?= --disable-video \ --with-readline=none \ --enable-gtk_ui=no \ + --enable-console_ui=no \ --enable-ssl-hmac=no \ SPEEX_CFLAGS="-I$(prefix)/include" \ SPEEX_LIBS="-L$(prefix)/lib -lspeex " diff --git a/linphone/scripts/builder-generic.mk b/linphone/scripts/builder-generic.mk index 59fc53e8e..fb27308cc 100644 --- a/linphone/scripts/builder-generic.mk +++ b/linphone/scripts/builder-generic.mk @@ -1,3 +1,25 @@ +############################################################################ +# builder-generic.mk +# Copyright (C) 2009 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. + # +############################################################################ + host?=armv6-apple-darwin config_site?=iphone-config.site library_mode?= --disable-shared @@ -55,11 +77,15 @@ build-liblinphone: $(LINPHONE_SRC_DIR)/Makefile clean-makefile-liblinphone: cd $(LINPHONE_SRC_DIR) && rm Makefile && rm oRTP/Makefile && rm mediastreamer2/Makefile +clean-liblinphone: + cd $(LINPHONE_SRC_DIR) && make clean #osip2 get_osip2_svn: cd $(LINPHONE_SRC_DIR)/ \ - && svn co svn://svn.sv.gnu.org/osip/trunk/osip libosip2-$(libosip2_version) + && svn co -r ${libosip2_version} svn://svn.sv.gnu.org/osip/trunk/osip libosip2-$(libosip2_version) \ + && cd libosip2-$(libosip2_version) \ + && patch -p0 < $(LINPHONE_SRC_DIR)/patches/libosip2-wince.patch get_osip2_src: cd $(LINPHONE_SRC_DIR)/ \ && rm -f libosip2-$(libosip2_version).tar.gz \ @@ -93,7 +119,9 @@ clean-makefile-osip2: get_eXosip2_svn: cd $(LINPHONE_SRC_DIR)/ \ - && svn co svn://svn.sv.gnu.org/exosip/trunk/exosip libeXosip2-$(libeXosip2_version) + && svn co -r ${libeXosip2_version} svn://svn.sv.gnu.org/exosip/trunk/exosip libeXosip2-$(libeXosip2_version)\ + && cd libeXosip2-$(libeXosip2_version) \ + && patch -p0 < $(LINPHONE_SRC_DIR)/patches/libeXosip2-wince.patch get_eXosip2_src: cd $(LINPHONE_SRC_DIR)/ \ diff --git a/linphone/scripts/cegcc-config.site b/linphone/scripts/cegcc-config.site deleted file mode 100644 index 8ffc17354..000000000 --- a/linphone/scripts/cegcc-config.site +++ /dev/null @@ -1,17 +0,0 @@ -# -*- shell-script -*- - - -ARCH=arm4l -SDK_BIN_PATH=/opt/mingw32ce/bin -SYSROOT_PATH=/opt/mingw32ce - -CC="${SDK_BIN_PATH}/arm-mingw32ce-gcc -isysroot=${SYSROOT_PATH}" -CXX="${SDK_BIN_PATH}/arm-mingw32ce-g++ -isysroot=${SYSROOT_PATH}" -LD="${SDK_BIN_PATH}/arm-mingw32ce-ld " -AR=${SDK_BIN_PATH}/arm-mingw32ce-ar -RANLIB=${SDK_BIN_PATH}/arm-mingw32ce-ranlib - -CPPFLAGS="-D_WIN32_WCE -DUNICODE -Drewind=" -#CFLAGS="-D_WIN32_WCE" -#LDFLAGS="-Wl,-syslibroot ${SYSROOT_PATH}" -LDFLAGS="-Wl,-L${SYSROOT_PATH}/arm-mingw32ce/lib -lws2" diff --git a/linphone/scripts/mingw32ce-config.site b/linphone/scripts/mingw32ce-config.site new file mode 100644 index 000000000..c82747f34 --- /dev/null +++ b/linphone/scripts/mingw32ce-config.site @@ -0,0 +1,34 @@ +############################################################################ +# mingw32ce-config.site +# Copyright (C) 2009 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. + # +############################################################################ + + +SDK_BIN_PATH=/opt/mingw32ce/bin +SYSROOT_PATH=/opt/mingw32ce + +CC="${SDK_BIN_PATH}/arm-mingw32ce-gcc -isysroot=${SYSROOT_PATH}" +CXX="${SDK_BIN_PATH}/arm-mingw32ce-g++ -isysroot=${SYSROOT_PATH}" +LD="${SDK_BIN_PATH}/arm-mingw32ce-ld " +AR=${SDK_BIN_PATH}/arm-mingw32ce-ar +RANLIB=${SDK_BIN_PATH}/arm-mingw32ce-ranlib + +CPPFLAGS="-D_WIN32_WCE -DUNICODE -Drewind=" +LDFLAGS="-L${SYSROOT_PATH}/arm-mingw32ce/lib -lws2" From 798b8e72f1de254f7118d6e0deb55b37d690ff45 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Wed, 28 Oct 2009 09:57:59 +0100 Subject: [PATCH 08/14] remove compilation file from linphone project --- linphone/README.mingwce | 25 --- linphone/patches/libeXosip2-wince.patch | 12 -- linphone/patches/libosip2-wince.patch | 13 -- linphone/scripts/builder-arm-ming32ce.mk | 54 ------ linphone/scripts/builder-generic.mk | 200 ----------------------- linphone/scripts/mingw32ce-config.site | 34 ---- 6 files changed, 338 deletions(-) delete mode 100644 linphone/README.mingwce delete mode 100644 linphone/patches/libeXosip2-wince.patch delete mode 100644 linphone/patches/libosip2-wince.patch delete mode 100644 linphone/scripts/builder-arm-ming32ce.mk delete mode 100644 linphone/scripts/builder-generic.mk delete mode 100644 linphone/scripts/mingw32ce-config.site diff --git a/linphone/README.mingwce b/linphone/README.mingwce deleted file mode 100644 index f6b038313..000000000 --- a/linphone/README.mingwce +++ /dev/null @@ -1,25 +0,0 @@ -install arm-mingw32ce 0.55 from from http://cegcc.sourceforge.net/ - -Modify the file errno.h found in -"/mingw/opt/mingw32ce/arm-wince-mingw32ce/include/errno.h" - -Remove lines 11-14: - -#ifdef __COREDLL__ -# include_next -#else /* __COREDLL__ */ - -and lines 106-107: - -#endif /* Not __COREDLL__ */ - - - -get dependencies: - cd scripts - make -f builder-arm-ming32ce.mk get_dependencies - -build: -from scripts: - make -f builder-arm-ming32ce.mk build-linphone - diff --git a/linphone/patches/libeXosip2-wince.patch b/linphone/patches/libeXosip2-wince.patch deleted file mode 100644 index a6b8244c3..000000000 --- a/linphone/patches/libeXosip2-wince.patch +++ /dev/null @@ -1,12 +0,0 @@ -Index: src/eXutils.c -=================================================================== ---- src/eXutils.c (revision 1047) -+++ src/eXutils.c (working copy) -@@ -26,6 +26,7 @@ - #include "eXosip2.h" - - #if defined(_WIN32_WCE) -+#include - #elif defined(WIN32) - #include - #include diff --git a/linphone/patches/libosip2-wince.patch b/linphone/patches/libosip2-wince.patch deleted file mode 100644 index 8925e6269..000000000 --- a/linphone/patches/libosip2-wince.patch +++ /dev/null @@ -1,13 +0,0 @@ -Index: include/osip2/internal.h -=================================================================== ---- include/osip2/internal.h (revision 797) -+++ include/osip2/internal.h (working copy) -@@ -216,7 +216,7 @@ - #include - #undef _WINSOCKAPI_ - --#if (_WIN32_WINNT >= 0x0403) -+#if (_WIN32_WINNT >= 0x0403) && !defined(_WIN32_WCE) - - #define OSIP_CRITICALSECTION_SPIN 4000 - typedef struct diff --git a/linphone/scripts/builder-arm-ming32ce.mk b/linphone/scripts/builder-arm-ming32ce.mk deleted file mode 100644 index d96b2ee0b..000000000 --- a/linphone/scripts/builder-arm-ming32ce.mk +++ /dev/null @@ -1,54 +0,0 @@ -############################################################################ -# builder-arm-mingw32ce.mk -# Copyright (C) 2009 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. - # -############################################################################ -host:=armv4-mingw32ce -config_site:=mingw32ce-config.site -library_mode:= --disable-shared --enable-static -libosip2_version:=797 -libeXosip2_version:=1047 -linphone_configure_controls?= --disable-video \ - --with-readline=none \ - --enable-gtk_ui=no \ - --enable-console_ui=no \ - --enable-ssl-hmac=no \ - SPEEX_CFLAGS="-I$(prefix)/include" \ - SPEEX_LIBS="-L$(prefix)/lib -lspeex " - -include builder-generic.mk - - -build-linphone: build-osip2 build-eXosip2 build-speex $(LINPHONE_SRC_DIR)/Makefile - cd $(LINPHONE_SRC_DIR) && make newdate && make && make install - -clean-linphone: clean-osip2 clean-eXosip2 clean-speex - cd $(LINPHONE_SRC_DIR) && make clean - -veryclean-linphone: clean-linphone veryclean-osip2 veryclean-eXosip2 veryclean-speex - cd $(LINPHONE_SRC_DIR) && make distclean - cd $(LINPHONE_SRC_DIR) && rm configure - -clean-makefile-linphone: clean-makefile-osip2 clean-makefile-eXosip2 - cd $(LINPHONE_SRC_DIR) && rm Makefile && rm oRTP/Makefile && rm mediastreamer2/Makefile - - -get_dependencies: get_osip2_svn get_eXosip2_svn get_speex_src - - diff --git a/linphone/scripts/builder-generic.mk b/linphone/scripts/builder-generic.mk deleted file mode 100644 index fb27308cc..000000000 --- a/linphone/scripts/builder-generic.mk +++ /dev/null @@ -1,200 +0,0 @@ -############################################################################ -# builder-generic.mk -# Copyright (C) 2009 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. - # -############################################################################ - -host?=armv6-apple-darwin -config_site?=iphone-config.site -library_mode?= --disable-shared -libosip2_version?=3.3.0 -libeXosip2_version?=3.3.0 -libspeex_version=1.2rc1 -libgsm_version=1.0.13 -linphone_configure_controls?= --disable-video \ - --with-readline=none \ - --enable-gtk_ui=no \ - --enable-ssl-hmac=no \ - --enable-nonstandard-gsm \ - --with-gsm=$(prefix) \ - SPEEX_CFLAGS="-I$(prefix)/include" \ - SPEEX_LIBS="-L$(prefix)/lib -lspeex " -ifneq (,$(findstring arm,$(host))) - SPEEX_CONFIGURE_OPTION := --enable-fixed-point --disable-float-api - #SPEEX_CONFIGURE_OPTION := --enable-arm5e-asm --enable-fixed-point -endif - -LINPHONE_SRC_DIR=$(shell pwd)/../ -prefix=$(LINPHONE_SRC_DIR)/liblinphone-sdk/$(host) - -all: build-linphone -clean-makefile: clean-makefile-linphone -clean: clean-linphone - -delivery: - cd $(LINPHONE_SRC_DIR) \ - && zip -r linphone-iphone.zip \ - liblinphone-sdk xcode/linphone/ pixmaps/red.png \ - pixmaps/green.png share/ringback.wav \ - share/rings/oldphone-mono.wav \ - -x xcode/linphone/build/Debug-iphoneos/\* \ - xcode/linphone/build/Debug-iphonesimulator/\* \ - xcode/linphone/build/Release-iphoneos/\* \ - xcode/linphone/build/Release-iphonesimulator/\* \ - xcode/linphone/build/linphone.build/\* - - -$(LINPHONE_SRC_DIR)/configure: - cd $(LINPHONE_SRC_DIR) && ./autogen.sh - -$(LINPHONE_SRC_DIR)/Makefile: $(LINPHONE_SRC_DIR)/configure - cd $(LINPHONE_SRC_DIR) && \ - PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(LINPHONE_SRC_DIR)/scripts/$(config_site) \ - ./configure -prefix=$(prefix) --host=$(host) ${library_mode} \ - ${linphone_configure_controls} - - -#libphone only (asume dependencies are met) -build-liblinphone: $(LINPHONE_SRC_DIR)/Makefile - cd $(LINPHONE_SRC_DIR) && make newdate && make && make install - -clean-makefile-liblinphone: - cd $(LINPHONE_SRC_DIR) && rm Makefile && rm oRTP/Makefile && rm mediastreamer2/Makefile - -clean-liblinphone: - cd $(LINPHONE_SRC_DIR) && make clean -#osip2 - -get_osip2_svn: - cd $(LINPHONE_SRC_DIR)/ \ - && svn co -r ${libosip2_version} svn://svn.sv.gnu.org/osip/trunk/osip libosip2-$(libosip2_version) \ - && cd libosip2-$(libosip2_version) \ - && patch -p0 < $(LINPHONE_SRC_DIR)/patches/libosip2-wince.patch -get_osip2_src: - cd $(LINPHONE_SRC_DIR)/ \ - && rm -f libosip2-$(libosip2_version).tar.gz \ - && wget http://ftp.gnu.org/gnu/osip/libosip2-$(libosip2_version).tar.gz \ - && tar xvzf libosip2-$(libosip2_version).tar.gz \ - && rm -rf libosip2-$(libosip2_version).tar.gz \ - && cd libosip2-$(libosip2_version) \ - && patch -p1 < $(LINPHONE_SRC_DIR)/patches/libosip2-iphone.patch - -$(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/configure: - cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version) && ./autogen.sh - -$(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/Makefile: $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/configure - cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/ \ - && CONFIG_SITE=$(LINPHONE_SRC_DIR)/scripts/$(config_site) \ - ./configure -prefix=$(prefix) --host=$(host) ${library_mode} - -build-osip2: $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version)/Makefile - cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version) && make && make install - -clean-osip2: - cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version) && make clean - -veryclean-osip2: - cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version) && make distclean - cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version) && rm configure - -clean-makefile-osip2: - cd $(LINPHONE_SRC_DIR)/libosip2-$(libosip2_version) && rm Makefile -#eXosip - -get_eXosip2_svn: - cd $(LINPHONE_SRC_DIR)/ \ - && svn co -r ${libeXosip2_version} svn://svn.sv.gnu.org/exosip/trunk/exosip libeXosip2-$(libeXosip2_version)\ - && cd libeXosip2-$(libeXosip2_version) \ - && patch -p0 < $(LINPHONE_SRC_DIR)/patches/libeXosip2-wince.patch - -get_eXosip2_src: - cd $(LINPHONE_SRC_DIR)/ \ - && rm -f libeXosip2-$(libeXosip2_version).tar.gz \ - && wget http://nongnu.askapache.com/exosip/libeXosip2-$(libeXosip2_version).tar.gz \ - && tar xvzf libeXosip2-$(libeXosip2_version).tar.gz \ - && rm -rf libeXosip2-$(libeXosip2_version).tar.gz - -$(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version)/configure: - cd $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version) && ./autogen.sh - -$(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version)/Makefile: $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version)/configure - cd $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version)/\ - && PKG_CONFIG_PATH=$(prefix)/lib/pkgconfig CONFIG_SITE=$(LINPHONE_SRC_DIR)/scripts/$(config_site) \ - ./configure -prefix=$(prefix) --host=$(host) ${library_mode} --disable-tools - -build-eXosip2: $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version)/Makefile - cd $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version) && make && make install - -clean-eXosip2: - cd $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version) && make clean - -veryclean-eXosip2: - cd $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version) && make distclean - -clean-makefile-eXosip2: - cd $(LINPHONE_SRC_DIR)/libeXosip2-$(libeXosip2_version) && rm Makefile - -#speex - -get_speex_src: - cd $(LINPHONE_SRC_DIR)/\ - && rm -f speex-$(libspeex_version).tar.gz \ - && wget http://downloads.xiph.org/releases/speex/speex-$(libspeex_version).tar.gz \ - && tar xvzf speex-$(libspeex_version).tar.gz \ - && rm -f speex-$(libspeex_version).tar.gz - -$(LINPHONE_SRC_DIR)/speex-$(libspeex_version)/Makefile: - cd $(LINPHONE_SRC_DIR)/speex-$(libspeex_version)/\ - && CONFIG_SITE=$(LINPHONE_SRC_DIR)/scripts/$(config_site) \ - ./configure -prefix=$(prefix) --host=$(host) ${library_mode} --disable-oggtest $(SPEEX_CONFIGURE_OPTION) - -build-speex: $(LINPHONE_SRC_DIR)/speex-$(libspeex_version)/Makefile - cd $(LINPHONE_SRC_DIR)/speex-$(libspeex_version)/libspeex && make && make install - cd $(LINPHONE_SRC_DIR)/speex-$(libspeex_version)/include && make && make install - -clean-speex: - cd $(LINPHONE_SRC_DIR)/speex-$(libspeex_version) && make clean - -veryclean-speex: - cd $(LINPHONE_SRC_DIR)/speex-$(libspeex_version) && make distclean - -clean-makefile-speex: - cd $(LINPHONE_SRC_DIR)/speex-$(libspeex_version) && rm Makefile - -#GSM - -get_libgsm_src: - - cd $(LINPHONE_SRC_DIR)/\ - && rm -f gsm-$(libgsm_version).tar.gz \ - && wget http://user.cs.tu-berlin.de/~jutta/gsm/gsm-$(libgsm_version).tar.gz \ - && tar xvzf gsm-$(libgsm_version).tar.gz \ - && rm -f gsm-$(libgsm_version).tar.gz -build-libgsm: - cd $(LINPHONE_SRC_DIR)/gsm-1.0-pl13\ - && mkdir -p $(prefix)/include/gsm \ - && host_alias=$(host) . ../scripts/$(config_site) \ - && make CC="$${CC}" INSTALL_ROOT=$(prefix) GSM_INSTALL_INC=$(prefix)/include/gsm install - -clean-libgsm: - cd $(LINPHONE_SRC_DIR)/gsm-1.0-pl13 \ - && make clean - -veryclean-libgsm: clean-libgsm - cd $(LINPHONE_SRC_DIR)/gsm-1.0-pl13 \ - && make uninstall diff --git a/linphone/scripts/mingw32ce-config.site b/linphone/scripts/mingw32ce-config.site deleted file mode 100644 index c82747f34..000000000 --- a/linphone/scripts/mingw32ce-config.site +++ /dev/null @@ -1,34 +0,0 @@ -############################################################################ -# mingw32ce-config.site -# Copyright (C) 2009 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. - # -############################################################################ - - -SDK_BIN_PATH=/opt/mingw32ce/bin -SYSROOT_PATH=/opt/mingw32ce - -CC="${SDK_BIN_PATH}/arm-mingw32ce-gcc -isysroot=${SYSROOT_PATH}" -CXX="${SDK_BIN_PATH}/arm-mingw32ce-g++ -isysroot=${SYSROOT_PATH}" -LD="${SDK_BIN_PATH}/arm-mingw32ce-ld " -AR=${SDK_BIN_PATH}/arm-mingw32ce-ar -RANLIB=${SDK_BIN_PATH}/arm-mingw32ce-ranlib - -CPPFLAGS="-D_WIN32_WCE -DUNICODE -Drewind=" -LDFLAGS="-L${SYSROOT_PATH}/arm-mingw32ce/lib -lws2" From 1896a794b3bb672f17a7f606f76b1b815f4710f6 Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Fri, 4 Dec 2009 21:12:21 +0100 Subject: [PATCH 09/14] prepare wince port --- linphone/configure.in | 2 +- linphone/console/commands.c | 14 +- linphone/console/linphonec.c | 172 +++++++++++++----- linphone/console/linphonec.h | 3 +- linphone/coreapi/Makefile.am | 2 +- linphone/coreapi/exevents.c | 68 +++---- linphone/coreapi/linphonecore.c | 12 +- linphone/coreapi/lpconfig.c | 26 +-- linphone/coreapi/misc.c | 18 +- linphone/coreapi/sdphandler.c | 17 +- linphone/mediastreamer2/configure.ac | 5 +- .../include/mediastreamer2/mediastream.h | 7 +- linphone/mediastreamer2/src/Makefile.am | 4 +- linphone/mediastreamer2/src/audiostream.c | 34 ++-- linphone/mediastreamer2/src/msvolume.c | 10 +- linphone/oRTP/include/ortp/port.h | 31 +++- linphone/oRTP/src/b64.c | 2 +- linphone/oRTP/src/port.c | 85 ++++++--- 18 files changed, 345 insertions(+), 167 deletions(-) diff --git a/linphone/configure.in b/linphone/configure.in index 273bf8e8e..4f57caa77 100644 --- a/linphone/configure.in +++ b/linphone/configure.in @@ -36,7 +36,7 @@ AM_PROG_CC_C_O case $target_os in *mingw32ce) - CFLAGS="$CFLAGS -D_WIN32_WCE -DORTP_STATIC -D_WIN32_WINNT=0x0501 -Dstrerror=" + CFLAGS="$CFLAGS -D_WIN32_WCE -DORTP_STATIC -D_WIN32_WINNT=0x0501" CXXFLAGS="$CXXFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501" LIBS="$LIBS -lws2 -liphlpapi" mingw_found=yes diff --git a/linphone/console/commands.c b/linphone/console/commands.c index 486202d03..a022c3ff0 100644 --- a/linphone/console/commands.c +++ b/linphone/console/commands.c @@ -26,10 +26,12 @@ #include #include #include +#ifndef _WIN32_WCE #include +#include +#endif /*_WIN32_WCE*/ #include #include -#include #include #include "linphonec.h" @@ -282,7 +284,7 @@ linphonec_command_generator(const char *text, int state) if (strncmp(name, text, len) == 0) { - return strdup(name); + return ortp_strdup(name); } } @@ -577,10 +579,12 @@ lpc_cmd_friend(LinphoneCore *lc, char *args) args+=4; if ( ! *args ) return 0; friend_num = strtol(args, NULL, 10); +#ifndef _WIN32_WCE if ( errno == ERANGE ) { linphonec_out("Invalid friend number\n"); return 0; } +#endif /*_WIN32_WCE*/ linphonec_friend_call(lc, friend_num); return 1; } @@ -597,10 +601,12 @@ lpc_cmd_friend(LinphoneCore *lc, char *args) else { friend_num = strtol(args, NULL, 10); +#ifndef _WIN32_WCE if ( errno == ERANGE ) { linphonec_out("Invalid friend number\n"); return 0; } +#endif /*_WIN32_WCE*/ } linphonec_friend_delete(lc, friend_num); return 1; @@ -1401,9 +1407,9 @@ static int lpc_cmd_duration(LinphoneCore *lc, char *args){ static int lpc_cmd_status(LinphoneCore *lc, char *args) { - if ( ! args ) return 0; - LinphoneProxyConfig *cfg; + + if ( ! args ) return 0; linphone_core_get_default_proxy(lc,&cfg); if (strstr(args,"register")) { diff --git a/linphone/console/linphonec.c b/linphone/console/linphonec.c index 90a08f198..2e9d99cc5 100644 --- a/linphone/console/linphonec.c +++ b/linphone/console/linphonec.c @@ -23,24 +23,28 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ****************************************************************************/ - -#include +#include +#ifndef _WIN32_WCE #include #include #include -#include +#include #include +#include "private.h" /*coreapi/private.h, needed for LINPHONE_VERSION */ +#endif /*_WIN32_WCE*/ #include #include #include -#include "private.h" /*coreapi/private.h, needed for LINPHONE_VERSION */ + #include "linphonec.h" #ifdef WIN32 #include #include +#ifndef _WIN32_WCE #include +#endif /*_WIN32_WCE*/ #else #include #include @@ -48,6 +52,21 @@ #include #endif +#if defined(_WIN32_WCE) + +#if !defined(PATH_MAX) +#define PATH_MAX 256 +#endif /*PATH_MAX*/ + +#if !defined(strdup) +#define strdup _strdup +#endif /*strdup*/ +/* +#if !defined(access) +#define access _access +#endif*/ /*access*/ + +#endif /*_WIN32_WCE*/ #ifdef HAVE_GETTEXT #include @@ -71,14 +90,16 @@ typedef struct { /*************************************************************************** * - * Forward declarations + * Forward declarations * ***************************************************************************/ char *lpc_strip_blanks(char *input); static int handle_configfile_migration(void); +#if !defined(_WIN32_WCE) static int copy_file(const char *from, const char *to); +#endif /*_WIN32_WCE*/ static int linphonec_parse_cmdline(int argc, char **argv); static int linphonec_init(int argc, char **argv); static int linphonec_main_loop (LinphoneCore * opm, char * sipAddr); @@ -111,7 +132,7 @@ static void linphonec_dtmf_received(LinphoneCore *lc, int dtmf); static void print_prompt(LinphoneCore *opm); /*************************************************************************** * - * Global variables + * Global variables * ***************************************************************************/ @@ -135,18 +156,25 @@ static int trace_level = 0; static char *logfile_name = NULL; static char configfile_name[PATH_MAX]; static char *sipAddr = NULL; /* for autocall */ +#if !defined(_WIN32_WCE) static ortp_pipe_t client_sock=ORTP_PIPE_INVALID; +#endif /*_WIN32_WCE*/ char prompt[PROMPT_MAX_LEN]; - +#if !defined(_WIN32_WCE) static ortp_thread_t pipe_reader_th; static bool_t pipe_reader_run=FALSE; +#endif /*_WIN32_WCE*/ +#if !defined(_WIN32_WCE) static ortp_pipe_t server_sock; +#endif /*_WIN32_WCE*/ -LinphoneCoreVTable linphonec_vtable = { +LinphoneCoreVTable linphonec_vtable +#if !defined (_MSC_VER) += { .show =(ShowInterfaceCb) stub, .inv_recv = linphonec_call_received, - .bye_recv = linphonec_bye_received, + .bye_recv = linphonec_bye_received, .notify_recv = linphonec_notify_received, .new_unknown_subscriber = linphonec_new_unknown_subscriber, .auth_info_requested = linphonec_prompt_for_auth, @@ -162,7 +190,9 @@ LinphoneCoreVTable linphonec_vtable = { .text_received=linphonec_text_received, .general_state=linphonec_general_state, .dtmf_received=linphonec_dtmf_received -}; +} +#endif /*_WIN32_WCE*/ +; @@ -173,7 +203,7 @@ LinphoneCoreVTable linphonec_vtable = { ***************************************************************************/ /* - * Linphone core callback + * Linphone core callback */ static void linphonec_display_something (LinphoneCore * lc, const char *something) @@ -183,7 +213,7 @@ linphonec_display_something (LinphoneCore * lc, const char *something) } /* - * Linphone core callback + * Linphone core callback */ static void linphonec_display_status (LinphoneCore * lc, const char *something) @@ -193,7 +223,7 @@ linphonec_display_status (LinphoneCore * lc, const char *something) } /* - * Linphone core callback + * Linphone core callback */ static void linphonec_display_warning (LinphoneCore * lc, const char *something) @@ -203,7 +233,7 @@ linphonec_display_warning (LinphoneCore * lc, const char *something) } /* - * Linphone core callback + * Linphone core callback */ static void linphonec_display_url (LinphoneCore * lc, const char *something, const char *url) @@ -213,7 +243,7 @@ linphonec_display_url (LinphoneCore * lc, const char *something, const char *url /* - * Linphone core callback + * Linphone core callback */ static void linphonec_call_received(LinphoneCore *lc, const char *from) @@ -225,7 +255,7 @@ linphonec_call_received(LinphoneCore *lc, const char *from) } /* - * Linphone core callback + * Linphone core callback */ static void linphonec_prompt_for_auth(LinphoneCore *lc, const char *realm, const char *username) @@ -235,15 +265,15 @@ linphonec_prompt_for_auth(LinphoneCore *lc, const char *realm, const char *usern linphone_core_abort_authentication(lc,NULL); }else{ LinphoneAuthInfo *pending_auth; - + if ( auth_stack.nitems+1 > MAX_PENDING_AUTH ) { fprintf(stderr, "Can't accept another authentication request.\n" "Consider incrementing MAX_PENDING_AUTH macro.\n"); return; - } - + } + pending_auth=linphone_auth_info_new(username,NULL,NULL,NULL,realm); auth_stack.elem[auth_stack.nitems++]=pending_auth; } @@ -268,8 +298,8 @@ linphonec_new_unknown_subscriber(LinphoneCore *lc, LinphoneFriend *lf, const char *url) { printf("Friend %s requested subscription " - "(accept/deny is not implemented yet)\n", url); - // This means that this person wishes to be notified + "(accept/deny is not implemented yet)\n", url); + // This means that this person wishes to be notified // of your presence information (online, busy, away...). } @@ -304,7 +334,7 @@ static void linphonec_dtmf_received(LinphoneCore *lc, int dtmf){ fflush(stdout); } -static void +static void linphonec_general_state (LinphoneCore * lc, LinphoneGeneralState *gstate) { if (show_general_state) { @@ -352,11 +382,11 @@ linphonec_general_state (LinphoneCore * lc, LinphoneGeneralState *gstate) printf("GSTATE_CALL_ERROR"); break; default: - printf("GSTATE_UNKNOWN_%d",gstate->new_state); + printf("GSTATE_UNKNOWN_%d",gstate->new_state); } if (gstate->message) printf(" %s", gstate->message); printf("\n"); - } + } } static char received_prompt[PROMPT_MAX_LEN]; @@ -380,14 +410,14 @@ static void start_prompt_reader(void){ ms_mutex_init(&prompt_mutex,NULL); ortp_thread_create(&th,NULL,prompt_reader_thread,NULL); } - +#if !defined(_WIN32_WCE) static ortp_pipe_t create_server_socket(void){ char path[128]; #ifndef WIN32 snprintf(path,sizeof(path)-1,"linphonec-%i",getuid()); #else { - char username[128]; + TCHAR username[128]; DWORD size=sizeof(username)-1; GetUserName(username,&size); snprintf(path,sizeof(path)-1,"linphonec-%s",username); @@ -396,6 +426,7 @@ static ortp_pipe_t create_server_socket(void){ return ortp_server_pipe_create(path); } + static void *pipe_thread(void*p){ char tmp[250]; server_sock=create_server_socket(); @@ -424,7 +455,7 @@ static void *pipe_thread(void*p){ ortp_server_pipe_close_client(client_sock); client_sock=ORTP_PIPE_INVALID; } - + }else{ if (pipe_reader_run) fprintf(stderr,"accept() failed: %s\n",strerror(errno)); } @@ -446,6 +477,7 @@ static void stop_pipe_reader(void){ ortp_server_pipe_close(server_sock); ortp_thread_join(pipe_reader_th,NULL); } +#endif /*_WIN32_WCE*/ #ifdef HAVE_READLINE #define BOOL_HAVE_READLINE 1 @@ -462,8 +494,10 @@ char *linphonec_readline(char *prompt){ prompt_reader_started=TRUE; } if (unix_socket && !pipe_reader_started){ +#if !defined(_WIN32_WCE) start_pipe_reader(); pipe_reader_started=TRUE; +#endif /*_WIN32_WCE*/ } fprintf(stdout,"%s",prompt); fflush(stdout); @@ -498,19 +532,23 @@ void linphonec_out(const char *fmt,...){ va_end (args); printf("%s",res); fflush(stdout); +#if !defined(_WIN32_WCE) if (client_sock!=ORTP_PIPE_INVALID){ if (ortp_pipe_write(client_sock,(uint8_t*)res,strlen(res))==-1){ fprintf(stderr,"Fail to send output via pipe: %s",strerror(errno)); } } +#endif /*_WIN32_WCE*/ ortp_free(res); } void linphonec_command_finished(void){ +#if !defined(_WIN32_WCE) if (client_sock!=ORTP_PIPE_INVALID){ ortp_server_pipe_close_client(client_sock); client_sock=ORTP_PIPE_INVALID; } +#endif /*_WIN32_WCE*/ } void linphonec_set_autoanswer(bool_t enabled){ @@ -530,9 +568,35 @@ bool_t linphonec_get_autoanswer(){ * - char *histfile_name * - FILE *mylogfile */ +#if defined (_MSC_VER) +int _tmain(int argc, _TCHAR* argv[]) { + trace_level=1; + linphonec_vtable.show =(ShowInterfaceCb) stub; + linphonec_vtable.inv_recv = linphonec_call_received; + linphonec_vtable.bye_recv = linphonec_bye_received; + linphonec_vtable.notify_recv = linphonec_notify_received; + linphonec_vtable.new_unknown_subscriber = linphonec_new_unknown_subscriber; + linphonec_vtable.auth_info_requested = linphonec_prompt_for_auth; + linphonec_vtable.display_status = linphonec_display_status; + linphonec_vtable.display_message=linphonec_display_something; +#ifdef VINCENT_MAURY_RSVP + /* the yes/no dialog box */ + linphonec_vtable.display_yes_no= (DisplayMessageCb) stub; +#endif + linphonec_vtable.display_warning=linphonec_display_warning; + linphonec_vtable.display_url=linphonec_display_url; + linphonec_vtable.display_question=(DisplayQuestionCb)stub; + linphonec_vtable.text_received=linphonec_text_received; + linphonec_vtable.general_state=linphonec_general_state; + linphonec_vtable.dtmf_received=linphonec_dtmf_received; + +#else int -main (int argc, char *argv[]) -{ +main (int argc, char *argv[]) { +#endif + + + if (! linphonec_init(argc, argv) ) exit(EXIT_FAILURE); @@ -556,9 +620,13 @@ linphonec_init(int argc, char **argv) * Set initial values for global variables */ mylogfile = NULL; - snprintf(configfile_name, PATH_MAX, "%s/.linphonerc", - getenv("HOME")); + snprintf(configfile_name, PATH_MAX, "%s/.linphonerc", +#if !defined(_WIN32_WCE) + getenv("HOME")); +#else + "."); +#endif /*_WIN32_WCE*/ /* Handle configuration filename changes */ switch (handle_configfile_migration()) @@ -623,12 +691,13 @@ linphonec_init(int argc, char **argv) */ linphonec_initialize_readline(); #endif +#if !defined(_WIN32_WCE) /* * Initialize signal handlers */ - signal(SIGTERM, linphonec_finish); - signal(SIGINT, linphonec_finish); - + signal(SIGTERM, linphonec_finish); + signal(SIGINT, linphonec_finish); +#endif /*_WIN32_WCE*/ return 1; } @@ -645,16 +714,17 @@ void linphonec_finish(int exit_status) { printf("Terminating...\n"); - + /* Terminate any pending call */ linphonec_parse_command_line(&linphonec, "terminate"); linphonec_command_finished(); #ifdef HAVE_READLINE linphonec_finish_readline(); #endif +#if !defined(_WIN32_WCE) if (pipe_reader_run) stop_pipe_reader(); - +#endif /*_WIN32_WCE*/ linphone_core_uninit (&linphonec); @@ -672,7 +742,7 @@ linphonec_finish(int exit_status) * pending_auth != NULL. * * It prompts user for a password. - * Hitting ^D (EOF) would make this function + * Hitting ^D (EOF) would make this function * return 0 (Cancel). * Any other input would try to set linphone core * auth_password for the pending_auth, add the auth_info @@ -715,7 +785,7 @@ linphonec_prompt_for_auth_final(LinphoneCore *lc) */ if ( ! input ) { - printf("Cancel requested, but not implemented.\n"); + printf("Cancel requested, but not implemented.\n"); continue; } @@ -834,7 +904,7 @@ linphonec_initialize_readline() rl_readline_name = "linphonec"; /* Call idle_call() every second */ - rl_set_keyboard_input_timeout(LPC_READLINE_TIMEOUT); + rl_set_keyboard_input_timeout(LPC_READLINE_TIMEOUT); rl_event_hook=linphonec_idle_call; /* Set history file and read it */ @@ -849,7 +919,7 @@ linphonec_initialize_readline() rl_attempted_completion_function = linephonec_readline_completion; /* printf("Readline initialized.\n"); */ - setlinebuf(stdout); + setlinebuf(stdout); return 0; } @@ -976,7 +1046,7 @@ linphonec_parse_cmdline(int argc, char **argv) else if (strncmp ("-c", argv[arg_num], 2) == 0) { if ( ++arg_num >= argc ) print_usage(EXIT_FAILURE); - +#if !defined(_WIN32_WCE) if (access(argv[arg_num],F_OK)!=0 ) { fprintf (stderr, @@ -984,6 +1054,7 @@ linphonec_parse_cmdline(int argc, char **argv) argv[arg_num]); exit(EXIT_FAILURE); } +#endif /*_WIN32_WCE*/ snprintf(configfile_name, PATH_MAX, "%s", argv[arg_num]); } else if (strncmp ("-s", argv[arg_num], 2) == 0) @@ -1016,7 +1087,9 @@ linphonec_parse_cmdline(int argc, char **argv) ("--version", argv[arg_num], strlen ("--version")) == 0)) { +#if !defined(_WIN32_WCE) printf ("version: " LINPHONE_VERSION "\n"); +#endif exit (EXIT_SUCCESS); } else if (strncmp ("-S", argv[arg_num], 2) == 0) @@ -1053,16 +1126,20 @@ linphonec_parse_cmdline(int argc, char **argv) * Returns: * 0 if it did nothing * 1 if it migrated successfully - * -1 on error + * -1 on error */ static int handle_configfile_migration() { +#if !defined(_WIN32_WCE) char *old_cfg_gui; - char *old_cfg_cli; + char *old_cfg_cli; char *new_cfg; +#if !defined(_WIN32_WCE) const char *home = getenv("HOME"); - +#else + const char *home = "."; +#endif /*_WIN32_WCE*/ new_cfg = ms_strdup_printf("%s/.linphonerc", home); /* @@ -1119,9 +1196,10 @@ handle_configfile_migration() free(old_cfg_gui); free(new_cfg); +#endif /*_WIN32_WCE*/ return 0; } - +#if !defined(_WIN32_WCE) /* * Copy file "from" to file "to". * Destination file is truncated if existing. @@ -1162,13 +1240,14 @@ copy_file(const char *from, const char *to) { return 0; } - } + } fclose(in); fclose(out); return 1; } +#endif /*_WIN32_WCE*/ #ifdef HAVE_READLINE static char ** @@ -1332,3 +1411,4 @@ lpc_strip_blanks(char *input) * * ****************************************************************************/ + diff --git a/linphone/console/linphonec.h b/linphone/console/linphonec.h index 8c1c7ca32..732c99a6a 100644 --- a/linphone/console/linphonec.h +++ b/linphone/console/linphonec.h @@ -46,6 +46,7 @@ #endif #endif + /************************************************************************** * * Compile-time defines @@ -98,7 +99,7 @@ typedef struct { /*************************************************************************** * - * Forward declarations + * Forward declarations * ***************************************************************************/ diff --git a/linphone/coreapi/Makefile.am b/linphone/coreapi/Makefile.am index d2506730e..65db8c024 100644 --- a/linphone/coreapi/Makefile.am +++ b/linphone/coreapi/Makefile.am @@ -42,9 +42,9 @@ endif AM_CFLAGS=$(STRICT_OPTIONS) -DIN_LINPHONE \ + $(ORTP_CFLAGS) \ $(OSIP_CFLAGS) \ $(EXOSIP_CFLAGS) \ - $(ORTP_CFLAGS) \ -DENABLE_TRACE \ -DLOG_DOMAIN=\"LinphoneCore\" \ $(IPV6_CFLAGS) \ diff --git a/linphone/coreapi/exevents.c b/linphone/coreapi/exevents.c index 9178b9708..834c914f1 100644 --- a/linphone/coreapi/exevents.c +++ b/linphone/coreapi/exevents.c @@ -116,7 +116,7 @@ int linphone_call_terminated(LinphoneCore *lc, eXosip_event_t *ev) return 0; } } - + ms_message("Current call terminated..."); if (lc->ringstream!=NULL) { ring_stop(lc->ringstream); @@ -143,7 +143,7 @@ int linphone_call_terminated(LinphoneCore *lc, eXosip_event_t *ev) int linphone_call_released(LinphoneCore *lc, int cid){ LinphoneCall *call=lc->call; if (call!=NULL && call->cid==cid){ - + linphone_call_destroy(lc->call); lc->call=NULL; lc->vtable.display_status(lc,_("Could not reach destination.")); @@ -178,7 +178,7 @@ int linphone_call_failure(LinphoneCore *lc, eXosip_event_t *ev) reason=osip_message_get_reason_phrase(ev->response); }else code=-110; lc->vtable.show(lc); - + switch(code) { case 401: @@ -211,12 +211,12 @@ int linphone_call_failure(LinphoneCore *lc, eXosip_event_t *ev) sprintf(umsg,retrymsg,tmpmsg,atoi(retry->hvalue)/60); lc->vtable.display_message(lc,umsg); ms_free(umsg); - }*/ + }*/ lc->vtable.display_message(lc,tmpmsg); break; case 487: lc->vtable.display_status(lc,msg487); - break; + break; case 600: lc->vtable.display_message(lc,msg600); break; @@ -229,13 +229,13 @@ int linphone_call_failure(LinphoneCore *lc, eXosip_event_t *ev) case -111: lc->vtable.display_status(lc,_("Remote host was found but refused connection.")); break; - + default: if (code>0) { lc->vtable.display_status(lc,reason); } - else ms_warning("failure_cb unknown code=%i\n",code); + else ms_warning("failure_cb unknown code=%i\n",code); } if (lc->ringstream!=NULL) { ring_stop(lc->ringstream); @@ -255,7 +255,7 @@ extern sdp_handler_t linphone_sdphandler; static int linphone_answer_sdp(LinphoneCore *lc, eXosip_event_t *ev, sdp_message_t *sdp){ int status=200; sdp_context_t *ctx=NULL; - + ctx=lc->call->sdpctx; /* get the result of the negociation */ sdp_context_get_answer(ctx,sdp); @@ -280,8 +280,8 @@ int linphone_inc_new_call(LinphoneCore *lc, eXosip_event_t *ev) int err; osip_from_to_str(ev->request->from,&from); - osip_to_to_str(ev->request->to,&to); - + osip_to_to_str(ev->request->to,&to); + /* first check if we can answer successfully to this invite */ if (lc->presence_mode!=LINPHONE_STATUS_ONLINE){ ms_message("Not present !! presence mode : %d\n",lc->presence_mode); @@ -322,7 +322,7 @@ int linphone_inc_new_call(LinphoneCore *lc, eXosip_event_t *ev) goto end; } lc->call=linphone_call_new_incoming(lc,from,to,ev); - + sdp=eXosip_get_sdp_info(ev->request); if (sdp==NULL){ ms_message("No sdp body in invite, 200-ack scheme"); @@ -352,7 +352,7 @@ int linphone_inc_new_call(LinphoneCore *lc, eXosip_event_t *ev) lc->vtable.inv_recv(lc,tmp); ms_free(barmesg); - osip_free(tmp); + osip_free(tmp); }else{ ms_error("Error during sdp negociation. "); eXosip_lock(); @@ -459,8 +459,8 @@ int linphone_set_audio_offer(sdp_context_t *ctx) PayloadType *codec; MSList *elem; sdp_payload_t payload; - - + + elem=lc->codecs_conf.audio_codecs; while(elem!=NULL){ codec=(PayloadType*) elem->data; @@ -468,7 +468,7 @@ int linphone_set_audio_offer(sdp_context_t *ctx) sdp_payload_init(&payload); payload.a_rtpmap=ortp_strdup_printf("%s/%i/1",codec->mime_type,codec->clock_rate); payload.pt=rtp_profile_get_payload_number_from_rtpmap(lc->local_profile,payload.a_rtpmap); - payload.localport=call->audio_params.natd_port > 0 ? + payload.localport=call->audio_params.natd_port > 0 ? call->audio_params.natd_port : lc->rtp_conf.audio_rtp_port; if (strcasecmp(codec->mime_type,"iLBC")==0){ /* prefer the 30 ms mode */ @@ -494,7 +494,7 @@ static int find_payload_type_number(RtpProfile *prof, PayloadType *pt){ PayloadType *it; for(i=0;i<127;++i){ it=rtp_profile_get_payload(prof,i); - if (it!=NULL && strcasecmp(pt->mime_type,it->mime_type)==0 + if (it!=NULL && strcasecmp(pt->mime_type,it->mime_type)==0 && (pt->clock_rate==it->clock_rate || pt->clock_rate<=0) ){ if ( (pt->recv_fmtp && it->recv_fmtp && strcasecmp(pt->recv_fmtp,it->recv_fmtp)==0) || (pt->recv_fmtp==NULL && it->recv_fmtp==NULL) ){ @@ -533,7 +533,7 @@ int linphone_set_video_offer(sdp_context_t *ctx) LinphoneCore *lc=call->core; PayloadType *codec; MSList *elem; - bool_t firsttime=TRUE; + bool_t firsttime=TRUE; if (!linphone_core_video_enabled(lc)) return -1; @@ -544,7 +544,7 @@ int linphone_set_video_offer(sdp_context_t *ctx) sdp_payload_init(&payload); payload.line=1; payload.a_rtpmap=ortp_strdup_printf("%s/%i",codec->mime_type,codec->clock_rate); - payload.localport=call->video_params.natd_port>0 ? + payload.localport=call->video_params.natd_port>0 ? call->video_params.natd_port : lc->rtp_conf.video_rtp_port; payload.pt=find_payload_type_number(lc->local_profile,codec); payload.a_fmtp=codec->recv_fmtp; @@ -576,7 +576,7 @@ SupportLevel linphone_payload_is_supported(LinphoneCore *lc, sdp_payload_t *payl localpt=payload->pt; ms_warning("payload has no rtpmap."); } - + if (localpt>=0 && localpt <128 ){ /* this payload is understood, but does the user want to use it ?? */ PayloadType *rtppayload; @@ -610,7 +610,7 @@ SupportLevel linphone_payload_is_supported(LinphoneCore *lc, sdp_payload_t *payl if (rtppayload->type==PAYLOAD_VIDEO){ dbw=lc->dw_video_bw; ubw=lc->up_video_bw; - }else{ + }else{ dbw=lc->dw_audio_bw; ubw=lc->up_audio_bw; } @@ -665,11 +665,11 @@ int linphone_accept_audio_offer(sdp_context_t *ctx,sdp_payload_t *payload) ms_message("Only one codec has to be accepted."); return -1; } - if (supported==SupportedAndValid) { + if (supported==SupportedAndValid) { if (params->initialized==0){ /* this is the first codec we accept, it is going to be used*/ params->localport=lc->rtp_conf.audio_rtp_port; - payload->localport=params->natd_port>0 ? + payload->localport=params->natd_port>0 ? params->natd_port : lc->rtp_conf.audio_rtp_port; params->line=payload->line; params->pt=payload->pt; /* remember the first payload accepted */ @@ -692,7 +692,9 @@ int linphone_accept_audio_offer(sdp_context_t *ctx,sdp_payload_t *payload) /* refuse all other audio lines*/ if(params->line!=payload->line) { ms_message("Only one audio line can be accepted."); +#if !defined(_WIN32_WCE) abort(); +#endif /*_WIN32_WCE*/ return -1; } } @@ -761,7 +763,7 @@ int linphone_read_audio_answer(sdp_context_t *ctx,sdp_payload_t *payload) StreamParams *params; SupportLevel supported; PayloadType *lpt=NULL; - + /* paranoid check: see if this codec is supported in our local rtp profile*/ supported=linphone_payload_is_supported(lc, payload,lc->local_profile,call->profile,FALSE,&lpt); if (supported==Unsupported) { @@ -801,7 +803,7 @@ int linphone_read_video_answer(sdp_context_t *ctx,sdp_payload_t *payload) StreamParams *params; SupportLevel supported; PayloadType *lpt=NULL; - + /* paranoid check: see if this codec is supported in our local rtp profile*/ supported=linphone_payload_is_supported(lc, payload,lc->local_profile,call->profile,FALSE,&lpt); if (supported==Unsupported) { @@ -834,7 +836,7 @@ int linphone_read_video_answer(sdp_context_t *ctx,sdp_payload_t *payload) void linphone_call_ringing(LinphoneCore *lc, eXosip_event_t *ev){ sdp_message_t *sdp=eXosip_get_sdp_info(ev->response); LinphoneCall *call=lc->call; - + linphone_call_proceeding(lc,ev); if (call==NULL) return; if (sdp==NULL){ @@ -909,7 +911,7 @@ static void linphone_process_dtmf_relay(LinphoneCore *lc, eXosip_event_t *ev){ lc->vtable.dtmf_received(lc, tmp[0]); } } - + eXosip_call_build_answer(ev->tid,200,&ans); if (ans) eXosip_call_send_answer(ev->tid,200,ans); @@ -951,7 +953,7 @@ void linphone_registration_faillure(LinphoneCore *lc, eXosip_event_t *ev){ osip_uri_t *requri=osip_message_get_uri(ev->request); char *ru; LinphoneProxyConfig *cfg; - + if (ev->response){ status_code=osip_message_get_status_code(ev->response); reason=osip_message_get_reason_phrase(ev->response); @@ -993,7 +995,7 @@ void linphone_registration_success(LinphoneCore *lc,eXosip_event_t *ev){ cfg->registered=TRUE; linphone_proxy_config_register_again_with_updated_contact(cfg,ev->request,ev->response); }else cfg->registered=FALSE; - + osip_uri_to_str(requri,&ru); if (cfg->registered) msg=ms_strdup_printf(_("Registration on %s successful."),ru); else msg=ms_strdup_printf(_("Unregistration on %s done."),ru); @@ -1012,7 +1014,7 @@ static bool_t comes_from_local_if(osip_message_t *msg){ osip_generic_param_t *param=NULL; osip_via_param_get_byname(via,"received",¶m); if (param==NULL) return TRUE; - if (param->gvalue && + if (param->gvalue && (strcmp(param->gvalue,"127.0.0.1")==0 || strcmp(param->gvalue,"::1")==0)){ return TRUE; } @@ -1056,10 +1058,10 @@ static void linphone_other_request(LinphoneCore *lc, eXosip_event_t *ev){ osip_message_header_get_byname(ev->request,"Refer-To",0,&h); eXosip_message_send_answer(ev->tid,200,NULL); if (h){ - if (lc->vtable.refer_received) + if (lc->vtable.refer_received) lc->vtable.refer_received(lc,h->hvalue); } - + }else ms_warning("Ignored REFER not coming from this local loopback interface."); }else if (strncmp(ev->request->sip_method, "UPDATE", 6) == 0){ linphone_inc_update(lc,ev); @@ -1102,7 +1104,7 @@ void linphone_core_process_event(LinphoneCore *lc,eXosip_event_t *ev) break; case EXOSIP_CALL_INVITE: ms_message("CALL_NEW\n"); - /* CALL_NEW is used twice in qos mode : + /* CALL_NEW is used twice in qos mode : * when you receive invite (textinfo = "With QoS" or "Without QoS") * and when you receive update (textinfo = "New Call") */ linphone_inc_new_call(lc,ev); @@ -1131,7 +1133,7 @@ void linphone_core_process_event(LinphoneCore *lc,eXosip_event_t *ev) linphone_call_message_new(lc,ev); break; case EXOSIP_CALL_MESSAGE_REQUESTFAILURE: - if (ev->did<0 && ev->response && + if (ev->did<0 && ev->response && (ev->response->status_code==407 || ev->response->status_code==401)){ eXosip_default_action(ev); } diff --git a/linphone/coreapi/linphonecore.c b/linphone/coreapi/linphonecore.c index 661fc771e..ed7aa718d 100644 --- a/linphone/coreapi/linphonecore.c +++ b/linphone/coreapi/linphonecore.c @@ -163,7 +163,12 @@ void linphone_call_destroy(LinphoneCall *obj) /*prevent a gcc bug with %c*/ static size_t my_strftime(char *s, size_t max, const char *fmt, const struct tm *tm){ +#if !defined(_WIN32_WCE) return strftime(s, max, fmt, tm); +#else + return 0; + /*FIXME*/ +#endif /*_WIN32_WCE*/ } LinphoneCallLog * linphone_call_log_new(LinphoneCall *call, char *from, char *to){ @@ -171,7 +176,10 @@ LinphoneCallLog * linphone_call_log_new(LinphoneCall *call, char *from, char *to struct tm loctime; cl->dir=call->dir; #ifdef WIN32 +#if !defined(_WIN32_WCE) loctime=*localtime(&call->start_time); + /*FIXME*/ +#endif /*_WIN32_WCE*/ #else localtime_r(&call->start_time,&loctime); #endif @@ -396,7 +404,7 @@ void sound_config_read(LinphoneCore *lc) tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING; tmpbuf=lp_config_get_string(lc->config,"sound","local_ring",tmpbuf); - if (access(tmpbuf,F_OK)==-1) { + if (ortp_file_exist(tmpbuf)==-1) { tmpbuf=PACKAGE_SOUND_DIR "/" LOCAL_RING; } if (strstr(tmpbuf,".wav")==NULL){ @@ -408,7 +416,7 @@ void sound_config_read(LinphoneCore *lc) tmpbuf=PACKAGE_SOUND_DIR "/" REMOTE_RING; tmpbuf=lp_config_get_string(lc->config,"sound","remote_ring",tmpbuf); - if (access(tmpbuf,F_OK)==-1){ + if (ortp_file_exist(tmpbuf)==-1){ tmpbuf=PACKAGE_SOUND_DIR "/" REMOTE_RING; } if (strstr(tmpbuf,".wav")==NULL){ diff --git a/linphone/coreapi/lpconfig.c b/linphone/coreapi/lpconfig.c index 08abcd5e8..044f02267 100644 --- a/linphone/coreapi/lpconfig.c +++ b/linphone/coreapi/lpconfig.c @@ -30,7 +30,9 @@ #include #include #include +#if !defined(_WIN32_WCE) #include +#endif /*_WIN32_WCE*/ #include #include @@ -76,8 +78,8 @@ void list_node_foreach(ListNode *head, ListNodeForEachFunc func){ #define LIST_PREPEND(e1,e2) ( (e2)->_prev=NULL,(e2)->_next=(e1),(e1)->_prev=(e2),(e2) ) -#define LIST_APPEND(head,elem) ((head)==0 ? (elem) : (list_node_append((ListNode*)(head),(ListNode*)(elem)), (head)) ) -#define LIST_REMOVE(head,elem) +#define LIST_APPEND(head,elem) ((head)==0 ? (elem) : (list_node_append((ListNode*)(head),(ListNode*)(elem)), (head)) ) +#define LIST_REMOVE(head,elem) /* returns void */ #define LIST_FOREACH(head) list_node_foreach((ListNode*)head) @@ -102,14 +104,14 @@ struct _LpConfig{ LpItem * lp_item_new(const char *key, const char *value){ LpItem *item=lp_new0(LpItem,1); - item->key=strdup(key); - item->value=strdup(value); + item->key=ortp_strdup(key); + item->value=ortp_strdup(value); return item; } LpSection *lp_section_new(const char *name){ LpSection *sec=lp_new0(LpSection,1); - sec->name=strdup(name); + sec->name=ortp_strdup(name); return sec; } @@ -151,9 +153,9 @@ static bool_t is_first_char(const char *start, const char *pos){ void lp_config_parse(LpConfig *lpconfig){ char tmp[MAX_LEN]; LpSection *cur=NULL; - + if (lpconfig->file==NULL) return; - + while(fgets(tmp,MAX_LEN,lpconfig->file)!=NULL){ char *pos1,*pos2; pos1=strchr(tmp,'['); @@ -180,10 +182,10 @@ void lp_config_parse(LpConfig *lpconfig){ if (pos1!=NULL){ char key[MAX_LEN]; key[0]='\0'; - + *pos1='\0'; if (sscanf(tmp,"%s",key)>0){ - + pos1++; pos2=strchr(pos1,'\n'); if (pos2==NULL) pos2=pos1+strlen(pos1); @@ -211,16 +213,18 @@ void lp_config_parse(LpConfig *lpconfig){ LpConfig * lp_config_new(const char *filename){ LpConfig *lpconfig=lp_new0(LpConfig,1); if (filename!=NULL){ - lpconfig->filename=strdup(filename); + lpconfig->filename=ortp_strdup(filename); lpconfig->file=fopen(filename,"rw"); if (lpconfig->file!=NULL){ lp_config_parse(lpconfig); fclose(lpconfig->file); +#if !defined(_WIN32_WCE) /* make existing configuration files non-group/world-accessible */ if (chmod(filename, S_IRUSR | S_IWUSR) == -1) ms_warning("unable to correct permissions on " "configuration file: %s", strerror(errno)); +#endif /*_WIN32_WCE*/ lpconfig->file=NULL; lpconfig->modified=0; } @@ -230,7 +234,7 @@ LpConfig * lp_config_new(const char *filename){ void lp_item_set_value(LpItem *item, const char *value){ free(item->value); - item->value=strdup(value); + item->value=ortp_strdup(value); } diff --git a/linphone/coreapi/misc.c b/linphone/coreapi/misc.c index eca072491..68fa5569e 100644 --- a/linphone/coreapi/misc.c +++ b/linphone/coreapi/misc.c @@ -30,7 +30,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include +#if !defined(_WIN32_WCE) #include +#endif /*_WIN32_WCE*/ #undef snprintf #include @@ -100,15 +102,17 @@ char *int2str(int number) void check_sound_device(LinphoneCore *lc) { - int fd,len; + int fd=0; + int len; int a; char *file=NULL; char *i810_audio=NULL; char *snd_pcm_oss=NULL; char *snd_mixer_oss=NULL; char *snd_pcm=NULL; - +#if !defined(_WIN32_WCE) fd=open("/proc/modules",O_RDONLY); +#endif /*_WIN32_WCE*/ if (fd>0){ /* read the entire /proc/modules file and check if sound conf seems correct */ /*a=fstat(fd,&statbuf); @@ -158,7 +162,9 @@ void check_sound_device(LinphoneCore *lc) */ end: if (file!=NULL) ms_free(file); +#if !defined(_WIN32_WCE) if (fd>0) close(fd); +#endif /*_WIN32_WCE*/ } #define UDP_HDR_SZ 8 @@ -353,12 +359,10 @@ void linphone_core_setup_local_rtp_profile(LinphoneCore *lc) PayloadType *payload; bool_t prepend; lc->local_profile=rtp_profile_clone_full(&av_profile); - /* first look at the list given by configuration file to see if it is correct */ audiopt=fix_codec_list(lc->local_profile,lc->codecs_conf.audio_codecs); videopt=fix_codec_list(lc->local_profile,lc->codecs_conf.video_codecs); - /* now find and add payloads that are not listed in the configuration codec list */ for (i=0;i<127;i++) @@ -798,7 +802,7 @@ int linphone_core_get_local_ip_for(const char *dest, char *result){ if (err<0) { ms_error("Error in connect: %s",strerror(errno)); freeaddrinfo(res); - close(sock); + close_socket(sock); return -1; } freeaddrinfo(res); @@ -807,14 +811,14 @@ int linphone_core_get_local_ip_for(const char *dest, char *result){ err=getsockname(sock,(struct sockaddr*)&addr,&s); if (err!=0) { ms_error("Error in getsockname: %s",strerror(errno)); - close(sock); + close_socket(sock); return -1; } err=getnameinfo((struct sockaddr *)&addr,s,result,LINPHONE_IPADDR_SIZE,NULL,0,NI_NUMERICHOST); if (err!=0){ ms_error("getnameinfo error: %s",strerror(errno)); } - close(sock); + close_socket(sock); ms_message("Local interface to reach %s is %s.",dest,result); return 0; } diff --git a/linphone/coreapi/sdphandler.c b/linphone/coreapi/sdphandler.c index 4c0337c3e..890217289 100644 --- a/linphone/coreapi/sdphandler.c +++ b/linphone/coreapi/sdphandler.c @@ -174,7 +174,7 @@ sdp_context_generate_template (sdp_context_t * ctx) } static void add_relay_info(sdp_message_t *sdp, int mline, const char *relay, const char *relay_session_id){ - + if (relay) sdp_message_a_attribute_add(sdp, mline, osip_strdup ("relay-addr"),osip_strdup(relay)); if (relay_session_id) sdp_message_a_attribute_add(sdp, mline, @@ -191,7 +191,12 @@ sdp_context_add_payload (sdp_context_t * ctx, sdp_payload_t * payload, char *med { eXosip_trace (OSIP_ERROR, ("You must not call sdp_context_add_*_payload outside the write_offer callback\n")); - abort (); +#if !defined(_WIN32_WCE) + abort(); +#else + exit(-1); +#endif /*_WIN32_WCE*/ + } if (payload->proto == NULL) payload->proto = "RTP/AVP"; @@ -225,7 +230,7 @@ sdp_context_add_payload (sdp_context_t * ctx, sdp_payload_t * payload, char *med attr_field); } if (payload->b_as_bandwidth != 0) - { + { if (sdp_message_bandwidth_get(offer,payload->line,0)==NULL){ attr_field = sstrdup_sprintf ("%i", payload->b_as_bandwidth); @@ -326,7 +331,7 @@ sdp_context_get_answer ( sdp_context_t *ctx,sdp_message_t *remote) else eXosip_trace(OSIP_INFO1,("Using firewall address in sdp.")); answer = sdp_context_generate_template (ctx); - + /* for each m= line */ for (i = 0; !sdp_message_endof_media (remote, i); i++){ sdp_payload_init(&init_payload); @@ -373,7 +378,7 @@ sdp_context_get_answer ( sdp_context_t *ctx,sdp_message_t *remote) sdp_message_a_attr_value_get_with_pt (remote, i, payload.pt, "fmtp"); - + /* ask the application if this codec is supported */ err = sdph->accept_audio_codecs (ctx, &payload); @@ -447,7 +452,7 @@ sdp_context_get_answer ( sdp_context_t *ctx,sdp_message_t *remote) { /* refuse the line */ refuse_mline(answer,mtype,proto,i); - + } else m_lines_accepted++; diff --git a/linphone/mediastreamer2/configure.ac b/linphone/mediastreamer2/configure.ac index 2dd9ed7e0..21db5d414 100644 --- a/linphone/mediastreamer2/configure.ac +++ b/linphone/mediastreamer2/configure.ac @@ -125,6 +125,7 @@ if test $GCC = yes && test $wall_werror = yes; then fi macosx_found=no +mingw32ce_found=no dnl add thread flags case $target_os in @@ -138,8 +139,9 @@ case $target_os in CFLAGS="$CFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -D_WIN32_WCE -DORTP_STATIC" CXXFLAGS="$CXXFLAGS -DINET6 -DORTP_INET6 -D_WIN32_WINNT=0x0501 -DORTP_STATIC -D_WIN32_WCE" dnl ORTP_STATIC to tell ortp not to export its variable with dllexport, as if we were building statically, or dynamically on linux - LIBS="$LIBS -lws2" + LIBS="$LIBS -lws2" mingw_found=yes + mingw32ce_found=yes build_tests=no ;; *mingw*) @@ -480,6 +482,7 @@ MS_CHECK_VIDEO AM_CONDITIONAL(BUILD_VIDEO, test "$video" = "true") AM_CONDITIONAL(BUILD_THEORA, test "$have_theora" = "yes") AM_CONDITIONAL(BUILD_WIN32, test "$mingw_found" = "yes") +AM_CONDITIONAL(BUILD_WIN32_WCE, test "$mingw32ce_found" = "yes") dnl ********************************************* dnl setup oRTP dependency diff --git a/linphone/mediastreamer2/include/mediastreamer2/mediastream.h b/linphone/mediastreamer2/include/mediastreamer2/mediastream.h index eadff1495..9ac669337 100644 --- a/linphone/mediastreamer2/include/mediastreamer2/mediastream.h +++ b/linphone/mediastreamer2/include/mediastreamer2/mediastream.h @@ -30,6 +30,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "ortp/event.h" #include +#if defined(_WIN32_WCE) +#define time ms_time +time_t ms_time (time_t *t); +#endif /*_WIN32_WCE*/ + typedef enum EchoLimiterType{ ELInactive, ELControlMic, @@ -100,7 +105,7 @@ void audio_stream_set_rtcp_information(AudioStream *st, const char *cname, const void audio_stream_play_received_dtmfs(AudioStream *st, bool_t yesno); /* those two function do the same as audio_stream_start() but in two steps -this is useful to make sure that sockets are open before sending an invite; +this is useful to make sure that sockets are open before sending an invite; or to start to stream only after receiving an ack.*/ AudioStream *audio_stream_new(int locport, bool_t ipv6); int audio_stream_start_now(AudioStream * stream, RtpProfile * prof, const char *remip, int remport, int rem_rtcp_port, int payload_type, int jitt_comp,MSSndCard *playcard, MSSndCard *captcard, bool_t echo_cancel); diff --git a/linphone/mediastreamer2/src/Makefile.am b/linphone/mediastreamer2/src/Makefile.am index c85f15846..d5bf394ac 100644 --- a/linphone/mediastreamer2/src/Makefile.am +++ b/linphone/mediastreamer2/src/Makefile.am @@ -162,7 +162,9 @@ libmediastreamer_la_LIBADD+= -lole32 \ endif endif - +if BUILD_WIN32_WCE +libmediastreamer_la_LIBADD+= -lmmtimer +endif AM_CFLAGS= -I$(top_srcdir) \ $(ORTP_CFLAGS) \ diff --git a/linphone/mediastreamer2/src/audiostream.c b/linphone/mediastreamer2/src/audiostream.c index fd5c3d3bc..323ec99ce 100644 --- a/linphone/mediastreamer2/src/audiostream.c +++ b/linphone/mediastreamer2/src/audiostream.c @@ -95,7 +95,7 @@ bool_t ms_is_ipv6(const char *remote){ bool_t ret=FALSE; #ifdef INET6 struct addrinfo hints, *res0; - + int err; memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_UNSPEC; @@ -105,7 +105,7 @@ bool_t ms_is_ipv6(const char *remote){ ms_warning ("get_local_addr_for: %s", gai_strerror(err)); return FALSE; } - ret=(res0->ai_addr->sa_family==AF_INET6); + ret=(res0->ai_addr->sa_family==AF_INET6); freeaddrinfo(res0); #endif return ret; @@ -127,7 +127,7 @@ RtpSession * create_duplex_rtpsession( int locport, bool_t ipv6){ #if defined(_WIN32_WCE) time_t -time (time_t *t) +ms_time (time_t *t) { DWORD timemillis = GetTickCount(); if (timemillis>0) @@ -179,7 +179,7 @@ void audio_stream_change_decoder(AudioStream *stream, int payload){ ms_filter_link (stream->rtprecv, 0, stream->decoder, 0); ms_filter_link (stream->decoder,0 , stream->dtmfgen, 0); ms_filter_preprocess(stream->decoder,stream->ticker); - + }else{ ms_warning("No decoder found for %s",pt->mime_type); } @@ -208,17 +208,17 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char if (remport>0) rtp_session_set_remote_addr_full(rtps,remip,remport,rem_rtcp_port); rtp_session_set_payload_type(rtps,payload); rtp_session_set_jitter_compensation(rtps,jitt_comp); - + if (remport>0) ms_filter_call_method(stream->rtpsend,MS_RTP_SEND_SET_SESSION,rtps); stream->rtprecv=ms_filter_new(MS_RTP_RECV_ID); ms_filter_call_method(stream->rtprecv,MS_RTP_RECV_SET_SESSION,rtps); stream->session=rtps; - + stream->dtmfgen=ms_filter_new(MS_DTMF_GEN_ID); rtp_session_signal_connect(rtps,"telephone-event",(RtpCallback)on_dtmf_received,(unsigned long)stream); rtp_session_signal_connect(rtps,"payload_type_changed",(RtpCallback)payload_type_changed,(unsigned long)stream); - + /* creates the local part */ if (captcard!=NULL) stream->soundread=ms_snd_card_create_reader(captcard); else { @@ -231,7 +231,7 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char stream->soundwrite=ms_filter_new(MS_FILE_REC_ID); if (outfile!=NULL) audio_stream_record(stream,outfile); } - + /* creates the couple of encoder/decoder */ pt=rtp_profile_get_payload(profile,payload); if (pt==NULL){ @@ -245,7 +245,7 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char ms_error("mediastream.c: No decoder available for payload %i.",payload); return -1; } - + if (use_ec) { stream->ec=ms_filter_new(MS_SPEEX_EC_ID); ms_filter_call_method(stream->ec,MS_FILTER_SET_SAMPLE_RATE,&pt->clock_rate); @@ -283,7 +283,7 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char ms_filter_call_method(stream->soundwrite,MS_FILTER_SET_SAMPLE_RATE,&pt->clock_rate); tmp=1; ms_filter_call_method(stream->soundwrite,MS_FILTER_SET_NCHANNELS, &tmp); - + /* give the encoder/decoder some parameters*/ ms_filter_call_method(stream->encoder,MS_FILTER_SET_SAMPLE_RATE,&pt->clock_rate); ms_message("Payload's bitrate is %i",pt->normal_bitrate); @@ -292,10 +292,10 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char ms_filter_call_method(stream->encoder,MS_FILTER_SET_BITRATE,&pt->normal_bitrate); } ms_filter_call_method(stream->decoder,MS_FILTER_SET_SAMPLE_RATE,&pt->clock_rate); - + if (pt->send_fmtp!=NULL) ms_filter_call_method(stream->encoder,MS_FILTER_ADD_FMTP, (void*)pt->send_fmtp); if (pt->recv_fmtp!=NULL) ms_filter_call_method(stream->decoder,MS_FILTER_ADD_FMTP,(void*)pt->recv_fmtp); - + /*create the equalizer*/ stream->equalizer=ms_filter_new(MS_EQUALIZER_ID); tmp=stream->eq_active; @@ -303,7 +303,7 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char /* and then connect all */ /* tip: draw yourself the picture if you don't understand */ - + /*sending graph*/ ms_connection_helper_start(&h); ms_connection_helper_link(&h,stream->soundread,-1,0); @@ -328,13 +328,13 @@ int audio_stream_start_full(AudioStream *stream, RtpProfile *profile, const char if (stream->ec) ms_connection_helper_link(&h,stream->ec,0,0); ms_connection_helper_link(&h,stream->soundwrite,0,-1); - + /* create ticker */ stream->ticker=ms_ticker_new(); ms_ticker_set_name(stream->ticker,"Audio MSTicker"); ms_ticker_attach(stream->ticker,stream->soundread); ms_ticker_attach(stream->ticker,stream->rtprecv); - + return 0; } @@ -490,9 +490,9 @@ void audio_stream_stop(AudioStream * stream) MSConnectionHelper h; ms_ticker_detach(stream->ticker,stream->soundread); ms_ticker_detach(stream->ticker,stream->rtprecv); - + rtp_stats_display(rtp_session_get_stats(stream->session),"Audio session's RTP statistics"); - + /*dismantle the outgoing graph*/ ms_connection_helper_start(&h); ms_connection_helper_unlink(&h,stream->soundread,-1,0); diff --git a/linphone/mediastreamer2/src/msvolume.c b/linphone/mediastreamer2/src/msvolume.c index ba8b068ee..c281191d4 100644 --- a/linphone/mediastreamer2/src/msvolume.c +++ b/linphone/mediastreamer2/src/msvolume.c @@ -103,7 +103,7 @@ static void volume_uninit(MSFilter *f){ static int volume_get(MSFilter *f, void *arg){ float *farg=(float*)arg; Volume *v=(Volume*)f->data; - *farg=10*log10f((v->energy+1)/max_e); + *farg=10*ortp_log10f((v->energy+1)/max_e); return 0; } @@ -138,10 +138,10 @@ static inline float compute_gain(float static_gain, float energy, float weight){ } /* -The principle of this algorithm is that we apply a gain to the input signal which is opposite to the +The principle of this algorithm is that we apply a gain to the input signal which is opposite to the energy measured by the peer MSVolume. For example if some noise is played by the speaker, then the signal captured by the microphone will be lowered. -The gain changes smoothly when the peer energy is decreasing, but is immediately changed when the peer energy is +The gain changes smoothly when the peer energy is decreasing, but is immediately changed when the peer energy is increasing. */ @@ -340,7 +340,7 @@ static void volume_process(MSFilter *f){ om->b_wptr+=nbytes; en=update_energy((int16_t*)om->b_rptr,v->nsamples,en); volume_agc_process(v,om); - + if (v->peer){ volume_echo_avoider_process(v,f->ticker->time); }else v->target_gain=v->static_gain; @@ -355,7 +355,7 @@ static void volume_process(MSFilter *f){ while((m=ms_queue_get(f->inputs[0]))!=NULL){ en=update_energy((int16_t*)m->b_rptr,(m->b_wptr-m->b_rptr)/2,en); if (v->peer){ - volume_echo_avoider_process(v,f->ticker->time); + volume_echo_avoider_process(v,f->ticker->time); }else v->target_gain=v->static_gain; if (v->noise_gate_enabled) diff --git a/linphone/oRTP/include/ortp/port.h b/linphone/oRTP/include/ortp/port.h index 5d2a2d3f3..f3fe9b48d 100644 --- a/linphone/oRTP/include/ortp/port.h +++ b/linphone/oRTP/include/ortp/port.h @@ -147,7 +147,7 @@ typedef HANDLE ortp_thread_t; #define ortp_thread_create WIN_thread_create #define ortp_thread_join WIN_thread_join -#define ortp_thread_exit(arg) +#define ortp_thread_exit(arg) #define ortp_mutex_init WIN_mutex_init #define ortp_mutex_lock WIN_mutex_lock #define ortp_mutex_unlock WIN_mutex_unlock @@ -163,12 +163,12 @@ typedef HANDLE ortp_thread_t; extern "C" { #endif - + int WIN_mutex_init(ortp_mutex_t *m, void *attr_unused); int WIN_mutex_lock(ortp_mutex_t *mutex); int WIN_mutex_unlock(ortp_mutex_t *mutex); int WIN_mutex_destroy(ortp_mutex_t *mutex); -int WIN_thread_create(ortp_thread_t *t, void *attr_unused, void *(*func)(void*), void *arg); +int WIN_thread_create(ortp_thread_t *t, void *attr_unused, void *(*func)(void*), void *arg); int WIN_thread_join(ortp_thread_t thread, void **unused); int WIN_cond_init(ortp_cond_t *cond, void *attr_unused); int WIN_cond_wait(ortp_cond_t * cond, ortp_mutex_t * mutex); @@ -183,6 +183,28 @@ int WIN_cond_destroy(ortp_cond_t * cond); #define SOCKET_OPTION_VALUE char * #define inline __inline +#if defined(_WIN32_WCE) + +#define ortp_log10f(x) (float)log10 ((double)x) + +#ifdef assert + #undef assert +#endif /*assert*/ +#define assert(exp) ((void)0) + +#ifdef errno + #undef errno +#endif /*errno*/ +#define errno GetLastError() +#ifdef strerror + #undef strerror +#endif /*strerror*/ +const char * ortp_strerror(DWORD value); +#define strerror ortp_strerror + + +#endif /*_WIN32_WCE*/ + const char *getWinSocketError(int error); #define getSocketErrorCode() WSAGetLastError() #define getSocketError() getWinSocketError(WSAGetLastError()) @@ -240,6 +262,8 @@ char *ortp_strndup(const char *str,int n); char *ortp_strdup_printf(const char *fmt,...); char *ortp_strdup_vprintf(const char *fmt, va_list ap); +int ortp_file_exist(const char *pathname); + /* portable named pipes */ #if !defined(_WIN32_WCE) #ifdef WIN32 @@ -269,6 +293,7 @@ int ortp_pipe_write(ortp_pipe_t p, const uint8_t *buf, int len); #ifdef __cplusplus } + #endif diff --git a/linphone/oRTP/src/b64.c b/linphone/oRTP/src/b64.c index b8d925351..08b0ed3e6 100644 --- a/linphone/oRTP/src/b64.c +++ b/linphone/oRTP/src/b64.c @@ -60,7 +60,7 @@ #include #include - +#include "ortp/port.h" /* ///////////////////////////////////////////////////////////////////////////// * Constants and definitions */ diff --git a/linphone/oRTP/src/port.c b/linphone/oRTP/src/port.c index 73680f659..de14a3812 100644 --- a/linphone/oRTP/src/port.c +++ b/linphone/oRTP/src/port.c @@ -100,7 +100,7 @@ char * ortp_strdup(const char *tmp){ */ int set_non_blocking_socket (ortp_socket_t sock) { - + #if !defined(_WIN32) && !defined(_WIN32_WCE) return fcntl (sock, F_SETFL, O_NONBLOCK); @@ -124,7 +124,23 @@ int close_socket(ortp_socket_t sock){ #endif } - +#if defined (_WIN32_WCE) +int ortp_file_exist(const char *pathname) { + FILE* fd; + if (pathname==NULL) return -1; + fd=fopen(pathname,"r"); + if (fd==NULL) { + return -1; + } else { + fclose(fd); + return 0; + } +} +#else +int ortp_file_exist(const char *pathname) { + return access(pathname,F_OK); +} +#endif /*_WIN32_WCE*/ #if !defined(_WIN32) && !defined(_WIN32_WCE) /* Use UNIX inet_aton method */ @@ -132,10 +148,10 @@ int close_socket(ortp_socket_t sock){ int inet_aton (const char * cp, struct in_addr * addr) { unsigned long retval; - + retval = inet_addr (cp); - if (retval == INADDR_NONE) + if (retval == INADDR_NONE) { return -1; } @@ -180,7 +196,7 @@ int __ortp_thread_create(pthread_t *thread, pthread_attr_t *attr, void * (*routi #if defined(_WIN32) || defined(_WIN32_WCE) int WIN_mutex_init(ortp_mutex_t *mutex, void *attr) -{ +{ *mutex=CreateMutex(NULL, FALSE, NULL); return 0; } @@ -248,7 +264,7 @@ int WIN_cond_init(ortp_cond_t *cond, void *attr) int WIN_cond_wait(ortp_cond_t* hCond, ortp_mutex_t * hMutex) { //gulp: this is not very atomic ! bug here ? - WIN_mutex_unlock(hMutex); + WIN_mutex_unlock(hMutex); WaitForSingleObject(*hCond, INFINITE); WIN_mutex_lock(hMutex); return 0; @@ -276,6 +292,21 @@ int WIN_cond_destroy(ortp_cond_t * hCond) #if defined(_WIN32_WCE) #include +const char * ortp_strerror(DWORD value) { + static TCHAR msgBuf[256]; + FormatMessage( + FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, + value, + 0, // Default language + (LPTSTR) &msgBuf, + 0, + NULL + ); + return (const char *)msgBuf; +} + int gettimeofday (struct timeval *tv, void *tz) { @@ -287,19 +318,19 @@ gettimeofday (struct timeval *tv, void *tz) #else -int gettimeofday (struct timeval *tv, void* tz) -{ - union - { - __int64 ns100; /*time since 1 Jan 1601 in 100ns units */ - FILETIME fileTime; - } now; +int gettimeofday (struct timeval *tv, void* tz) +{ + union + { + __int64 ns100; /*time since 1 Jan 1601 in 100ns units */ + FILETIME fileTime; + } now; - GetSystemTimeAsFileTime (&now.fileTime); - tv->tv_usec = (long) ((now.ns100 / 10LL) % 1000000LL); - tv->tv_sec = (long) ((now.ns100 - 116444736000000000LL) / 10000000LL); - return (0); -} + GetSystemTimeAsFileTime (&now.fileTime); + tv->tv_usec = (long) ((now.ns100 / 10LL) % 1000000LL); + tv->tv_sec = (long) ((now.ns100 - 116444736000000000LL) / 10000000LL); + return (0); +} #endif @@ -405,6 +436,7 @@ int ortp_client_pipe_close(ortp_socket_t sock){ return close(sock); } + #elif defined(WIN32) && !defined(_WIN32_WCE) static char *make_pipe_name(const char *name){ @@ -462,15 +494,15 @@ int ortp_server_pipe_close(ortp_pipe_t spipe){ ortp_pipe_t ortp_client_pipe_connect(const char *name){ char *pipename=make_pipe_name(name); - ortp_pipe_t hpipe = CreateFile( - pipename, // pipe name - GENERIC_READ | // read and write access - GENERIC_WRITE, - 0, // no sharing + ortp_pipe_t hpipe = CreateFile( + pipename, // pipe name + GENERIC_READ | // read and write access + GENERIC_WRITE, + 0, // no sharing NULL, // default security attributes - OPEN_EXISTING, // opens existing pipe - 0, // default attributes - NULL); // no template file + OPEN_EXISTING, // opens existing pipe + 0, // default attributes + NULL); // no template file ortp_free(pipename); return hpipe; } @@ -496,4 +528,5 @@ int ortp_client_pipe_close(ortp_pipe_t sock){ return CloseHandle(sock); } + #endif From 0e04f99c705e213d43c9fcb558f1afd037149633 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 7 Dec 2009 14:27:04 +0100 Subject: [PATCH 10/14] update for vs2008 --- .../build/wince/mediastreamer2.sln | 46 ++++ .../build/wince/mediastreamer2.vcproj | 216 +++++++++++++++++- linphone/oRTP/build/wince/oRTP.sln | 46 ++++ linphone/oRTP/build/wince/oRTP.vcproj | 212 ++++++++++++++++- linphone/oRTP/src/rtpsession.c | 3 +- 5 files changed, 519 insertions(+), 4 deletions(-) create mode 100644 linphone/mediastreamer2/build/wince/mediastreamer2.sln create mode 100644 linphone/oRTP/build/wince/oRTP.sln diff --git a/linphone/mediastreamer2/build/wince/mediastreamer2.sln b/linphone/mediastreamer2/build/wince/mediastreamer2.sln new file mode 100644 index 000000000..b328b8f7f --- /dev/null +++ b/linphone/mediastreamer2/build/wince/mediastreamer2.sln @@ -0,0 +1,46 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mediastreamer2", "mediastreamer2.vcproj", "{177F5AE2-A40C-4412-8F26-7F85FA32464E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + Debug|Windows Mobile 6 Standard SDK (ARMV4I) = Debug|Windows Mobile 6 Standard SDK (ARMV4I) + Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I) + Release|Windows Mobile 6 Standard SDK (ARMV4I) = Release|Windows Mobile 6 Standard SDK (ARMV4I) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) + {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/linphone/mediastreamer2/build/wince/mediastreamer2.vcproj b/linphone/mediastreamer2/build/wince/mediastreamer2.vcproj index 3d05986e1..bf4c12444 100644 --- a/linphone/mediastreamer2/build/wince/mediastreamer2.vcproj +++ b/linphone/mediastreamer2/build/wince/mediastreamer2.vcproj @@ -1,11 +1,12 @@ + @@ -80,6 +84,8 @@ IgnoreAllDefaultLibraries="true" ModuleDefinitionFile="mediastreamer2.def" GenerateDebugInformation="true" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" /> + @@ -163,6 +172,8 @@ IgnoreAllDefaultLibraries="true" ModuleDefinitionFile="mediastreamer2.def" GenerateDebugInformation="true" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" /> + @@ -250,6 +264,8 @@ IgnoreAllDefaultLibraries="true" ModuleDefinitionFile="mediastreamer2.def" GenerateDebugInformation="true" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="0" /> + @@ -276,6 +295,98 @@ + + + + + + + + + + + + + + + + + + + + + @@ -413,6 +529,8 @@ AdditionalDependencies="ws2.lib iphlpapi.lib mmtimer.lib libcmt.lib dmoguids.lib strmiids.lib strmbase.lib atls.lib" IgnoreAllDefaultLibraries="true" ModuleDefinitionFile="mediastreamer2.def" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" /> + @@ -495,6 +616,8 @@ AdditionalDependencies="atls.lib strmiids.lib dmoguids.lib strmbase.lib ws2.lib iphlpapi.lib mmtimer.lib libcmt.lib" IgnoreAllDefaultLibraries="true" ModuleDefinitionFile="mediastreamer2.def" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="0" /> + @@ -521,6 +647,94 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/linphone/oRTP/build/wince/oRTP.sln b/linphone/oRTP/build/wince/oRTP.sln new file mode 100644 index 000000000..e481bdf21 --- /dev/null +++ b/linphone/oRTP/build/wince/oRTP.sln @@ -0,0 +1,46 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oRTP", "oRTP.vcproj", "{9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + Debug|Windows Mobile 6 Professional SDK (ARMV4I) = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + Debug|Windows Mobile 6 Standard SDK (ARMV4I) = Debug|Windows Mobile 6 Standard SDK (ARMV4I) + Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + Release|Windows Mobile 6 Professional SDK (ARMV4I) = Release|Windows Mobile 6 Professional SDK (ARMV4I) + Release|Windows Mobile 6 Standard SDK (ARMV4I) = Release|Windows Mobile 6 Standard SDK (ARMV4I) + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Standard SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Standard SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Build.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) + {9FEA0683-C391-4C74-BCF6-2F9E4DE1B541}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/linphone/oRTP/build/wince/oRTP.vcproj b/linphone/oRTP/build/wince/oRTP.vcproj index 83cc9bae8..2c2dfe188 100644 --- a/linphone/oRTP/build/wince/oRTP.vcproj +++ b/linphone/oRTP/build/wince/oRTP.vcproj @@ -1,11 +1,12 @@ + @@ -79,6 +83,8 @@ IgnoreAllDefaultLibraries="true" ModuleDefinitionFile="oRTP.def" GenerateDebugInformation="true" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" /> + @@ -159,6 +168,8 @@ AdditionalDependencies="ws2.lib iphlpapi.lib mmtimer.lib libcmtd.lib" IgnoreAllDefaultLibraries="true" ModuleDefinitionFile="oRTP.def" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" /> + @@ -243,6 +257,8 @@ IgnoreAllDefaultLibraries="true" ModuleDefinitionFile="oRTP.def" GenerateDebugInformation="true" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="0" /> + @@ -324,6 +343,8 @@ AdditionalDependencies="ws2.lib iphlpapi.lib mmtimer.lib libcmt.lib" IgnoreAllDefaultLibraries="true" ModuleDefinitionFile="oRTP.def" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" /> + @@ -404,6 +428,8 @@ AdditionalDependencies="ws2.lib iphlpapi.lib mmtimer.lib libcmt.lib" IgnoreAllDefaultLibraries="true" ModuleDefinitionFile="oRTP.def" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" /> + @@ -485,6 +514,8 @@ AdditionalDependencies="ws2.lib iphlpapi.lib mmtimer.lib libcmt.lib" IgnoreAllDefaultLibraries="true" ModuleDefinitionFile="oRTP.def" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" TargetMachine="0" /> + @@ -511,6 +545,182 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linphone/oRTP/src/rtpsession.c b/linphone/oRTP/src/rtpsession.c index b656d7e97..42165b630 100644 --- a/linphone/oRTP/src/rtpsession.c +++ b/linphone/oRTP/src/rtpsession.c @@ -213,13 +213,12 @@ mblk_t *rtp_getq_permissive(queue_t *q,uint32_t timestamp, int *rejected) void rtp_session_init (RtpSession * session, int mode) { + JBParameters jbp; if (session == NULL) { ortp_debug("rtp_session_init: Invalid paramter (session=NULL)"); return; } - - JBParameters jbp; memset (session, 0, sizeof (RtpSession)); session->mode = (RtpSessionMode) mode; if ((mode == RTP_SESSION_RECVONLY) || (mode == RTP_SESSION_SENDRECV)) From 2fae075a4e24d8231eb55940fdbd14cb194d73ad Mon Sep 17 00:00:00 2001 From: Jehan Monnier Date: Mon, 7 Dec 2009 14:35:44 +0100 Subject: [PATCH 11/14] add msv project for liblinphone --- linphone/build/wince/liblinphone.ncb | Bin 0 -> 8170496 bytes linphone/build/wince/liblinphone.sln | 28 ++ linphone/build/wince/liblinphone.suo | Bin 0 -> 35328 bytes linphone/build/wince/liblinphone.vcproj | 436 ++++++++++++++++++++++++ 4 files changed, 464 insertions(+) create mode 100644 linphone/build/wince/liblinphone.ncb create mode 100644 linphone/build/wince/liblinphone.sln create mode 100644 linphone/build/wince/liblinphone.suo create mode 100644 linphone/build/wince/liblinphone.vcproj diff --git a/linphone/build/wince/liblinphone.ncb b/linphone/build/wince/liblinphone.ncb new file mode 100644 index 0000000000000000000000000000000000000000..3d66f0c3ddc558206774670edb719b5b379a3b08 GIT binary patch literal 8170496 zcmeF)1$5lVwy5Ef9A*ZG9A<}^nHe26C2?YkAfLHVsZ=VJ)JhdE_W-{@zve+srLvXEoY|>L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