×

Discussion Board

Results 1 to 12 of 12
  1. #1
    Registered User
    Join Date
    Feb 2011
    Posts
    8

    Exclamation Camera API missing from Qt SDK 1.1's Qt Mobility APIs

    I have downloaded the Qt SDK 1.1 BETA version today at Forum.Nokia website , March 2, 2011.

    This SDK contains:
    Qt 4.7.2 and Qt Mobility 1.1.1 APIs.
    Qt Quick and Qt Creator 2.1 to provide a complete solution for UI development.
    Tools for Symbian, Maemo, and desktop apps, including the use of native APIs.
    Device binaries to enable apps created with the SDK to be run on Symbian devices.

    This is stated in the Forum.Nokia website http://www.forum.nokia.com/info/sw.n...f8/Qt_SDK.html

    What I want to do and what I did so far:
    1. I want to develop an application that utilizes the built-in camera of a Symbian^3 phone.
    2. I have researched and found out that the latest release of Qt Mobility which is Qt Mobility 1.1.1 APIs SHOULD include the Camera APIs which is under the Multimedia API - http://doc.qt.nokia.com/qtmobility-1.1.1/index.html
    3. I also found a QCamera application example here - http://www.forum.nokia.com/info/sw.n..._0_en.zip.html
    4. I downloaded the example and tried to build it in Qt Creator using the new Qt SDK 1.1
    5. Now the first problem is that it cannot find the QCamera APIs specifically these two in the cameraexample.h header file:
    // QtMobility API
    #include <qcamera.h>
    #include <qstillimagecapture.h>

    My questions now:
    Now is it possible that the latest Qt SDK 1.1 that includes the Qt Mobility 1.1.1 APIs did not really include the Camera APIs?
    Did the developers forgot to include it into the Qt Mobility 1.1.1 APIs?

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Camera API missing from Qt SDK 1.1's Qt Mobility APIs

    You should instead use the Mobility 1.1.0 examples, I just checked with my n8 that it is now again working just fine.

  3. #3
    Registered User
    Join Date
    Feb 2011
    Posts
    8

    Re: Camera API missing from Qt SDK 1.1's Qt Mobility APIs

    Thanks for the reply.

    Do you know how to access the Mobility APIs specifically the Camera APIs in qt creator? Im currently using the Qt SDK 1.1.

    I tried to include it to the .pro file:
    config += mobility
    mobility += multimedia \ qcamera

    But i can't seem to #include<QCamera> and when i force to #include<QCamera> and build the project, it says that there is no such file.

    I've been trying to solve this for three whole days, I hope you can help me with this.

  4. #4
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Camera API missing from Qt SDK 1.1's Qt Mobility APIs

    camera is part of multimedia so no need to add it separately. anyway, I would still suggest on finding the latest mobility examples, I suppose you could get them from: http://labs.qt.nokia.com/2011/03/01/...-1-1-released/

  5. #5
    Regular Contributor
    Join Date
    May 2010
    Posts
    362

    Re: Camera API missing from Qt SDK 1.1's Qt Mobility APIs

    There seems to be a bug in QtCreator where <QCamera> is not found by the editor when building for Symbian target.

    The project should still build properly, but of course developing is difficult without code completion.

    I suggest you include the following in your .pro file:
    Code:
    INCLUDEPATH+=../../src/multimedia
    Then change your project target to be "Simulator".
    The <QCamera> should now be found by the editor and you can continue write your code.

    When you want to test on device, simply change to the Symbian target.

    Note: Do Build->Clean whenever changing to Symbian target. Qt SDK 1.1 is still a beta and there seems to be some issues with old code being stuck on Symbian builds.

    Let us know if this helps!

  6. #6
    Registered User
    Join Date
    Feb 2011
    Posts
    8

    Re: Camera API missing from Qt SDK 1.1's Qt Mobility APIs

    Thanks symbianyucca and teemup for the replies.

    I found out that:

    1. The .pro file should have this code to include the mobility APIs to the project:

    CONFIG += mobility
    MOBILITY = multimedia

    2. The target should be set to Qt Simulator for MinGW 4.4 (Qt SDK)

    Now with this settings, the Qt Creator can detect the APIs and can code complete already.

    I have a new problem right now:
    1. I have successfully built and created a sis file of my application underdevelopment without the camera functionalities yet, and it successfully run on an actual device Nokia C7.
    2. Now i want to include the camera capablities to my code, so i downloaded Qt Mobility 1.1.0 examples for me to study.
    3. I found that there is a 'camera' example within the package of Qt Mobility 1.1.0.
    4. I successfully built it and it is successfully running in the Qt Simulator.
    5. Now i want to make a sis file of the camera example and test it on an actual device (Nokia C7)
    6. The build function for Symbian Device (Qt 4.7.2 for Symbain^3) built successfully
    7. Since the create sis file step is moved to the run function of Qt SDK 1.1 (it was on the build function on 1.0), i have to press the run button to be able to create a sis file (i already dropped the deploy step).
    8. Now when i run it, it fails to create the sis file, here is the compile output:
    Running build steps for project camera...
    Configuration unchanged, skipping qmake step.
    Starting: "C:\QtSDK\Symbian\SDKs\Symbian3Qt472\epoc32\tools\make.exe" debug-gcce -w
    C:\QtSDK\Symbian\SDKs\Symbian3Qt472\epoc32\tools\make.exe: Entering directory `C:/QtProjects/camera'
    sbs -c arm.v5.udeb.gcce4_4_1

    no warnings or errors

    built 'arm.v5.udeb.gcce4_4_1'

    Run time 2 seconds

    sbs: build log in C:\QtSDK\Symbian\SDKs\Symbian3Qt472\epoc32\build\Makefile.2011-03-03-12-58-03.61-2720.log
    C:\QtSDK\Symbian\SDKs\Symbian3Qt472\epoc32\tools\make.exe: Leaving directory `C:/QtProjects/camera'
    The process "C:\QtSDK\Symbian\SDKs\Symbian3Qt472\epoc32\tools\make.exe" exited normally.
    Starting: "C:\QtSDK\Symbian\SDKs\Symbian3Qt472\epoc32\tools\make.exe" sis in C:/QtProjects/camera
    make -f Makefile ok_sis MAKEFILES=.make.cache
    make[1]: Entering directory `C:/QtProjects/camera'
    createpackage -g camera_template.pkg DEBUG-armv5
    Auto-patching self-signed package.

    Patching package file and relevant binaries...

    Patching: Executable with capabilities incompatible with self-signing detected: "camera_patched_caps.exe". (Incompatible capabilities: "ReadDeviceData", "WriteDeviceData".) Reducing capabilities is only supported for libraries.

    Patching: Unable to patch the package for self-singing.
    Use a proper developer certificate for signing this package.

    make[1]: Leaving directory `C:/QtProjects/camera'
    ERROR: Automatic patching failed at C:\QtSDK\Symbian\SDKs\Symbian3Qt472\bin\createpackage.pl line 357.
    make[1]: *** [ok_sis] Error 2
    C:\QtSDK\Symbian\SDKs\Symbian3Qt472\epoc32\tools\make.exe: *** [sis] Error 2
    The process "C:\QtSDK\Symbian\SDKs\Symbian3Qt472\epoc32\tools\make.exe" exited with code 2.
    Error while building project camera (target: Symbian Device)
    When executing build step 'Create SIS Package'

    Does anyone know what i have to do? Take note that i successfully created a sis file with my own applications using these steps. It only failed for the camera example provided in the Qt Mobility 1.1.0 package.

  7. #7
    Regular Contributor
    Join Date
    May 2010
    Posts
    362

    Re: Camera API missing from Qt SDK 1.1's Qt Mobility APIs

    Are you sure the example is located in C:/QtProjects/camera?

    Normal step here is, when changing the project to build, do Build->Clean and then Right click the project and "run qmake".
    Then try again.

    Just to make sure

  8. #8
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,166

    Re: Camera API missing from Qt SDK 1.1's Qt Mobility APIs

    it is complaining for the self-signed certificate there, basically you can not get that working without a developer certificate, thus can you setting the developer certificate in run settings and see whether it helps on this.

  9. #9
    Registered User
    Join Date
    Sep 2010
    Posts
    3

    Re: Camera API missing from Qt SDK 1.1's Qt Mobility APIs

    I solved by following way :

    click Projects Page, select "Run" under symbian devices, change from self-signed to cert-sign by using your own certificate and key.

  10. #10
    Regular Contributor
    Join Date
    May 2010
    Posts
    362

    Re: Camera API missing from Qt SDK 1.1's Qt Mobility APIs

    It is not really a solution if you don't have a certificate and key.

    The example used is unfortunately very outdated.
    I didn't look it before, but now when I did - you really shouldn't use it.

    You should try this one https://projects.forum.nokia.com/qcamera/ instead.

    It doesn't ask for all those un-necessary capabilities.

  11. #11
    Registered User
    Join Date
    Oct 2008
    Posts
    20

    Re: Camera API missing from Qt SDK 1.1's Qt Mobility APIs

    Quote Originally Posted by leong.nuthon View Post
    I solved by following way :

    click Projects Page, select "Run" under symbian devices, change from self-signed to cert-sign by using your own certificate and key.
    You should let it self-signed and just comment ReadDeviceData and WriteDeviceData.

    Code:
        TARGET.CAPABILITY = NetworkServices \
            ReadUserData \
            WriteUserData \
            LocalServices \
            UserEnvironment #\
            #ReadDeviceData \
            #WriteDeviceData
    Anyway, like teemup said that's a very outdated example. I patched the code till it compiled and also got it deployed. I was more interested on how it overlays captured image over viewfinder.

    Andy

  12. #12
    Registered User
    Join Date
    Nov 2010
    Posts
    32

    Re: Camera API missing from Qt SDK 1.1's Qt Mobility APIs

    The QCamera example on ForumNokia:
    https://projects.forum.nokia.com/qcamera/
    ...is using QVideoRendererControl for showing the viewfinder.
    That is not the optimal way if one only wants to show the viewfinder, not to access the viewfinder data.
    That was used there as a workaround to a viewfinder bug on QtMobility 1.1.0.

    The better way for a basic case is used in the camera example in QtMobility which is QCameraViewfinder (i.e. QVideoWidget) based.

    The issue there, as mentioned are the ReadDevideData and WriteDeviceData capabilities which cannot be self-signed.
    One can change those to ReadUserData and WriteUserData and rebuild/self-sign and the app should work.

    Alternatively, one can use proper certificates that allow signing for those capabilities.

Similar Threads

  1. Qt Mobility API not working with Nokia Qt SDK + incomplete docs
    By remy_david in forum [Archived] Qt Mobility Project
    Replies: 15
    Last Post: 2011-06-10, 14:38
  2. Qt SDK 1.1 TP issue with Mobility/Camera
    By charshep in forum [Archived] Qt SDKs and Tools
    Replies: 4
    Last Post: 2011-03-14, 15:03
  3. Replies: 1
    Last Post: 2011-01-05, 15:28
  4. Replies: 3
    Last Post: 2010-06-30, 01:17
  5. Nokia Qt SDK missing QT Mobility - messaging
    By Zeddeh in forum [Archived] Qt SDKs and Tools
    Replies: 5
    Last Post: 2010-06-07, 08:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×