diff --git a/linphone/build/wince/liblinphone.ncb b/linphone/build/wince/liblinphone.ncb deleted file mode 100644 index a247b37d6..000000000 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 217604981..fe4efff27 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 f959a99f3..205eb3dd9 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 379d7dbb0..9909c8a1f 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" > diff --git a/linphone/console/linphonec.c b/linphone/console/linphonec.c index ddd284bd3..9ec842d62 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;isa_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 380326fa1..6eaab9b26 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 000000000..5a8b40e64 --- /dev/null +++ b/linphone/mediastreamer2/build/wince/echo/echo.vcproj @@ -0,0 +1,227 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/linphone/mediastreamer2/build/wince/mediastreamer2.sln b/linphone/mediastreamer2/build/wince/mediastreamer2.sln index b328b8f7f..8a3de9d24 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 910564b9d..8758723c2 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" > + + @@ -760,10 +764,22 @@ RelativePath="..\..\src\dxfilter.cpp" > + + + + + + @@ -808,6 +824,10 @@ RelativePath="..\..\src\msticker.c" > + + @@ -833,7 +853,7 @@ > diff --git a/linphone/mediastreamer2/src/audiostream.c b/linphone/mediastreamer2/src/audiostream.c index d410f5fa7..cb678a5f8 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 5a5f03f5e..b1b981631 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 dc481545d..ca2ddbfc2 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 +#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 2c2dfe188..fdfc895e1 100644 --- a/linphone/oRTP/build/wince/oRTP.vcproj +++ b/linphone/oRTP/build/wince/oRTP.vcproj @@ -288,6 +288,96 @@ + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - -