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

 


FxTimingAPI

Declared In:

Introduction

Defines the methods provided by the host to allow a plug-in to query the timing properties of its input image(s), image parameters, effect, timeline, and in/out points.

Discussion

This protocol was added in FxPlug framework version 1.2.



Methods

-durationForEffect:
Returns the duration of the given effect.
-durationOfImageParm:forEffect:
Returns the duration of the clip assigned to the given image parameter for the given effect.
-durationOfInputAToTransition:
Returns the duration of the given transition's image input A clip.
-durationOfInputBToTransition:
Returns the duration of the given transition's image input B clip.
-durationOfInputToFilter:
Returns the duration of the given filter's image input clip.
-fieldOrderForImageParm:forEffect:
Return the field order of the image parameter.
-fieldOrderForInputAToTransition:
Return the field order of the transition's first input.
-fieldOrderForInputBToTransition:
Return the field order of the transition's second input.
-fieldOrderForInputToFilter:
Return the field order of the filter input.
-imageTimeForParmId:forEffect:fromTimelineTime:
Returns a time, expressed as a frame number in the time frame of the given image parameter, converted from timeline frames.
-inPointOfTimelineForEffect:
Returns the In Point of the timeline on which the given effect has been applied.
-inputATimeForTransition:fromTimelineTime:
Returns a time, expressed as a frame number in the time frame of the transition's image input A, converted from timeline frames.
-inputBTimeForTransition:fromTimelineTime:
Returns a time, expressed as a frame number in the time frame of the transition's image input B, converted from timeline frames.
-inputTimeForFilter:fromTimelineTime:
Returns a time, expressed as a frame number in the time frame of the filter's image input, converted from timeline frames.
-inputTimeForParmId:forEffect:fromTimelineTime:
Returns a time, expressed as a frame number in the time frame of the given image parameter, converted from timeline frames.
-outPointOfTimelineForEffect:
Returns the Out Point of the timeline on which the given effect has been applied.
-startTimeForEffect:
Returns the start time of the given effect.
-startTimeOfImageParm:forEffect:
Returns the start time of the clip assigned to the given image parameter for the given effect.
-startTimeOfInputAToTransition:
Returns the start time of the given transition's image input A clip.
-startTimeOfInputBToTransition:
Returns the start time of the given transition's image input B clip.
-startTimeOfInputToFilter:
Returns the start time of the given filter's image input clip.
-timelineFpsDenominatorForEffect:
Return the denominator of frame rate of the timeline on which the given effect has been applied.
-timelineFpsNumeratorForEffect:
Return the numerator of frame rate of the timeline on which the given effect has been applied.
-timelineTimeFromImageTime:forParmId:forEffect:
Returns a number of timeline frames, converted from clip frames of the given image parameter in the given effect.
-timelineTimeFromInputATime:forTransition:
Returns a number of timeline frames, converted from clip frames of the transition's image input A.
-timelineTimeFromInputBTime:forTransition:
Returns a number of timeline frames, converted from clip frames of the transition's image input B.
-timelineTimeFromInputTime:forFilter:
Returns a number of timeline frames, converted from clip frames of the filter's image input.

durationForEffect:


Returns the duration of the given effect.

- (double)durationForEffect:(id<FxBaseEffect>)effect; 
Parameters
effect
The plug-in object.
Return Value

The effect's duration, expressed in timeline frames.


durationOfImageParm:forEffect:


Returns the duration of the clip assigned to the given image parameter for the given effect.

- (double)durationOfImageParm:(UInt32)parmId forEffect:(id<FxBaseEffect>)effect; 
Parameters
parmId
The ID of the image parameter.
effect
The plug-in object.
Return Value

The clip's duration, expressed in timeline frames, or the special value kFxDuration_Undefined if the image is empty.


durationOfInputAToTransition:


Returns the duration of the given transition's image input A clip.

- (double)durationOfInputAToTransition:(id<FxTransition>)transition; 
Parameters
transition
The plug-in object.
Return Value

The clip's duration, expressed in timeline frames.


durationOfInputBToTransition:


Returns the duration of the given transition's image input B clip.

- (double)durationOfInputBToTransition:(id<FxTransition>)transition; 
Parameters
transition
The plug-in object.
Return Value

The clip's duration, expressed in timeline frames.


durationOfInputToFilter:


Returns the duration of the given filter's image input clip.

- (double)durationOfInputToFilter:(id<FxFilter>)filter; 
Parameters
filter
The plug-in object.
Return Value

The clip's duration, expressed in timeline frames.


fieldOrderForImageParm:forEffect:


Return the field order of the image parameter.

-(FxFieldOrder)fieldOrderForImageParm:(UInt32)parmId forEffect:(id<FxBaseEffect>)effect; 
Parameters
filter
The plug-in object.
Return Value

An FxFieldOrder value (kFxFieldOrder_PROGRESSIVE, kFxFieldOrder_TOP_FIRST, or kFxFieldOrder_LOWER_FIRST).

Discussion

This method is only meaningful if the image parameter has been assigned a value. To determine whether or not it has, you should first call -durationOfImageParm:forEffect:. If the return value is kFxDuration_Undefined, then the image parameter has not yet been connected.


fieldOrderForInputAToTransition:


Return the field order of the transition's first input.

-(FxFieldOrder)fieldOrderForInputAToTransition:(id<FxTransition>)transition; 
Parameters
filter
The plug-in object.
Return Value

An FxFieldOrder value (kFxFieldOrder_PROGRESSIVE, kFxFieldOrder_TOP_FIRST, or kFxFieldOrder_LOWER_FIRST).


fieldOrderForInputBToTransition:


Return the field order of the transition's second input.

-(FxFieldOrder)fieldOrderForInputBToTransition:(id<FxTransition>)transition; 
Parameters
filter
The plug-in object.
Return Value

An FxFieldOrder value (kFxFieldOrder_PROGRESSIVE, kFxFieldOrder_TOP_FIRST, or kFxFieldOrder_LOWER_FIRST).


fieldOrderForInputToFilter:


Return the field order of the filter input.

-(FxFieldOrder)fieldOrderForInputToFilter:(id<FxFilter>)filter; 
Parameters
filter
The plug-in object.
Return Value

An FxFieldOrder value (kFxFieldOrder_PROGRESSIVE, kFxFieldOrder_TOP_FIRST, or kFxFieldOrder_LOWER_FIRST).


imageTimeForParmId:forEffect:fromTimelineTime:


Returns a time, expressed as a frame number in the time frame of the given image parameter, converted from timeline frames.

See Also:
inputTimeForParmId:forEffect:fromTimelineTime:
- (double)imageTimeForParmId:(UInt32)parmId forEffect:(id<FxBaseEffect>)effect fromTimelineTime:(double)time; 
Parameters
parmId
The parameter ID of the image parameter.
effect
The plug-in object.
time
A time, expressed in timeline frames.
Discussion

The time argument and return value are floating-point frame numbers. For example, the first frame or field of the clip would be expressed as 0.0. The second field of interlaced video would be expressed as 0.5.


inPointOfTimelineForEffect:


Returns the In Point of the timeline on which the given effect has been applied.

- (double)inPointOfTimelineForEffect:(id<FxBaseEffect>)effect; 
Parameters
effect
The plug-in object.
Return Value

The In time, expressed in timeline frames.


inputATimeForTransition:fromTimelineTime:


Returns a time, expressed as a frame number in the time frame of the transition's image input A, converted from timeline frames.

- (double)inputATimeForTransition:(id<FxTransition>)transition fromTimelineTime:(double)time; 
Parameters
transition
The plug-in object.
time
A time, expressed in timeline frames.
Return Value

The converted time, in clip frames.

Discussion

The time argument and return value are floating-point frame numbers. For example, the first frame or field of the clip would be expressed as 0.0. The second field of interlaced video would be expressed as 0.5.


inputBTimeForTransition:fromTimelineTime:


Returns a time, expressed as a frame number in the time frame of the transition's image input B, converted from timeline frames.

- (double)inputBTimeForTransition:(id<FxTransition>)transition fromTimelineTime:(double)time; 
Parameters
transition
The plug-in object.
time
A time, expressed in timeline frames.
Return Value

The converted time, in clip frames.

Discussion

The time argument and return value are floating-point frame numbers. For example, the first frame or field of the clip would be expressed as 0.0. The second field of interlaced video would be expressed as 0.5.


inputTimeForFilter:fromTimelineTime:


Returns a time, expressed as a frame number in the time frame of the filter's image input, converted from timeline frames.

- (double)inputTimeForFilter:(id<FxFilter>)filter fromTimelineTime:(double)time; 
Parameters
filter
The plug-in object.
time
A time, expressed in timeline frames.
Return Value

The converted time, in clip frames.

Discussion

The time argument and return value are floating-point frame numbers. For example, the first frame or field of the clip would be expressed as 0.0. The second field of interlaced video would be expressed as 0.5.


inputTimeForParmId:forEffect:fromTimelineTime:


Returns a time, expressed as a frame number in the time frame of the given image parameter, converted from timeline frames.

See Also:
imageTimeForParmId:forEffect:fromTimelineTime:
- (double)imageTimeForParmId:(UInt32)parmId forEffect:(id<FxBaseEffect>)effect fromTimelineTime:(double)time; 
Parameters
parmId
The parameter ID of the image parameter.
effect
The plug-in object.
time
A time, expressed in timeline frames.
Return Value

The converted time, in clip frames.

Discussion

The time argument and return value are floating-point frame numbers. For example, the first frame or field of the clip would be expressed as 0.0. The second field of interlaced video would be expressed as 0.5.


outPointOfTimelineForEffect:


Returns the Out Point of the timeline on which the given effect has been applied.

- (double)outPointOfTimelineForEffect:(id<FxBaseEffect>)effect; 
Parameters
effect
The plug-in object.
Return Value

