初始提交:龙芯2K0300智能车卖家Demo完整代码
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
#include "video.h"
|
||||
|
||||
Video::Video(const std::string &filename, double fps)
|
||||
: timer(static_cast<int>(1000 / fps), std::bind(&Video::streamCapture, this)), cap(filename)
|
||||
{
|
||||
streamCapture();
|
||||
}
|
||||
|
||||
Video::~Video(void)
|
||||
{
|
||||
timer.stop();
|
||||
}
|
||||
|
||||
void Video::streamCapture(void)
|
||||
{
|
||||
frameMutex.lock();
|
||||
cap.read(frame);
|
||||
frameMutex.unlock();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user