Re: QTMovie movieWithFile takes a long time
Re: QTMovie movieWithFile takes a long time
- Subject: Re: QTMovie movieWithFile takes a long time
- From: Tim Monroe <email@hidden>
- Date: Tue, 25 Apr 2006 17:07:54 -0700
On Apr 24, 2006, at 1:43 AM, Pierre-Loïc Raynaud wrote:
I'm not sure if this should be asked to this list or the quicktime
list, but here we go :
The QuickTime API list is often a better bet for QTKit-related issues.
I'm using QTMovie's +movieWithFile:error: to create a QTMovie object
from a file.
For some movies, this can be very long... I have some MPEG2 Movies
(10 min long) on which this call may last over 20 seconds.
(...)
NSString* path = [self valueForKey:@"movieURL"];
QTMovie* myMovie = [QTMovie movieWithFile:path error:&vErr];
(...)
Note that this seems to be "normal", QuickTime player is almost as
slow as my app for openning the document.
By default, +[QTMovie movieWithFile:error:] operates asynchronously,
meaning that it will return almost immediately with a valid QTMovie
object reference. The two lines of code you list simply should not
take 20 seconds to complete. If they really do, then you should file
a bug report and indicate precisely what kind of movie is taking so
long. Do *all* your MPEG2 movies take that long to return from
[QTMovie movieWithFile:error:]?
Perhaps the Quicktime API has some callbacks that I could use and
then use QTMovie's +movieWithQuickTimeMovie ? Or would it be possible
to call QTMovie's +movieWithFile:error from a separate thread and
have an indefinite progressbar running in the main thread ? I don't
know if that call is thread safe.
It is not advisable to open a QTMovie on a background thread.
I'm really curious to see this delay for myself; can you provide a
pointer to some sample movies that exhibit the misbehavior?
Tim Monroe
QuickTime Engineering _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden