Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. QMovie jumpToFrame() API and CacheAll mode related problem
Forum Updated to NodeBB v4.3 + New Features

QMovie jumpToFrame() API and CacheAll mode related problem

Scheduled Pinned Locked Moved Mobile and Embedded
6 Posts 2 Posters 2.0k Views 1 Watching
  • 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 Offline
    B Offline
    buggood
    wrote on last edited by
    #1

    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
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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
      0
      • B Offline
        B Offline
        buggood
        wrote on last edited by
        #3

        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
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          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
          0
          • B Offline
            B Offline
            buggood
            wrote on last edited by
            #5

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

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              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
              0

              • Login

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