Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Qml video problem ...

Qml video problem ...

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 2 Posters 1.6k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Summer
    wrote on last edited by
    #1

    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
    }@

    1 Reply Last reply
    0
    • M Offline
      M Offline
      melghawi
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • S Offline
        S Offline
        Summer
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0
        • M Offline
          M Offline
          melghawi
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved