-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
I have looked over the code for the part that streams to localhost but cannot find it.
Is this it (in MainStreamer)?
` VideoCapture cap(VIDEO_FILE, CAP_FFMPEG);
if(!cap.isOpened()){ FrameError=true; goto Ferr; }
if (!cap.read(frame)) { FrameError=true; goto Ferr; }
cout << "Camera start streaming...." << endl;
//reset lock mechanism
unlink(SWAP_IMG_FILE);
unlink(SWAP_RDY_FILE);
while(true)
{
//wait until ready
while(FileExists(SWAP_IMG_FILE) || FileExists(SWAP_RDY_FILE)) cap.read(frame);
//event app is ready to recieve a new frame
cap.read(frame);
cv::resize(frame, norm_frame, cv::Size(320, 240));
imwrite(SWAP_IMG_FILE,norm_frame);
//signal image to file writing is done
Fdone.open(SWAP_RDY_FILE);
Fdone.close(); //write empty file
}`
It just seems to write the image to SWAP_IMG_FILE.
I am new to c++ - just trying to work it out.
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels