效果图:
DirectShow采集核心代码:
创建线程调用该函数,采集图像通过x264解码封装rtmp协议包,推送至FMS服务器,可实现视频直播
UINT __stdcall StartVideo(void *c)
{
CVideoConf *conf = (CVideoConf *)c;
int vid = conf->code;
CString strurl(conf->rtmpurl);
CWnd *pW = conf->pW;
CCameraDS camera;
if (!camera.OpenCamera(0,false));
{
TRACE("OpenCamera error.....");
}
while(true)
{
CvvImage cimg;
CRect rect;
IplImage *m_Frame ;
BYTE *data1 = cam