|
@@ -40,6 +40,7 @@ void * gpa;
|
|
|
|
|
|
void Listenpic(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
|
|
|
{
|
|
|
+ std::cout<<"listen pic."<<std::endl;
|
|
|
if(nSize<1000)return;
|
|
|
iv::vision::rawpic pic;
|
|
|
if(false == pic.ParseFromArray(strdata,nSize))
|
|
@@ -67,7 +68,7 @@ void threadgetpic()
|
|
|
{
|
|
|
int nindex = gph264decode->GetUpdatedIndex(10);
|
|
|
if(nindex<0)continue;
|
|
|
-// std::cout<<" recv a yuv."<<std::endl;
|
|
|
+ std::cout<<" recv a yuv."<<std::endl;
|
|
|
iv::framedecodebuf * pbuf = gph264decode->LockReadBuff(nindex);
|
|
|
int cy = pbuf->frameheight;
|
|
|
int cx = pbuf->framewidth;
|
|
@@ -347,6 +348,7 @@ class h264picHandler : public CivetWebSocketHandler {
|
|
|
|
|
|
void Listenframe(const char * strdata,const unsigned int nSize,const unsigned int index,const QDateTime * dt,const char * strmemname)
|
|
|
{
|
|
|
+ std::cout<<" listen frame."<<std::endl;
|
|
|
if(nSize<1000)return;
|
|
|
gpwsh264front->BroadData(strdata,nSize);
|
|
|
|
|
@@ -360,12 +362,12 @@ int main(int argc, char *argv[])
|
|
|
|
|
|
std::thread * pthreadpic = new std::thread(threadgetpic);
|
|
|
|
|
|
- iv::xmlparam::Xmlparam xp("./picview_civetweb.xml");
|
|
|
- std::string strmsgname = xp.GetParam("imagemsgname","picfront");
|
|
|
+ iv::xmlparam::Xmlparam xp("./h264view_civetweb.xml");
|
|
|
+ std::string strmsgname = xp.GetParam("framename","h264front");
|
|
|
std::string strport = xp.GetParam("Port","6123");
|
|
|
- gpa = iv::modulecomm::RegisterRecv(strmsgname.data(),Listenpic);
|
|
|
+ // gpa = iv::modulecomm::RegisterRecv(strmsgname.data(),Listenpic);
|
|
|
|
|
|
- void * pah264 = iv::modulecomm::RegisterRecv("h264front",Listenframe);
|
|
|
+ void * pah264 = iv::modulecomm::RegisterRecv(strmsgname.data(),Listenframe);
|
|
|
|
|
|
mg_init_library(0);
|
|
|
|