Example for a videoserver waiting for images
- Author
- MIP
#include <iostream>
#include <Utils/Param.hh>
#include <VideoSource/VideoServer.hh>
#include <Base/Debug/TimeMeasure.hh>
using namespace std;
using namespace BIAS;
int main( int argc, char *argv[])
{
bool done = false;
float fps;
if (optind<0) {
cout<<"Usage: "<<argv[0]<<" options"<<endl<<
" by default all images in current dir are taken."<<endl;
exit(1);
}
cout <<"Init class VideoServer"<<endl;
if (vs.
Init() <0) exit(1);
cout <<"done"<<endl;
int i=0,res=0;
while(!done){
if (res==1) biasusleep(500);
if (res==0) {
float bw = (float)MessageSize* fps / 1024;
cout <<"sent image "<<i<<" size: "<<MessageSize<<" fps: "<<fps
<<" bandwidth: "<<bw<< " [kB/s]"<<endl;
i++;
}
}
return 0;
}