Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Camera/Video Without OpenGL (Quick Renderer)
I have a non OpenGL embedded Linux system with a QT 5.9 build. I am developing a QML and C++ based application. In this case I am utilizing the Qt Quick 2D renderer in lieu of OpenGL - because of this, I cannot utilize the "VideoOutput" item in QML since this is reliant on OpenGL.
I am looking for some ideas for an alternative way to display a camera view in my application. What is my best option in this case? I can do tricks with launching another app or something but would prefer something more built in if it's possible.
What are the specs of the camera ?
How fast is it supposed to be ?
720x480 SD, 30 fps - this is a pretty low quality camera, nothing super fancy. I can already utilize the camera in my system sans QT (using gstreamer or other tools) but want to integrate a live camera view into my UI application in certain cases.
You can maybe use QtGStreamer for example.
Is that a USB camera ?
No it's an embedded interface. That shouldn't matter though as it just appears as a standard V4L2 device (/dev/video)
"Finally, when drawing on QtQuick2 (Qt5), the only way is to use qtquick2videosink."
"If you are using QtQuick (either QtQuick1 with Qt4 or Qt5, or QtQuick2 with Qt5), there is also a "VideoItem" element available when you import "QtGStreamer 1.0". See the qmlplayer and qmlplayer2 examples for details."
So does that mean I can still utilize the VideoItem element as long as I setup gstreamer to feed qtquick2videosink?
Also since it says:
"qtglvideosink and qtquick2videosink use OpenGL/OpenGLES and support hardware colorspace conversion and color balance."
Wouldn't I have the same problem? OpenGL doesn't work well on my system.
What system do you have ?
What format is the image you receive ?
do you have ?
What format is the image
It's a Cortex A5 based system with no GPU. The camera format is ITU601 - but ultimately, I just need to be able to display any old /dev/video device in my QML application window. Like I mentioned, I have already verified the interface as I can use gstreamer to output it to my display. I am just wondering if there are any alternatives to VideoOutput as this is directly reliant on OpenGL which I can't practically use on this system.
That link seems to be saying that QtGstreamer still uses OpenGL correct? If it can only use OpenGL, then I would still have the same problem.
They also have widget sink.
In any case, this stack overflow answer might be an interesting starting point to push images to QtQuick from C++.
Well the widget sink would require the use of QWidgets correct? Not Quick/QML... I was wondering if there was any other way to implement video in QML but doesn't sound like there is.
Sorry, I don't have deep enough knowledge of the Qt Quick Renderer to give you hints about how to implement a video item for it.