opencv/modules/videoio/misc/python/pyopencv_videoio.hpp
Alexander Alekhin f5b58e5fc9 bindings: backport generator from OpenCV 4.x
- better handling of enum arguments
- less merge conflicts
2019-03-01 20:18:48 +00:00

24 lines
683 B
C++

#ifdef HAVE_OPENCV_VIDEOIO
typedef std::vector<VideoCaptureAPIs> vector_VideoCaptureAPIs;
template<> struct pyopencvVecConverter<cv::VideoCaptureAPIs>
{
static bool to(PyObject* obj, std::vector<cv::VideoCaptureAPIs>& value, const ArgInfo info)
{
return pyopencv_to_generic_vec(obj, value, info);
}
static PyObject* from(const std::vector<cv::VideoCaptureAPIs>& value)
{
return pyopencv_from_generic_vec(value);
}
};
template<>
bool pyopencv_to(PyObject *o, std::vector<cv::VideoCaptureAPIs>& apis, const char *name)
{
return pyopencvVecConverter<cv::VideoCaptureAPIs>::to(o, apis, ArgInfo(name, false));
}
#endif // HAVE_OPENCV_VIDEOIO