Recover camera capture and release mmap buffers before reconnecting
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
// Camera timeout tests exercise live capture only. Stub the unused replay API
|
||||
// so the use-can Camera can be tested without OpenCV or a video decoder.
|
||||
#include <stdexcept>
|
||||
#include <string>
|
||||
namespace cv {
|
||||
constexpr int CAP_PROP_FRAME_WIDTH=3,CAP_PROP_FRAME_HEIGHT=4;
|
||||
struct Mat {
|
||||
int cols{},rows{};
|
||||
unsigned char const* ptr(int)const {throw std::logic_error("Video replay is outside this test");}
|
||||
};
|
||||
class VideoCapture {
|
||||
public:
|
||||
bool isOpened()const{return false;}
|
||||
bool open(std::string const&){throw std::logic_error("Video replay is outside this test");}
|
||||
double get(int)const {throw std::logic_error("Video replay is outside this test");}
|
||||
bool read(Mat&){throw std::logic_error("Video replay is outside this test");}
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user