Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    QMovie jumpToFrame() API and CacheAll mode related problem

    Mobile and Embedded
    2
    6
    1527
    Loading More Posts
    • 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.
    • B
      buggood last edited by

      Dear All,

      I am trying to use QMovie to play some .gif animation. Regarding the FastForward and Rewind function support, QMovie::jumpToFrame API is used. In order to make this API work properly, we have to enable the QMovie::cacheall mode. The problem is when we enable CacheAll, there will be memory leak. It seems someone else report the same problem but there is no solution. (Sorry I have not posted the bug number or link here).

      So does anyone have a good solution for this QMovie problem or any good suggestion on alternatives for playing .gif in Qt?

      Thanks and Regards,
      Jeff

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi and welcome to devnet,

        Can you explain more about that memory leak ? At least the link to the exact bug report would be a good thing.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        1 Reply Last reply Reply Quote 0
        • B
          buggood last edited by

          Hi,

          Maybe I should not call it memory leak. For the cacheall mode, the whole content of the .gif will be cached in the memory. This buffering process occur when you play/fastforward/rewind and it took some time. So you will see the memory usage increase continuously till a very big value( for a 60M gif, it will increase to 900M).

          Regards,
          Jeff

          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            What kind of gif are you loading ?

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            1 Reply Last reply Reply Quote 0
            • B
              buggood last edited by

              I think the QMovie should improve its cacheing method instead of limiting the user usage of .gif file.

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                That doesn't answer my question, what kind of gif is it ? What are the image characteristics ? A 60M file looks like a very big animated gif so it might not be the best format for such an animation.

                QMovie caches each frame of your gif in a format suitable for displaying. If you think it's not optimum you are welcome to improve the class.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                1 Reply Last reply Reply Quote 0
                • First post
                  Last post