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.
-
Hi,
What are the specs of the camera ?
How fast is it supposed to be ? -
-
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?
-
What system do you have ?
What format is the image you receive ?
-
@SGaist said in Camera/Video Without OpenGL (Quick Renderer):
do you have ?
What format is the imageIt'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++.
-
@SGaist said in Camera/Video Without OpenGL (Quick Renderer):
dget si
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.