Qml video problem ...



  • Hi everybody,

    I'm developping a simple application which play a video with QtMultimediaKit in Symbian, the application works well when i play, pause or stop the video but when i hide the application in background (on the device) and get back, the video is stopped and does'nt play again and gave the error number 5 : Problem blitting video to display.
    I'm using QT Creator version Qt 4.7.4 and testing the application in Nokia C7.

    Thank you in advance for your help.
    @ Video{
    id:videoPlay
    volume: 1.0
    anchors.fill: videoRect
    source: "Video/jamal.wmv"
    onStopped: {isVideoPause=true; console.log("video stopped !!!")}
    onError: console.log("error code : "+videoPlay.error+", Error string : "+videoPlay.errorString)
    focus: true
    }@



  • When a QQuickWindow instance is deliberately hidden with hide() or setVisible(false), it will stop rendering and its scene graph and OpenGL context might be released. The sceneGraphInvalidated() signal will be emitted when this happens. "QQuickWindow Exposure and Visibility":http://qt-project.org/doc/qt-5.0/qtquick/qquickwindow.html#exposure-and-visibility



  • Thank you Moeg687 for your reply.
    What i understood is that i could prevent this problem by catching the signal sceneGraphInvalidated() ?



  • No. This signal is emitted when the scene graph has been invalidated.
    This signal implies that the opengl rendering context used has been invalidated and all user resources tied to that context should be released.

    The signal just informs you that the scene graph has been invalidated and that the OpenGL context has been released.

    Have a look at this "page.":http://doc-snapshot.qt-project.org/5.0/qtgui/qopenglcontext.html. If the context is temporarily not needed, such as when the application is not rendering, it can be useful to call destroy() to free resources. However, if you do so you will need to call create() again before the context can be used, and you might need to recreate any OpenGL resources and reinitialize the OpenGL state. You can connect to the aboutToBeDestroyed() signal to clean up any resources that have been allocated with different ownership from the QOpenGLContext itself.

    Have you confirmed that this is in fact your problem. Have you checked that this signal is being emitted? If not then my suggestions might not be so helpful.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.