The Out time, expressed in timeline frames.


startTimeForEffect:


Returns the start time of the given effect.

- (double)startTimeForEffect:(id<FxBaseEffect>)effect; 
Parameters
effect
The plug-in object.
Return Value

The effect's start time, expressed in timeline frames.


startTimeOfImageParm:forEffect:


Returns the start time of the clip assigned to the given image parameter for the given effect.

- (double)startTimeOfImageParm:(UInt32)parmId forEffect:(id<FxBaseEffect>)effect; 
Parameters
parmId
The ID of the image parameter.
effect
The plug-in object.
Return Value

The clip's start time, expressed in timeline frames.

Discussion

This method is only meaningful if the image parameter has been assigned a value. To determine whether or not it has, you should first call -durationOfImageParm:forEffect:. If the return value is kFxDuration_Undefined, then the image parameter has not yet been connected.


startTimeOfInputAToTransition:


Returns the start time of the given transition's image input A clip.

- (double)startTimeOfInputAToTransition:(id<FxTransition>)transition; 
Parameters
transition
The plug-in object.
Return Value

The clip's start time, expressed in timeline frames.


startTimeOfInputBToTransition:


Returns the start time of the given transition's image input B clip.

- (double)startTimeOfInputBToTransition:(id<FxTransition>)transition; 
Parameters
transition
The plug-in object.
Return Value

The clip's start time, expressed in timeline frames.


startTimeOfInputToFilter:


Returns the start time of the given filter's image input clip.

- (double)startTimeOfInputToFilter:(id<FxFilter>)filter;
Parameters
filter
The plug-in object.
Return Value

The clip's start time, expressed in timeline frames.


timelineFpsDenominatorForEffect:


Return the denominator of frame rate of the timeline on which the given effect has been applied.

- (UInt32)timelineFpsDenominatorForEffect:(id<FxBaseEffect>)effect; 
Parameters
effect
The plug-in object.
Return Value

The denominator of the frame rate.

Discussion

For example, for 29.97-fps video, you might see 1001 for the numerator, and 30000 for the denominator.


timelineFpsNumeratorForEffect:


Return the numerator of frame rate of the timeline on which the given effect has been applied.

- (UInt32)timelineFpsNumeratorForEffect:(id<FxBaseEffect>)effect; 
Parameters
effect
The plug-in object.
Return Value

The numerator of the frame rate.

Discussion

For example, for 29.97-fps video, you might see 1001 for the numerator, and 30000 for the denominator.


timelineTimeFromImageTime:forParmId:forEffect:


Returns a number of timeline frames, converted from clip frames of the given image parameter in the given effect.

- (double)timelineTimeFromImageTime:(double)time forParmId:(UInt32)parmId forEffect:(id<FxBaseEffect>)effect; 
Parameters
time
A time, expressed in clip frames.
parmId
The parameter ID of the image parameter.
effect
The plug-in object.
Return Value

The converted time, in timeline frames.

Discussion

The time argument and return value are floating-point frame numbers. For example, the first frame or field of the clip would be expressed as 0.0. The second field of interlaced video would be expressed as 0.5.


timelineTimeFromInputATime:forTransition:


Returns a number of timeline frames, converted from clip frames of the transition's image input A.

- (double)timelineTimeFromInputATime:(double)time forTransition:(id<FxTransition>)transition; 
Parameters
time
A time, expressed in clip frames.
transition
The plug-in object.
Return Value

The converted time, in timeline frames.

Discussion

The time argument and return value are floating-point frame numbers. For example, the first frame or field of the clip would be expressed as 0.0. The second field of interlaced video would be expressed as 0.5.


timelineTimeFromInputBTime:forTransition:


Returns a number of timeline frames, converted from clip frames of the transition's image input B.

- (double)timelineTimeFromInputBTime:(double)time forTransition:(id<FxTransition>)transition; 
Parameters
time
A time, expressed in clip frames.
transition
The plug-in object.
Return Value

The converted time, in timeline frames.

Discussion

The time argument and return value are floating-point frame numbers. For example, the first frame or field of the clip would be expressed as 0.0. The second field of interlaced video would be expressed as 0.5.


timelineTimeFromInputTime:forFilter:


Returns a number of timeline frames, converted from clip frames of the filter's image input.

- (double)timelineTimeFromInputTime:(double)time forFilter:(id<FxFilter>)filter; 
Parameters
time
A time, expressed in clip frames.
filter
The plug-in object.
Return Value

The converted time, in timeline frames.

Discussion

The time argument and return value are floating-point frame numbers. For example, the first frame or field of the clip would be expressed as 0.0. The second field of interlaced video would be expressed as 0.5.

#defines


kFxDuration_Undefined


A special duration value indicating an undefined duration.

private

#define kFxDuration_Undefined -1.0
Discussion

This value is returned by the method -durationOfImageParm:forEffect: if the given image parameter has not yet been assigned a value.


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