Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
[Solved] How to set Gstreamer camberabin2 properties from Qt
njozwiak last edited by njozwiak
I'm running Qt 5.4.0 with Gstreamer-0.10.36 in an embedded Linux environment and having issues with camera operation in Qt. Is it possible to set the Gstreamer camerabin2 plugin properties from Qt's QCamera API? Specifically I want to manually set the viewfinder sink to fbdevsink. This is possible using
g_object_set()from a C application. But how would I control these properties from a Qt application?
AFAIK, no, however if you need more control over the pipeline, you should take a look at QtGStreamer
Hope it helps
njozwiak last edited by
That is correct.
I looked more in depth into the QtMultimedia plugin and found it setting the video sink statically to ximagesink on line 130 in qt-everywhere-opensource-src-5.4.0/qtmultimedia/src/gsttools/qgstreamervideowidget.cpp:
m_videoSink = gst_element_factory_make ("ximagesink", NULL);
As a test, I did modify that line to use fbdevsink. And that provided some basic functionality. But the caps that control the filters, size, and position of the ximagesink are not valid in fbdevsink. So instead of the viewfinder being restricted to a small widget in the application, the video sink took up the entire screen... covering the rest of the application.
It's likely possible to get this working with other sinks outside of X11, but would take more customization of QtMultimedia's camerabin plugin.
Then you should take a look at QtGstreamer, it might be worth it