Re: FxPlug Loading Questions
Re: FxPlug Loading Questions
- Subject: Re: FxPlug Loading Questions
- From: Peter Litwinowicz <email@hidden>
- Date: Thu, 10 Jun 2010 09:36:32 -0700
- Thread-topic: FxPlug Loading Questions
Bob,
We also have plug-ins that are not to load in certain earlier versions of
FCP/Motion/FCE.
We test against the version and app in -init and return 0 if the plugin
shouldn't load. Does the trick.
Some example code follows, if you are interested. Note that FCPVERSIONMIN,
etc. are OUR constants, as is kFxPlugHostFCP, etc.
Cheers,
Pete
- (id)initWithAPIManager:(id)apiManager;
{
_apiManager = apiManager;
_canDoHardware = NO;
Class theClass = NSClassFromString( @"FxHostCapabilities" );
id hostCaps = [[theClass alloc] initWithAPIManager:apiManager];
_hostVersion = [hostCaps hostVersionNumber];
_returnsFieldsAsFullFrames = [hostCaps upscalesFields];
_host = kFxPlugHostFCP;
if ([hostCaps hostIsFCP]) {
_host = kFxPlugHostFCP;
}
else if ([hostCaps hostIsFCE]) {
_host = kFxPlugHostFCE;
}
else if ([hostCaps hostIsMotion]) {
_host = kFxPlugHostMotion;
}
if (_host == kFxPlugHostFCP) {
if ( _hostVersion<=FCPVERSIONMIN) {
return 0;
}
}
else if (_host ==kFxPlugHostFCE) {
return 0;
}
else {
return 0;
}
/* do REAL init here */
...
return self;
}
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Pro-apps-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden