- Timestamp:
- Feb 14, 2006 9:08:51 PM (19 years ago)
- Location:
- pjproject/trunk/pjmedia
- Files:
-
- 5 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
pjproject/trunk/pjmedia/build/pjmedia_codec.dsp
r176 r183 42 42 # PROP Target_Dir "" 43 43 # ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c 44 # ADD CPP /nologo / W4 /GX /O2 /I "../include" /I "../../pjlib/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /YX /FD /c44 # ADD CPP /nologo /MD /W4 /GX /O2 /I "../include" /I "../../pjlib/include" /D "NDEBUG" /D "WIN32" /D "_MBCS" /D "_LIB" /D PJ_WIN32=1 /D PJ_M_I386=1 /YX /FD /c 45 45 # ADD BASE RSC /l 0x409 /d "NDEBUG" 46 46 # ADD RSC /l 0x409 /d "NDEBUG" -
pjproject/trunk/pjmedia/src/pjmedia/errno.c
r162 r183 127 127 128 128 msg.ptr = (char*)err_str[first].msg; 129 msg.slen = pj_ native_strlen(err_str[first].msg);129 msg.slen = pj_ansi_strlen(err_str[first].msg); 130 130 131 131 errstr.ptr = buf; -
pjproject/trunk/pjmedia/src/pjmedia/portaudio/dsound_wrapper.c
r65 r183 96 96 return E_NOTIMPL; 97 97 } 98 99 #ifndef _T 100 # define _T(s) s 101 #endif 102 98 103 /************************************************************************************/ 99 104 void DSW_InitializeDSoundEntryPoints(void) 100 105 { 101 dswDSoundEntryPoints.hInstance_ = LoadLibrary( "dsound.dll");106 dswDSoundEntryPoints.hInstance_ = LoadLibrary(_T("dsound.dll")); 102 107 if( dswDSoundEntryPoints.hInstance_ != NULL ) 103 108 { 104 109 dswDSoundEntryPoints.DirectSoundCreate = 105 110 (HRESULT (WINAPI *)(LPGUID, LPDIRECTSOUND *, LPUNKNOWN)) 106 GetProcAddress( dswDSoundEntryPoints.hInstance_, "DirectSoundCreate");111 GetProcAddress( dswDSoundEntryPoints.hInstance_, _T("DirectSoundCreate") ); 107 112 if( dswDSoundEntryPoints.DirectSoundCreate == NULL ) 108 113 dswDSoundEntryPoints.DirectSoundCreate = DummyDirectSoundCreate; … … 110 115 dswDSoundEntryPoints.DirectSoundEnumerateW = 111 116 (HRESULT (WINAPI *)(LPDSENUMCALLBACKW, LPVOID)) 112 GetProcAddress( dswDSoundEntryPoints.hInstance_, "DirectSoundEnumerateW");117 GetProcAddress( dswDSoundEntryPoints.hInstance_, _T("DirectSoundEnumerateW") ); 113 118 if( dswDSoundEntryPoints.DirectSoundEnumerateW == NULL ) 114 119 dswDSoundEntryPoints.DirectSoundEnumerateW = DummyDirectSoundEnumerateW; … … 116 121 dswDSoundEntryPoints.DirectSoundEnumerateA = 117 122 (HRESULT (WINAPI *)(LPDSENUMCALLBACKA, LPVOID)) 118 GetProcAddress( dswDSoundEntryPoints.hInstance_, "DirectSoundEnumerateA");123 GetProcAddress( dswDSoundEntryPoints.hInstance_, _T("DirectSoundEnumerateA") ); 119 124 if( dswDSoundEntryPoints.DirectSoundEnumerateA == NULL ) 120 125 dswDSoundEntryPoints.DirectSoundEnumerateA = DummyDirectSoundEnumerateA; … … 122 127 dswDSoundEntryPoints.DirectSoundCaptureCreate = 123 128 (HRESULT (WINAPI *)(LPGUID, LPDIRECTSOUNDCAPTURE *, LPUNKNOWN)) 124 GetProcAddress( dswDSoundEntryPoints.hInstance_, "DirectSoundCaptureCreate");129 GetProcAddress( dswDSoundEntryPoints.hInstance_, _T("DirectSoundCaptureCreate") ); 125 130 if( dswDSoundEntryPoints.DirectSoundCaptureCreate == NULL ) 126 131 dswDSoundEntryPoints.DirectSoundCaptureCreate = DummyDirectSoundCaptureCreate; … … 128 133 dswDSoundEntryPoints.DirectSoundCaptureEnumerateW = 129 134 (HRESULT (WINAPI *)(LPDSENUMCALLBACKW, LPVOID)) 130 GetProcAddress( dswDSoundEntryPoints.hInstance_, "DirectSoundCaptureEnumerateW");135 GetProcAddress( dswDSoundEntryPoints.hInstance_, _T("DirectSoundCaptureEnumerateW") ); 131 136 if( dswDSoundEntryPoints.DirectSoundCaptureEnumerateW == NULL ) 132 137 dswDSoundEntryPoints.DirectSoundCaptureEnumerateW = DummyDirectSoundCaptureEnumerateW; … … 134 139 dswDSoundEntryPoints.DirectSoundCaptureEnumerateA = 135 140 (HRESULT (WINAPI *)(LPDSENUMCALLBACKA, LPVOID)) 136 GetProcAddress( dswDSoundEntryPoints.hInstance_, "DirectSoundCaptureEnumerateA");141 GetProcAddress( dswDSoundEntryPoints.hInstance_, _T("DirectSoundCaptureEnumerateA") ); 137 142 if( dswDSoundEntryPoints.DirectSoundCaptureEnumerateA == NULL ) 138 143 dswDSoundEntryPoints.DirectSoundCaptureEnumerateA = DummyDirectSoundCaptureEnumerateA; -
pjproject/trunk/pjmedia/src/pjmedia/portaudio/pa_win_ds.c
r65 r183 68 68 #include "pa_cpuload.h" 69 69 #include "pa_process.h" 70 71 70 #include "dsound_wrapper.h" 72 71 … … 76 75 #endif 77 76 77 78 #include <pj/unicode.h> 78 79 79 80 #define PRINT(x) /* { printf x; fflush(stdout); } */ … … 326 327 DSDeviceNameAndGUIDVector *namesAndGUIDs = (DSDeviceNameAndGUIDVector*)lpContext; 327 328 PaError error; 329 PJ_DECL_ANSI_TEMP_BUF(atemp,128) 328 330 329 331 (void) lpszDrvName; /* unused variable */ … … 353 355 354 356 namesAndGUIDs->items[namesAndGUIDs->count].name = 355 DuplicateDeviceNameString( namesAndGUIDs->allocations, lpszDesc ); 357 DuplicateDeviceNameString( namesAndGUIDs->allocations, 358 PJ_NATIVE_TO_STRING(lpszDesc,atemp,sizeof(atemp))); 356 359 if( namesAndGUIDs->items[namesAndGUIDs->count].name == NULL ) 357 360 { … … 1024 1027 1025 1028 /* Let user determine minimal latency by setting environment variable. */ 1029 #ifdef UNDER_CE 1030 hresult = 0; 1031 #else 1026 1032 hresult = GetEnvironmentVariable( PA_LATENCY_ENV_NAME, envbuf, PA_ENV_BUF_SIZE ); 1033 #endif 1027 1034 if( (hresult > 0) && (hresult < PA_ENV_BUF_SIZE) ) 1028 1035 { -
pjproject/trunk/pjmedia/src/pjmedia/portaudio/pa_win_util.c
r65 r183 129 129 else 130 130 { 131 #ifndef UNDER_CE 131 132 return timeGetTime() * .001; 133 #else 134 return GetTickCount() * .001; 135 #endif 132 136 } 133 137 } -
pjproject/trunk/pjmedia/src/pjmedia/portaudio/pa_win_wmme.c
r65 r183 106 106 #include <windows.h> 107 107 #include <mmsystem.h> 108 #ifndef UNDER_CE 108 109 #include <process.h> 110 #endif 109 111 #include <assert.h> 110 112 /* PLB20010422 - "memory.h" doesn't work on CodeWarrior for PC. Thanks Mike Berry for the mod. */ … … 125 127 #include "pa_win_wmme.h" 126 128 127 #if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) /* MSC version 6 and above */ 129 #include <pj/string.h> 130 #include <pj/unicode.h> 131 132 #if (defined(WIN32) && (defined(_MSC_VER) && (_MSC_VER >= 1200))) && \ 133 !defined(UNDER_CE) 134 /* MSC version 6 and above */ 128 135 #pragma comment(lib, "winmm.lib") 129 136 #endif … … 160 167 #define PA_MME_MIN_TIMEOUT_MSEC_ (1000) 161 168 162 static const char constInputMapperSuffix_[] = " - Input";163 static const char constOutputMapperSuffix_[] = " - Output";169 static const pj_char_t constInputMapperSuffix_[] = PJ_T(" - Input"); 170 static const pj_char_t constOutputMapperSuffix_[] = PJ_T(" - Output"); 164 171 165 172 /********************************************************************/ … … 553 560 WAVEINCAPS wic; 554 561 PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo; 562 PJ_DECL_ANSI_TEMP_BUF(abuf,128) 555 563 556 564 *success = 0; … … 575 583 { 576 584 /* Append I/O suffix to WAVE_MAPPER device. */ 577 deviceName = (char *)PaUtil_GroupAllocateMemory( 578 winMmeHostApi->allocations, strlen( wic.szPname ) + 1 + sizeof(constInputMapperSuffix_) ); 585 deviceName = (char*)PaUtil_GroupAllocateMemory( 586 winMmeHostApi->allocations, 587 pj_native_strlen( wic.szPname ) + sizeof(pj_char_t) + sizeof(constInputMapperSuffix_) ); 579 588 if( !deviceName ) 580 589 { … … 582 591 goto error; 583 592 } 584 strcpy( deviceName, wic.szPname);585 strcat( deviceName, constInputMapperSuffix_);593 strcpy( deviceName, PJ_NATIVE_TO_STRING(wic.szPname,abuf,sizeof(abuf)) ); 594 strcat( deviceName, PJ_NATIVE_TO_STRING(constInputMapperSuffix_,abuf,sizeof(abuf)) ); 586 595 } 587 596 else 588 597 { 589 598 deviceName = (char*)PaUtil_GroupAllocateMemory( 590 winMmeHostApi->allocations, strlen( wic.szPname ) + 1);599 winMmeHostApi->allocations, pj_native_strlen( wic.szPname ) + sizeof(pj_char_t) ); 591 600 if( !deviceName ) 592 601 { … … 594 603 goto error; 595 604 } 596 strcpy( deviceName, wic.szPname);605 strcpy( deviceName, PJ_NATIVE_TO_STRING(wic.szPname,abuf,sizeof(abuf)) ); 597 606 } 598 607 deviceInfo->name = deviceName; … … 629 638 WAVEOUTCAPS woc; 630 639 PaDeviceInfo *deviceInfo = &winMmeDeviceInfo->inheritedDeviceInfo; 640 PJ_DECL_ANSI_TEMP_BUF(abuf,128) 631 641 632 642 *success = 0; … … 652 662 /* Append I/O suffix to WAVE_MAPPER device. */ 653 663 deviceName = (char *)PaUtil_GroupAllocateMemory( 654 winMmeHostApi->allocations, strlen( woc.szPname ) + 1 + sizeof(constOutputMapperSuffix_) );664 winMmeHostApi->allocations, pj_native_strlen( woc.szPname ) + 1 + sizeof(constOutputMapperSuffix_) ); 655 665 if( !deviceName ) 656 666 { … … 658 668 goto error; 659 669 } 660 strcpy( deviceName, woc.szPname);661 strcat( deviceName, constOutputMapperSuffix_);670 strcpy( deviceName, PJ_NATIVE_TO_STRING(woc.szPname,abuf,sizeof(abuf)) ); 671 strcat( deviceName, PJ_NATIVE_TO_STRING(constOutputMapperSuffix_,abuf,sizeof(abuf)) ); 662 672 } 663 673 else 664 674 { 665 675 deviceName = (char*)PaUtil_GroupAllocateMemory( 666 winMmeHostApi->allocations, strlen( woc.szPname ) + 1 );676 winMmeHostApi->allocations, pj_native_strlen( woc.szPname ) + 1 ); 667 677 if( !deviceName ) 668 678 { … … 670 680 goto error; 671 681 } 672 strcpy( deviceName, woc.szPname);682 strcpy( deviceName, PJ_NATIVE_TO_STRING(woc.szPname,abuf,sizeof(abuf)) ); 673 683 } 674 684 deviceInfo->name = deviceName; -
pjproject/trunk/pjmedia/src/pjmedia/sdp.c
r164 r183 169 169 170 170 name.ptr = (char*)c_name; 171 name.slen = pj_ native_strlen(c_name);171 name.slen = pj_ansi_strlen(c_name); 172 172 173 173 return pjmedia_sdp_attr_find(count, attr_array, &name, c_fmt); … … 199 199 200 200 attr_name.ptr = (char*)name; 201 attr_name.slen = pj_ native_strlen(name);201 attr_name.slen = pj_ansi_strlen(name); 202 202 203 203 for (i=0; i<*count; ) {
Note: See TracChangeset
for help on using the changeset viewer.