QCamera Problems!
-
I am newly using QCamera in Linux (Ubuntu 16.04), but it seems does not work properly in Linux. I faced to the following warning:
Unable to query the parameter info: "Invalid argument"
I am using Qt5.10.0 in Linux, Windows and Mac OS X. The problem is just in Linux and it works fine in other OS like Windows and Mac....
To find the problem I have added another WebCam as USB Webcam, I have changed my OS device (Test in another PC with another Webcam), but warning is remained.
I have also tested the QT Camera Example and I found that this warning is also coming with the example: https://doc.qt.io/qt-5.10/qtmultimedia-multimediawidgets-camera-example.html
I am sure there is a bug with QT5 and Camera does not work well.
I think there is a lack of Proper Plugin in Linux which cuz this warning.This warning is caused following problems:
1- Ui element become disabled when you fire staring QCamera Object. For example you can not click on any Push Buttons!!!!!
2- Scaling is not good in Mode of "Qt::KeepAspectRatioByExpanding"My very very simple test code :
QCamera *Camera;
QCameraImageCapture *ImageCapture;
QCameraInfo *CameraInfo;void MainWindow::on_pushButton_clicked()
{
Camera = new QCamera;
ImageCapture = new QCameraImageCapture(Camera);//connect(ImageCapture, &QCameraImageCapture::imageCaptured, this, &MainWindow::processCapturedImage); Camera->setViewfinder(ui->wCamera); ui->wCamera->setAspectRatioMode(Qt::KeepAspectRatioByExpanding); Camera->setCaptureMode(QCamera::CaptureViewfinder); Camera->start();
}
Hope someone test.
Thanks.
-
Hi,
Do you have gstreamer installed ? If so, which version ?
-
-
You should check the QtMultimedia plugin with ldd to see if it finds the gstreamer libraries. It might be still using the 0.1 version.
-
@SGaist said in QCamera Problems!:
check the QtMultimedia plugin with ldd
Thank you SGaist, there is no EXEC file in gstreamer plugin folder. With ldd we can just check exec dependency Libs.
Would you please tell me how to check Lib dependency of Qt Plugins? -
@SGaist said in QCamera Problems!:
QtMultimedia
-
@Hasan-Vaez said in QCamera Problems!:
With ldd we can just check exec dependency Libs.
This is wrong. ldd works with libs as well
-
You are mixing your distribution provided Qt with the one you installed through the online installer. They are two different versions of Qt hence my question about the libraries linked to your 5.10 version of the gstreamer plugin.
-
@Hasan-Vaez For camera:
ldd ~/Qt/5.10.0/gcc_64/plugins/mediaservice/libgstcamerabin.so
-
@SGaist Thank you for your reply and trying to solve this maybe bug.
I did not install GStreamer after installing QT.I try to setup a new Ubuntu 16.04LTS in VMWare machine + QT5.10.0 again and run the example of QCamera which is in part of the Qt package and see what happened.
-
@SGaist said in QCamera Problems!:
with
I installed a new Ubuntu 14.04 LTS, Qt5.10.0 (Offline installer).
Also installed some essential PKGs for running Camera: mesa-common-dev, libpulse-dev, libgl1-mesa-devBut problem is remained!!!
Mr. Gsaist, did you tried? : https://doc.qt.io/qt-5.10/qtmultimedia-multimediawidgets-camera-example.html
Would you please make a run the QCamera example from QT example folder.
-
If you are running from a VMware machine, you could have problems accessing the camera.
Make sure that the camera is not connected to the host.
See the "Player | Removable Devices | ..." menu option of VMware player.
Also, if its connect to the usb you may have to downgrade from usb3.0 to sub 2.0 or even usb 1.1 from the player settings menu. -
@mranger90
Thank you, but I think you do not read my full description in the top.
I tested it in another PC without VM. -
@Hasan-Vaez said in QCamera Problems!:
Unable to query the parameter info: "Invalid argument"
Google that suggest something with the gstreamer. but im not 100% sure.
Anyway, i would test the camera in the same linux using some linux camera program to verify something can see it.
https://www.linuxlinks.com/webcam/ -
Just tell me, you do not having any problem with Camera with QT C++ in linux?
-
@mranger90
Thank you for your reply.
Yes, I can use it outside of QT. I tested it with Cheese app in Ubuntu 16.04 LTS without any problem.
I also have not any problem in other OS like MAC and WINDOWS. -
@mranger90
Please tell me what plugins did you install for qmultimedia in QT5?