Details
-
Bug
-
Resolution: Won't Do
-
P2: Important
-
None
-
5.4.0, 5.4.1
-
None
-
Ubuntu x64 14.10, Blackberry Z30
Description
After applying patch from QTBUG-43752 it becames possible to use Qt Quick Camera and show preview.
However camera initialization may fail randomly when FrontFace camera is used by default (available since Qt 5.4):
Camera { position: Camera.FrontFace }
It seems that QCamera uses back camera as default device and when front camera is specified as default device we will get the following behaviour:
- QCamera::start is called for back camera
- QCamera::unload is called for back camera
- QCamera::start is called for front camera
The latest call fails randomly in BbCameraSession::startViewFinder on this check:
if (result != CAMERA_EOK) { qWarning() << "Unable to start viewfinder:" << result; return false; }
My workaround is to call applyConfiguration directly in BbCameraSession::setState instead of queueing it with invokeMethod.
I have not found any regression after this change and I see no reason why we must use invokeMethod