|
@@ -296,38 +296,6 @@ int GetJPEGDataWithWait(char * strvideoname, char * str,int * x,int nwaitms)
|
|
|
int GetJPEGData(char * strvideoname, char * str,int * x)
|
|
|
{
|
|
|
return GetJPEGDataWithWait(strvideoname,str,x,0);
|
|
|
- std::string strvideo = strvideoname;
|
|
|
-
|
|
|
- int nsize;
|
|
|
- int i;
|
|
|
- iv::threadcam * pthreadcam = NULL;
|
|
|
- for(i=0;i<nsize;i++)
|
|
|
- {
|
|
|
- if(gvectorthreadcam[i]->mstrvideoname == strvideo)
|
|
|
- {
|
|
|
- pthreadcam = gvectorthreadcam[i];
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- if(pthreadcam == NULL)
|
|
|
- {
|
|
|
- std::cout<<" video device not open."<<std::endl;
|
|
|
- return 0;
|
|
|
- }
|
|
|
-
|
|
|
- int nRtn = 0;
|
|
|
- pthreadcam->mmutexdata.lock();
|
|
|
- if(pthreadcam->mbUpdate)
|
|
|
- {
|
|
|
-// str.copy(gstrbuf,gnLen);
|
|
|
- memcpy(str,pthreadcam->mpstr_data.get(),pthreadcam->mndatasize);
|
|
|
- nRtn = pthreadcam->mndatasize;
|
|
|
- *x = pthreadcam->mndatasize;
|
|
|
- pthreadcam->mbUpdate= false;
|
|
|
- }
|
|
|
- pthreadcam->mmutexdata.unlock();
|
|
|
- return nRtn;
|
|
|
}
|
|
|
|
|
|
int StopCam(char * strvideoname)
|