ADC Home > Reference Library > Reference > Apple Applications > Final Cut Pro/Final Cut Express > FxPlug Reference

 


FxHostCapabilities

Superclass:
Declared In:

Introduction

A source of information about the plug-in host environment

Discussion

A plug-in can use this class to query the capabilities and unique characteristics of the host environment.

IMPORTANT: This class was introduced in FxPlug version 1.1. If you reference this class in a plug-in, then it will link and be usable only if version 1.1 or later of FxPlug.framework is installed. Consequently, if you use this class, you should either (1) make your plug-in's installer require that FxPlug 1.1 or later is present (and alert the user to run Software Update if it's not), or (2) retrieve the class by name using a string literal, like so:

Class theClass = NSClassFromString( @"FxHostCapabilities" );
id hostCaps = [[theClass alloc] initWithAPIManager:_apiManager];
if ( [hostCaps supportsHiddenParameters] )
	{ ... }



Methods

-formatsFloatRGBABitmapsAsARGB
Indicates whether or not the host application formats 32-bit float RGBA bitmaps as ARGB
-glContextPixelFormatAttributes
Returns the list of pixel format attributes used to create the GL context
-hostID
Returns the host ID string
-hostIsFCE
Indicates whether or not the host is Final Cut Express
-hostIsFCP
Indicates whether or not the host is Final Cut Pro
-hostIsMotion
Indicates whether or not the host is Motion
-hostVersionNumber
Returns the host version number
-initWithAPIManager:
Initializes the FxHostCapabilities object with the given API Manager
-notifiesParameterChangedForGenerators
Indicates whether or not the host application calls the -parameterChanged: method for generator effects
-parameterChangedUsableForAllParameters
Indicates whether or not the -parameterChanged: method is usable for all parameter types (rather than only for custom parameters)
-supportsDisabledParameters
Indicates whether or not the host application heeds the flag kFxParameterFlag_DISABLED
-supportsGroupParameters
Indicates whether or not the host application supports group parameters
-supportsHiddenParameters
Indicates whether or not the host application heeds the flag kFxParameterFlag_HIDDEN
-supportsTemporalBitmaps
Indicates whether or not the host application returns trustworthy bitmaps for FxTemporalImageAPI and image well parameters
-timeBase
Indicates whether the time values used by the host application are relative or absolute
-upscalesFields
Indicates whether or not the host application vertically upscales single fields to full-frame dimensions

formatsFloatRGBABitmapsAsARGB


Indicates whether or not the host application formats 32-bit float RGBA bitmaps as ARGB

- (BOOL)formatsFloatRGBABitmapsAsARGB; 
Discussion

If this method returns NO, then all bitmaps and textures will have the correct pixel component order.


glContextPixelFormatAttributes


Returns the list of pixel format attributes used to create the GL context

- (NSArray *)glContextPixelFormatAttributes; 
Return Value

An NSArray of NSNumbers, each of which is a CGPixelFormatAttribute value.

Discussion

This method allows a plug-in to create GL contexts that are compatible with those created by the host application. A plug-in typically puts the values for each element of the returned array into an C-style zero-terminated array of CGPixelFormatAttributes, and passes a pointer to that array to CGLChoosePixelFormat(). It then passes the CGLPixelFormatObj returned by that function to CGLCreateContext() and then to CGLDestroyPixelFormat().


hostID


Returns the host ID string

- (NSString *)hostID; 
Return Value

A string that defines the host, e.g. @"com.apple.motion" or @"com.apple.FinalCutPro"

Discussion

Normally a plug-in should not call this method. It should use one of the specific feature check methods, if available. If no feature check method is available, the plug-in should usually use -hostIsFCP, -hostIsFCE, or -hostIsMotion.


hostIsFCE


Indicates whether or not the host is Final Cut Express

- (BOOL)hostIsFCE; 
Return Value

YES, if the host is Final Cut Express.

Discussion

Normally a plug-in should not call this method. It should use one of the specific feature check methods, if available.


NOTE: This method was added in FxPlug version 1.2. If there is a chance that your plug-in will run on an earlier version of the FxPlug framework, then you should only call this if this method returns YES: [FxHostCapabilities respondsToSelector:@selector(hostIsFCE)]


hostIsFCP


Indicates whether or not the host is Final Cut Pro

- (BOOL)hostIsFCP; 
Return Value

YES, if the host is Final Cut Pro.

