openfx icon indicating copy to clipboard operation
openfx copied to clipboard

New timeline suite

Open MrKepzie opened this issue 6 years ago • 2 comments

Standard version: 1.4.1 (Should be set as 1.4.1 milestone by @garyo)

Subcommittee

Pierre Jasmin @revisionfx (Their Github user account (if any) should be set to assignees by @garyo)

Overview

Todo by @revisionfx

Solution

typedef struct OfxTimeLineSuiteV2 {

  OfxStatus  (*getProjectTime)(void *instance, double EffectTime,  double *ProjectTime); 
// converts what host displays in it's user interface to local effect time, could be a large number if host project starts at 12:00:00:00)

 OfxStatus  (*getEffectTrimPoints)(void *instance, double *InPoint, double *OutPoint);
//  for example in an NLE this refers to In and out point handles of the video track on which the effect is applied, this is in effects local time. This is different then frame range and 0 to Duration.
 
 OfxStatus  (*gotoEffectTime)(void *instance, double *time);  // this is in effects local time, if one asks to go to time -5000, it might not be defined
// because of this not being supported a lot, this is example of wanting to check if function pointer is NULL as means of seeing if supported

} OfxTimeLineSuiteV2;

For simplification assuming we have effect time which is normalized to 0 to Duration. That effect lives in a Project timeline (Project here is whatever embeds the effect, in one host it could be called a comp for example). And that effect has source clips.

For context: The effect space is also normalized in terms of frame time (+1 is next frame in effects space, and +0.5 is next field when it applies actually kOfxImageEffectPropFrameStep). We also have a specifier for that: kOfxImageEffectPropFrameStep (read only for effects). And we have a parallel Frame Range mechanism in API as well.

getEffectTrimPoints (for example returns the in and out point in an NLE, distinct from 0 to Duration valid frames) : if user changes those, should produce an instance changed prop reason. Of course actions like a razor cut or what happens in a pre-comp or nested sequence etc can reset what is Effect first frame.

getProjectTimelineTime: Theorically the double parameter OFX time is supposed to be allowing us to let the user see that - I would like to display time (in Frames at least) in an info non-animated slider or something so user sees time in the same unit as host displays current time. Would pass effect time and get Project time:

getProjectTimelineStartTimeInFrames -- provides an offset in frame (our effect local time is normalized to 0 is first frame so maybe this is implicit mapped via the effect to timeline conversion and NOT NEEDED

Question 1: Then what is getTimeBounds... is there a use case for a Global (to effect) time bound (e.g. needing to know the Project time bounds)? In other words: is getEffectTrimPoints == getTimeBounds?

Question 2: If we have getProjectTime I don't think we need getTime as we can pass Effect Current time

MrKepzie avatar Oct 12 '17 11:10 MrKepzie