Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-45004

BB10: Qt Quick Camera fails to initialize sometimes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Won't Do
    • Affects Version/s: 5.4.0, 5.4.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:
      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

        Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

            Assignee:
            bomb3rman Fabian Bumberger
            Reporter:
            korvin Stepan Prokipchyn
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes