开发者

QTMovie opened movie successfully?

开发者 https://www.devze.com 2023-03-27 10:30 出处:网络
Is there any way to detect whether QTMovie successfully loaded a movie? I.E. whether a valid component is found?

Is there any way to detect whether QTMovie successfully loaded a movie? I.E. whether a valid component is found?

Or even better enumerate the components on launch and detect then what c开发者_C百科omponents have been loaded without having to provide a sample movie?

Thanks.


Have you read the QTMovie API reference? When you try to create a QTMovie object, you'll get either a valid movie object or nil. If you make use of the NSError argument (that's included on all the initializers/factory methods that create movies from files/URLs), you'll even get an explanation of what went wrong if the method returns nil. Also in that reference (handily categorized in the Tasks section), are a number of ways to get pretty much any information about the movie you want.

Regarding the "components" part of your question, I don't think QTKit gives you access to this directly. You might have to use the QuickTime.framework and dive deeper. You might be able to figure out whether your third-party-supported file type is actually supported by using the +[QTMovie movieFileTypes:] method (also found in the API reference I linked) and seeing if your file's extension appears there.

0

精彩评论

暂无评论...
验证码 换一张
取 消