20 lines
763 B
C++
20 lines
763 B
C++
#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");}
|
|
};
|
|
}
|