Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- QVideoFrame VideoFilterRunnable::run(QVideoFrame* input,
- const QVideoSurfaceFormat& surfaceFormat,
- QVideoFilterRunnable::RunFlags flags)
- {
- if (input->isValid()) {
- if (input->map(QAbstractVideoBuffer::ReadOnly)) {
- cv::Mat img = cv::Mat(m_videoHeight, m_videoWidth, CV_8UC3, input->bits());
- imwrite("testdms.png", img);
- } else {
- qDebug() << "error while mapping frame";
- }
- } else {
- qDebug() << "invalid input";
- }
- return *input;
- }
Add Comment
Please, Sign In to add comment