Discussion

Normally a plug-in should not call this method. It should use one of the specific feature check methods, if available.


hostIsMotion


Indicates whether or not the host is Motion

- (BOOL)hostIsMotion; 
Return Value

YES, if the host is Motion.

Discussion

Normally a plug-in should not call this method. It should use one of the specific feature check methods, if available.


hostVersionNumber


Returns the host version number

- (UInt32)hostVersionNumber; 
Return Value

A longword that identifies the version number of the host application. For example, 0x01230000 would be version 1.2.3.

Discussion

Normally a plug-in should not call this method. It should use one of the specific feature check methods, if available. If no feature check method is available, the plug-in should usually use -hostIsFCP, -hostIsFCE, or -hostIsMotion.


initWithAPIManager:


Initializes the FxHostCapabilities object with the given API Manager

- (id)initWithAPIManager:(id)apiManager; 
Parameters
apiManager
The API Manager.
Return Value

The initialized FxHostCapabilities object.

Discussion

This is the designated initializer for the FxHostCapabilities class. You should always use this initializer method rather than -init.


notifiesParameterChangedForGenerators


Indicates whether or not the host application calls the -parameterChanged: method for generator effects

- (BOOL)notifiesParameterChangedForGenerators; 
Discussion

In FxPlug 1.0, the -parameterChanged: was part of the FxFilter protocol. In 1.1, it was moved into the parent FxBaseEffect protocol. Consequently, host apps that support only the FxPlug 1.0 SDK will call the -parameterChanged: method for filters, but not for generators. If this method returns NO, then -parameterChanged: will be called for all types of effects.


parameterChangedUsableForAllParameters


Indicates whether or not the -parameterChanged: method is usable for all parameter types (rather than only for custom parameters)

- (BOOL)parameterChangedUsableForAllParameters; 
Discussion

If this method returns NO, then -parameterChanged: is usable only for custom parameter types (or, more accurately, the FxActionAPI is inaccessible for standard parameter types, so you can't use change notification to modify parameter settings). If YES, then -parameterChanged is usable for all parameter types.


supportsDisabledParameters


Indicates whether or not the host application heeds the flag kFxParameterFlag_DISABLED

- (BOOL)supportsDisabledParameters; 
Discussion

If this method returns NO, then parameter disabling is supported.


supportsGroupParameters


Indicates whether or not the host application supports group parameters

- (BOOL)supportsGroupParameters; 
Discussion

If this method returns NO, then group parameters, as well as the kFxParameterFlag_COLLAPSED parameter flag, are supported. If it returns YES, then the methods -startParameterSubGroup: and -endParameterSubGroup: will be ignored.


supportsHiddenParameters


Indicates whether or not the host application heeds the flag kFxParameterFlag_HIDDEN

- (BOOL)supportsHiddenParameters; 
Discussion

If this method returns NO, then parameter hiding is supported.


supportsTemporalBitmaps


Indicates whether or not the host application returns trustworthy bitmaps for FxTemporalImageAPI and image well parameters

- (BOOL)supportsTemporalBitmaps; 
Discussion

If this method returns NO, then bitmap images returned by the FxTemporalImageAPI, and by the -getBitmap: method in the FxParameterRetrievalAPI protocol, may have incorrect pixel aspect or pixel size, or other problems. If this is the case, and if you need to use imageReference parameters or FxTemporalImageAPI, then you should restrict your plug-in to using only textures, by setting the canRenderSoftware value to NO in your -frameSetup: method.


timeBase


Indicates whether the time values used by the host application are relative or absolute

- (FxTimeBase)timeBase; 
Discussion

If this method returns kFxTimeBase_TIMELINE, then times are absolute frame numbers, where zero is the start of the timeline. If it returns kFxTimeBase_CLIP, then times are "clip-relative," meaning that zero is the start of the "clip." For generators and transitions, the clip is the effect itself. For filters, the clip is the video item to which the filter is applied.


NOTE: Other FxTimeBase values could be added in the future, so you should not assume that the only valid values are kFxTimeBase_TIMELINE and kFxTimeBase_CLIP.


upscalesFields


Indicates whether or not the host application vertically upscales single fields to full-frame dimensions

- (BOOL)upscalesFields; 
Discussion

Motion upscales single fields to full-frame dimensions (and this method returns YES). Final Cut does not upscale single fields (and this method returns NO).


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.
Last Updated: 2008-06-05