diff --git a/linphone/build/wince/liblinphone.ncb b/linphone/build/wince/liblinphone.ncb deleted file mode 100644 index a247b37d6fbddcd02c3d65c513312461706d33cf..0000000000000000000000000000000000000000 Binary files a/linphone/build/wince/liblinphone.ncb and /dev/null differ diff --git a/linphone/build/wince/liblinphone.sln b/linphone/build/wince/liblinphone.sln index 21760498136028a90344751f22259459fd96df56..fe4efff270721625da9e112f127892bc5d53b4d1 100644 --- a/linphone/build/wince/liblinphone.sln +++ b/linphone/build/wince/liblinphone.sln @@ -4,9 +4,6 @@ Microsoft Visual Studio Solution File, Format Version 10.00 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblinphone", "liblinphone.vcproj", "{290078F0-3B63-47BF-A2A9-E1AF5411F5E7}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "linphonec", "linphonec\linphonec.vcproj", "{92574924-BF59-4DAA-994B-9978B80E5797}" - ProjectSection(ProjectDependencies) = postProject - {290078F0-3B63-47BF-A2A9-E1AF5411F5E7} = {290078F0-3B63-47BF-A2A9-E1AF5411F5E7} - EndProjectSection EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/linphone/build/wince/liblinphone.suo b/linphone/build/wince/liblinphone.suo index f959a99f32a514467d6f4f03a96a8f6f35ecd820..205eb3dd9e9dfa589320ffbadd4ea70c7905add8 100644 Binary files a/linphone/build/wince/liblinphone.suo and b/linphone/build/wince/liblinphone.suo differ diff --git a/linphone/build/wince/liblinphone.vcproj b/linphone/build/wince/liblinphone.vcproj index 379d7dbb04a015e30f0478ba44d3426839410874..9909c8a1fbf535c4f67db1c129e7a60ddd1b4b3c 100644 --- a/linphone/build/wince/liblinphone.vcproj +++ b/linphone/build/wince/liblinphone.vcproj @@ -178,6 +178,7 @@ OutputDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)" IntermediateDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)" ConfigurationType="4" + CharacterSet="1" > <Tool Name="VCPreBuildEventTool" @@ -199,9 +200,9 @@ Name="VCCLCompilerTool" ExecutionBucket="7" AdditionalOptions="
" - Optimization="0" + Optimization="2" AdditionalIncludeDirectories="..\..\oRTP\include;..\..\mediastreamer2\include;"..\..\..\..\linphone-builder\speex\include";"..\..\..\..\linphone-builder\eXosip\include";"..\..\..\..\linphone-builder\osip\include"" - PreprocessorDefinitions="ORTP_INET6;ORTP_EXPORT;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);LIBLINPHONE_EXPORTS;OSIP_MT;ENABLE_TRACE;LOG_DOMAIN=\"LinphoneCore\";IN_LINPHONE;LINPHONE_PLUGINS_DIR=\"\";LINPHONE_VERSION=\"3.1.2\";_UNICODE;UNICODE" + PreprocessorDefinitions="ORTP_INET6;ORTP_EXPORT;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);LIBLINPHONE_EXPORTS;OSIP_MT;ENABLE_TRACE;LOG_DOMAIN=\"LinphoneCore\";IN_LINPHONE;LINPHONE_PLUGINS_DIR=\"\";LINPHONE_VERSION=\"3.1.2\";_UNICODE;UNICODE;PACKAGE_SOUND_DIR=\"\\Program Files\\Linphone\"" MinimalRebuild="true" RuntimeLibrary="3" UsePrecompiledHeader="0" diff --git a/linphone/build/wince/linphonec/linphonec.vcproj b/linphone/build/wince/linphonec/linphonec.vcproj index bc017e827e00c90d3a8dae30b90ae0b964ab38aa..058ce425c3e0c2fa182b5f544b465e5cb543a07b 100644 --- a/linphone/build/wince/linphonec/linphonec.vcproj +++ b/linphone/build/wince/linphonec/linphonec.vcproj @@ -21,6 +21,7 @@ OutputDirectory="$(PlatformName)\$(ConfigurationName)" IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" ConfigurationType="1" + UseOfMFC="0" CharacterSet="1" > <Tool @@ -43,9 +44,9 @@ ExecutionBucket="7" Optimization="0" AdditionalIncludeDirectories=""..\..\..\..\..\linphone-builder\osip\include";..\..\..\mediastreamer2\include;..\..\..\oRTP\include;..\..\..\coreapi" - PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_CONSOLE;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;IN_LINPHONE" + PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_CONSOLE;$(ARCHFAM);$(_ARCHFAM_);IN_LINPHONE;PACKAGE_DIR=\"\\Program Files\\Linphone\"" MinimalRebuild="true" - RuntimeLibrary="1" + RuntimeLibrary="3" UsePrecompiledHeader="0" WarningLevel="3" DebugInformationFormat="3" @@ -101,7 +102,7 @@ ForceDirty="-1" RemoteDirectory="%CSIDL_PROGRAM_FILES%\linphone" RegisterOutput="0" - AdditionalFiles="..\..\..\oRTP\build\wince\$(PlatformName)\$(ConfigurationName)\oRTP.dll;..\..\..\mediastreamer2\build\wince\$(PlatformName)\$(ConfigurationName)\mediastreamer2.dll" + AdditionalFiles="" /> <DebuggerTool /> diff --git a/linphone/console/linphonec.c b/linphone/console/linphonec.c index ddd284bd37b56df117b700a2d770dc3021ffd395..9ec842d62725ecd48c4c8f5998e77c0038286e8e 100644 --- a/linphone/console/linphonec.c +++ b/linphone/console/linphonec.c @@ -61,10 +61,6 @@ #if !defined(strdup) #define strdup _strdup #endif /*strdup*/ -/* -#if !defined(access) -#define access _access -#endif*/ /*access*/ #endif /*_WIN32_WCE*/ @@ -77,6 +73,10 @@ #define _(something) (something) #endif +#ifndef PACKAGE_DIR +#define PACKAGE_DIR "" +#endif + /*************************************************************************** * * Types @@ -568,9 +568,22 @@ bool_t linphonec_get_autoanswer(){ * - char *histfile_name * - FILE *mylogfile */ -#if defined (_MSC_VER) -int _tmain(int argc, _TCHAR* argv[]) { - trace_level=1; +#if defined (_WIN32_WCE) + +char **convert_args_to_ascii(int argc, _TCHAR **wargv){ + int i; + char **result=malloc(argc*sizeof(char*)); + char argtmp[128]; + for(i=0;i<argc;++i){ + wcstombs(argtmp,wargv[i],sizeof(argtmp)); + result[i]=strdup(argtmp); + } + return result; +} + +int _tmain(int argc, _TCHAR* wargv[]) { + char **argv=convert_args_to_ascii(argc,wargv); + trace_level=6; linphonec_vtable.show =(ShowInterfaceCb) stub; linphonec_vtable.inv_recv = linphonec_call_received; linphonec_vtable.bye_recv = linphonec_bye_received; @@ -596,8 +609,6 @@ main (int argc, char *argv[]) { #endif - - if (! linphonec_init(argc, argv) ) exit(EXIT_FAILURE); linphonec_main_loop (&linphonec, sipAddr); @@ -620,14 +631,19 @@ linphonec_init(int argc, char **argv) * Set initial values for global variables */ mylogfile = NULL; - + + +#ifndef _WIN32 snprintf(configfile_name, PATH_MAX, "%s/.linphonerc", -#if !defined(_WIN32_WCE) getenv("HOME")); +#elif defined(_WIN32_WCE) + strncpy(configfile_name,PACKAGE_DIR "\\linphonerc",PATH_MAX); + mylogfile=fopen(PACKAGE_DIR "\\" "linphonec.log","w"); + printf("Logs are redirected in" PACKAGE_DIR "\\linphonec.log"); #else - "."); -#endif /*_WIN32_WCE*/ - + snprintf(configfile_name, PATH_MAX, "%s/Linphone/linphonerc", + getenv("APPDATA")); +#endif /* Handle configuration filename changes */ switch (handle_configfile_migration()) { diff --git a/linphone/coreapi/misc.c b/linphone/coreapi/misc.c index f10762f31d4e34d437af37666130a407d33fdb06..c2ba262975bb0427396eb0b58a9d46dcaf6276d0 100644 --- a/linphone/coreapi/misc.c +++ b/linphone/coreapi/misc.c @@ -775,6 +775,7 @@ int linphone_core_get_local_ip_for(const char *dest, char *result){ struct addrinfo hints; struct addrinfo *res=NULL; struct sockaddr_storage addr; + struct sockaddr *p_addr=(struct sockaddr*)&addr; ortp_socket_t sock; socklen_t s; @@ -813,6 +814,13 @@ int linphone_core_get_local_ip_for(const char *dest, char *result){ close_socket(sock); return -1; } + if (p_addr->sa_family==AF_INET){ + struct sockaddr_in *p_sin=(struct sockaddr_in*)p_addr; + if (p_sin->sin_addr.s_addr==0){ + close_socket(sock); + return -1; + } + } err=getnameinfo((struct sockaddr *)&addr,s,result,LINPHONE_IPADDR_SIZE,NULL,0,NI_NUMERICHOST); if (err!=0){ ms_error("getnameinfo error: %s",strerror(errno)); diff --git a/linphone/mediastreamer2/build/wince/alldescs.h b/linphone/mediastreamer2/build/wince/alldescs.h index 380326fa1ae7682f49972359d523e98cdcef0f7f..6eaab9b26d441fed643a08cf55f43087fc809ee8 100644 --- a/linphone/mediastreamer2/build/wince/alldescs.h +++ b/linphone/mediastreamer2/build/wince/alldescs.h @@ -28,6 +28,9 @@ extern MSFilterDesc ms_v4w_desc; //extern MSFilterDesc ms_h263_enc_desc; //extern MSFilterDesc ms_h263_dec_desc; extern MSFilterDesc ms_join_desc; +extern MSFilterDesc ms_equalizer_desc; +extern MSFilterDesc ms_volume_desc; + MSFilterDesc * ms_filter_descs[]={ &ms_alaw_dec_desc, &ms_alaw_enc_desc, @@ -57,6 +60,8 @@ MSFilterDesc * ms_filter_descs[]={ //&ms_h263_enc_desc, //&ms_h263_dec_desc, &ms_join_desc, +&ms_equalizer_desc, +&ms_volume_desc, NULL }; diff --git a/linphone/mediastreamer2/build/wince/echo/echo.vcproj b/linphone/mediastreamer2/build/wince/echo/echo.vcproj new file mode 100644 index 0000000000000000000000000000000000000000..5a8b40e646e41d0dc5ee0dcd5a83af27729d00a8 --- /dev/null +++ b/linphone/mediastreamer2/build/wince/echo/echo.vcproj @@ -0,0 +1,227 @@ +<?xml version="1.0" encoding="Windows-1252"?> +<VisualStudioProject + ProjectType="Visual C++" + Version="9,00" + Name="echo" + ProjectGUID="{B616AC95-748E-4CD5-89AC-772DC3C069D9}" + RootNamespace="echo" + Keyword="Win32Proj" + TargetFrameworkVersion="196613" + > + <Platforms> + <Platform + Name="Windows Mobile 6 Professional SDK (ARMV4I)" + /> + </Platforms> + <ToolFiles> + </ToolFiles> + <Configurations> + <Configuration + Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + ExecutionBucket="7" + Optimization="0" + AdditionalIncludeDirectories="..\..\..\include;..\..\..\..\oRTP\include" + PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;DEBUG;_CONSOLE;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE;ORTP_INET6" + MinimalRebuild="true" + RuntimeLibrary="1" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="_DEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)" + Culture="1033" + AdditionalIncludeDirectories="$(IntDir)" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions=" /subsystem:windowsce,5.02" + AdditionalDependencies="mediastreamer2.lib oRTP.lib" + OutputFile="$(OutDir)/echo.exe" + LinkIncremental="2" + AdditionalLibraryDirectories=""..\$(PlatformName)\$(ConfigurationName)";"..\..\..\..\oRTP\build\wince\$(PlatformName)\$(ConfigurationName)"" + DelayLoadDLLs="$(NOINHERIT)" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/echo.pdb" + SubSystem="0" + StackReserveSize="65536" + StackCommitSize="4096" + EntryPointSymbol="mainWCRTStartup" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCCodeSignTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + <DeploymentTool + ForceDirty="-1" + RemoteDirectory="" + RegisterOutput="0" + AdditionalFiles="" + /> + <DebuggerTool + /> + </Configuration> + <Configuration + Name="Release|Windows Mobile 6 Professional SDK (ARMV4I)" + OutputDirectory="$(PlatformName)\$(ConfigurationName)" + IntermediateDirectory="$(PlatformName)\$(ConfigurationName)" + ConfigurationType="1" + CharacterSet="1" + > + <Tool + Name="VCPreBuildEventTool" + /> + <Tool + Name="VCCustomBuildTool" + /> + <Tool + Name="VCXMLDataGeneratorTool" + /> + <Tool + Name="VCWebServiceProxyGeneratorTool" + /> + <Tool + Name="VCMIDLTool" + /> + <Tool + Name="VCCLCompilerTool" + ExecutionBucket="7" + Optimization="2" + FavorSizeOrSpeed="2" + PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES);WINCE;_CONSOLE;$(ARCHFAM);$(_ARCHFAM_);_UNICODE;UNICODE" + RuntimeLibrary="0" + UsePrecompiledHeader="0" + WarningLevel="3" + DebugInformationFormat="3" + /> + <Tool + Name="VCManagedResourceCompilerTool" + /> + <Tool + Name="VCResourceCompilerTool" + PreprocessorDefinitions="NDEBUG;_WIN32_WCE=$(CEVER);UNDER_CE;$(PLATFORMDEFINES)" + Culture="1033" + AdditionalIncludeDirectories="$(IntDir)" + /> + <Tool + Name="VCPreLinkEventTool" + /> + <Tool + Name="VCLinkerTool" + AdditionalOptions=" /subsystem:windowsce,5.02" + OutputFile="$(OutDir)/echo.exe" + LinkIncremental="1" + DelayLoadDLLs="$(NOINHERIT)" + GenerateDebugInformation="true" + ProgramDatabaseFile="$(OutDir)/echo.pdb" + SubSystem="0" + StackReserveSize="65536" + StackCommitSize="4096" + OptimizeReferences="2" + EnableCOMDATFolding="2" + EntryPointSymbol="mainWCRTStartup" + RandomizedBaseAddress="1" + DataExecutionPrevention="0" + /> + <Tool + Name="VCALinkTool" + /> + <Tool + Name="VCXDCMakeTool" + /> + <Tool + Name="VCBscMakeTool" + /> + <Tool + Name="VCFxCopTool" + /> + <Tool + Name="VCCodeSignTool" + /> + <Tool + Name="VCPostBuildEventTool" + /> + <DeploymentTool + ForceDirty="-1" + RemoteDirectory="" + RegisterOutput="0" + AdditionalFiles="" + /> + <DebuggerTool + /> + </Configuration> + </Configurations> + <References> + </References> + <Files> + <Filter + Name="Source Files" + Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx" + UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}" + > + <File + RelativePath="..\..\..\tests\echo.c" + > + </File> + </Filter> + <Filter + Name="Header Files" + Filter="h;hpp;hxx;hm;inl;inc;xsd" + UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}" + > + </Filter> + <Filter + Name="Resource Files" + Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav" + UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}" + > + </Filter> + </Files> + <Globals> + </Globals> +</VisualStudioProject> diff --git a/linphone/mediastreamer2/build/wince/mediastreamer2.sln b/linphone/mediastreamer2/build/wince/mediastreamer2.sln index b328b8f7f5ca09f7b514170aaf1e85fc92125e8b..8a3de9d2488bd0ad1975ac999fe29404d8bed228 100644 --- a/linphone/mediastreamer2/build/wince/mediastreamer2.sln +++ b/linphone/mediastreamer2/build/wince/mediastreamer2.sln @@ -3,6 +3,8 @@ Microsoft Visual Studio Solution File, Format Version 10.00 # Visual Studio 2008 Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mediastreamer2", "mediastreamer2.vcproj", "{177F5AE2-A40C-4412-8F26-7F85FA32464E}" EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "echo", "echo\echo.vcproj", "{B616AC95-748E-4CD5-89AC-772DC3C069D9}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) = Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) @@ -39,6 +41,18 @@ Global {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Standard SDK (ARMV4I) {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) {177F5AE2-A40C-4412-8F26-7F85FA32464E}.Release|Windows Mobile 6 Standard SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Standard SDK (ARMV4I) + {B616AC95-748E-4CD5-89AC-772DC3C069D9}.Debug|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {B616AC95-748E-4CD5-89AC-772DC3C069D9}.Debug|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {B616AC95-748E-4CD5-89AC-772DC3C069D9}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {B616AC95-748E-4CD5-89AC-772DC3C069D9}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {B616AC95-748E-4CD5-89AC-772DC3C069D9}.Debug|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {B616AC95-748E-4CD5-89AC-772DC3C069D9}.Debug|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Debug|Windows Mobile 6 Professional SDK (ARMV4I) + {B616AC95-748E-4CD5-89AC-772DC3C069D9}.Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {B616AC95-748E-4CD5-89AC-772DC3C069D9}.Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {B616AC95-748E-4CD5-89AC-772DC3C069D9}.Release|Windows Mobile 6 Professional SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {B616AC95-748E-4CD5-89AC-772DC3C069D9}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Build.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {B616AC95-748E-4CD5-89AC-772DC3C069D9}.Release|Windows Mobile 6 Professional SDK (ARMV4I).Deploy.0 = Release|Windows Mobile 6 Professional SDK (ARMV4I) + {B616AC95-748E-4CD5-89AC-772DC3C069D9}.Release|Windows Mobile 6 Standard SDK (ARMV4I).ActiveCfg = Release|Windows Mobile 6 Professional SDK (ARMV4I) EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/linphone/mediastreamer2/build/wince/mediastreamer2.vcproj b/linphone/mediastreamer2/build/wince/mediastreamer2.vcproj index 910564b9d086724f852fe067171ecaf9d83e8dbc..8758723c2f6d5ff3497c925f96dad51abca7d8c2 100644 --- a/linphone/mediastreamer2/build/wince/mediastreamer2.vcproj +++ b/linphone/mediastreamer2/build/wince/mediastreamer2.vcproj @@ -327,7 +327,7 @@ Optimization="2" FavorSizeOrSpeed="1" AdditionalIncludeDirectories=".;"..\..\..\..\..\linphone-builder\speex\include";..\..;..\..\include;..\..\..\oRTP\include;..\..\..\codecs\speex\include" - PreprocessorDefinitions="__VIDEO_DISABLED__;AMD_HACK;HAVE_SPEEX_NOISE;ORTP_INET6;MEDIASTREAMER2_EXPORT;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);POCKETPC2003_UI_MODEL" + PreprocessorDefinitions="__VIDEO_DISABLED__;HAVE_SPEEX_NOISE;ORTP_INET6;MEDIASTREAMER2_EXPORT;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_)" RuntimeLibrary="3" TreatWChar_tAsBuiltInType="false" UsePrecompiledHeader="0" @@ -752,6 +752,10 @@ RelativePath="..\..\src\audiostream.c" > </File> + <File + RelativePath="..\..\src\dsptools.c" + > + </File> <File RelativePath="..\..\src\dtmfgen.c" > @@ -760,10 +764,22 @@ RelativePath="..\..\src\dxfilter.cpp" > </File> + <File + RelativePath="..\..\src\equalizer.c" + > + </File> <File RelativePath="..\..\src\ice.c" > </File> + <File + RelativePath="..\..\src\kiss_fft.c" + > + </File> + <File + RelativePath="..\..\src\kiss_fftr.c" + > + </File> <File RelativePath="..\..\src\mscommon.c" > @@ -808,6 +824,10 @@ RelativePath="..\..\src\msticker.c" > </File> + <File + RelativePath="..\..\src\msvolume.c" + > + </File> <File RelativePath="..\..\src\mswebcam.c" > @@ -833,7 +853,7 @@ > </File> <File - RelativePath="..\..\src\winsnd.c" + RelativePath="..\..\src\winsnd3.c" > </File> </Filter> diff --git a/linphone/mediastreamer2/src/audiostream.c b/linphone/mediastreamer2/src/audiostream.c index d410f5fa7da1b9faaad05b1186bd02681361708d..cb678a5f86e2a52371951e7da26a5d7de70d1dc8 100644 --- a/linphone/mediastreamer2/src/audiostream.c +++ b/linphone/mediastreamer2/src/audiostream.c @@ -560,6 +560,10 @@ void ring_stop(RingStream *stream){ ms_filter_destroy(stream->source); ms_filter_destroy(stream->sndwrite); ms_free(stream); +#ifdef _WIN32_WCE + ms_warning("Sleeping a bit after closing the audio device..."); + ms_sleep(1); +#endif } diff --git a/linphone/mediastreamer2/src/msfileplayer_win.c b/linphone/mediastreamer2/src/msfileplayer_win.c index 5a5f03f5e198a262fcff812b36892aeda7c0dd4a..b1b981631c92398e7583bc2c142827d1c95c07fc 100644 --- a/linphone/mediastreamer2/src/msfileplayer_win.c +++ b/linphone/mediastreamer2/src/msfileplayer_win.c @@ -127,21 +127,26 @@ static int read_wav_header(PlayerData *d){ static int player_open(MSFilter *f, void *arg){ PlayerData *d=(PlayerData*)f->data; HANDLE fd; - const char *file=(const char*)arg; -#if defined(_WIN32_WCE) - fd = CreateFile((LPCWSTR)file, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, 0, NULL); + const char *afile=(const char*)arg; + LPCTSTR file; +#ifdef _UNICODE + wchar_t wfile[MAX_PATH]; + mbstowcs(wfile,afile,MAX_PATH); + file=wfile; #else - fd = CreateFile(file, GENERIC_READ, FILE_SHARE_READ, NULL, - OPEN_EXISTING, 0, NULL); + file=afile; #endif + + fd = CreateFile(file, GENERIC_READ, FILE_SHARE_READ, NULL, + OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); + if (fd==INVALID_HANDLE_VALUE){ - ms_warning("Failed to open %s",file); + ms_warning("Failed to open %s: error %i",afile,GetLastError()); return -1; } d->state=STOPPED; d->fd=fd; - if (strstr(file,".wav")!=NULL) read_wav_header(d); + if (strstr(afile,".wav")!=NULL) read_wav_header(d); return 0; } diff --git a/linphone/mediastreamer2/tests/echo.c b/linphone/mediastreamer2/tests/echo.c index dc481545de924406414a289e0a97cb3de8483f3a..ca2ddbfc2bd3a5452c69b82c36e2da6561b94e5b 100644 --- a/linphone/mediastreamer2/tests/echo.c +++ b/linphone/mediastreamer2/tests/echo.c @@ -22,7 +22,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "mediastreamer2/mssndcard.h" #include "mediastreamer2/msticker.h" +#ifndef _WIN32_WCE #include <signal.h> +#elif defined(_MSC_VER) +#define main _tmain +#endif static int run=1; @@ -37,11 +41,14 @@ int main(int argc, char *argv[]){ MSTicker *ticker; char *card_id=NULL; int rate = 16000; + ortp_init(); ortp_set_log_level_mask(ORTP_MESSAGE|ORTP_WARNING|ORTP_ERROR|ORTP_FATAL); ms_init(); - + +#ifndef _WIN32_WCE signal(SIGINT,stop); +#endif if (argc>1) card_id=argv[1]; @@ -77,8 +84,12 @@ int main(int argc, char *argv[]){ ticker=ms_ticker_new(); ms_filter_link(f1,0,f2,0); ms_ticker_attach(ticker,f1); +#ifndef _WIN32_WCE while(run) ms_sleep(1); +#else + ms_sleep(5); +#endif ms_ticker_detach(ticker,f1); ms_ticker_destroy(ticker); ms_filter_unlink(f1,0,f2,0); diff --git a/linphone/oRTP/build/wince/oRTP.vcproj b/linphone/oRTP/build/wince/oRTP.vcproj index 2c2dfe188eaa91dad8c0baa376c306d24f0b60f2..fdfc895e12358384eddc1447fd1a2767ba18fafd 100644 --- a/linphone/oRTP/build/wince/oRTP.vcproj +++ b/linphone/oRTP/build/wince/oRTP.vcproj @@ -289,9 +289,9 @@ /> </Configuration> <Configuration - Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" - OutputDirectory="$(PlatformName)\Release" - IntermediateDirectory="$(PlatformName)\Release" + Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)" + OutputDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)" + IntermediateDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)" ConfigurationType="2" UseOfMFC="0" CharacterSet="1" @@ -310,15 +310,18 @@ /> <Tool Name="VCMIDLTool" - PreprocessorDefinitions="NDEBUG" + PreprocessorDefinitions="_DEBUG" MkTypLibCompatible="false" + TargetEnvironment="1" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" + Optimization="2" + FavorSizeOrSpeed="1" AdditionalIncludeDirectories="..\..\include;..\..\..\osip\include" - PreprocessorDefinitions="ORTP_INET6;ORTP_EXPORT;AMD_HACK;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);POCKETPC2003_UI_MODEL;POCKETPC2003_UI_MODEL" - RuntimeLibrary="2" + PreprocessorDefinitions="ORTP_INET6;ORTP_EXPORT;AMD_HACK;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);POCKETPC2003_UI_MODEL" + RuntimeLibrary="3" TreatWChar_tAsBuiltInType="true" UsePrecompiledHeader="0" ProgramDataBaseFileName="$(IntDir)/oRTP.pdb" @@ -330,7 +333,7 @@ /> <Tool Name="VCResourceCompilerTool" - PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE" + PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE" Culture="1033" AdditionalIncludeDirectories="$(IntDir)" /> @@ -340,11 +343,13 @@ <Tool Name="VCLinkerTool" AdditionalOptions=" /SUBSYSTEM:WINDOWSCE,5.01 /MACHINE:THUMB" - AdditionalDependencies="ws2.lib iphlpapi.lib mmtimer.lib libcmt.lib" + AdditionalDependencies="ws2.lib iphlpapi.lib mmtimer.lib libcmtd.lib" IgnoreAllDefaultLibraries="true" ModuleDefinitionFile="oRTP.def" + GenerateDebugInformation="true" RandomizedBaseAddress="1" DataExecutionPrevention="0" + TargetMachine="0" /> <Tool Name="VCALinkTool" @@ -366,7 +371,7 @@ /> <DeploymentTool ForceDirty="-1" - RemoteDirectory="\amsip" + RemoteDirectory="%CSIDL_PROGRAM_FILES%\linphone" RegisterOutput="0" AdditionalFiles="" /> @@ -374,7 +379,7 @@ /> </Configuration> <Configuration - Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" + Name="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" OutputDirectory="$(PlatformName)\Release" IntermediateDirectory="$(PlatformName)\Release" ConfigurationType="2" @@ -402,7 +407,7 @@ Name="VCCLCompilerTool" ExecutionBucket="7" AdditionalIncludeDirectories="..\..\include;..\..\..\osip\include" - PreprocessorDefinitions="ORTP_INET6;ORTP_EXPORT;AMD_HACK;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);SMARTPHONE2003_UI_MODEL;SMARTPHONE2003_UI_MODEL" + PreprocessorDefinitions="ORTP_INET6;ORTP_EXPORT;AMD_HACK;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);POCKETPC2003_UI_MODEL;POCKETPC2003_UI_MODEL" RuntimeLibrary="2" TreatWChar_tAsBuiltInType="true" UsePrecompiledHeader="0" @@ -451,7 +456,7 @@ /> <DeploymentTool ForceDirty="-1" - RemoteDirectory="%CSIDL_PROGRAM_FILES%\vbamsipua" + RemoteDirectory="\amsip" RegisterOutput="0" AdditionalFiles="" /> @@ -459,9 +464,9 @@ /> </Configuration> <Configuration - Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)" - OutputDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)" - IntermediateDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)" + Name="Release|Windows Mobile 5.0 Smartphone SDK (ARMV4I)" + OutputDirectory="$(PlatformName)\Release" + IntermediateDirectory="$(PlatformName)\Release" ConfigurationType="2" UseOfMFC="0" CharacterSet="1" @@ -482,13 +487,12 @@ Name="VCMIDLTool" PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="false" - TargetEnvironment="1" /> <Tool Name="VCCLCompilerTool" ExecutionBucket="7" AdditionalIncludeDirectories="..\..\include;..\..\..\osip\include" - PreprocessorDefinitions="ORTP_INET6;ORTP_EXPORT;AMD_HACK;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_)" + PreprocessorDefinitions="ORTP_INET6;ORTP_EXPORT;AMD_HACK;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);SMARTPHONE2003_UI_MODEL;SMARTPHONE2003_UI_MODEL" RuntimeLibrary="2" TreatWChar_tAsBuiltInType="true" UsePrecompiledHeader="0" @@ -516,7 +520,6 @@ ModuleDefinitionFile="oRTP.def" RandomizedBaseAddress="1" DataExecutionPrevention="0" - TargetMachine="0" /> <Tool Name="VCALinkTool" @@ -538,7 +541,7 @@ /> <DeploymentTool ForceDirty="-1" - RemoteDirectory="%CSIDL_PROGRAM_FILES%\amsipua" + RemoteDirectory="%CSIDL_PROGRAM_FILES%\vbamsipua" RegisterOutput="0" AdditionalFiles="" /> @@ -546,9 +549,9 @@ /> </Configuration> <Configuration - Name="Debug|Windows Mobile 6 Professional SDK (ARMV4I)" - OutputDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)" - IntermediateDirectory="Windows Mobile 6 Professional SDK (ARMV4I)\$(ConfigurationName)" + Name="Release|Windows Mobile 6 Standard SDK (ARMV4I)" + OutputDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)" + IntermediateDirectory="Windows Mobile 6 Standard SDK (ARMV4I)\$(ConfigurationName)" ConfigurationType="2" UseOfMFC="0" CharacterSet="1" @@ -567,17 +570,16 @@ /> <Tool Name="VCMIDLTool" - PreprocessorDefinitions="_DEBUG" + PreprocessorDefinitions="NDEBUG" MkTypLibCompatible="false" TargetEnvironment="1" /> <Tool Name="VCCLCompilerTool" - Optimization="2" - FavorSizeOrSpeed="1" + ExecutionBucket="7" AdditionalIncludeDirectories="..\..\include;..\..\..\osip\include" - PreprocessorDefinitions="ORTP_INET6;ORTP_EXPORT;AMD_HACK;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);_DEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_);POCKETPC2003_UI_MODEL" - RuntimeLibrary="3" + PreprocessorDefinitions="ORTP_INET6;ORTP_EXPORT;AMD_HACK;_WIN32_WCE=$(CEVER);UNDER_CE=$(CEVER);WINCE;$(PLATFORMDEFINES);NDEBUG;_USRDLL;$(ARCHFAM);$(_ARCHFAM_)" + RuntimeLibrary="2" TreatWChar_tAsBuiltInType="true" UsePrecompiledHeader="0" ProgramDataBaseFileName="$(IntDir)/oRTP.pdb" @@ -589,7 +591,7 @@ /> <Tool Name="VCResourceCompilerTool" - PreprocessorDefinitions="_DEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE" + PreprocessorDefinitions="NDEBUG;_UNICODE;UNICODE;_WIN32_WCE;UNDER_CE" Culture="1033" AdditionalIncludeDirectories="$(IntDir)" /> @@ -599,10 +601,9 @@ <Tool Name="VCLinkerTool" AdditionalOptions=" /SUBSYSTEM:WINDOWSCE,5.01 /MACHINE:THUMB" - AdditionalDependencies="ws2.lib iphlpapi.lib mmtimer.lib libcmtd.lib" + AdditionalDependencies="ws2.lib iphlpapi.lib mmtimer.lib libcmt.lib" IgnoreAllDefaultLibraries="true" ModuleDefinitionFile="oRTP.def" - GenerateDebugInformation="true" RandomizedBaseAddress="1" DataExecutionPrevention="0" TargetMachine="0" @@ -627,7 +628,7 @@ /> <DeploymentTool ForceDirty="-1" - RemoteDirectory="" + RemoteDirectory="%CSIDL_PROGRAM_FILES%\amsipua" RegisterOutput="0" AdditionalFiles="" /> diff --git a/linphone/oRTP/src/ortp.c b/linphone/oRTP/src/ortp.c index 992032f8658b6d49ffa7a8a56b4f6ddd836ae22f..4edd91a4df12948cd10f5a81b8c9fd2462e9b75e 100644 --- a/linphone/oRTP/src/ortp.c +++ b/linphone/oRTP/src/ortp.c @@ -256,7 +256,7 @@ static void __ortp_logv_out(OrtpLogLevel lev, const char *fmt, va_list args){ ortp_fatal("Bad level !"); } msg=ortp_strdup_vprintf(fmt,args); -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(_WIN32_WCE) OutputDebugString(msg); OutputDebugString("\r\n"); #else