Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

QTMovie currentFrameImage is slow



How do I get a movie frame without everything grinding to a halt? Here's what I'm trying to do:


long long pos = 0; long long end = [movie duration].timeValue; NSImage* image; while(pos < length) {

// Add an autorelease pool so we don't end up with loads of unreleased NSImage*s in the loop.
NSAutoreleasePool* pool = [[NSAutoreleasePool alloc] init];


  // This line causes the trouble.
  image = [movie currentFrameImage];

  [movie stepForward];
  pos = [movie currentTime].timeValue;

  [pool release];
}



Without the line 'image = [movie currentFrameImage];' the loop finishes in about two seconds for a sixteen second movie. With the line it takes nearly 350 seconds. Why so slow? How can I get movie frames at a reasonable rate?
_______________________________________________
Do not post admin requests to the list. They will be ignored.
QuickTime-API mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quicktime-api/email@hidden


This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.