| |||
| [Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] |
When are you querying the duration? These files take a few seconds to import, and the duration reported by QTKit will vary depending on how much of the file has been imported when you ask it. My guess is that that is what is happening. If you wait until the movie loading has completed, you should get the correct duration.Oh. Somehow I completely missed the fact that there were asynchronous import components. For some reason this never bit me before using the QT API (I guess because I always let QuickTime do its magic rather than manually configuring an import component). So I assumed this must be some new and advanced QTKit behavior.
As for the extra track, I think that that is an artifact of the importing process. Once again, if you wait until the importing process is complete, QTKit should report only one track. Just like QuickTime Player.
So the bottom line is this: when you open a file that requires an idling importer, you should make sure that the movie has completely loaded (by looking at the load state) if you need the "real" information vis-a-vis duration or the kind and number of tracks in the movie. If that's too much trouble, then you can just open the movie synchronously. I'd bet that you get the results you expect if you add this key/value pair to the dictionary passed to movieWithAttributes:
Oh duh. I must have read right over that part of the docs 10 times or more without having it click. I feel stupid now. Yes, that is exactly what I want.[NSNumber numberWithBool:NO], QTMovieOpenAsynchOKAttribute
Thanks for the help!
Derrick
_______________________________________________ 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
| Home | Archives | FAQ | Terms/Conditions | Contact | RSS | Lists | About |
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.