QCameraInfo::availableCameras() CANNOT update when remove a webcam
I have a question about QCameraInfo::availableCameras(). This function return all the available cameras connecting to my machine. It returns NULL when no cameras plugged in, and it works fine when I connect a webcam, however, it doesn't work when I unplugged the camera, which means it still returns the camera. Should't it return NULL when I disconnect the camera?
Waiting for reply and thanks very much!
It's the similar behavior as on Ubuntu 14.04:
i) Programs starts (one camera), calling QCameraInfo::availableCameras() -> 1
ii) connecting 2nd camera, QCameraInfo::availableCameras() -> 1
i) Programs starts (one camera), connecting 2nd camera, availableCameras() -> 2
Removing is not working( not showing NULL). Which OS/multimedia plugin are you using?
Why my Qt5.4 with VS2010 does not contain qgstutils.cpp in the QtMultimedia folder?
[quote author="yeckel" date="1424357096"]Hi, I believe its a bug hot QT is using gstreamer. I tried to make a simple fix "https://codereview.qt-project.org/106730":https://codereview.qt-project.org/106730[/quote]
I have no idea :) how did you got the sourcecode? I was following "Building-Qt-5-from-Git":http://qt-project.org/wiki/Building-Qt-5-from-Git eg @git clone git://gitorious.org/qt/qt5.git qt5@ and then @perl init-repository@. Then the file should be there: qt5/qtmultimedia/src/gsttools/qgstutils.cpp