problem deploying qt app with camera
-
Hello,
I have written a big application which make use of a usb camera. It is mainly intended to be used under linux (ubuntu) and I was deploying it by putting the requested libraries, plugin and the app in a deployment folder which is copied to the client machine.
This approach was working perfectly well until I added the USB camera.
When I am running the app (either debug or release) from within Qt creator everything works fine, but while deploying the app, I had different problems:
first, no camera was detected until I included in my deployment folder the multimedia directory from the Qt plugins directory.
Now the camera is detected and no error is mentioned, but the camera window is black and I have no image at all.
using ldd or QT_DEBUG_PLUGINS=1 has not given me any significant clue, so I don't know how to diagnose the problem.
Any hint appreciated ... -
Hi,
Did you also activate the verbose logging for QtMultimedia ?
Might be a silly question but are you sure that all the ldd outputs are pointing to the librairies you deployed along your application and not from the system ?
-
Hello,
No I have not used verbose logging for Qt multimedia, I didn't know it existed. I'll check that now.
For the ldd output, I have effectively checked that the deployed libraries are used. For that to happen, I had to set the LD_LIBRARY_PATH variable to the proper path. -
A short search has not given me a clear picture of how to activate verbose logging for Qt. Can you elaborate a bit ?
-
You can find the syntax and some additional things you can enable in this page of the Qt Multimedia documentation.
-
I have made several tests, and on the multimedia part, everything looks fine. However, finally I found that something about wayland appear to be missing, so I added other plugins in my deployment "plugins" folde, and here is its actual content (folders):
iconengines
imageformats
multimedia
platforms
platforminputcontexts
platformthemes
wayland-decoration-client
wayland-graphics-integration-client
wayland-graphics-integration-server
wayland-shell-integration
xcbglintegrationsI have now an error message at the start of the application: "qt.qpa.wayland: Failed to load client buffer integration: "wayland-egl" "
One thing I don't understand is that, although I have set LD_LIBRARY_PATH to the deployment folder, I have to make symbolic links from the deployment folder to the different folders in "plugins" directory for them to be seen.
-
@oliver_mpt said in problem deploying qt app with camera:
Failed to load client buffer integration: "wayland-egl"
Install libwayland-egl1 package
Regarding plug-ins: take a look at https://doc.qt.io/qt-6/qt-conf.html
-
Hello
Thanks for pointing me the qt.conf file. I will experiment with that.
Regarding libwayland-egl1 package, apt reported that it was already installed in the most recent version. -
After some tests, I have setup the proper qt.conf file and that solved all issues, which were clearly related to paths for plugins and libraries. I think that qt.conf should be systematically used for correct deployment and the document cited by jsulm above is very clear.
Thanks ! -