Unsolved VideoOutput with custom source
-
Hellow!
Try to create custom video provider to stream v4l2 video to qml. I hve Implemented VideoProvider class derived from QObject like in doc (https://doc.qt.io/qt-5/videooverview.html#working-with-low-level-video-frames) but VideoOutput is always black.With MediaPlayer it works well.
Add QAbstractFilter to check frames on videoOutput - it receives proper data but creen is black.
Frames for present() created with
int bytesPerLine = m_capture->width() * 2; // 2 bytes per pixel int bufferSize = m_capture->height() * bytesPerLine; QSize frameSize(m_capture->width(), m_capture->height()); QVideoFrame::PixelFormat format = QVideoFrame::Format_UYVY; QVideoFrame *frame = new QVideoFrame(bufferSize, frameSize, bytesPerLine, format);
Surface started on setVideoSurface()
m_format = QVideoSurfaceFormat(frameSize, format); m_surface->start(m_format);
What am I missed? How can I debug it?
qt 5.7 on imx6
-
Hi and welcome to devnet,
I am not sure that UYVY support was 100% supported for displaying like that by that old version of Qt.