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

  • 大小: 10.29MB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2023-10-06
  • 語言: C#
  • 標簽: rtspFFMETP??

資源簡介

C#RTSP以及FFmpeg視頻傳輸Demo C#RTSP以及FFmpeg視頻傳輸Demo C#RTSP以及FFmpeg視頻傳輸Demo

資源截圖

代碼片段和文件信息

#include?“DemoServer.h“
#include?
#include?
#include?
using?namespace?std;

#pragma?comment(lib“Ws2_32.lib“)

#define??err_out(s)?{?printf(“error:?%s?line?number:%d?\r\n“__LINE__);?system(“pause“);?exit(-1);?}

#define??MAX_CLIENT_NUM?60
#define??DATA_MAX_BUFFER_SIZE?10240

static?bool?g_stoped?=?false;

static?int?g_sockCount?=?0;

static?SOCKET?g_sClinet[MAX_CLIENT_NUM]?=?{-1};

static?unsigned?int?g_InterCount?=?0;
static?list?g_listData;

static?CRITICAL_SECTION?g_syc;
extern?“C“?{;

extern?int?g_pic_width;
extern?int?g_pic_height;
extern?int?g_pic_framerate;

onframeData?g_onframeDataCall?=?NULL;
}
void?ContructBhh(int?nWidthint?nHeightBITMAPFILEHEADER&?bhh)?//add?2010-9-04
{
int?widthStep?=?(((nWidth?*?24)?+?31)?&?(~31))?/?8?;?//每行實際占用的大小(每行都被填充到一個4字節邊界)
bhh.bfType?=?((WORD)?(‘M‘?< bhh.bfSize?=?(DWORD)sizeof(BITMAPFILEHEADER)?+?(DWORD)sizeof(BITMAPINFOHEADER)?+?widthStep?*?nHeight;
bhh.bfReserved1?=?0;
bhh.bfReserved2?=?0;
bhh.bfOffBits?=?(DWORD)sizeof(BITMAPFILEHEADER)?+?(DWORD)sizeof(BITMAPINFOHEADER);
}

void?ConstructBih(int?nWidthint?nHeightBITMAPINFOHEADER&?bih)?
{
int?widthStep?=?(((nWidth?*?24)?+?31)?&?(~31))?/?8?;?

bih.biSize=40;???????//?header?size
bih.biWidth=nWidth;
bih.biHeight=nHeight;
bih.biPlanes=1;
bih.biBitCount=24;?????//?RGB?encoded?24?bit
bih.biCompression=BI_RGB;???//?no?compression?非壓縮
bih.biSizeImage=widthStep*nHeight;
bih.biXPelsPerMeter=0;
bih.biYPelsPerMeter=0;
bih.biClrUsed=0;
bih.biClrImportant=0;?

}

int?onDecodeData(char*?data?int?data_sizeint?w?int?h)
{
g_InterCount++;
if(g_InterCount>0xfffffff0)
g_InterCount?=?0;
int?iframeCount?=?g_InterCount%10;
if?(g_pic_framerate==5)
{
if(g_InterCount%2!=0)
return?0;
}
else?if?(g_pic_framerate==6)
{
if(iframeCount==1?||?iframeCount==3?||?iframeCount==5?||?iframeCount==7)
return?0;
}
else?if?(g_pic_framerate==7)
{
if(iframeCount==1?||?iframeCount==3?||?iframeCount==5)
return?0;
}
else?if?(g_pic_framerate==8)
{
if(iframeCount==1?||?iframeCount==3)
return?0;
}
else?
{
if?(g_InterCount%10>g_pic_framerate)
return?0;
}

int?widthStep?=?(((w?*?24)?+?31)?&?(~31))?/?8?;?
char*?bmp?=?new?char[data_size];
for?(int?i=0;?i {
memcpy(bmp+i*widthStepdata+(h-i-1)*widthStepwidthStep);
}
string?str;
BITMAPFILEHEADER?bitmapHeader?=?{0};
ContructBhh(whbitmapHeader);
str.append((char*)&bitmapHeadersizeof(BITMAPFILEHEADER));
BITMAPINFOHEADER?infoHeader?=?{0};
ConstructBih(whinfoHeader);
str.append((char*)&infoHeadersizeof(BITMAPINFOHEADER));
str.append(bmpdata_size);
delete[]?bmp;
????
if?(g_onframeDataCall)
{
g_onframeDataCall((char*)str.data()str.size());
}

return?0;
}

int?push_data(char*?data?int?data_sizeint?w?int?h)
{
g_InterCount++;
if(g_InterCount>0xfffffff0)
g_InterCount?=?0;
int?iframe

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

????..A..H.?????67072??2017-09-16?11:51??C#_FFmpeg_rtsp_Demo\fflib_rtsp\.vs\libffrtsp\v15\.suo

?????文件????8810496??2017-09-16?11:51??C#_FFmpeg_rtsp_Demo\fflib_rtsp\.vs\libffrtsp\v15\Browse.VC.db

?????文件?????618496??2017-09-16?11:51??C#_FFmpeg_rtsp_Demo\fflib_rtsp\.vs\libffrtsp\v15\Solution.VC.db

?????文件?????565248??2017-09-16?11:46??C#_FFmpeg_rtsp_Demo\fflib_rtsp\.vs\libffrtsp\v15\sqlite3\storage.ide

?????文件???????8079??2014-06-19?15:22??C#_FFmpeg_rtsp_Demo\fflib_rtsp\DemoServer.cpp

?????文件????????343??2014-06-19?15:30??C#_FFmpeg_rtsp_Demo\fflib_rtsp\DemoServer.h

?????文件???????2493??2013-03-15?08:09??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\compat\getopt.c

?????文件???????2126??2013-03-04?07:27??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\compat\msvcrt\snprintf.c

?????文件???????1298??2013-03-04?07:27??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\compat\msvcrt\snprintf.h

?????文件????????118??2013-03-15?08:09??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\compat\plan9\head

?????文件???????1154??2013-03-15?08:09??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\compat\plan9\main.c

?????文件?????????86??2013-03-15?08:09??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\compat\plan9\printf

?????文件???????2778??2013-03-15?08:09??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\compat\strtod.c

?????文件????????192??2013-03-15?08:09??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\compat\tms470\math.h

?????文件????????952??2013-03-04?07:27??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\compat\va_copy.h

?????文件???????1158??2013-04-17?14:04??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\inttypes.h

?????文件?????172783??2013-03-28?12:33??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\libavcodec\avcodec.h

?????文件???????3060??2013-03-28?12:33??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\libavcodec\avfft.h

?????文件???????2270??2013-03-28?12:33??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\libavcodec\dxva2.h

?????文件??????10659??2013-03-28?12:33??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\libavcodec\old_codec_ids.h

?????文件???????4007??2013-03-28?12:33??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\libavcodec\vaapi.h

?????文件???????5154??2013-03-28?12:33??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\libavcodec\vda.h

?????文件???????4212??2013-03-28?12:33??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\libavcodec\vdpau.h

?????文件???????3836??2013-03-28?12:33??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\libavcodec\version.h

?????文件???????5986??2013-03-28?12:33??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\libavcodec\xvmc.h

?????文件???????2177??2013-08-08?11:32??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\libavdevice\avdevice.h

?????文件???????1860??2013-03-28?12:33??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\libavdevice\version.h

?????文件???????3321??2013-03-28?12:33??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\libavfilter\asrc_abuffer.h

?????文件???????4433??2013-03-28?12:33??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\libavfilter\avcodec.h

?????文件??????31027??2013-03-28?12:33??C#_FFmpeg_rtsp_Demo\fflib_rtsp\fflib\include\libavfilter\avfilter.h

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

評論

共有 條評論

相關資源