Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
None
-
5.15.0 RC2
-
None
-
Ubuntu18.04,Virtual Box
Description
In the demo camera provided by QT ,i add the following code int the last of setCamera function:
QList<QCameraViewfinderSettings> settings = m_camera->supportedViewfinderSettings(); qDebug() << "Settings size is " << settings.size();
in Windows system,i can get some value of list,but in Linux ,i get nothing, the return list size is 0.
Through debugging source code,i found a very strange problem,the following code is in the camerabinsession.cpp file of Multimedia module, function name is supportedViewfinderSettings,i add the debug infomation:
QList<QCameraViewfinderSettings> CameraBinSession::supportedViewfinderSettings() const { qDebug() << "m_status = " << m_status; qDebug() << "m_status >= QCamera::LoadedStatus result is " << (m_status >= QCamera::LoadedStatus); if (m_status >= QCamera::LoadedStatus && m_supportedViewfinderSettings.isEmpty()) { m_supportedViewfinderSettings = capsToViewfinderSettings(supportedCaps(QCamera::CaptureViewfinder)); } return m_supportedViewfinderSettings; }
The final result is as follows:
m_status = QCamera::LoadingStatus
m_status >= QCamera::LoadedStatus result is false
why m_status value is QCamera::LoadingStatus,but the judgment that (m_status >= QCamera::LoadedStatus) return false ?This result in the return value is always none if the m_supportedViewfinderSettings list is empty