×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Oct 2009
    Posts
    82

    Strange problem with QCamera / Qt Creator

    When I run my application through Qt Creator everything runs fine.
    But if I run it through icon or start with command line, the camera never starts up properly.

    Code:
    camera State Change: QCamera::ActiveState 
    loaded the Generic plugin 
    loaded the grue plugin 
    Loaded the MeeGo sensor plugin 
    hijackWindow() context created for QmlApplicationViewer(0xaea90ab0) 1 
    Found SGX/MBX driver, enabling FullClearOnEveryFrame 
    Found v1.4 driver, enabling brokenTexSubImage 
    QGLWindowSurface: Using plain widget as window surface QGLWindowSurface(0x1fb009a8) 
    virtual GstElement* QGstreamerGLTextureRenderer::videoSink() : Fallback to QVideoSurfaceGstSink since EGLImageTextureHandle is not supported 
    camera status change:  QCamera::StartingStatus
    So the last line of the above log does not appear when not hooked up to qtcreator.

    I'm setting my own QAbstractVideoSurface which start() method gets called after camera status changes, but again for me it only happens if running through qtcreator.

    To me this looks some sort of race condition, but I'm at loss how to go around it. Does this ring a bell?
    Grego
    http://mpaja.com/

  2. #2
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: Strange problem with QCamera / Qt Creator

    Hi

    it looks like there is timing problem but not race condition. Please check sample applications available in QCreator from "welcome page" then select "demo and examples" page , then type in search text input bar "camera" . There are several examples available.

  3. #3
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: Strange problem with QCamera / Qt Creator

    Hi,

    There was this issue that you have posted observed with the qcamera example in the demos folder of qtmobility too.
    It was running fine on symbian devices but not on meego/harmattan.

    I have raised a bug in Jira for this sometime back. It is here

    There is a wiki article for the same giving a workaround for this issue. Its well written, and should help you.

  4. #4
    Registered User
    Join Date
    Oct 2009
    Posts
    82

    Re: Strange problem with QCamera / Qt Creator

    Quote Originally Posted by izinin View Post
    Hi

    it looks like there is timing problem but not race condition. ...
    Well, race condition is typically a timing problem . Thanks for the pointer to multiple examples though.

    I have code that works, and very similar code that does not work. I was getting tired of pinpointing the difference and hoping for "been there, done that" answer. I'll continue debugging, should be easier with more code to reference.

  5. #5
    Registered User
    Join Date
    Oct 2009
    Posts
    82

    Re: Strange problem with QCamera / Qt Creator

    @kusumk: Nice article. Not my problem though, as my code works with qtcreator, just not alone.

    For uyvy conversion there is ARM Neon optimized code http://paste.kde.org/1486/raw/ and example using it at
    http://kunalmaemo.blogspot.com/2012/...raw-image.html

  6. #6
    Registered User
    Join Date
    Sep 2011
    Posts
    449

    Re: Strange problem with QCamera / Qt Creator

    @grekker: Do you have the necessary aegis tokens required?
    <aegis>
    <request>
    <credential name="GRP::video" />
    <credential name="GRP:ulse-access" />
    <for path="/opt/yourapp/bin/yourapp" />
    </request>
    </aegis>

    Also please take a note if you have done the below too as per the QT sdk release notes

    If you use the QML Camera or Video elements of the Qt Mobility Multimedia API, use QGLWidget as a viewport or the application crashes when swiped. In other words, the main.cpp should look something like this:
    #include
    #include
    #include

    int main(int argc, char *argv[])
    {
    QApplication app(argc, argv);
    QDeclarativeView view;
    view.setViewport(new QGLWidget());
    view.setSource(QUrl("qrc:/qml/main.qml"));
    view.showFullScreen();
    return app.exec();
    }
    Correspondingly, include the following line in the .pro file:
    QT += opengl

Similar Threads

  1. Strange Issue with Qt SDK and Qt Creator
    By ksg91 in forum [Archived] Qt SDKs and Tools
    Replies: 11
    Last Post: 2012-03-27, 05:00
  2. Capturing QCamera image in a separate thread problem
    By s.maks in forum [Archived] Qt Mobility Project
    Replies: 7
    Last Post: 2012-03-22, 13:02
  3. Problem when using QCamera
    By tamnv110 in forum [Archived] Beginning Qt
    Replies: 2
    Last Post: 2011-09-15, 10:54
  4. QCamera::Status vs QCamera::State ?
    By tipul07 in forum Qt
    Replies: 3
    Last Post: 2011-03-07, 23:33
  5. Replies: 7
    Last Post: 2010-07-14, 14:58

Posting Permissions

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