From bc778cb393139c0d78ec2712c749af8f7b632220 Mon Sep 17 00:00:00 2001 From: smorlat Date: Tue, 16 Jun 2009 10:00:34 +0000 Subject: [PATCH] Merge branch 'master' of smorlat@git.sv.gnu.org:/srv/git/linphone git-svn-id: svn+ssh://svn.savannah.nongnu.org/linphone/trunk@496 3f6dc0c8-ddfe-455d-9043-3cd528dc4637 --- linphone/INSTALL | 50 +- linphone/Makefile.am | 16 + linphone/README.mingw | 65 + linphone/autogen.sh | 1 + linphone/configure.in | 40 +- linphone/console/Makefile.am | 20 +- linphone/console/commands.c | 4 + linphone/console/sipomatic.c | 4 + linphone/coreapi/Makefile.am | 6 +- linphone/coreapi/linphonecore.c | 4 +- linphone/coreapi/misc.c | 1 + linphone/gtk-glade/Makefile.am | 4 + linphone/gtk-glade/main.c | 9 +- linphone/gtk-glade/parameters.glade | 237 +++- linphone/gtk-glade/update.c | 3 - linphone/m4/osip.m4 | 2 - linphone/mediastreamer2/INSTALL | 50 +- linphone/mediastreamer2/acinclude.m4 | 6 +- linphone/mediastreamer2/configure.ac | 47 +- .../include/mediastreamer2/allfilters.h | 3 +- .../mediastreamer2/plugins/msx264/INSTALL | 5 +- .../plugins/msx264/configure.ac | 21 +- linphone/mediastreamer2/src/Makefile.am | 68 +- linphone/mediastreamer2/src/mscommon.c | 7 + linphone/mediastreamer2/src/msdscap-mingw.cc | 1071 ++++++++++++++++ linphone/mediastreamer2/tests/bench.c | 4 +- linphone/mediastreamer2/tests/echo.c | 10 +- linphone/mediastreamer2/tests/ring.c | 2 +- linphone/oRTP/configure.ac | 8 +- linphone/oRTP/src/Makefile.am | 2 +- linphone/oRTP/src/rtpsession_inet.c | 16 +- linphone/oRTP/src/srtp.c | 2 +- linphone/oRTP/src/tests/Makefile.am | 4 + linphone/po/Makefile.in.in | 4 +- linphone/po/linphone.pot | 1123 ----------------- 35 files changed, 1610 insertions(+), 1309 deletions(-) mode change 100644 => 100755 linphone/INSTALL create mode 100644 linphone/README.mingw mode change 100644 => 100755 linphone/mediastreamer2/INSTALL mode change 100644 => 100755 linphone/mediastreamer2/plugins/msx264/INSTALL create mode 100755 linphone/mediastreamer2/src/msdscap-mingw.cc mode change 100644 => 100755 linphone/po/Makefile.in.in delete mode 100644 linphone/po/linphone.pot diff --git a/linphone/INSTALL b/linphone/INSTALL old mode 100644 new mode 100755 index 23e5f25d0..5458714e1 --- a/linphone/INSTALL +++ b/linphone/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -10,7 +10,10 @@ unlimited permission to copy, distribute and modify it. Basic Installation ================== -These are generic installation instructions. +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -23,9 +26,9 @@ debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail @@ -35,20 +38,17 @@ some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. @@ -78,7 +78,7 @@ details on some of the pertinent environment variables. by setting variables in the command line or in the environment. Here is an example: - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. @@ -87,17 +87,15 @@ Compiling For Multiple Architectures You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. Installation Names ================== @@ -190,12 +188,12 @@ them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: +overridden in the site shell script). - /bin/bash ./configure CONFIG_SHELL=/bin/bash +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== diff --git a/linphone/Makefile.am b/linphone/Makefile.am index c4528c9b3..bebc72fa5 100644 --- a/linphone/Makefile.am +++ b/linphone/Makefile.am @@ -25,6 +25,9 @@ ACLOCAL_FLAGS=-I$(top_srcdir)/m4 DISTCLEANFILES= intltool-extract intltool-merge intltool-update po/stamp-it po/.intltool-merge-cache +INSTALLDIR=$(shell cd $(top_builddir)/linphone-install && pwd) +ZIPFILE=$(shell cd $(top_builddir) && pwd)/$(PACKAGE)-win32-$(VERSION).zip + # `make rpm' all-local: linphone.spec @@ -41,3 +44,16 @@ rpm: gzip $(PACKAGE)-$(VERSION).tar # TAR_OPTIONS=--wildcards rpmbuild -ta --clean --rmsource --rmspec $(PACKAGE)-$(VERSION).tar.gz + +#a zip containing win32 binaries, suitable to generate an installer + + + +zip: + rm -f $(ZIPFILE) + rm -rf $(INSTALLDIR) + mkdir -p $(INSTALLDIR) + make install DESTDIR=$(INSTALLDIR) + cd $(INSTALLDIR)/$(prefix) && zip -r $(ZIPFILE) * + + \ No newline at end of file diff --git a/linphone/README.mingw b/linphone/README.mingw new file mode 100644 index 000000000..dd5ff5be7 --- /dev/null +++ b/linphone/README.mingw @@ -0,0 +1,65 @@ +Software to install +* mingw32 +* msys +* automake*/autoconf*/libtool , uncompress in / +* gcc-part-core-4.3 gcc-part-c++-4.3, uncompress in /mingw +* download unzip for mingw + +* gtk+bundle, uncompress in /usr/local +* libglade and libglade-dev >=2.6.3 from gnome ftp, uncompress in /usr/local +* download and install ActiveState perl +* linphone-deps from linphone website, uncompress in /usr/local +* install zip and unzip from http://www.info-zip.org/Zip.html#Downloads + (quicklink: ftp://ftp.dante.de/tex-archive/tools/zip/info-zip/WIN32/zip232xN.zip), and extract zip.exe to c:\msys\1.0\usr\local\bin + + +Building + +WARNING: During the build, windows might slow down suddenly. Using ctl+alt+del to start the windows system monitor, you might see a process 'LVpSRV.exe' or something like this that eats 90% of cpu. Kill it. Don't know what it is, but once killed, windows runs normally. + +#use ActiveState perl instead of mingw perl +export PERL="/c/Perl/bin/perl" +export INTLTOOL_PERL="/c/Perl/bin/perl" +#run autogen.sh after a git/svn checkout or update +./autogen.sh +./configure --enable-shared --disable-static --with-osip=/usr/local +make +make install DESTDIR=/c/linphone-install + + +#build plugins +cd mediastreamer2/plugins/msx264 +./autogen.sh +PKG_CONFIG_PATH=/c/linphone-install/lib/pkgconfig ./configure --enable-shared --disable-static +make install DESTDIR=/c/msx264-install + +cd coreapi/plugins/buddyloolup +./autogen.sh +PKG_CONFIG_PATH=/c/linphone-install/lib/pkgconfig ./configure --enable-shared --disable-static +make install DESTDIR=/c/buddylookup-install + + +****************************************************** +* Notes about linphone-deps generation * +****************************************************** +List of software included in linphone-deps: +libosip2 (compiled) +libeXosip2 (compiled) +libavcodec, libavutil, libavformat, libavdevice, libswscale (compiled, all these from ffmpeg) +libtheora (from the web) +libx264 (compiled from the version distributed from linphone's web site) +libogg (from the web) +libspeex, libspeexdsp (compiled, statically to workaround a dll-related crash) +libgnutls (from the web) +libgsm (from the web) +libxml2 (compiled) +libsoup (compiled) + + +- build ffmpeg +./configure --enable-shared --disable-static --enable-memalign-hack --extra-cflags="-fno-common" --enable-gpl && make +make install DESTDIR=/c/output/ +Copy to linphone-deps/ +Copy also all *.dll.a files from the build tree to lib/ directort of linphone-deps. These are the implibs necessary to link a program against the dlls. +- build libxml2: the binaries found on the internet are generated with MSVC++, and for obscure reason they are not suitable for building libsoup (that requires libxml2). + diff --git a/linphone/autogen.sh b/linphone/autogen.sh index c9304d4d9..fef987f58 100755 --- a/linphone/autogen.sh +++ b/linphone/autogen.sh @@ -13,6 +13,7 @@ fi echo "Generating build scripts in linphone..." set -x libtoolize --copy --force + intltoolize -c --force --automake autoheader $ACLOCAL -I m4 diff --git a/linphone/configure.in b/linphone/configure.in index 6fe14f6bf..2227e49c5 100644 --- a/linphone/configure.in +++ b/linphone/configure.in @@ -1,6 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_INIT([linphone],[3.1.2],[linphone-developers@nongnu.org]) +AC_CANONICAL_SYSTEM dnl Source packaging numbers @@ -29,20 +30,54 @@ AC_PROG_CC AC_C_INLINE AM_PROG_CC_STDC AC_HEADER_STDC +AM_PROG_CC_C_O + +case $target_os in + *mingw*) + CFLAGS="$CFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501" + CXXFLAGS="$CXXFLAGS -DORTP_STATIC -D_WIN32_WINNT=0x0501" + LIBS="$LIBS -lws2_32" + GUI_FLAGS="-mwindows" + CONSOLE_FLAGS="-mconsole" + mingw_found=yes + ;; +esac + +AC_SUBST(CONSOLE_FLAGS) +AC_SUBST(GUI_FLAGS) + dnl localization tools ifdef([IT_PROG_INTLTOOL],[IT_PROG_INTLTOOL],[AC_PROG_INTLTOOL]) dnl Initialize libtool +AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AM_PROG_LIBTOOL - AC_ENABLE_SHARED(yes) AC_ENABLE_STATIC(no) + + +if test "$mingw_found" = "yes" ; then + AC_MSG_NOTICE([Hacking libtool to work with mingw...]) + sed -e 's/\*\" \$a_deplib \"\*/\*/' < ./libtool > libtool.tmp + cp -f ./libtool.tmp ./libtool + rm -f ./libtool.tmp +fi + dnl Add the languages which your application supports here. PKG_PROG_PKG_CONFIG ALL_LINGUAS="fr it de ja es pl cs nl sv pt_BR hu ru" AC_SUBST(ALL_LINGUAS) -GETTEXT_PACKAGE=linphone + +if test "$mingw_found" != "yes" ; then +dnl gettext macro does not work properly under mingw. AM_GNU_GETTEXT([external]) +else +AC_DEFINE(ENABLE_NLS,1,[Tells whether localisation is possible]) +AC_DEFINE(HAVE_GETTEXT,1,[Tells wheter localisation is possible]) +LIBS="$LIBS -lintl" +fi + +GETTEXT_PACKAGE=linphone AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE",[The name of the gettext package name]) AC_CHECK_LIB(intl,libintl_gettext) @@ -239,6 +274,7 @@ dnl special things for arm-linux cross compilation toolchain AM_CONDITIONAL(ARMBUILD, test x$use_arm_toolchain = xyes) 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 ) ################################################## # Stricter build options (after external packages) diff --git a/linphone/console/Makefile.am b/linphone/console/Makefile.am index d06323c89..45f886580 100644 --- a/linphone/console/Makefile.am +++ b/linphone/console/Makefile.am @@ -1,5 +1,7 @@ ## Process this file with automake to produce Makefile.in +COMMON_CFLAGS=$(STRICT_OPTIONS) -DIN_LINPHONE -DENABLE_TRACE -D_ORTP_SOURCE $(VIDEO_CFLAGS) $(READLINE_CFLAGS) $(OSIP_CFLAGS) + if BUILD_CONSOLE INCLUDES = \ @@ -13,16 +15,29 @@ INCLUDES = \ bin_PROGRAMS = linphonec sipomatic linphonecsh -linphonec_SOURCES = linphonec.c linphonec.h commands.c +if BUILD_WIN32 +bin_PROGRAMS += linphoned +endif +linphonec_SOURCES = linphonec.c linphonec.h commands.c +linphonec_CFLAGS=$(COMMON_CFLAGS) $(CONSOLE_FLAGS) linphonec_LDADD = $(top_builddir)/coreapi/liblinphone.la $(READLINE_LIBS) \ $(top_builddir)/mediastreamer2/src/libmediastreamer.la \ $(ORTP_LIBS) \ $(SPEEX_LIBS) \ $(OSIP_LIBS) +if BUILD_WIN32 +#special build of linphonec to detach from the windows console +linphoned_SOURCES = $(linphonec_SOURCES) +linphoned_CFLAGS=$(COMMON_CFLAGS) $(GUI_FLAGS) +linphoned_LDADD=$(linphonec_LDADD) +endif + + sipomatic_SOURCES=\ sipomatic.c sipomatic.h +sipomatic_CFLAGS= $(COMMON_CFLAGS) $(CONSOLE_FLAGS) sipomatic_LDADD= $(INTLLIBS) \ $(top_builddir)/coreapi/liblinphone.la \ @@ -32,11 +47,12 @@ sipomatic_LDADD= $(INTLLIBS) \ $(OSIP_LIBS) linphonecsh_SOURCES = shell.c +linphonecsh_CFLAGS = $(CONSOLE_FLAGS) linphonecsh_LDADD = $(ORTP_LIBS) endif -AM_CFLAGS=$(STRICT_OPTIONS) -DIN_LINPHONE -DENABLE_TRACE -D_ORTP_SOURCE $(VIDEO_CFLAGS) $(READLINE_CFLAGS) $(OSIP_CFLAGS) + diff --git a/linphone/console/commands.c b/linphone/console/commands.c index 275de6c1b..ff623ae2a 100644 --- a/linphone/console/commands.c +++ b/linphone/console/commands.c @@ -76,7 +76,9 @@ static void linphonec_friend_display(LinphoneFriend *fr); static int linphonec_friend_list(LinphoneCore *lc, char *arg); static void linphonec_display_command_help(LPC_COMMAND *cmd); static int linphonec_friend_call(LinphoneCore *lc, unsigned int num); +#ifndef WIN32 static int linphonec_friend_add(LinphoneCore *lc, const char *name, const char *addr); +#endif static int linphonec_friend_delete(LinphoneCore *lc, int num); @@ -1264,6 +1266,7 @@ linphonec_friend_call(LinphoneCore *lc, unsigned int num) return 1; } +#ifndef WIN32 static int linphonec_friend_add(LinphoneCore *lc, const char *name, const char *addr) { @@ -1276,6 +1279,7 @@ linphonec_friend_add(LinphoneCore *lc, const char *name, const char *addr) linphone_core_add_friend(lc, newFriend); return 0; } +#endif static int linphonec_friend_delete(LinphoneCore *lc, int num) diff --git a/linphone/console/sipomatic.c b/linphone/console/sipomatic.c index 08b167b1c..3a96699a5 100644 --- a/linphone/console/sipomatic.c +++ b/linphone/console/sipomatic.c @@ -460,7 +460,11 @@ int main(int argc, char *argv[]) while (run_cond){ sipomatic_iterate(&sipomatic); +#ifndef WIN32 usleep(20000); +#else + Sleep(20); +#endif } return(0); diff --git a/linphone/coreapi/Makefile.am b/linphone/coreapi/Makefile.am index 78c6b3043..3a16cb48e 100644 --- a/linphone/coreapi/Makefile.am +++ b/linphone/coreapi/Makefile.am @@ -28,12 +28,16 @@ liblinphone_la_SOURCES=\ sipsetup.c sipsetup.h -liblinphone_la_LDFLAGS= -version-info $(LIBLINPHONE_SO_VERSION) +liblinphone_la_LDFLAGS= -version-info $(LIBLINPHONE_SO_VERSION) -no-undefined liblinphone_la_LIBADD= \ $(EXOSIP_LIBS) \ $(top_builddir)/mediastreamer2/src/libmediastreamer.la +if BUILD_WIN32 +liblinphone_la_LIBADD+=$(top_builddir)/oRTP/src/libortp.la +endif + AM_CFLAGS=$(STRICT_OPTIONS) -DIN_LINPHONE \ $(OSIP_CFLAGS) \ diff --git a/linphone/coreapi/linphonecore.c b/linphone/coreapi/linphonecore.c index 1ff4e4824..a0a9497ca 100644 --- a/linphone/coreapi/linphonecore.c +++ b/linphone/coreapi/linphonecore.c @@ -926,7 +926,7 @@ static bool_t exosip_running=FALSE; static char _ua_name[64]="Linphone"; static char _ua_version[64]=LINPHONE_VERSION; -static void set_user_agent(){ +static void apply_user_agent(void){ char ua_string[256]; snprintf(ua_string,sizeof(ua_string),"%s/%s (eXosip2/%s)",_ua_name,_ua_version, #ifdef HAVE_EXOSIP_GET_VERSION @@ -973,7 +973,7 @@ void linphone_core_set_sip_port(LinphoneCore *lc,int port) eXosip_set_rsvp_mode (lc->rsvp_enable); eXosip_set_rpc_mode (lc->rpc_enable); #endif - set_user_agent("Linphone",LINPHONE_VERSION); + apply_user_agent(); exosip_running=TRUE; } diff --git a/linphone/coreapi/misc.c b/linphone/coreapi/misc.c index 9aacf93d1..9f3b1b70e 100644 --- a/linphone/coreapi/misc.c +++ b/linphone/coreapi/misc.c @@ -28,6 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include +#undef snprintf #include #ifndef WIN32 diff --git a/linphone/gtk-glade/Makefile.am b/linphone/gtk-glade/Makefile.am index 6482d8316..bb5da6db3 100644 --- a/linphone/gtk-glade/Makefile.am +++ b/linphone/gtk-glade/Makefile.am @@ -43,6 +43,10 @@ linphone_3_LDADD=$(top_builddir)/oRTP/src/libortp.la \ $(LIBGTK_LIBS) $(INTLLIBS) \ $(LIBGLADE_LIBS) +if BUILD_WIN32 +linphone_3_LDADD+=-lwininet +endif + linphone_3_LDFLAGS=-export-dynamic gladedir=$(datadir)/linphone diff --git a/linphone/gtk-glade/main.c b/linphone/gtk-glade/main.c index ef90fefca..319ff89f4 100644 --- a/linphone/gtk-glade/main.c +++ b/linphone/gtk-glade/main.c @@ -95,7 +95,6 @@ static GOptionEntry linphone_options[2]={ static char _config_file[1024]; const char *linphone_gtk_get_config_file(){ - const char *home; /*try accessing a local file first if exists*/ if (access(CONFIG_FILE,F_OK)==0){ snprintf(_config_file,sizeof(_config_file),"%s",CONFIG_FILE); @@ -108,8 +107,8 @@ const char *linphone_gtk_get_config_file(){ snprintf(_config_file,sizeof(_config_file),"%s\\%s",appdata,"Linphone\\linphonerc"); } #else - home=getenv("HOME"); - if (home==NULL) home=""; + const char *home=getenv("HOME"); + if (home==NULL) home="."; snprintf(_config_file,sizeof(_config_file),"%s/%s",home,CONFIG_FILE); #endif } @@ -340,7 +339,11 @@ static gboolean linphone_gtk_iterate(LinphoneCore *lc){ GdkWindow *w; previd=id; if (id!=0){ +#ifndef WIN32 w=gdk_window_foreign_new(id); +#else + w=gdk_window_foreign_new((HANDLE)id); +#endif if (w) { set_video_window_decorations(w); g_object_unref(G_OBJECT(w)); diff --git a/linphone/gtk-glade/parameters.glade b/linphone/gtk-glade/parameters.glade index 60539d71d..4e56f8537 100644 --- a/linphone/gtk-glade/parameters.glade +++ b/linphone/gtk-glade/parameters.glade @@ -1,9 +1,10 @@ - - - + + + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Settings linphone2.png @@ -15,7 +16,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -29,20 +30,23 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 12 - + True True + Set Maximum Transmission Unit: True True - Set Maximum Transmission Unit: - 0 + False True + + 0 + @@ -56,13 +60,16 @@ + + 0 + + Send DTMFs as SIP info True True - Send DTMFs as SIP info - 0 + False True @@ -72,11 +79,11 @@ + Use IPv6 instead of IPv4 True True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Use IPv6 instead of IPv4 - 0 True @@ -100,6 +107,9 @@ + + 0 + @@ -165,7 +175,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Video RTP/UDP: - GTK_JUSTIFY_RIGHT + right 2 @@ -177,7 +187,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Audio RTP/UDP: - GTK_JUSTIFY_RIGHT + right 1 @@ -189,7 +199,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK SIP (UDP): - GTK_JUSTIFY_RIGHT + right @@ -222,29 +232,37 @@ True + Direct connection to the Internet True True - Direct connection to the Internet - 0 + False True True + + False + False + 0 + - + True + Behind NAT / Firewall (specify gateway IP below) True True - Behind NAT / Firewall (specify gateway IP below) - 0 + False True True no_nat + + 0 + @@ -255,8 +273,11 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Public IP address: - GTK_JUSTIFY_RIGHT + right + + 0 + @@ -276,23 +297,28 @@ + False + False 1 - + True + Behind NAT / Firewall (use STUN to resolve) True True - Behind NAT / Firewall (use STUN to resolve) - 0 + False True True no_nat + + 0 + @@ -303,8 +329,11 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Stun server: - GTK_JUSTIFY_RIGHT + right + + 0 + @@ -324,6 +353,8 @@ + False + False 2 @@ -357,6 +388,9 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-network + + 0 + @@ -370,8 +404,8 @@ - tab False + tab @@ -394,9 +428,6 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 6 2 - - - True @@ -407,16 +438,18 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + 0 + + gtk-media-play True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-media-play True - 0 @@ -437,7 +470,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Ring sound: - GTK_JUSTIFY_RIGHT + right 4 @@ -494,7 +527,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK ALSA special device (optional): - GTK_JUSTIFY_RIGHT + right 3 @@ -507,7 +540,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Capture device: - GTK_JUSTIFY_RIGHT + right 2 @@ -520,7 +553,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Ring device: - GTK_JUSTIFY_RIGHT + right 1 @@ -533,7 +566,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Playback device: - GTK_JUSTIFY_RIGHT + right GTK_FILL @@ -557,10 +590,10 @@ + Enable echo cancellation True True - Enable echo cancellation - 0 + False True @@ -571,6 +604,9 @@ 6 + + + @@ -587,6 +623,9 @@ + + 0 + @@ -605,7 +644,7 @@ True Video input device: - GTK_JUSTIFY_RIGHT + right GTK_EXPAND @@ -682,6 +721,9 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-media-play + + 0 + @@ -695,13 +737,13 @@ - tab 1 False + tab - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -806,6 +848,9 @@ + + 0 + @@ -826,17 +871,19 @@ True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC + automatic + automatic True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True + + 0 + @@ -848,7 +895,6 @@ True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 @@ -860,6 +906,9 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-add + + 0 + @@ -874,6 +923,11 @@ + + False + False + 0 + @@ -881,7 +935,6 @@ True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 @@ -893,6 +946,9 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-edit + + 0 + @@ -908,6 +964,8 @@ + False + False 1 @@ -917,7 +975,6 @@ True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 @@ -929,6 +986,9 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-delete + + 0 + @@ -944,6 +1004,8 @@ + False + False 2 @@ -951,7 +1013,6 @@ True True - 0 @@ -961,6 +1022,9 @@ True gtk-network + + 0 + @@ -976,6 +1040,8 @@ virtual network ! + False + False 3 @@ -1026,7 +1092,6 @@ virtual network ! True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 @@ -1038,6 +1103,9 @@ virtual network ! GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-delete + + 0 + @@ -1052,6 +1120,11 @@ virtual network ! + + False + False + 0 + @@ -1088,6 +1161,9 @@ virtual network ! GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK stock_people.png + + 0 + @@ -1101,13 +1177,13 @@ virtual network ! - tab 2 False + tab - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -1135,6 +1211,7 @@ Video codecs False + 0 @@ -1146,19 +1223,21 @@ Video codecs True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_POLICY_AUTOMATIC - GTK_POLICY_AUTOMATIC - GTK_SHADOW_OUT + automatic + automatic + out True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True - True + + 0 + @@ -1166,28 +1245,33 @@ Video codecs GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-go-up True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-go-up True - 0 + + False + False + 0 + + gtk-go-down True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-go-down True - 0 + False + False 1 @@ -1197,7 +1281,6 @@ Video codecs True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 @@ -1209,6 +1292,9 @@ Video codecs GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-yes + + 0 + @@ -1224,6 +1310,8 @@ Video codecs + False + False 2 @@ -1233,7 +1321,6 @@ Video codecs True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 @@ -1245,6 +1332,9 @@ Video codecs GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-no + + 0 + @@ -1260,6 +1350,8 @@ Video codecs + False + False 3 @@ -1290,6 +1382,9 @@ Video codecs + + 0 + @@ -1342,7 +1437,7 @@ Video codecs True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Upload speed limit in Kbit/sec: - GTK_JUSTIFY_RIGHT + right 1 @@ -1354,7 +1449,7 @@ Video codecs True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK Download speed limit in Kbit/sec: - GTK_JUSTIFY_RIGHT + right @@ -1392,6 +1487,9 @@ Video codecs GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-execute + + 0 + @@ -1405,29 +1503,36 @@ Video codecs - tab 3 False + tab + + 0 + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - GTK_BUTTONBOX_END + end + gtk-close True True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-close True - 0 + + False + False + 0 + diff --git a/linphone/gtk-glade/update.c b/linphone/gtk-glade/update.c index 6bfcc7cbe..bc962c5a7 100755 --- a/linphone/gtk-glade/update.c +++ b/linphone/gtk-glade/update.c @@ -24,10 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include static int linphone_gtk_get_new_version(const char *version_url, char *version, size_t size){ - DWORD dwSize = 0; DWORD dwDownloaded = 0; - LPSTR pszOutBuffer; - BOOL bResults = FALSE; HINTERNET hSession = NULL, hConnect = NULL; int ret=-1; diff --git a/linphone/m4/osip.m4 b/linphone/m4/osip.m4 index 2c6c99a0b..08ab41394 100644 --- a/linphone/m4/osip.m4 +++ b/linphone/m4/osip.m4 @@ -42,8 +42,6 @@ dnl check for osip2 libs LIBS_save=$LIBS AC_CHECK_LIB(osip2${osip_legacy_version},osip_init, , AC_MSG_ERROR([Could not find osip2 library !]),[-losipparser2${osip_legacy_version} -lpthread]) AC_CHECK_LIB(osipparser2${osip_legacy_version},osip_message_init, , AC_MSG_ERROR([Could not find osipparser2 library !]),[-lpthread]) -dnl AC_CHECK_LIB adds osip2 & osipparser2 to LIBS - OSIP_LIBS=$LIBS LDFLAGS=$LDFLAGS_save LIBS=$LIBS_save fi diff --git a/linphone/mediastreamer2/INSTALL b/linphone/mediastreamer2/INSTALL old mode 100644 new mode 100755 index 23e5f25d0..5458714e1 --- a/linphone/mediastreamer2/INSTALL +++ b/linphone/mediastreamer2/INSTALL @@ -1,8 +1,8 @@ Installation Instructions ************************* -Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free -Software Foundation, Inc. +Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, +2006 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -10,7 +10,10 @@ unlimited permission to copy, distribute and modify it. Basic Installation ================== -These are generic installation instructions. +Briefly, the shell commands `./configure; make; make install' should +configure, build, and install this package. The following +more-detailed instructions are generic; see the `README' file for +instructions specific to this package. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses @@ -23,9 +26,9 @@ debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is +the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale -cache files.) +cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail @@ -35,20 +38,17 @@ some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. +`configure' by a program called `autoconf'. You need `configure.ac' if +you want to change it or regenerate `configure' using a newer version +of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. + `./configure' to configure the package for your system. - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. + Running `configure' might take a while. While running, it prints + some messages telling which features it is checking for. 2. Type `make' to compile the package. @@ -78,7 +78,7 @@ details on some of the pertinent environment variables. by setting variables in the command line or in the environment. Here is an example: - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix + ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. @@ -87,17 +87,15 @@ Compiling For Multiple Architectures You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the +own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. + With a non-GNU `make', it is safer to compile the package for one +architecture at a time in the source code directory. After you have +installed the package for one architecture, use `make distclean' before +reconfiguring for another architecture. Installation Names ================== @@ -190,12 +188,12 @@ them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is -overridden in the site shell script). Here is a another example: +overridden in the site shell script). - /bin/bash ./configure CONFIG_SHELL=/bin/bash +Unfortunately, this technique does not work for `CONFIG_SHELL' due to +an Autoconf bug. Until the bug is fixed you can use this workaround: -Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent -configuration-related scripts to be executed by `/bin/bash'. + CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== diff --git a/linphone/mediastreamer2/acinclude.m4 b/linphone/mediastreamer2/acinclude.m4 index 00266d14f..cdc99a328 100644 --- a/linphone/mediastreamer2/acinclude.m4 +++ b/linphone/mediastreamer2/acinclude.m4 @@ -102,7 +102,7 @@ AC_DEFUN([MS_CHECK_VIDEO],[ if test "$libsdldir" != "none" ; then MS_CHECK_DEP([SDL],[SDL],[${libsdldir}/include],[${libsdldir}/lib],[SDL/SDL.h],[SDL],[SDL_Init]) - if test "$SDL_found" = "no" ; then + if test "$SDL_found" = "no" && test "$mingw_found" != "yes" ; then AC_MSG_ERROR([Could not find libsdl headers and library. This is mandatory for video support]) fi fi @@ -143,6 +143,10 @@ AC_DEFUN([MS_CHECK_VIDEO],[ if test "${ac_cv_header_X11_Xlib_h}" = "yes" ; then VIDEO_LIBS="$VIDEO_LIBS -lX11" fi + + if test "$mingw_found" = "yes" ; then + VIDEO_LIBS="$VIDEO_LIBS -lvfw32" + fi fi AC_SUBST(VIDEO_CFLAGS) diff --git a/linphone/mediastreamer2/configure.ac b/linphone/mediastreamer2/configure.ac index ce50cbe3a..29b5dd15b 100644 --- a/linphone/mediastreamer2/configure.ac +++ b/linphone/mediastreamer2/configure.ac @@ -80,6 +80,7 @@ AC_ARG_ENABLE(debug, dnl Checks for programs. AC_PROG_CC +AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_ENABLE_SHARED(yes) AC_ENABLE_STATIC(no) @@ -122,12 +123,19 @@ fi macosx_found=no dnl add thread flags -case $OS in - darwin*) - MSPLUGINS_CFLAGS="" - MSPLUGINS_LIBS="-dynamiclib" - macosx_found=yes - ;; +case $target_os in + *darwin*) + MSPLUGINS_CFLAGS="" + MSPLUGINS_LIBS="-dynamiclib" + macosx_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 + LIBS="$LIBS -lws2_32 -lwinmm " + mingw_found=yes + ;; *) MSPLUGINS_CFLAGS="-pthread" MSPLUGINS_LIBS="-shared -pthread" @@ -138,6 +146,14 @@ esac AM_CONDITIONAL(BUILD_MACOSX, test x$macosx_found = xyes) +if test "$mingw_found" = "yes" ; then + AC_MSG_NOTICE([Hacking libtool to work with mingw...]) + sed -e 's/\*\" \$a_deplib \"\*/\*/' < ./libtool > libtool.tmp + cp -f ./libtool.tmp ./libtool + rm -f ./libtool.tmp +fi + + dnl initialize pkg-config so that we can use it within if else fi statements. PKG_PROG_PKG_CONFIG() @@ -152,6 +168,10 @@ dnl ********************************* found_sound=no +if test x$mingw_found = xyes ; then + found_sound=yes +fi + AC_ARG_ENABLE(oss, [ --enable-oss Disable oss support], [case "${enableval}" in @@ -167,10 +187,12 @@ if test "${ac_cv_header_sys_soundcard_h}" = "yes" || \ test "${ac_cv_header_sys_audio_h}" = "yes" || \ test "${ac_cv_header_machine_soundcard_h}" = "yes"; then found_sound=yes +else + oss=false fi fi -AM_CONDITIONAL(BUILD_OSS, test x$found_sound = xyes) +AM_CONDITIONAL(BUILD_OSS, test x$oss = xtrue) dnl conditionnal build of ALSA support AC_ARG_ENABLE(alsa, @@ -403,6 +425,7 @@ AM_CONDITIONAL(BUILD_GSM, test x$build_gsm = xyes ) 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") dnl ********************************************* dnl setup oRTP dependency @@ -462,6 +485,16 @@ AC_SUBST(PACKAGE_DATA_DIR) dnl check for video4linux headers AC_CHECK_HEADERS(linux/videodev.h linux/videodev2.h) +if test "${ac_cv_header_linux_videodev_h}" = "yes" || \ + test "${ac_cv_header_linux_videodev2_h}" = "yes" ; then + found_v4l=yes +else + found_v4l=no +fi + +AM_CONDITIONAL(BUILD_V4L, test x$found_v4l = xyes ) + + dnl ################################################## dnl # Check for doxygen diff --git a/linphone/mediastreamer2/include/mediastreamer2/allfilters.h b/linphone/mediastreamer2/include/mediastreamer2/allfilters.h index 58dfb01c1..275a4142b 100644 --- a/linphone/mediastreamer2/include/mediastreamer2/allfilters.h +++ b/linphone/mediastreamer2/include/mediastreamer2/allfilters.h @@ -82,7 +82,8 @@ typedef enum MSFilterId{ MS_MIRE_ID, MS_VFW_ID, MS_ICE_ID, - MS_VOID_SINK_ID + MS_VOID_SINK_ID, + MS_DSCAP_ID } MSFilterId; diff --git a/linphone/mediastreamer2/plugins/msx264/INSTALL b/linphone/mediastreamer2/plugins/msx264/INSTALL old mode 100644 new mode 100755 index d3c5b40a9..5458714e1 --- a/linphone/mediastreamer2/plugins/msx264/INSTALL +++ b/linphone/mediastreamer2/plugins/msx264/INSTALL @@ -2,7 +2,7 @@ Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005, -2006, 2007 Free Software Foundation, Inc. +2006 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. @@ -67,9 +67,6 @@ The simplest way to compile this package is: all sorts of other programs in order to regenerate files that came with the distribution. - 6. Often, you can also type `make uninstall' to remove the installed - files again. - Compilers and Options ===================== diff --git a/linphone/mediastreamer2/plugins/msx264/configure.ac b/linphone/mediastreamer2/plugins/msx264/configure.ac index e257b42c9..5ee6a0544 100644 --- a/linphone/mediastreamer2/plugins/msx264/configure.ac +++ b/linphone/mediastreamer2/plugins/msx264/configure.ac @@ -1,5 +1,5 @@ dnl Process this file with autoconf to produce a configure script. -AC_INIT([msx264],[1.1.7]) +AC_INIT([msx264],[1.1.8]) AM_INIT_AUTOMAKE([tar-ustar]) @@ -15,9 +15,24 @@ AC_ARG_ENABLE(strict, dnl Checks for programs. AC_PROG_CC -AC_PROG_LIBTOOL -AC_DISABLE_STATIC +AC_LIBTOOL_WIN32_DLL +AC_DISABLE_STATIC +AC_PROG_LIBTOOL + + +case $target_os in + *mingw*) + mingw_found=yes + ;; +esac + +if test "$mingw_found" = "yes" ; then + AC_MSG_NOTICE([Hacking libtool to work with mingw...]) + sed -e 's/\*\" \$a_deplib \"\*/\*/' < ./libtool > libtool.tmp + cp -f ./libtool.tmp ./libtool + rm -f ./libtool.tmp +fi CFLAGS="$CFLAGS -Wall" diff --git a/linphone/mediastreamer2/src/Makefile.am b/linphone/mediastreamer2/src/Makefile.am index 376d1ad98..999b7e70e 100644 --- a/linphone/mediastreamer2/src/Makefile.am +++ b/linphone/mediastreamer2/src/Makefile.am @@ -19,10 +19,8 @@ libmediastreamer_la_SOURCES= mscommon.c \ alaw.c \ ulaw.c \ mssndcard.c \ - msfileplayer.c \ msrtp.c \ dtmfgen.c \ - msfilerec.c \ ice.c \ tee.c \ msconf.c \ @@ -33,9 +31,28 @@ libmediastreamer_la_SOURCES= mscommon.c \ mtu.c \ void.c +#dummy c++ file to force libtool to use c++ linking (because of msdscap-mingw.cc) +nodist_EXTRA_libmediastreamer_la_SOURCES = dummy.cxx libmediastreamer_la_SOURCES+=audiostream.c + +if BUILD_SPEEX +libmediastreamer_la_SOURCES+=msspeex.c speexec.c +endif + +if BUILD_GSM +libmediastreamer_la_SOURCES+=gsm.c +endif + +if BUILD_WIN32 +libmediastreamer_la_SOURCES+= winsnd3.c \ + msfileplayer_win.c msfilerec_win.c +else +libmediastreamer_la_SOURCES+= msfileplayer.c \ + msfilerec.c +endif + if BUILD_RESAMPLE libmediastreamer_la_SOURCES+=msresample.c endif @@ -69,10 +86,21 @@ if BUILD_VIDEO if BUILD_MACOSX libmediastreamer_la_SOURCES+=msv4m.c -else +endif + +if BUILD_V4L libmediastreamer_la_SOURCES+=msv4l.c msv4l2.c endif +if BUILD_WIN32 +libmediastreamer_la_SOURCES+=msdscap-mingw.cc +endif + +if BUILD_THEORA +libmediastreamer_la_SOURCES+=theora.c +endif + + libmediastreamer_la_SOURCES+= videoenc.c \ videodec.c \ pixconv.c \ @@ -89,17 +117,8 @@ libmediastreamer_la_SOURCES+=videostream.c endif -if BUILD_THEORA -libmediastreamer_la_SOURCES+=theora.c -endif -if BUILD_SPEEX -libmediastreamer_la_SOURCES+=msspeex.c speexec.c -endif -if BUILD_GSM -libmediastreamer_la_SOURCES+=gsm.c -endif alldescs.h: Makefile.am $(libmediastreamer_la_SOURCES) builddir=`pwd` && cd $(srcdir) && \ @@ -113,13 +132,26 @@ libmediastreamer_la_LIBADD= $(ORTP_LIBS) \ $(ALSA_LIBS) \ $(ARTS_LIBS) \ $(SPEEX_LIBS) \ - $(GSM_LIBS) \ - $(THEORA_LIBS) - + $(GSM_LIBS) +if !BUILD_WIN32 libmediastreamer_la_LDFLAGS=-rdynamic +else +libmediastreamer_la_LDFLAGS=-no-undefined +endif if BUILD_VIDEO -libmediastreamer_la_LIBADD+=$(VIDEO_LIBS) +libmediastreamer_la_LIBADD+= $(VIDEO_LIBS) \ + $(THEORA_LIBS) + + +if BUILD_WIN32 +libmediastreamer_la_LIBADD+= -lole32 \ + -loleaut32\ + -lwinmm \ + -luuid + +endif + endif @@ -129,6 +161,10 @@ AM_CFLAGS= -I$(top_srcdir) \ $(GSM_CFLAGS) \ $(STRICT_OPTIONS) +AM_CXXFLAGS= -I$(top_srcdir) \ + $(ORTP_CFLAGS) \ + $(STRICT_OPTIONS) + if BUILD_VIDEO AM_CFLAGS+=$(VIDEO_CFLAGS) endif diff --git a/linphone/mediastreamer2/src/mscommon.c b/linphone/mediastreamer2/src/mscommon.c index 25c9a55c1..8ba416120 100644 --- a/linphone/mediastreamer2/src/mscommon.c +++ b/linphone/mediastreamer2/src/mscommon.c @@ -481,6 +481,10 @@ extern MSWebCamDesc ms_vfw_cam_desc; extern MSWebCamDesc ms_directx_cam_desc; #endif +#ifdef __MINGW32__ +extern MSWebCamDesc ms_dshow_cam_desc; +#endif + extern MSWebCamDesc static_image_desc; extern MSWebCamDesc mire_desc; @@ -496,6 +500,9 @@ static MSWebCamDesc * ms_web_cam_descs[]={ #endif #if defined(WIN32) && defined(HAVE_VFW) &ms_vfw_cam_desc, +#endif +#ifdef __MINGW32__ + &ms_dshow_cam_desc, #endif &mire_desc, &static_image_desc, diff --git a/linphone/mediastreamer2/src/msdscap-mingw.cc b/linphone/mediastreamer2/src/msdscap-mingw.cc new file mode 100755 index 000000000..67449097b --- /dev/null +++ b/linphone/mediastreamer2/src/msdscap-mingw.cc @@ -0,0 +1,1071 @@ +/* msdscap-mingw - mediastreamer2 plugin for video capture using directshow + Unlike winvideods.c filter, the following source code compiles with mingw. + winvideods.c requires visual studio to build. + + Copyright (C) 2009 Simon Morlat + + 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 3 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, see . +*/ +/* +This plugin has been written by Simon Morlat based on the work made by +Jan Wedekind, posted on mingw tracker here: +http://sourceforge.net/tracker/index.php?func=detail&aid=1819367&group_id=2435&atid=302435 +He wrote all the declarations missing to get directshow capture working +with mingw, and provided a demo code that worked great with minimal code. +*/ + + +#include +#include +#include +#include +#include + + +#include +#include +#include +#include + +template +class ComPtr{ + private: + _ComT *mPtr; + public: + int coCreateInstance(REFCLSID clsid, REFIID iid){ + HRESULT res; + res=::CoCreateInstance(clsid,NULL,CLSCTX_INPROC,iid, + (void**)&mPtr); + return (res==S_OK) ? 0 : -1; + } + ComPtr() : mPtr(0){ + } + ~ComPtr(){ + reset(); + } + ComPtr(const ComPtr<_ComT>& other) : mPtr(other.mPtr){ + if (mPtr) mPtr->AddRef(); + } + ComPtr<_ComT> & operator=(const ComPtr<_ComT> &other){ + if (other.mPtr) + other.mPtr->AddRef(); + if (mPtr) + mPtr->Release(); + mPtr=other.mPtr; + return *this; + } + bool operator==(const ComPtr<_ComT> &other){ + return other.mPtr==mPtr; + } + bool operator!=(const ComPtr<_ComT> &other){ + return other.mPtr!=mPtr; + } + _ComT *get(){ + return mPtr; + } + _ComT **operator&(){ + return &mPtr; + } + _ComT * operator->(){ + return mPtr; + } + void reset(){ + if (mPtr){ + mPtr->Release(); + mPtr=0; + } + } +}; + + +DEFINE_GUID( CLSID_VideoInputDeviceCategory, 0x860BB310, 0x5D01, + 0x11d0, 0xBD, 0x3B, 0x00, 0xA0, 0xC9, 0x11, 0xCE, 0x86); +DEFINE_GUID( CLSID_SystemDeviceEnum, 0x62BE5D10, 0x60EB, 0x11d0, + 0xBD, 0x3B, 0x00, 0xA0, 0xC9, 0x11, 0xCE, 0x86 ); +DEFINE_GUID( CLSID_FilterGraph, 0xe436ebb3, 0x524f, 0x11ce, + 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); +DEFINE_GUID( CLSID_SampleGrabber, 0xc1f400a0, 0x3f08, 0x11d3, + 0x9f, 0x0b, 0x00, 0x60, 0x08, 0x03, 0x9e, 0x37 ); +DEFINE_GUID( CLSID_NullRenderer,0xc1f400a4, 0x3f08, 0x11d3, + 0x9f, 0x0b, 0x00, 0x60, 0x08, 0x03, 0x9e, 0x37 ); +DEFINE_GUID( CLSID_VfwCapture, 0x1b544c22, 0xfd0b, 0x11ce, + 0x8c, 0x63, 0x0, 0xaa, 0x00, 0x44, 0xb5, 0x1e); +DEFINE_GUID( IID_IGraphBuilder, 0x56a868a9, 0x0ad4, 0x11ce, + 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70); +DEFINE_GUID( IID_IBaseFilter, 0x56a86895, 0x0ad4, 0x11ce, + 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 ); +DEFINE_GUID( IID_ICreateDevEnum, 0x29840822, 0x5b84, 0x11d0, + 0xbd, 0x3b, 0x00, 0xa0, 0xc9, 0x11, 0xce, 0x86 ); +DEFINE_GUID( IID_IEnumFilters, 0x56a86893, 0xad4, 0x11ce, + 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 ); +DEFINE_GUID( IID_IEnumPins, 0x56a86892, 0x0ad4, 0x11ce, + 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 ); +DEFINE_GUID( IID_IMediaSample, 0x56a8689a, 0x0ad4, 0x11ce, + 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 ); +DEFINE_GUID( IID_IMediaFilter, 0x56a86899, 0x0ad4, 0x11ce, + 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 ); +DEFINE_GUID( IID_IPin, 0x56a86891, 0x0ad4, 0x11ce, + 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 ); +DEFINE_GUID( IID_ISampleGrabber, 0x6b652fff, 0x11fe, 0x4fce, + 0x92, 0xad, 0x02, 0x66, 0xb5, 0xd7, 0xc7, 0x8f ); +DEFINE_GUID( IID_ISampleGrabberCB, 0x0579154a, 0x2b53, 0x4994, + 0xb0, 0xd0, 0xe7, 0x73, 0x14, 0x8e, 0xff, 0x85 ); +DEFINE_GUID( IID_IMediaEvent, 0x56a868b6, 0x0ad4, 0x11ce, + 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 ); +DEFINE_GUID( IID_IMediaControl, 0x56a868b1, 0x0ad4, 0x11ce, + 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 ); +DEFINE_GUID( IID_IMemInputPin, 0x56a8689d, 0x0ad4, 0x11ce, + 0xb0, 0x3a, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 ); +DEFINE_GUID( IID_IAMStreamConfig, 0xc6e13340, 0x30ac, 0x11d0, + 0xa1, 0x8c, 0x00, 0xa0, 0xc9, 0x11, 0x89, 0x56 ); +DEFINE_GUID( IID_IVideoProcAmp, 0x4050560e, 0x42a7, 0x413a, + 0x85, 0xc2, 0x09, 0x26, 0x9a, 0x2d, 0x0f, 0x44 ); +DEFINE_GUID( MEDIATYPE_Video, 0x73646976, 0x0000, 0x0010, + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 ); +DEFINE_GUID( MEDIASUBTYPE_I420, 0x30323449, 0x0000, 0x0010, + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71); +DEFINE_GUID( MEDIASUBTYPE_YV12, 0x32315659, 0x0000, 0x0010, + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 ); +DEFINE_GUID( MEDIASUBTYPE_IYUV, 0x56555949, 0x0000, 0x0010, + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 ); +DEFINE_GUID( MEDIASUBTYPE_YUYV, 0x56595559, 0x0000, 0x0010, + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 ); +DEFINE_GUID( MEDIASUBTYPE_YUY2, 0x32595559, 0x0000, 0x0010, + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 ); +DEFINE_GUID( MEDIASUBTYPE_UYVY, 0x59565955, 0x0000, 0x0010, + 0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71 ); +DEFINE_GUID( MEDIASUBTYPE_RGB24, 0xe436eb7d, 0x524f, 0x11ce, + 0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70 ); + +using namespace std; + +typedef LONGLONG REFERENCE_TIME; + +typedef struct tagVIDEOINFOHEADER { + RECT rcSource; + RECT rcTarget; + DWORD dwBitRate; + DWORD dwBitErrorRate; + REFERENCE_TIME AvgTimePerFrame; + BITMAPINFOHEADER bmiHeader; +} VIDEOINFOHEADER; + +typedef struct _AMMediaType { + GUID majortype; + GUID subtype; + BOOL bFixedSizeSamples; + BOOL bTemporalCompression; + ULONG lSampleSize; + GUID formattype; + IUnknown *pUnk; + ULONG cbFormat; + BYTE *pbFormat; +} AM_MEDIA_TYPE; + +DECLARE_ENUMERATOR_(IEnumMediaTypes,AM_MEDIA_TYPE*); + +typedef struct _VIDEO_STREAM_CONFIG_CAPS +{ + GUID guid; + ULONG VideoStandard; + SIZE InputSize; + SIZE MinCroppingSize; + SIZE MaxCroppingSize; + int CropGranularityX; + int CropGranularityY; + int CropAlignX; + int CropAlignY; + SIZE MinOutputSize; + SIZE MaxOutputSize; + int OutputGranularityX; + int OutputGranularityY; + int StretchTapsX; + int StretchTapsY; + int ShrinkTapsX; + int ShrinkTapsY; + LONGLONG MinFrameInterval; + LONGLONG MaxFrameInterval; + LONG MinBitsPerSecond; + LONG MaxBitsPerSecond; +} VIDEO_STREAM_CONFIG_CAPS; + +typedef LONGLONG REFERENCE_TIME; + +typedef interface IBaseFilter IBaseFilter; +typedef interface IReferenceClock IReferenceClock; +typedef interface IFilterGraph IFilterGraph; + +typedef enum _FilterState { + State_Stopped, + State_Paused, + State_Running +} FILTER_STATE; + +#define MAX_FILTER_NAME 128 +typedef struct _FilterInfo { + WCHAR achName[MAX_FILTER_NAME]; + IFilterGraph *pGraph; +} FILTER_INFO; + +typedef enum _PinDirection { + PINDIR_INPUT, + PINDIR_OUTPUT +} PIN_DIRECTION; + +#define MAX_PIN_NAME 128 +typedef struct _PinInfo { + IBaseFilter *pFilter; + PIN_DIRECTION dir; + WCHAR achName[MAX_PIN_NAME]; +} PIN_INFO; + +#define INTERFACE IPin +DECLARE_INTERFACE_(IPin,IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD(Connect)(THIS_ IPin*,const AM_MEDIA_TYPE*) PURE; + STDMETHOD(ReceiveConnection)(THIS_ IPin*,const AM_MEDIA_TYPE*) PURE; + STDMETHOD(Disconnect)(THIS) PURE; + STDMETHOD(ConnectedTo)(THIS_ IPin**) PURE; + STDMETHOD(ConnectionMediaType)(THIS_ AM_MEDIA_TYPE*) PURE; + STDMETHOD(QueryPinInfo)(THIS_ PIN_INFO*) PURE; + STDMETHOD(QueryDirection)(THIS_ PIN_DIRECTION*) PURE; +}; +#undef INTERFACE + +DECLARE_ENUMERATOR_(IEnumPins,IPin*); + +typedef struct _AllocatorProperties { + long cBuffers; + long cbBuffer; + long cbAlign; + long cbPrefix; +} ALLOCATOR_PROPERTIES; + +typedef LONG_PTR OAEVENT; + +#define INTERFACE IMediaEvent +DECLARE_INTERFACE_(IMediaEvent,IDispatch) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD(GetEventHandle)(THIS_ OAEVENT*) PURE; + STDMETHOD(GetEvent)(THIS_ long*,LONG_PTR,LONG_PTR,long) PURE; + STDMETHOD(WaitForCompletion)(THIS_ long,long*) PURE; + STDMETHOD(CancelDefaultHandling)(THIS_ long) PURE; + STDMETHOD(RestoreDefaultHandling)(THIS_ long) PURE; + STDMETHOD(FreeEventParams)(THIS_ long,LONG_PTR,LONG_PTR) PURE; +}; +#undef INTERFACE + +typedef long OAFilterState; + +#define INTERFACE IMediaControl +DECLARE_INTERFACE_(IMediaControl,IDispatch) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD(Run)(THIS) PURE; + STDMETHOD(Pause)(THIS) PURE; + STDMETHOD(Stop)(THIS) PURE; + STDMETHOD(GetState)(THIS_ LONG,OAFilterState*) PURE; + STDMETHOD(RenderFile)(THIS_ BSTR) PURE; + STDMETHOD(AddSourceFilter)(THIS_ BSTR,IDispatch**) PURE; + STDMETHOD(get_FilterCollection)(THIS_ IDispatch**) PURE; + STDMETHOD(get_RegFilterCollection)(THIS_ IDispatch**) PURE; + STDMETHOD(StopWhenReady)(THIS) PURE; +}; +#undef INTERFACE + +#define INTERFACE IVideoProcAmp +DECLARE_INTERFACE_(IVideoProcAmp,IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; +}; +#undef INTERFACE + +#define INTERFACE IAMStreamConfig +DECLARE_INTERFACE_(IAMStreamConfig,IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD(SetFormat)(THIS_ AM_MEDIA_TYPE*) PURE; + STDMETHOD(GetFormat)(THIS_ AM_MEDIA_TYPE**) PURE; + STDMETHOD(GetNumberOfCapabilities)(THIS_ int*,int*) PURE; + STDMETHOD(GetStreamCaps)(THIS_ int,AM_MEDIA_TYPE**,BYTE*) PURE; +}; +#undef INTERFACE + +#define INTERFACE IMediaFilter +DECLARE_INTERFACE_(IMediaFilter,IPersist) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD(Stop)(THIS) PURE; + STDMETHOD(Pause)(THIS) PURE; + STDMETHOD(Run)(THIS_ REFERENCE_TIME) PURE; + STDMETHOD(GetState)(THIS_ DWORD,FILTER_STATE*) PURE; + STDMETHOD(SetSyncSource)(THIS_ IReferenceClock*) PURE; + STDMETHOD(GetSyncSource)(THIS_ IReferenceClock**) PURE; +}; +#undef INTERFACE + +#define INTERFACE IBaseFilter +DECLARE_INTERFACE_(IBaseFilter,IMediaFilter) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD(EnumPins)(THIS_ IEnumPins**) PURE; + STDMETHOD(FindPin)(THIS_ LPCWSTR,IPin**) PURE; + STDMETHOD(QueryFilterInfo)(THIS_ FILTER_INFO*) PURE; + STDMETHOD(JoinFilterGraph)(THIS_ IFilterGraph*,LPCWSTR) PURE; + STDMETHOD(QueryVendorInfo)(THIS_ LPWSTR*) PURE; +}; +#undef INTERFACE + +DECLARE_ENUMERATOR_(IEnumFilters,IBaseFilter*); + +// #define INTERFACE IEnumFilters +// DECLARE_INTERFACE_(IEnumFilters,IUnknown) +// { +// STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; +// STDMETHOD_(ULONG,AddRef)(THIS) PURE; +// STDMETHOD_(ULONG,Release)(THIS) PURE; +// STDMETHOD(Next)(THIS_ ULONG,IBaseFilter**,ULONG*) PURE; +// STDMETHOD(Skip)(THIS_ ULONG) PURE; +// STDMETHOD(Reset)(THIS) PURE; +// STDMETHOD(Clone)(THIS_ IEnumFilters**) PURE; +// }; +// #undef INTERFACE + +#define INTERFACE IFilterGraph +DECLARE_INTERFACE_(IFilterGraph,IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD(AddFilter)(THIS_ IBaseFilter*,LPCWSTR) PURE; + STDMETHOD(RemoveFilter)(THIS_ IBaseFilter*) PURE; + STDMETHOD(EnumFilters)(THIS_ IEnumFilters**) PURE; + STDMETHOD(FindFilterByName)(THIS_ LPCWSTR,IBaseFilter**) PURE; + STDMETHOD(ConnectDirect)(THIS_ IPin*,IPin*,const AM_MEDIA_TYPE*) PURE; + STDMETHOD(Reconnect)(THIS_ IPin*) PURE; + STDMETHOD(Disconnect)(THIS_ IPin*) PURE; + STDMETHOD(SetDefaultSyncSource)(THIS) PURE; +}; +#undef INTERFACE + +#define INTERFACE IGraphBuilder +DECLARE_INTERFACE_(IGraphBuilder,IFilterGraph) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD(Connect)(THIS_ IPin*,IPin*) PURE; + STDMETHOD(Render)(THIS_ IPin*) PURE; + STDMETHOD(RenderFile)(THIS_ LPCWSTR,LPCWSTR) PURE; + STDMETHOD(AddSourceFilter)(THIS_ LPCWSTR,LPCWSTR,IBaseFilter**) PURE; + STDMETHOD(SetLogFile)(THIS_ DWORD_PTR) PURE; + STDMETHOD(Abort)(THIS) PURE; + STDMETHOD(ShouldOperationContinue)(THIS) PURE; +}; +#undef INTERFACE + +#define INTERFACE ICreateDevEnum +DECLARE_INTERFACE_(ICreateDevEnum,IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD(CreateClassEnumerator)(THIS_ REFIID,IEnumMoniker**,DWORD) PURE; +}; +#undef INTERFACE + +#define INTERFACE IMediaSample +DECLARE_INTERFACE_(IMediaSample,IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD(GetPointer)(THIS_ BYTE **) PURE; + STDMETHOD_(long, GetSize)(THIS) PURE; +}; +/* +#define INTERFACE IMediaSample +DECLARE_INTERFACE_(IMediaSample, IUnknown) +{ + STDMETHOD(GetPointer)(THIS_ BYTE **) PURE; + STDMETHOD_(long, GetSize)(THIS) PURE; + STDMETHOD(GetTime)(THIS_ REFERENCE_TIME *, REFERENCE_TIME *) PURE; + STDMETHOD(SetTime)(THIS_ REFERENCE_TIME *, REFERENCE_TIME *) PURE; + STDMETHOD(IsSyncPoint)(THIS) PURE; + STDMETHOD(SetSyncPoint)(THIS_ BOOL) PURE; + STDMETHOD(IsPreroll)(THIS) PURE; + STDMETHOD(SetPreroll)(THIS_ BOOL) PURE; + STDMETHOD_(long, GetActualDataLength)(THIS) PURE; + STDMETHOD(SetActualDataLength)(THIS_ long) PURE; + STDMETHOD(GetMediaType)(THIS_ AM_MEDIA_TYPE **) PURE; + STDMETHOD(SetMediaType)(THIS_ AM_MEDIA_TYPE *) PURE; + STDMETHOD(IsDiscontinuity)(THIS) PURE; + STDMETHOD(SetDiscontinuity)(THIS_ BOOL) PURE; + STDMETHOD(GetMediaTime)(THIS_ LONGLONG *, LONGLONG *) PURE; + STDMETHOD(SetMediaTime)(THIS_ LONGLONG *, LONGLONG *) PURE; +}; +*/ + + +#undef INTERFACE + +#define INTERFACE IMemAllocator +DECLARE_INTERFACE_(IMemAllocator,IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD(SetProperties)(THIS_ ALLOCATOR_PROPERTIES*,ALLOCATOR_PROPERTIES*) PURE; + STDMETHOD(GetProperties)(THIS_ ALLOCATOR_PROPERTIES*) PURE; + STDMETHOD(Commit)(THIS) PURE; + STDMETHOD(Decommit)(THIS) PURE; + STDMETHOD(GetBuffer)(THIS_ IMediaSample **,REFERENCE_TIME*,REFERENCE_TIME*,DWORD) PURE; + STDMETHOD(ReleaseBuffer)(THIS_ IMediaSample*) PURE; +}; +#undef INTERFACE + +#define INTERFACE IMemInputPin +DECLARE_INTERFACE_(IMemInputPin,IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD(GetAllocator)(THIS_ IMemAllocator**) PURE; + STDMETHOD(NotifyAllocator)(THIS_ IMemAllocator*,BOOL) PURE; + STDMETHOD(GetAllocatorRequirements)(THIS_ ALLOCATOR_PROPERTIES*) PURE; + STDMETHOD(Receive)(THIS_ IMediaSample*) PURE; + STDMETHOD(ReceiveMultiple)(THIS_ IMediaSample**,LONG,LONG*) PURE; + STDMETHOD(ReceiveCanBlock)(THIS) PURE; +}; +#undef INTERFACE + +#define INTERFACE ISampleGrabberCB +DECLARE_INTERFACE_(ISampleGrabberCB,IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD(SampleCB)(THIS_ double,IMediaSample*) PURE; + STDMETHOD(BufferCB)(THIS_ double,BYTE*,long) PURE; +}; +#undef INTERFACE + +#define INTERFACE ISampleGrabber +DECLARE_INTERFACE_(ISampleGrabber,IUnknown) +{ + STDMETHOD(QueryInterface)(THIS_ REFIID,PVOID*) PURE; + STDMETHOD_(ULONG,AddRef)(THIS) PURE; + STDMETHOD_(ULONG,Release)(THIS) PURE; + STDMETHOD(SetOneShot)(THIS_ BOOL) PURE; + STDMETHOD(SetMediaType)(THIS_ const AM_MEDIA_TYPE*) PURE; + STDMETHOD(GetConnectedMediaType)(THIS_ AM_MEDIA_TYPE*) PURE; + STDMETHOD(SetBufferSamples)(THIS_ BOOL) PURE; + STDMETHOD(GetCurrentBuffer)(THIS_ long*,long*) PURE; + STDMETHOD(GetCurrentSample)(THIS_ IMediaSample**) PURE; + STDMETHOD(SetCallBack)(THIS_ ISampleGrabberCB *,long) PURE; +}; +#undef INTERFACE + +ComPtr< IPin > getPin( IBaseFilter *filter, PIN_DIRECTION direction, int num ) +{ + ComPtr< IPin > retVal; + ComPtr< IEnumPins > enumPins; + if (filter->EnumPins( &enumPins )!=S_OK){ + ms_error("Error getting pin enumerator" ); + return retVal; + } + ULONG found; + ComPtr< IPin > pin; + while ( enumPins->Next( 1, &pin, &found ) == S_OK ) { + PIN_DIRECTION pinDirection = (PIN_DIRECTION)( -1 ); + pin->QueryDirection( &pinDirection ); + if ( pinDirection == direction ) { + if ( num == 0 ) { + retVal = pin; + break; + }; + num--; + }; + }; + return retVal; +} + + + +class DSCapture : public ISampleGrabberCB{ +public: + DSCapture(){ + qinit(&_rq); + ms_mutex_init(&_mutex,NULL); + _vsize=MS_VIDEO_SIZE_CIF; + _fps=15; + _start_time=0; + _frame_count=0; + _pixfmt=MS_YUV420P; + _ready=false; + m_refCount=1; + } + virtual ~DSCapture(){ + if (_ready) stopAndClean(); + flushq(&_rq,0); + ms_mutex_destroy(&_mutex); + } + STDMETHODIMP QueryInterface( REFIID riid, void **ppv ); + STDMETHODIMP_(ULONG) AddRef(void); + STDMETHODIMP_(ULONG) Release(void); + STDMETHODIMP SampleCB(double,IMediaSample*); + STDMETHODIMP BufferCB(double,BYTE*,long); + int startDshowGraph(); + void stopAndClean(); + mblk_t *readFrame(){ + mblk_t *ret=NULL; + ms_mutex_lock(&_mutex); + ret=getq(&_rq); + ms_mutex_unlock(&_mutex); + return ret; + } + bool isTimeToSend(uint64_t ticker_time); + MSVideoSize getVSize()const{ + return _vsize; + } + void setVSize(MSVideoSize vsize){ + _vsize=vsize; + } + void setFps(float fps){ + _fps=fps; + } + MSPixFmt getPixFmt(){ + if (!_ready) createDshowGraph(); /* so that _pixfmt is updated*/ + return _pixfmt; + } + void setDeviceIndex(int index){ + _devid=index; + } +protected: + long m_refCount; +private: + int createDshowGraph(); + int selectBestFormat(ComPtr streamConfig, int count); + int _devid; + MSVideoSize _vsize; + queue_t _rq; + ms_mutex_t _mutex; + float _fps; + float _start_time; + int _frame_count; + MSPixFmt _pixfmt; + ComPtr< IGraphBuilder > _graphBuilder; + ComPtr< IBaseFilter > _source; + ComPtr< IBaseFilter > _nullRenderer; + ComPtr< IBaseFilter > _grabberBase; + ComPtr< IMediaControl > _mediaControl; + ComPtr< IMediaEvent > _mediaEvent; + bool _ready; +}; + + +STDMETHODIMP DSCapture::QueryInterface(REFIID riid, void **ppv) +{ + HRESULT retval; + if ( ppv == NULL ) return E_POINTER; + /* + if ( riid == IID_IUnknown ) { + *ppv = static_cast< IUnknown * >( this ); + AddRef(); + retval = S_OK; + } else if ( riid == IID_ISampleGrabberCB ) { + *ppv = static_cast< ISampleGrabberCB * >( this ); + AddRef(); + retval = S_OK; + } else */ { + retval = E_NOINTERFACE; + }; + return retval; +}; + +STDMETHODIMP_(ULONG) DSCapture::AddRef(){ + m_refCount++; + return m_refCount; +} + +STDMETHODIMP_(ULONG) DSCapture::Release() +{ + ms_message("DSCapture::Release"); + if ( !InterlockedDecrement( &m_refCount ) ) { + int refcnt=m_refCount; + delete this; + return refcnt; + } + return m_refCount; +} + +static void dummy(void*p){ +} + +STDMETHODIMP DSCapture::SampleCB( double par1 , IMediaSample * sample) +{ + uint8_t *p; + unsigned int size; + if (sample->GetPointer(&p)!=S_OK){ + ms_error("error in GetPointer()"); + return S_OK; + } + size=sample->GetSize(); + //ms_message( "DSCapture::SampleCB pointer=%p, size=%i",p,size); + mblk_t *m=esballoc(p,size,0,dummy); + m->b_wptr+=size; + ms_mutex_lock(&_mutex); + putq(&_rq,m); + ms_mutex_unlock(&_mutex); + return S_OK; +} + + + +STDMETHODIMP DSCapture::BufferCB( double, BYTE *b, long len) +{ + ms_message("DSCapture::BufferCB"); + return S_OK; +} + +static void dscap_init(MSFilter *f){ + DSCapture *s=new DSCapture(); + f->data=s; +} + + + +static void dscap_uninit(MSFilter *f){ + DSCapture *s=(DSCapture*)f->data; + s->Release(); +} + +static char * fourcc_to_char(char *str, uint32_t fcc){ + memcpy(str,&fcc,4); + str[4]='\0'; + return str; +} + +static int find_best_format(ComPtr streamConfig, int count, MSVideoSize *requested_size, MSPixFmt requested_fmt ){ + int i; + MSVideoSize best_found=(MSVideoSize){32768,32768}; + int best_index=-1; + char fccstr[5]; + char selected_fcc[5]; + for (i=0; iGetStreamCaps( i, &mediaType, + (BYTE *)&videoConfig )!=S_OK){ + ms_error( "Error getting stream capabilities"); + return -1; + } + if ( mediaType->majortype == MEDIATYPE_Video && + mediaType->cbFormat != 0 ) { + VIDEOINFOHEADER *infoHeader = (VIDEOINFOHEADER*)mediaType->pbFormat; + ms_message("Seeing format %ix%i %s",infoHeader->bmiHeader.biWidth,infoHeader->bmiHeader.biHeight, + fourcc_to_char(fccstr,infoHeader->bmiHeader.biCompression)); + if (ms_fourcc_to_pix_fmt(infoHeader->bmiHeader.biCompression)==requested_fmt){ + MSVideoSize cur; + cur.width=infoHeader->bmiHeader.biWidth; + cur.height=infoHeader->bmiHeader.biHeight; + if (ms_video_size_greater_than(cur,*requested_size)){ + if (ms_video_size_greater_than(best_found,cur)){ + best_found=cur; + best_index=i; + fourcc_to_char(selected_fcc,infoHeader->bmiHeader.biCompression); + } + } + } + }; + if ( mediaType->cbFormat != 0 ) + CoTaskMemFree( (PVOID)mediaType->pbFormat ); + if ( mediaType->pUnk != NULL ) mediaType->pUnk->Release(); + CoTaskMemFree( (PVOID)mediaType ); + } + if (best_index!=-1) { + *requested_size=best_found; + ms_message("Best camera format is %s %ix%i",selected_fcc,best_found.width,best_found.height); + } + return best_index; +} + +int DSCapture::selectBestFormat(ComPtr streamConfig, int count){ + int index; + _pixfmt=MS_YUV420P; + index=find_best_format(streamConfig, count, &_vsize, _pixfmt); + if (index!=-1) goto success; + _pixfmt=MS_YUY2; + index=find_best_format(streamConfig, count, &_vsize,_pixfmt); + if (index!=-1) goto success; + _pixfmt=MS_YUYV; + index=find_best_format(streamConfig, count, &_vsize, _pixfmt); + if (index!=-1) goto success; + _pixfmt=MS_RGB24; + index=find_best_format(streamConfig, count, &_vsize, _pixfmt); + if (index!=-1) { + _pixfmt=MS_RGB24_REV; + goto success; + } + ms_error("This camera does not support any of our pixel formats."); + return -1; + + success: + VIDEO_STREAM_CONFIG_CAPS videoConfig; + AM_MEDIA_TYPE *mediaType; + if (streamConfig->GetStreamCaps( index, &mediaType, + (BYTE *)&videoConfig )!=S_OK){ + ms_error( "Error getting stream capabilities" ); + } + streamConfig->SetFormat( mediaType ); + return 0; +} + +int DSCapture::createDshowGraph(){ + ComPtr< ICreateDevEnum > createDevEnum; + + CoInitialize(NULL); + if (createDevEnum.coCreateInstance( CLSID_SystemDeviceEnum, + IID_ICreateDevEnum )==-1){ + ms_error("Could not create device enumerator"); + return -1; + } + ComPtr< IEnumMoniker > enumMoniker; + if (createDevEnum->CreateClassEnumerator( CLSID_VideoInputDeviceCategory, &enumMoniker, 0 )!=S_OK){ + ms_error("Fail to create class enumerator."); + return -1; + } + createDevEnum.reset(); + enumMoniker->Reset(); + + ULONG fetched = 0; + if (_graphBuilder.coCreateInstance( CLSID_FilterGraph, IID_IGraphBuilder )!=0){ + ms_error("Could not create graph builder."); + return -1; + } + ComPtr< IMoniker > moniker; + for ( int i=0;enumMoniker->Next( 1, &moniker, &fetched )==S_OK;++i ) { + if (i==_devid){ + if (moniker->BindToObject( 0, 0, IID_IBaseFilter, (void **)&_source )!=S_OK){ + ms_error("Error binding moniker to base filter" ); + return -1; + } + } + } + if (_source.get()==0){ + ms_error("Could not interface with webcam devid=%i",_devid); + return -1; + } + moniker.reset(); + enumMoniker.reset(); + if (_graphBuilder->AddFilter( _source.get(), L"Source" )!=S_OK){ + ms_error("Error adding camera source to filter graph" ); + return -1; + } + ComPtr< IPin > sourceOut = getPin( _source.get(), PINDIR_OUTPUT, 0 ); + if (sourceOut.get()==NULL){ + ms_error("Error getting output pin of camera source" ); + return -1; + } + ComPtr< IAMStreamConfig > streamConfig; + if (sourceOut->QueryInterface( IID_IAMStreamConfig, + (void **)&streamConfig )!=S_OK){ + ms_error("Error requesting stream configuration API" ); + return -1; + } + int count, size; + if (streamConfig->GetNumberOfCapabilities( &count, &size )!=S_OK){ + ms_error("Error getting number of capabilities" ); + return -1; + } + if (selectBestFormat(streamConfig,count)!=0){ + return -1; + } + streamConfig.reset(); + + if (CoCreateInstance( CLSID_SampleGrabber, NULL, + CLSCTX_INPROC, IID_IBaseFilter, + (void **)&_grabberBase )!=S_OK){ + ms_error("Error creating sample grabber" ); + return -1; + } + if (_graphBuilder->AddFilter( _grabberBase.get(), L"Grabber" )!=S_OK){ + ms_error("Error adding sample grabber to filter graph"); + return -1; + } + ComPtr< ISampleGrabber > sampleGrabber; + if (_grabberBase->QueryInterface( IID_ISampleGrabber, + (void **)&sampleGrabber )!=S_OK){ + ms_error("Error requesting sample grabber interface"); + return -1; + } + if (sampleGrabber->SetOneShot( FALSE )!=S_OK){ + ms_error("Error disabling one-shot mode" ); + return -1; + } + if (sampleGrabber->SetBufferSamples( TRUE )!=S_OK){ + ms_error("Error enabling buffer sampling" ); + return -1; + } + if (sampleGrabber->SetCallBack(this, 0 )!=S_OK){ + ms_error("Error setting callback interface for grabbing" ); + return -1; + } + ComPtr< IPin > grabberIn = getPin( _grabberBase.get(), PINDIR_INPUT, 0 ); + if (grabberIn.get() == NULL){ + ms_error("Error getting input of sample grabber"); + return -1; + } + ComPtr< IPin > grabberOut = getPin( _grabberBase.get(), PINDIR_OUTPUT, 0 ); + if (grabberOut.get()==NULL){ + ms_error("Error getting output of sample grabber" ); + return -1; + } + if (CoCreateInstance( CLSID_NullRenderer, NULL, + CLSCTX_INPROC, IID_IBaseFilter, + (void **)&_nullRenderer )!=S_OK){ + ms_error("Error creating Null Renderer" ); + return -1; + } + if (_graphBuilder->AddFilter( _nullRenderer.get(), L"Sink" )!=S_OK){ + ms_error("Error adding null renderer to filter graph" ); + return -1; + } + ComPtr< IPin > nullIn = getPin( _nullRenderer.get(), PINDIR_INPUT, 0 ); + if (_graphBuilder->Connect( sourceOut.get(), grabberIn.get() )!=S_OK){ + ms_error("Error connecting source to sample grabber" ); + return -1; + } + if (_graphBuilder->Connect( grabberOut.get(), nullIn.get() )!=S_OK){ + ms_error("Error connecting sample grabber to sink" ); + return -1; + } + ms_message("Directshow graph is now ready to run."); + + if (_graphBuilder->QueryInterface( IID_IMediaControl, + (void **)&_mediaControl )!=S_OK){ + ms_error("Error requesting media control interface" ); + return -1; + } + if (_graphBuilder->QueryInterface( IID_IMediaEvent, + (void **)&_mediaEvent )!=S_OK){ + ms_error("Error requesting event interface" ); + return -1; + } + _ready=true; + return 0; +} + +int DSCapture::startDshowGraph(){ + if (!_ready) { + if (createDshowGraph()!=0) return -1; + } + HRESULT r=_mediaControl->Run(); + if (r!=S_OK && r!=S_FALSE){ + ms_error("Error starting graph (%i)",r); + return -1; + } + ms_message("Graph started"); + return 0; +} + +void DSCapture::stopAndClean(){ + if (_mediaControl.get()!=NULL){ + HRESULT r; + r=_mediaControl->Stop(); + if (r!=S_OK){ + ms_error("msdscap: Could not stop graph !"); + fflush(NULL); + } + _graphBuilder->RemoveFilter(_source.get()); + _graphBuilder->RemoveFilter(_grabberBase.get()); + _graphBuilder->RemoveFilter(_nullRenderer.get()); + } + _source.reset(); + _grabberBase.reset(); + _nullRenderer.reset(); + _mediaControl.reset(); + _mediaEvent.reset(); + _graphBuilder.reset(); + CoUninitialize(); + ms_mutex_lock(&_mutex); + flushq(&_rq,0); + ms_mutex_unlock(&_mutex); + _ready=false; +} + +bool DSCapture::isTimeToSend(uint64_t ticker_time){ + if (_frame_count==-1){ + _start_time=(float)ticker_time; + _frame_count=0; + } + int cur_frame=(int)(((float)ticker_time-_start_time)*_fps/1000.0); + if (cur_frame>_frame_count){ + _frame_count++; + return true; + } + return false; +} + +static void dscap_preprocess(MSFilter * obj){ + DSCapture *s=(DSCapture*)obj->data; + s->startDshowGraph(); +} + +static void dscap_postprocess(MSFilter * obj){ + DSCapture *s=(DSCapture*)obj->data; + s->stopAndClean(); +} + +static void dscap_process(MSFilter * obj){ + DSCapture *s=(DSCapture*)obj->data; + mblk_t *m; + uint32_t timestamp; + + if (s->isTimeToSend(obj->ticker->time)){ + mblk_t *om=NULL; + /*keep the most recent frame if several frames have been captured */ + while((m=s->readFrame())!=NULL){ + if (om!=NULL) freemsg(om); + om=m; + } + if (om!=NULL){ + timestamp=(uint32_t)(obj->ticker->time*90);/* rtp uses a 90000 Hz clockrate for video*/ + mblk_set_timestamp_info(om,timestamp); + ms_queue_put(obj->outputs[0],om); + } + } +} + +static int dscap_set_fps(MSFilter *f, void *arg){ + DSCapture *s=(DSCapture*)f->data; + s->setFps(*(float*)arg); + return 0; +} + +static int dscap_get_pix_fmt(MSFilter *f,void *arg){ + DSCapture *s=(DSCapture*)f->data; + *((MSPixFmt*)arg)=s->getPixFmt(); + return 0; +} + +static int dscap_set_vsize(MSFilter *f, void *arg){ + DSCapture *s=(DSCapture*)f->data; + s->setVSize(*((MSVideoSize*)arg)); + return 0; +} + +static int dscap_get_vsize(MSFilter *f, void *arg){ + DSCapture *s=(DSCapture*)f->data; + MSVideoSize *vs=(MSVideoSize*)arg; + *vs=s->getVSize(); + return 0; +} + +static MSFilterMethod methods[]={ + { MS_FILTER_SET_FPS , dscap_set_fps }, + { MS_FILTER_GET_PIX_FMT , dscap_get_pix_fmt }, + { MS_FILTER_SET_VIDEO_SIZE, dscap_set_vsize }, + { MS_FILTER_GET_VIDEO_SIZE, dscap_get_vsize }, + { 0 , NULL } +}; + +MSFilterDesc ms_dscap_desc={ + MS_DSCAP_ID, + "MSDsCap", + N_("A webcam grabber based on directshow."), + MS_FILTER_OTHER, + NULL, + 0, + 1, + dscap_init, + dscap_preprocess, + dscap_process, + dscap_postprocess, + dscap_uninit, + methods +}; + + +static void ms_dshow_detect(MSWebCamManager *obj); +static MSFilter * ms_dshow_create_reader(MSWebCam *obj){ + MSFilter *f=ms_filter_new_from_desc(&ms_dscap_desc); + DSCapture *s=(DSCapture*)f->data; + s->setDeviceIndex((int)obj->data); + return f; +} + +MSWebCamDesc ms_dshow_cam_desc={ + "Directshow capture", + &ms_dshow_detect, + NULL, + &ms_dshow_create_reader, + NULL +}; + +static void ms_dshow_detect(MSWebCamManager *obj){ + ComPtr pBag; + + CoInitialize(NULL); + + ComPtr< ICreateDevEnum > createDevEnum; + if (createDevEnum.coCreateInstance( CLSID_SystemDeviceEnum, + IID_ICreateDevEnum)!=0){ + ms_error( "Could not create device enumerator" ); + return ; + } + ComPtr< IEnumMoniker > enumMoniker; + if (createDevEnum->CreateClassEnumerator( CLSID_VideoInputDeviceCategory, &enumMoniker, 0 )!=S_OK){ + ms_error("Fail to create class enumerator."); + return; + } + createDevEnum.reset(); + enumMoniker->Reset(); + + ULONG fetched = 0; + ComPtr< IMoniker > moniker; + for ( int i=0;enumMoniker->Next( 1, &moniker, &fetched )==S_OK;++i ) { + VARIANT var; + if (moniker->BindToStorage( 0, 0, IID_IPropertyBag, (void**) &pBag )!=S_OK) + continue; + VariantInit(&var); + if (pBag->Read( L"FriendlyName", &var, NULL )!=S_OK) + continue; + char szName[256]; + WideCharToMultiByte(CP_ACP,0,var.bstrVal,-1,szName,256,0,0); + MSWebCam *cam=ms_web_cam_new(&ms_dshow_cam_desc); + cam->name=ms_strdup(szName); + cam->data=(void*)i; + ms_web_cam_manager_prepend_cam(obj,cam); + VariantClear(&var); + } + enumMoniker.reset(); +} + diff --git a/linphone/mediastreamer2/tests/bench.c b/linphone/mediastreamer2/tests/bench.c index 23421be9b..a7c12721e 100644 --- a/linphone/mediastreamer2/tests/bench.c +++ b/linphone/mediastreamer2/tests/bench.c @@ -347,13 +347,13 @@ int main(int argc, char *argv[]){ for (pos=0;cfg[pos].num_session!=0;pos++) { count = count + init_bench(&cfg[pos]); - sleep(10); + ms_sleep(10); } ms_message("Number of session started: %i.", count); while(run) - sleep(1); + ms_sleep(1); for (pos=0;cfg[pos].num_session!=0;pos++) { diff --git a/linphone/mediastreamer2/tests/echo.c b/linphone/mediastreamer2/tests/echo.c index bc92d2289..dc481545d 100644 --- a/linphone/mediastreamer2/tests/echo.c +++ b/linphone/mediastreamer2/tests/echo.c @@ -69,16 +69,16 @@ int main(int argc, char *argv[]){ f1=ms_snd_card_create_reader(card_capture); f2=ms_snd_card_create_writer(card_playback); - ms_filter_call_method (f1, MS_FILTER_SET_SAMPLE_RATE, - &rate); - ms_filter_call_method (f2, MS_FILTER_SET_SAMPLE_RATE, - &rate); + ms_filter_call_method (f1, MS_FILTER_SET_SAMPLE_RATE, + &rate); + ms_filter_call_method (f2, MS_FILTER_SET_SAMPLE_RATE, + &rate); ticker=ms_ticker_new(); ms_filter_link(f1,0,f2,0); ms_ticker_attach(ticker,f1); while(run) - sleep(1); + ms_sleep(1); ms_ticker_detach(ticker,f1); ms_ticker_destroy(ticker); ms_filter_unlink(f1,0,f2,0); diff --git a/linphone/mediastreamer2/tests/ring.c b/linphone/mediastreamer2/tests/ring.c index 4cbcd27d8..8751eff98 100644 --- a/linphone/mediastreamer2/tests/ring.c +++ b/linphone/mediastreamer2/tests/ring.c @@ -46,7 +46,7 @@ int main(int argc, char *argv[]){ #endif r=ring_start(file,2000,sc); - sleep(10); + ms_sleep(10); ring_stop(r); return 0; } diff --git a/linphone/oRTP/configure.ac b/linphone/oRTP/configure.ac index dcf77490d..b9625b620 100644 --- a/linphone/oRTP/configure.ac +++ b/linphone/oRTP/configure.ac @@ -98,10 +98,16 @@ case "$target_os" in AC_DEFINE(NOCONNECT,1,[Defined if we should not use connect() on udp sockets]) PTHREAD_LDFLAGS="-pthread" ;; + *mingw*) + CFLAGS="$CFLAGS -D_WIN32_WINNT=0x0501 -DORTP_STATIC" + LIBS="$LIBS -lws2_32 -liphlpapi -lwinmm" + build_tests=no + ;; esac dnl Checks for programs. AC_PROG_CC +AC_LIBTOOL_WIN32_DLL AC_PROG_LIBTOOL AC_ENABLE_SHARED(yes) AC_ENABLE_STATIC(no) @@ -276,7 +282,7 @@ AC_PATH_PROG(EPM,epm,false) AC_PATH_PROG(MKEPMLIST,mkepmlist,false) AC_PATH_PROG(EPMINSTALL,epminstall,false) AM_CONDITIONAL(WITH_EPM,test $EPM != false && test $MKEPMLIST != false && test $EPMINSTALL != false) - +AM_CONDITIONAL(BUILD_TESTS,test x$build_tests != xno) # Preferred packaging system, as per EPM terminology case $target in diff --git a/linphone/oRTP/src/Makefile.am b/linphone/oRTP/src/Makefile.am index 7a381f62d..251c6dff7 100644 --- a/linphone/oRTP/src/Makefile.am +++ b/linphone/oRTP/src/Makefile.am @@ -35,7 +35,7 @@ libortp_la_SOURCES= str_utils.c \ libortp_la_LIBADD= $(PTHREAD_LIBS) -lm $(SRTP_LIBS) $(SSL_LIBS) -libortp_la_LDFLAGS= -version-info $(LIBORTP_SO_VERSION) +libortp_la_LDFLAGS= -version-info $(LIBORTP_SO_VERSION) -no-undefined SUBDIRS= . tests diff --git a/linphone/oRTP/src/rtpsession_inet.c b/linphone/oRTP/src/rtpsession_inet.c index 27c319d5d..78a213578 100644 --- a/linphone/oRTP/src/rtpsession_inet.c +++ b/linphone/oRTP/src/rtpsession_inet.c @@ -730,10 +730,10 @@ void rtp_session_flush_sockets(RtpSession *session){ } if (session->rtp.socket>=0){ - while (recvfrom(session->rtp.socket,trash,sizeof(trash),0,(struct sockaddr *)&from,&fromlen)>0){}; + while (recvfrom(session->rtp.socket,(char*)trash,sizeof(trash),0,(struct sockaddr *)&from,&fromlen)>0){}; } if (session->rtcp.socket>=0){ - while (recvfrom(session->rtcp.socket,trash,sizeof(trash),0,(struct sockaddr*)&from,&fromlen)>0){}; + while (recvfrom(session->rtcp.socket,(char*)trash,sizeof(trash),0,(struct sockaddr*)&from,&fromlen)>0){}; } } @@ -811,7 +811,7 @@ rtp_session_rtp_send (RtpSession * session, mblk_t * m) #else if (m->b_cont!=NULL) msgpullup(m,-1); - error = sendto (sockfd, m->b_rptr, (int) (m->b_wptr - m->b_rptr), + error = sendto (sockfd, (char*)m->b_rptr, (int) (m->b_wptr - m->b_rptr), 0,destaddr,destlen); #endif } @@ -855,7 +855,7 @@ rtp_session_rtcp_send (RtpSession * session, mblk_t * m) if (m->b_cont!=NULL){ msgpullup(m,-1); } - error = sendto (sockfd, m->b_rptr, + error = sendto (sockfd, (char*)m->b_rptr, (int) (m->b_wptr - m->b_rptr), 0, destaddr, destlen); #endif @@ -896,12 +896,12 @@ rtp_session_rtp_recv (RtpSession * session, uint32_t user_ts) mp=session->rtp.cached_mp; bufsz=(int) (mp->b_datap->db_lim - mp->b_datap->db_base); if (sock_connected){ - error=recv(sockfd,mp->b_wptr,bufsz,0); + error=recv(sockfd,(char*)mp->b_wptr,bufsz,0); }else if (rtp_session_using_transport(session, rtp)) error = (session->rtp.tr->t_recvfrom)(session->rtp.tr, mp, 0, (struct sockaddr *) &remaddr, &addrlen); - else error = recvfrom(sockfd, mp->b_wptr, + else error = recvfrom(sockfd, (char*)mp->b_wptr, bufsz, 0, (struct sockaddr *) &remaddr, &addrlen); @@ -977,7 +977,7 @@ rtp_session_rtcp_recv (RtpSession * session) mp=session->rtcp.cached_mp; if (sock_connected){ - error=recv(session->rtcp.socket,mp->b_wptr,RTCP_MAX_RECV_BUFSIZE,0); + error=recv(session->rtcp.socket,(char*)mp->b_wptr,RTCP_MAX_RECV_BUFSIZE,0); }else { addrlen=sizeof (remaddr); @@ -986,7 +986,7 @@ rtp_session_rtcp_recv (RtpSession * session) (struct sockaddr *) &remaddr, &addrlen); else - error=recvfrom (session->rtcp.socket, mp->b_wptr, + error=recvfrom (session->rtcp.socket,(char*) mp->b_wptr, RTCP_MAX_RECV_BUFSIZE, 0, (struct sockaddr *) &remaddr, &addrlen); diff --git a/linphone/oRTP/src/srtp.c b/linphone/oRTP/src/srtp.c index f1dfd24b6..444831d60 100644 --- a/linphone/oRTP/src/srtp.c +++ b/linphone/oRTP/src/srtp.c @@ -17,7 +17,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#if defined(WIN32) || defined(_WIN32_WCE) +#if defined(_MSC_VER) && (defined(WIN32) || defined(_WIN32_WCE)) #include "ortp-config-win32.h" #else #include "ortp-config.h" diff --git a/linphone/oRTP/src/tests/Makefile.am b/linphone/oRTP/src/tests/Makefile.am index 81daf553f..793312b0d 100644 --- a/linphone/oRTP/src/tests/Makefile.am +++ b/linphone/oRTP/src/tests/Makefile.am @@ -1,5 +1,7 @@ SUBDIRS=win_receiver win_sender +if BUILD_TESTS + noinst_PROGRAMS= rtpsend rtprecv mrtpsend mrtprecv test_timer rtpmemtest tevrtpsend tevrtprecv tevmrtprecv rtpsend_stupid rtpsend_SOURCES= rtpsend.c @@ -22,6 +24,8 @@ tevmrtprecv_SOURCES= tevmrtprecv.c rtpsend_stupid_SOURCES=rtpsend_stupid.c +endif + AM_CFLAGS= -D_ORTP_SOURCE $(PTHREAD_CFLAGS) AM_LDFLAGS= $(PTHREAD_LDFLAGS) LDADD=$(top_builddir)/src/libortp.la $(SRTP_LIBS) $(SSL_LIBS) diff --git a/linphone/po/Makefile.in.in b/linphone/po/Makefile.in.in old mode 100644 new mode 100755 index c7e83022c..57ef267b3 --- 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 = @SHELL@ +SHELL = /bin/sh 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/po/linphone.pot b/linphone/po/linphone.pot deleted file mode 100644 index c1b5c83a3..000000000 --- a/linphone/po/linphone.pot +++ /dev/null @@ -1,1123 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-02-02 22:29+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: ../gtk-glade/support.c:50 ../gtk-glade/support.c:74 -#, c-format -msgid "Couldn't find pixmap file: %s" -msgstr "" - -#: ../gtk-glade/chat.c:27 -#, c-format -msgid "Chat with %s" -msgstr "" - -#: ../gtk-glade/main.c:516 -#, c-format -msgid "Incoming call from %s" -msgstr "" - -#: ../gtk-glade/main.c:552 -#, c-format -msgid "" -"%s would like to add you to his contact list.\n" -"Would you allow him to see your presence status or add him to your contact " -"list ?\n" -"If you answer no, this person will be temporarily blacklisted." -msgstr "" - -#: ../gtk-glade/main.c:622 -#, c-format -msgid "Please enter your password for domain %s:" -msgstr "" - -#: ../gtk-glade/main.c:731 -msgid "Linphone - a video internet phone" -msgstr "" - -#: ../gtk-glade/main.c:749 -#, c-format -msgid "%s (Default)" -msgstr "" - -#: ../gtk-glade/main.c:922 -msgid "A free SIP video-phone" -msgstr "" - -#: ../gtk-glade/friendlist.c:205 ../gtk-glade/propertybox.c:244 -#: ../gtk-glade/contact.glade.h:3 -msgid "Name" -msgstr "" - -#: ../gtk-glade/friendlist.c:212 -msgid "Presence status" -msgstr "" - -#: ../gtk-glade/friendlist.c:380 -msgid "Invalid sip contact !" -msgstr "" - -#: ../gtk-glade/friendlist.c:411 -#, c-format -msgid "Call %s" -msgstr "" - -#: ../gtk-glade/friendlist.c:412 -#, c-format -msgid "Send text to %s" -msgstr "" - -#: ../gtk-glade/propertybox.c:250 -msgid "Rate (Hz)" -msgstr "" - -#: ../gtk-glade/propertybox.c:256 -msgid "Status" -msgstr "" - -#: ../gtk-glade/propertybox.c:262 -msgid "Min bitrate (kbit/s)" -msgstr "" - -#: ../gtk-glade/propertybox.c:268 -msgid "Parameters" -msgstr "" - -#: ../gtk-glade/propertybox.c:295 ../gtk-glade/propertybox.c:432 -msgid "Enabled" -msgstr "" - -#: ../gtk-glade/propertybox.c:296 ../gtk-glade/propertybox.c:432 -msgid "Disabled" -msgstr "" - -#: ../gtk-glade/propertybox.c:477 -msgid "Account" -msgstr "" - -#: ../gtk-glade/update.c:83 -#, c-format -msgid "" -"A more recent version is availalble from %s.\n" -"Would you like to open a browser to download it ?" -msgstr "" - -#: ../gtk-glade/main.glade.h:1 -msgid "#" -msgstr "" - -#: ../gtk-glade/main.glade.h:2 -msgid "*" -msgstr "" - -#: ../gtk-glade/main.glade.h:3 -msgid "0" -msgstr "" - -#: ../gtk-glade/main.glade.h:4 -msgid "1" -msgstr "" - -#: ../gtk-glade/main.glade.h:5 -msgid "2" -msgstr "" - -#: ../gtk-glade/main.glade.h:6 -msgid "3" -msgstr "" - -#: ../gtk-glade/main.glade.h:7 -msgid "4" -msgstr "" - -#: ../gtk-glade/main.glade.h:8 -msgid "5" -msgstr "" - -#: ../gtk-glade/main.glade.h:9 -msgid "6" -msgstr "" - -#: ../gtk-glade/main.glade.h:10 -msgid "7" -msgstr "" - -#: ../gtk-glade/main.glade.h:11 -msgid "8" -msgstr "" - -#: ../gtk-glade/main.glade.h:12 -msgid "9" -msgstr "" - -#: ../gtk-glade/main.glade.h:13 -msgid "Contact list" -msgstr "" - -#: ../gtk-glade/main.glade.h:14 -msgid "A" -msgstr "" - -#: ../gtk-glade/main.glade.h:15 -msgid "" -"All users\n" -"Online users" -msgstr "" - -#: ../gtk-glade/main.glade.h:17 -msgid "Audio & Video" -msgstr "" - -#: ../gtk-glade/main.glade.h:18 -msgid "Audio only" -msgstr "" - -#: ../gtk-glade/main.glade.h:19 -msgid "B" -msgstr "" - -#: ../gtk-glade/main.glade.h:20 -msgid "C" -msgstr "" - -#: ../gtk-glade/main.glade.h:21 ../gtk-glade/call_logs.glade.h:1 -msgid "Call history" -msgstr "" - -#: ../gtk-glade/main.glade.h:22 -msgid "Current call" -msgstr "" - -#: ../gtk-glade/main.glade.h:23 -msgid "D" -msgstr "" - -#: ../gtk-glade/main.glade.h:24 -msgid "Default" -msgstr "" - -#: ../gtk-glade/main.glade.h:25 -msgid "Digits" -msgstr "" - -#: ../gtk-glade/main.glade.h:26 -msgid "Enable self-view" -msgstr "" - -#: ../gtk-glade/main.glade.h:27 -msgid "Homepage" -msgstr "" - -#: ../gtk-glade/main.glade.h:28 -msgid "Lookup:" -msgstr "" - -#: ../gtk-glade/main.glade.h:29 -msgid "My current identity:" -msgstr "" - -#: ../gtk-glade/main.glade.h:30 -msgid "Show debug window" -msgstr "" - -#: ../gtk-glade/main.glade.h:31 -msgid "Start call" -msgstr "" - -#: ../gtk-glade/main.glade.h:32 -msgid "Terminate call" -msgstr "" - -#: ../gtk-glade/main.glade.h:33 -msgid "_Modes" -msgstr "" - -#: ../gtk-glade/main.glade.h:34 -msgid "_View" -msgstr "" - -#: ../gtk-glade/main.glade.h:35 -msgid "gtk-about" -msgstr "" - -#: ../gtk-glade/main.glade.h:36 -msgid "gtk-help" -msgstr "" - -#: ../gtk-glade/main.glade.h:37 -msgid "gtk-preferences" -msgstr "" - -#: ../gtk-glade/main.glade.h:38 -msgid "gtk-quit" -msgstr "" - -#: ../gtk-glade/main.glade.h:39 -msgid "in" -msgstr "" - -#: ../gtk-glade/about.glade.h:1 -msgid "About linphone" -msgstr "" - -#: ../gtk-glade/about.glade.h:2 -msgid "An internet video phone using the standart SIP (rfc3261) protocol." -msgstr "" - -#: ../gtk-glade/about.glade.h:3 -msgid "Created by Simon Morlat\n" -msgstr "" - -#: ../gtk-glade/about.glade.h:5 -msgid "" -"fr: Simon Morlat\n" -"en: Simon Morlat and Delphine Perreau\n" -"it: Alberto Zanoni \n" -"de: Jean-Jacques Sarton \n" -"sv: Daniel Nylander \n" -"es: Jesus Benitez \n" -"ja: YAMAGUCHI YOSHIYA \n" -"pt_BR: Rafael Caesar Lenzi \n" -"pl: Robert Nasiadek \n" -"cs: Petr Pisar \n" -"hu: anonymous\n" -msgstr "" - -#: ../gtk-glade/contact.glade.h:1 -msgid "Allow this contact to see my presence status" -msgstr "" - -#: ../gtk-glade/contact.glade.h:2 -msgid "Contact information" -msgstr "" - -#: ../gtk-glade/contact.glade.h:4 -msgid "SIP Address" -msgstr "" - -#: ../gtk-glade/contact.glade.h:5 -msgid "Show this contact presence status" -msgstr "" - -#: ../gtk-glade/contact.glade.h:6 ../gtk-glade/password.glade.h:5 -#: ../gtk-glade/sip_account.glade.h:9 -msgid "gtk-cancel" -msgstr "" - -#: ../gtk-glade/contact.glade.h:7 ../gtk-glade/password.glade.h:6 -#: ../gtk-glade/sip_account.glade.h:10 -msgid "gtk-ok" -msgstr "" - -#: ../gtk-glade/log.glade.h:1 -msgid "Linphone debug window" -msgstr "" - -#: ../gtk-glade/log.glade.h:2 ../gtk-glade/call_logs.glade.h:2 -#: ../gtk-glade/chatroom.glade.h:2 ../gtk-glade/parameters.glade.h:58 -msgid "gtk-close" -msgstr "" - -#: ../gtk-glade/password.glade.h:1 -msgid "Linphone - Authentication required" -msgstr "" - -#: ../gtk-glade/password.glade.h:2 -msgid "Password:" -msgstr "" - -#: ../gtk-glade/password.glade.h:3 -msgid "Please enter the domain password" -msgstr "" - -#: ../gtk-glade/password.glade.h:4 -msgid "Username:" -msgstr "" - -#: ../gtk-glade/sip_account.glade.h:1 -msgid "Configure a SIP account" -msgstr "" - -#: ../gtk-glade/sip_account.glade.h:2 -msgid "Linphone - Configure a SIP account" -msgstr "" - -#: ../gtk-glade/sip_account.glade.h:3 -msgid "Publish presence information" -msgstr "" - -#: ../gtk-glade/sip_account.glade.h:4 -msgid "Register at startup" -msgstr "" - -#: ../gtk-glade/sip_account.glade.h:5 -msgid "Registration duration (sec):" -msgstr "" - -#: ../gtk-glade/sip_account.glade.h:6 -msgid "Route (optional):" -msgstr "" - -#: ../gtk-glade/sip_account.glade.h:7 -msgid "SIP Proxy address:" -msgstr "" - -#: ../gtk-glade/sip_account.glade.h:8 -msgid "Your SIP identity:" -msgstr "" - -#: ../gtk-glade/sip_account.glade.h:11 -msgid "sip:" -msgstr "" - -#: ../gtk-glade/chatroom.glade.h:1 -msgid "Send" -msgstr "" - -#: ../gtk-glade/incoming_call.glade.h:1 -msgid "Accept" -msgstr "" - -#: ../gtk-glade/incoming_call.glade.h:2 -msgid "Decline" -msgstr "" - -#: ../gtk-glade/incoming_call.glade.h:3 ../coreapi/linphonecore.c:232 -msgid "Incoming call" -msgstr "" - -#: ../gtk-glade/incoming_call.glade.h:4 -msgid "Incoming call from" -msgstr "" - -#: ../gtk-glade/incoming_call.glade.h:5 -msgid "Linphone - Incoming call" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:1 -msgid "0 stands for \"unlimited\"" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:2 -msgid "Audio" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:3 -msgid "Bandwidth control" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:4 -msgid "Codecs" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:5 -msgid "Default identity" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:6 -msgid "NAT and Firewall" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:7 -msgid "Ports" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:8 -msgid "Privacy" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:9 -msgid "Proxy accounts" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:10 -msgid "Transport" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:11 -msgid "Video" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:12 -msgid "ALSA special device (optional):" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:13 -msgid "Add" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:14 -msgid "Audio RTP/UDP:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:15 -msgid "" -"Audio codecs\n" -"Video codecs" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:17 -msgid "Behind NAT / Firewall (specify gateway IP below)" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:18 -msgid "Behind NAT / Firewall (use STUN to resolve)" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:19 -msgid "CIF" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:20 -msgid "Capture device:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:21 -msgid "Codecs" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:22 -msgid "Direct connection to the Internet" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:23 -msgid "Disable" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:24 -msgid "Download speed limit in Kbit/sec:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:25 -msgid "Edit" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:26 -msgid "Enable" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:27 -msgid "Enable echo cancellation" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:28 -msgid "Erase all passwords" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:29 -msgid "Manage SIP Accounts" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:30 -msgid "Multimedia settings" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:31 -msgid "Network settings" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:32 -msgid "Playback device:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:33 -msgid "Prefered video resolution:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:34 -msgid "Public IP address:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:35 -msgid "" -"Register to FONICS\n" -"virtual network !" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:37 -msgid "Remove" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:38 -msgid "Ring device:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:39 -msgid "Ring sound:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:40 -msgid "SIP (UDP):" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:41 -msgid "Send DTMFs as SIP info" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:42 -msgid "Set Maximum Transmission Unit:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:43 -msgid "Stun server:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:44 -msgid "This section defines your SIP address when not using a SIP account" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:45 -msgid "Upload speed limit in Kbit/sec:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:46 -msgid "Use IPv6 instead of IPv4" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:47 -msgid "Video RTP/UDP:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:48 -msgid "Video input device:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:49 -msgid "Your display name (eg: John Doe):" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:50 -msgid "Your resulting SIP address:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:51 -msgid "Your username:" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:52 -msgid "a sound card\n" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:54 -msgid "default camera" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:55 -msgid "default soundcard" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:56 -msgid "default soundcard\n" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:59 -msgid "gtk-go-down" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:60 -msgid "gtk-go-up" -msgstr "" - -#: ../gtk-glade/parameters.glade.h:61 -msgid "gtk-media-play" -msgstr "" - -#: ../coreapi/linphonecore.c:194 -#, c-format -msgid "You have missed %i call(s)." -msgstr "" - -#: ../coreapi/linphonecore.c:220 -msgid "aborted" -msgstr "" - -#: ../coreapi/linphonecore.c:223 -msgid "completed" -msgstr "" - -#: ../coreapi/linphonecore.c:226 -msgid "missed" -msgstr "" - -#: ../coreapi/linphonecore.c:231 -#, c-format -msgid "" -"%s at %s\n" -"From: %s\n" -"To: %s\n" -"Status: %s\n" -"Duration: %i mn %i sec\n" -msgstr "" - -#: ../coreapi/linphonecore.c:232 -msgid "Outgoing call" -msgstr "" - -#: ../coreapi/linphonecore.c:418 -msgid "" -"Your machine appears to be connected to an IPv6 network. By default linphone " -"always uses IPv4. Please update your configuration if you want to use IPv6" -msgstr "" - -#: ../coreapi/linphonecore.c:693 -msgid "Ready" -msgstr "" - -#: ../coreapi/linphonecore.c:971 -msgid "Remote end seems to have disconnected, the call is going to be closed." -msgstr "" - -#: ../coreapi/linphonecore.c:1095 -msgid "Looking for telephone number destination..." -msgstr "" - -#: ../coreapi/linphonecore.c:1097 -msgid "Could not resolve this number." -msgstr "" - -#: ../coreapi/linphonecore.c:1162 -msgid "" -"Could not parse given sip address. A sip url usually looks like sip:" -"user@domain" -msgstr "" - -#: ../coreapi/linphonecore.c:1211 -msgid "Sorry, having multiple simultaneous calls is not supported yet !" -msgstr "" - -#: ../coreapi/linphonecore.c:1243 -msgid "Contacting" -msgstr "" - -#: ../coreapi/linphonecore.c:1258 -msgid "could not call" -msgstr "" - -#: ../coreapi/linphonecore.c:1560 ../coreapi/exevents.c:49 -msgid "Connected." -msgstr "" - -#: ../coreapi/linphonecore.c:1586 -msgid "Call ended" -msgstr "" - -#: ../coreapi/linphonecore.c:1910 -msgid "No nat/firewall address supplied !" -msgstr "" - -#: ../coreapi/linphonecore.c:1922 ../coreapi/linphonecore.c:1934 -#, c-format -msgid "Invalid nat address '%s' : %s" -msgstr "" - -#: ../coreapi/misc.c:131 -msgid "" -"Your computer appears to be using ALSA sound drivers.\n" -"This is the best choice. However the pcm oss emulation module\n" -"is missing and linphone needs it. Please execute\n" -"'modprobe snd-pcm-oss' as root to load it." -msgstr "" - -#: ../coreapi/misc.c:134 -msgid "" -"Your computer appears to be using ALSA sound drivers.\n" -"This is the best choice. However the mixer oss emulation module\n" -"is missing and linphone needs it. Please execute\n" -" 'modprobe snd-mixer-oss' as root to load it." -msgstr "" - -#: ../coreapi/misc.c:593 -msgid "Stun lookup in progress..." -msgstr "" - -#: ../coreapi/exevents.c:126 -msgid "Call terminated." -msgstr "" - -#: ../coreapi/exevents.c:148 -msgid "Could not reach destination." -msgstr "" - -#: ../coreapi/exevents.c:157 -msgid "User is busy." -msgstr "" - -#: ../coreapi/exevents.c:158 -msgid "User is temporarily unavailable." -msgstr "" - -#: ../coreapi/exevents.c:159 -msgid "Request Cancelled." -msgstr "" - -#. char *retrymsg=_("%s. Retry after %i minute(s)."); -#: ../coreapi/exevents.c:161 -msgid "User does not want to be disturbed." -msgstr "" - -#: ../coreapi/exevents.c:162 -msgid "Call declined." -msgstr "" - -#: ../coreapi/exevents.c:190 -msgid "Bad request" -msgstr "" - -#: ../coreapi/exevents.c:193 -msgid "User cannot be found at given address." -msgstr "" - -#: ../coreapi/exevents.c:196 -msgid "Remote user cannot support any of proposed codecs." -msgstr "" - -#. time out, call leg is lost -#: ../coreapi/exevents.c:222 -msgid "Timeout." -msgstr "" - -#: ../coreapi/exevents.c:225 -msgid "Remote host was found but refused connection." -msgstr "" - -#: ../coreapi/exevents.c:333 -msgid "is contacting you." -msgstr "" - -#: ../coreapi/exevents.c:417 -#, c-format -msgid "Redirected to %s..." -msgstr "" - -#: ../coreapi/exevents.c:433 -msgid "" -"User is not reachable at the moment but he invites you\n" -"to contact him using the following alternate resource:" -msgstr "" - -#: ../coreapi/exevents.c:849 -msgid "Early media." -msgstr "" - -#: ../coreapi/exevents.c:911 -#, c-format -msgid "Registration on %s failed: %s" -msgstr "" - -#: ../coreapi/exevents.c:911 -msgid "no response timeout" -msgstr "" - -#: ../coreapi/exevents.c:926 -#, c-format -msgid "Registration on %s successful." -msgstr "" - -#. people for which we don't have yet an answer should appear as offline -#: ../coreapi/presence.c:112 ../coreapi/presence.c:164 ../coreapi/friend.c:147 -msgid "Gone" -msgstr "" - -#: ../coreapi/presence.c:129 -msgid "Waiting for Approval" -msgstr "" - -#: ../coreapi/presence.c:133 ../coreapi/friend.c:38 -msgid "Online" -msgstr "" - -#: ../coreapi/presence.c:137 ../coreapi/friend.c:41 -msgid "Busy" -msgstr "" - -#: ../coreapi/presence.c:142 -msgid "Be Right Back" -msgstr "" - -#: ../coreapi/presence.c:146 ../coreapi/friend.c:47 -msgid "Away" -msgstr "" - -#: ../coreapi/presence.c:151 -msgid "On The Phone" -msgstr "" - -#: ../coreapi/presence.c:156 -msgid "Out To Lunch" -msgstr "" - -#: ../coreapi/presence.c:160 ../coreapi/friend.c:71 -msgid "Closed" -msgstr "" - -#: ../coreapi/friend.c:35 -msgid "Unknown" -msgstr "" - -#: ../coreapi/friend.c:44 -msgid "Be right back" -msgstr "" - -#: ../coreapi/friend.c:50 -msgid "On the phone" -msgstr "" - -#: ../coreapi/friend.c:53 -msgid "Out to lunch" -msgstr "" - -#: ../coreapi/friend.c:56 -msgid "Do not disturb" -msgstr "" - -#: ../coreapi/friend.c:59 -msgid "Moved" -msgstr "" - -#: ../coreapi/friend.c:62 -msgid "Using another messaging service" -msgstr "" - -#: ../coreapi/friend.c:65 -msgid "Offline" -msgstr "" - -#: ../coreapi/friend.c:68 -msgid "Pending" -msgstr "" - -#: ../coreapi/friend.c:74 -msgid "Unknown-bug" -msgstr "" - -#: ../mediastreamer2/src/alaw.c:144 ../mediastreamer2/src/alaw.c:162 -msgid "ITU-G.711 alaw encoder" -msgstr "" - -#: ../mediastreamer2/src/alaw.c:194 ../mediastreamer2/src/alaw.c:211 -msgid "ITU-G.711 alaw decoder" -msgstr "" - -#: ../mediastreamer2/src/alsa.c:890 -msgid "Alsa sound source" -msgstr "" - -#: ../mediastreamer2/src/alsa.c:987 -msgid "Alsa sound output" -msgstr "" - -#: ../mediastreamer2/src/aqsnd.c:603 -msgid "Sound capture filter for MacOS X Audio Queue Service" -msgstr "" - -#: ../mediastreamer2/src/aqsnd.c:617 -msgid "Sound playback filter for MacOS X Audio Queue Service" -msgstr "" - -#: ../mediastreamer2/src/dtmfgen.c:173 ../mediastreamer2/src/dtmfgen.c:191 -msgid "DTMF generator" -msgstr "" - -#: ../mediastreamer2/src/gsm.c:70 ../mediastreamer2/src/gsm.c:88 -msgid "The GSM full-rate codec" -msgstr "" - -#: ../mediastreamer2/src/gsm.c:134 ../mediastreamer2/src/gsm.c:152 -msgid "The GSM codec" -msgstr "" - -#: ../mediastreamer2/src/macsnd.c:662 -msgid "Sound capture filter for MacOS X Core Audio drivers" -msgstr "" - -#: ../mediastreamer2/src/macsnd.c:676 -msgid "Sound playback filter for MacOS X Core Audio drivers" -msgstr "" - -#: ../mediastreamer2/src/msconf.c:565 ../mediastreamer2/src/msconf.c:583 -msgid "A filter to make conferencing" -msgstr "" - -#: ../mediastreamer2/src/msfileplayer.c:274 -#: ../mediastreamer2/src/msfileplayer.c:292 -msgid "Raw files and wav reader" -msgstr "" - -#: ../mediastreamer2/src/msfilerec.c:170 ../mediastreamer2/src/msfilerec.c:188 -#: ../mediastreamer2/src/msfilerec_win.c:207 -#: ../mediastreamer2/src/msfilerec_win.c:225 -msgid "Wav file recorder" -msgstr "" - -#: ../mediastreamer2/src/msjoin.c:45 ../mediastreamer2/src/msjoin.c:63 -msgid "A filter that send several inputs to one output." -msgstr "" - -#: ../mediastreamer2/src/msresample.c:147 -#: ../mediastreamer2/src/msresample.c:165 -msgid "frequency resampler" -msgstr "" - -#: ../mediastreamer2/src/msrtp.c:253 ../mediastreamer2/src/msrtp.c:271 -msgid "RTP output filter" -msgstr "" - -#: ../mediastreamer2/src/msrtp.c:412 ../mediastreamer2/src/msrtp.c:430 -msgid "RTP input filter" -msgstr "" - -#: ../mediastreamer2/src/msspeex.c:386 ../mediastreamer2/src/msspeex.c:404 -#: ../mediastreamer2/src/msspeex.c:531 ../mediastreamer2/src/msspeex.c:549 -msgid "The free and wonderful speex codec" -msgstr "" - -#: ../mediastreamer2/src/msvolume.c:70 ../mediastreamer2/src/msvolume.c:84 -msgid "A filter to make level measurements on 16 bits pcm audio stream" -msgstr "" - -#: ../mediastreamer2/src/msv4l.c:1009 -msgid "A video4linux compatible source filter to stream pictures." -msgstr "" - -#: ../mediastreamer2/src/msv4l2.c:455 -msgid "A filter to grab pictures from Video4Linux2-powered cameras" -msgstr "" - -#: ../mediastreamer2/src/msv4m.c:494 -msgid "A video for macosx compatible source filter to stream pictures." -msgstr "" - -#: ../mediastreamer2/src/nowebcam.c:226 -msgid "A filter that outputs a static image." -msgstr "" - -#: ../mediastreamer2/src/oss.c:557 -msgid "Sound capture filter for OSS drivers" -msgstr "" - -#: ../mediastreamer2/src/oss.c:571 -msgid "Sound playback filter for OSS drivers" -msgstr "" - -#: ../mediastreamer2/src/pixconv.c:177 ../mediastreamer2/src/pixconv.c:195 -msgid "A pixel format converter" -msgstr "" - -#: ../mediastreamer2/src/sdlout.c:345 ../mediastreamer2/src/sdlout.c:363 -msgid "A video display window using SDL" -msgstr "" - -#: ../mediastreamer2/src/sizeconv.c:204 -msgid "A video size converter" -msgstr "" - -#: ../mediastreamer2/src/sizeconv.c:222 -msgid "a small video size converter" -msgstr "" - -#: ../mediastreamer2/src/speexec.c:290 ../mediastreamer2/src/speexec.c:308 -msgid "Echo canceler using speex library" -msgstr "" - -#: ../mediastreamer2/src/tee.c:80 ../mediastreamer2/src/tee.c:98 -msgid "A filter that reads from input and copy to its multiple outputs." -msgstr "" - -#: ../mediastreamer2/src/theora.c:372 -msgid "The theora video encoder from xiph.org" -msgstr "" - -#: ../mediastreamer2/src/theora.c:390 -msgid "The open-source and royalty-free 'theora' video codec from xiph.org" -msgstr "" - -#: ../mediastreamer2/src/theora.c:558 ../mediastreamer2/src/theora.c:576 -msgid "The theora video decoder from xiph.org" -msgstr "" - -#: ../mediastreamer2/src/ulaw.c:146 ../mediastreamer2/src/ulaw.c:164 -msgid "ITU-G.711 ulaw encoder" -msgstr "" - -#: ../mediastreamer2/src/ulaw.c:196 ../mediastreamer2/src/ulaw.c:214 -msgid "ITU-G.711 ulaw decoder" -msgstr "" - -#: ../mediastreamer2/src/videodec.c:297 ../mediastreamer2/src/videodec.c:313 -#: ../mediastreamer2/src/videodec.c:380 ../mediastreamer2/src/videodec.c:396 -msgid "A H.263 decoder using ffmpeg library" -msgstr "" - -#: ../mediastreamer2/src/videodec.c:330 -msgid "A MPEG4 decoder using ffmpeg library" -msgstr "" - -#: ../mediastreamer2/src/videodec.c:346 -msgid "A MJPEG decoder using ffmpeg library" -msgstr "" - -#: ../mediastreamer2/src/videodec.c:362 -msgid "A snow decoder using ffmpeg library" -msgstr "" - -#: ../mediastreamer2/src/videoenc.c:579 ../mediastreamer2/src/videoenc.c:645 -msgid "A video H.263 encoder using ffmpeg library." -msgstr "" - -#: ../mediastreamer2/src/videoenc.c:595 -msgid "" -"A video H.263 encoder using ffmpeg library. It is compliant with old RFC2190 " -"spec." -msgstr "" - -#: ../mediastreamer2/src/videoenc.c:611 ../mediastreamer2/src/videoenc.c:677 -msgid "A video MPEG4 encoder using ffmpeg library." -msgstr "" - -#: ../mediastreamer2/src/videoenc.c:627 -msgid "A video snow encoder using ffmpeg library." -msgstr "" - -#: ../mediastreamer2/src/videoenc.c:661 -msgid "" -"A video H.263 encoder using ffmpeg library, compliant with old RFC2190 spec." -msgstr "" - -#: ../mediastreamer2/src/videoenc.c:693 -msgid "" -"The snow codec is royalty-free and is open-source. \n" -"It uses innovative techniques that makes it one of the best video codec. It " -"is implemented within the ffmpeg project.\n" -"However it is under development and compatibility with other versions cannot " -"be guaranteed." -msgstr "" - -#: ../mediastreamer2/src/videoout.c:876 ../mediastreamer2/src/videoout.c:894 -msgid "A generic video display" -msgstr "" - -#: ../mediastreamer2/src/wincevideods.c:966 -#: ../mediastreamer2/src/wincevideods.c:984 -#: ../mediastreamer2/src/winvideo.c:596 ../mediastreamer2/src/winvideo.c:614 -#: ../mediastreamer2/src/winvideods.c:1422 -#: ../mediastreamer2/src/winvideods.c:1440 -msgid "A video4windows compatible source filter to stream pictures." -msgstr "" - -#: ../mediastreamer2/src/winvideo2.c:436 ../mediastreamer2/src/winvideo2.c:454 -msgid "A video for windows (vfw.h) based source filter to grab pictures." -msgstr ""