Results 1 to 3 of 3

Thread: Problem with QMovie

  1. #1
    Join Date
    Jan 2006
    Posts
    162
    Thanks
    9
    Qt products
    Qt3
    Platforms
    Windows

    Default Problem with QMovie

    Hi !

    I'm trying to use a QMovie object to dislpay animation files ith extension .mng.

    I First tryed without using double buffering. Here is a part of my code implemented in a SLOT connected using the QMovie::connectStatus function :
    Qt Code:
    1. case(QMovie::EndOfFrame):
    2. frame->setPixmap(movie->framePixmap());
    3. break;
    To copy to clipboard, switch view to plain text mode 

    As the result was flicker, I decided to use double buffering. Here is the updated code (in the smae function) :
    Qt Code:
    1. case(QMovie::EndOfFrame):
    2. {
    3. QPixmap pix(movie->framePixmap());
    4. QRect rect(0, 0, pix.width(), pix.height());
    5. bitBlt(frame, rect.topLeft(), &pix, rect);
    6. }
    7. break;
    To copy to clipboard, switch view to plain text mode 

    I have two problems :
    1. When trying to display big animations the first frame is displayed partially and the others are not displayed, and I can read in the debug traces the following message :
    Qt Code:
    1. MNG error 11: (null); chunk IDAT; subcode 0:0
    To copy to clipboard, switch view to plain text mode 
    So what's wrong ?

    2. In order to display big animations, I tryed to use a small one and then to resize it, but the result is not the one I expected : the pixmap size is resized but its content is not stretch, why ?

    Thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Posts
    162
    Thanks
    9
    Qt products
    Qt3
    Platforms
    Windows

    Default Re: Problem with QMovie

    I also have another problem, sometimes my program crashes due to an Access Violation in MSVCRT.DLL, someone could help me to find out why ?

  3. #3
    Join Date
    Feb 2006
    Location
    New Delhi,India
    Posts
    226
    Thanks
    14
    Thanked 4 Times in 4 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: Problem with QMovie

    Quote Originally Posted by yellowmat
    I also have another problem, sometimes my program crashes due to an Access Violation in MSVCRT.DLL, someone could help me to find out why ?

    One possible cause of this error is that the application has written past the block of memory that is owned by a particular object. The small-block heapmemory manager that ships with the Visual C++ 6.0 run-time libraries incorporates heap control structures within the small-block heap. Overwriting the memory block changes small-block heap pointer addresses, effecting a bad pointer and possibly a fault in Msvcrt.dll when the pointer is referenced.

    MAke sure that the memory allocated is greater than the size of the object...
    Last edited by Kapil; 30th March 2006 at 09:30.

Similar Threads

  1. Very strange socket programming problem
    By montylee in forum Qt Programming
    Replies: 5
    Last Post: 11th November 2008, 12:05
  2. Weird problem: multithread QT app kills my linux
    By Ishark in forum Qt Programming
    Replies: 2
    Last Post: 8th August 2008, 09:12
  3. Steps in solving a programming problem?
    By triperzonak in forum General Programming
    Replies: 8
    Last Post: 5th August 2008, 08:47
  4. problem with paint and erase in frame
    By M.A.M in forum Qt Programming
    Replies: 9
    Last Post: 4th May 2008, 20:17
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.