91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

資源簡介

真正項目中使用的sip電話源碼,可以適用于海思系列soc,實現了voip和可視電話功能,可控制PSTN模塊撥打可視電話

資源截圖

代碼片段和文件信息

#include?“hdef.h“
#include?“charCov.h“
#include?

char*?w2m(const?wchar_t*?wcs)?//unicode?->?ansi
{
int???len?=?0;
char*?buf?=?NULL;

char*?pOLD?=?setlocale(LC_ALL?NULL);
setlocale(LC_CTYPE?“zh_CN.gbk“);?//>>?unknown?

len?=?wcstombs(NULL?wcs?0);
if(len?==?0)?{?return?NULL;?}

buf?=?(char*)malloc(sizeof(char)?*?(len+1));
memset(buf?0?sizeof(char)?*?(len+1));
len?=?wcstombs(buf?wcs?len+1);

setlocale(LC_ALL?pOLD);
return?buf;
}

wchar_t*?m2w(const?char*?mbs)?//ansi?->?unicode
{
int ?len?=?0;
wchar_t*?buf?=?NULL;

char*?pOLD?=?setlocale(LC_ALL?NULL);
setlocale(LC_ALL?“chs“);?//>>?unknown?

len?=?mbstowcs(NULL?mbs?0);
if(len?==?0)?{?return?NULL;?}

buf?=?(wchar_t*)malloc(sizeof(wchar_t)?*?(len+1));
memset(buf?0?sizeof(wchar_t)?*?(len+1));
len?=?mbstowcs(buf?mbs?len+1);

setlocale(LC_ALL?pOLD);
return?buf;
}

int?w2utf8(const?wchar_t*?pSrc?int?nSrcLen?char*?pDst)
{
int?len?=?0;
int?i?=?0;

if(pDst?==?NULL)
{
while(i? {
if(pSrc[i]<0x0080)?len++;
else?if(pSrc[i]<0x0800)?len+=2;
else?len+=3;
i++;
}
}
else
{
while(i? {
if(pSrc[i]? {
pDst[len]?=?(char)pSrc[i];
len++;
}
else?if(pSrc[i]? {
pDst[len]?=?(char)(0xC0?|?(pSrc[i]?>>?6));
len++;
pDst[len]?=?(char)(0x80?|?(pSrc[i]?&?0x3F));
len++;
}
else
{
pDst[len]?=?(char)(0xE0?|?(pSrc[i]?>>?12));
len++;
pDst[len]?=?(char)(0x80?|?(pSrc[i]?>>?6?&?0x3F));
len++;
pDst[len]?=?(char)(0x80?|?(pSrc[i]?&?0x3F));
len++;
????????????}
i++;
}
}
return?len;
}

int?ascii2utf8(const?char*?pSrc?char*?pDst)
{
#define?W_LEN 1024
#define?BUF_MAX?(W_LEN*4)

wchar_t?wChar1[W_LEN]?=?{?0?};
char?szDestData1[BUF_MAX]?=?{?0?};

#if?defined(_WIN32)?||?defined(WIN32)?||?defined(_WINDOWS_)
setlocale(LC_CTYPE?“chs“);
#else
setlocale(LC_CTYPE?“zh_CN.gbk“);?
#endif

int?len?=?mbstowcs(NULL?pSrc?0);
if(len?==?0)?return?0;
mbstowcs(wChar1?pSrc?len);

len?=?w2utf8(wChar1?wcslen(wChar1)?szDestData1);

strcpy(pDst?szDestData1);
return?len;
}

int?c2w(char*?pSrc?int?nSrcLen?char**?ppDst?int*?pnDstLen)?//ansi?->?unicode
{
iconv_t ?fd;
int ?wstrlen;
char* ?outbuf?=?NULL;

wstrlen?=?nSrcLen?*?4;
outbuf?=?(char*)malloc(wstrlen);
if(outbuf?==?NULL)?
{
printf(“m2w?iconv?mode?failed?malloc?failed\n“);
return?-1;?
}
memset(outbuf?0?wstrlen);

fd?=?iconv_open(“ucs-2“/*to*/?“gb2312“/*from*/);
if(fd?==?(iconv_t)-1)
{
free(outbuf);
printf(“m2w?iconv?mode?failed?iconv?open?failed\n“);
return?-1;
}

if(iconv(fd?&pSrc?(size_t*)&nSrcLen?&outbuf?(size_t*)&wstrlen)?!=?0)
{
iconv_close(fd);
free(outbuf);
return?-1;
}

iconv_close(fd);
*ppDst?=?outbuf;
*pnDstLen?=?wstrlen;

return?0;
}

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件???????1094??2014-01-19?18:46??videophone\app.config

?????文件???????2931??2014-01-19?18:46??videophone\charCov.cpp

?????文件????????456??2014-01-19?18:46??videophone\charCov.h

?????文件???????5000??2014-01-19?18:46??videophone\h264fua.cpp

?????文件????????788??2014-01-19?18:46??videophone\h264fua.h

?????文件???????2512??2014-01-19?18:46??videophone\hdef.h

?????文件??????12566??2014-01-19?18:46??videophone\incude\iwlsip\IWLPortAPI.h

?????文件???????8963??2014-01-19?18:46??videophone\incude\iwlsip\IWLSipAPI.h

?????文件??????16047??2014-01-19?18:46??videophone\incude\iwlsip\IWLSipCallAPI.h

?????文件???????5314??2014-01-19?18:46??videophone\incude\iwlsip\IWLSipEventAPI.h

?????文件???????3804??2014-01-19?18:46??videophone\incude\iwlsip\IWLSipRegAPI.h

?????文件???????5628??2014-01-19?18:46??videophone\incude\iwlsip\IWLSipSdpAPI.h

?????文件???????5700??2014-01-19?18:46??videophone\incude\iwlsip\IWLSipTrAPI.h

?????文件???????2144??2014-01-19?18:46??videophone\incude\webrtc\aligned_malloc.h

?????文件???????2937??2014-01-19?18:46??videophone\incude\webrtc\channel_transport.h

?????文件??????17078??2014-01-19?18:46??videophone\incude\webrtc\common_types.h

?????文件???????1783??2014-01-19?18:46??videophone\incude\webrtc\constructor_magic.h

?????文件???????5760??2014-01-19?18:46??videophone\incude\webrtc\engine_configurations.h

?????文件???????4362??2014-01-19?18:46??videophone\incude\webrtc\i420_video_frame.h

?????文件??????24486??2014-01-19?18:46??videophone\incude\webrtc\isac.h

?????文件???????1962??2014-01-19?18:46??videophone\incude\webrtc\jpeg.h

?????文件???????1977??2014-01-19?18:46??videophone\incude\webrtc\module.h

?????文件??????29321??2014-01-19?18:46??videophone\incude\webrtc\module_common_types.h

?????文件???????2266??2014-01-19?18:46??videophone\incude\webrtc\plane.h

?????文件???????5238??2014-01-19?18:46??videophone\incude\webrtc\scoped_ptr.h

?????文件???????3337??2014-01-19?18:46??videophone\incude\webrtc\typedefs.h

?????文件??????15114??2014-01-19?18:46??videophone\incude\webrtc\udp_transport.h

?????文件???????1841??2014-01-19?18:46??videophone\incude\webrtc\video_image.h

?????文件???????9186??2014-01-19?18:46??videophone\incude\webrtc\video_processing.h

?????文件???????1239??2014-01-19?18:46??videophone\incude\webrtc\video_processing_defines.h

............此處省略58個文件信息

評論

共有 條評論