Legacy Callback Suites¶
piSuites¶
These callbacks are available to all plugins, although many of these callbacks are only appropriate for specific plugin types.
typedef struct {
int piInterfaceVer;
PlugMemoryFuncsPtr memFuncs;
PlugWindowFuncsPtr windFuncs;
PlugppixFuncsPtr ppixFuncs;
PlugUtilFuncsPtr utilFuncs;
PlugTimelineFuncsPtr timelineFuncs;
} piSuites, *piSuitesPtr;
|
Member |
Description |
|---|---|
|
|
API version |
|
Pointer to memory functions |
|
|
Pointer window functions |
|
|
Pointer PPix functions |
|
|
Pointer to utility functions. |
|
|
Pointer to timeline functions |
Memory Functions¶
Memory and handle allocation. Where possible, use the PPix Creator Suite for PPix-specific allocation.
Strings passed to and from Premiere in API structures are always null-terminated C strings.
|
Function |
Description |
|---|---|
|
|
Allocates a block of memory, returns a pointer to the new block. |
|
|
Equivalent to newPtr, but initializes the memory to 0. |
|
|
Resizes an allocated memory block. |
|
|
Returns size in bytes of an allocated memory block. |
|
|
Frees an allocated memory block. |
|
|
Allocates a block of memory, returning a handle to it. |
|
|
Equivalent to newHandle, but initializes the memory to 0. |
|
|
Resizes an allocated memory handle. |
|
|
Returns the size (in bytes) of an allocated block. |
|
|
Disposes of a previously allocated handle. |
|
|
These legacy functions are deprecated and should no longer be used. |
Window Functions¶
Window management routines. Superceded by the Window Suite.
|
Function |
Description |
|---|---|
|
|
Updates all windows. Windows only, doesn't work on Mac OS. |
|
|
Returns the main application HWND. |
PPix Functions¶
Used to manipulate a PPix. Superceded by the PPix Creator Suite for PPix allocation and the PPix Suite for general PPix functions.
|
Function |
Description |
|---|---|
|
|
Returns a pointer to the array of pixels contained in a PPix. |
|
|
Returns the bounds of a PPix. |
|
|
Returns the rowbytes of a PPix so you can properly parse the pixels returned by ppixGetPixels. |
|
|
Allocates and returns a handle to a new PPix, with specified bounds. |
|
|
Frees a PPixHand. |
|
|
These legacy functions are deprecated and should no longer be used. |
|
|
Passes back the pixel aspect ratio of a PPixHand. |
|
|
Passes back the alpha bounds of a PPixHand. |
Utility Functions¶
|
Function |
Description |
|---|---|
|
|
Passes back Premiere's serial number. - buffer: must be at least 40 characters long.
|
|
|
Passes back a file's timebase in a - filespec: description of the file, use before getFileVideo- audioOnly: if non-zero, return the audio timebase. If zero, return the video timebase.- result: the returned timebase
|
|
|
Gets a frame of video (at a specified time) from a file. - filespec: the description of the file- frame: the frame to retrieve- thePort: where the frame will be delivered, allocate prior to calling- bounds: the boundary of the port- flags: unused
|
|
|
Passes back the bounds of a file. |
|
|
This very important call returns the SweetPea suite that allows plugins to acquire and release all other SweetPea Suites. |
|
|
Passes back the list of valid entensions/filter strings given a class of media (see file types constants below). - kFileTypes_Still: still media- kFileTypes_AudioOnly: audio-only media- kFileTypes_AudioVideo: audio and video media- kFileTypes_AllNoIntrinsics: all importable media types via importer plugins (no prproj, txt, etc)
|
Timeline Functions¶
|
Function |
Description |
|---|---|
|
|
Superceded by the Clip Render Suite, which provides asynchronous import. Warning This call is expensive; use it carefully. - frame: the frame number you're requesting- thePort: allocate using the PPix Creator Suite before calling- bounds: the boundaries of video to return- flags: either kGCVFlag_UseFilePixelAspectRatio or 0. Setting it to kGCVFlag_UseFilePixelAspectRatio will return a PPix stamped with the PAR of the file. Setting it to 0 will return a PPix adjusted to the PAR of the project and stamped accordingly. It scales, but does not stretch the PPix to fit the destination PPix that is passed in. So if the destination PPix is larger than the frame asked for, the frame will maintain its frame aspect ratio, letterboxing or pillarboxing the frame with transparent black. To import a frame at its native dimensions, use getClipVideoBounds, allocate the destination PPix using the dimensions returned, and pass the PPixHand and the dimensions into getClipVideo. If the frame size is not the same as the sequence size, the frame must be positioned in the composite by the plugin.- clipData: the clipData handle found in prtFileRec
|
|
|
Passes back two longs with the start and end of the current work area (read-only). |
|
|
Passes back the current timebase of the timeline ( - timelineData: the timelineData of the current sequence- scale: the sequence scale- sampleSize: the sequence sampleSize
|
|
|
Returns the position of the current time indicator (the position bar set by the user). - timelineData: the timelineData of the current sequence
|
|
|
Gets a fully rendered frame from the timeline (all layers). - timelineData: The timelineData of the current sequence. Pass a timeline handle as provided in EffectRecord, VideoRecord, compDoCompileInfo, or imGetPrefsRec.- inFrame: The frame to get, specified in the current timebase. If a timelineData handle is specified (first param above), this frame will be relative to the start of the sequence.- outRenderedFrame: The destination buffer. Allocate prior to this call by the plugin using the PPix Suite. Released by the caller before returning.
|
|
|
Passes back the dimensions of a clip in a sequence. For rolling/ crawling titles, use the Roll/Crawl Suite to get the dimensions instead. |
|
|
Superceded by the Clip Render Suite, which provides asynchronous import. Warning This call is expensive; use it carefully. - inFrame: the frame number you're requesting, in the timebase of the clip- outRenderedFrame: Allocated by the host. The plugin should dispose of the PPixHand when done- inFrameRect: the boundaries of video to return. To import a frame at its native dimensions, use getClipVideoBounds. If the frame size is not the same as the sequence size, the frame must be positioned in the composite by the plugin.- inClipData: the PrClipID from the video segment
|
Bottleneck Functions¶
The pointer to the legacy bottleneck functions is passed only to transitions and video filters.
These functions are not exposed for other plugin types.
These functions are not aware of different pixel formats, and are intended only for 8-bit BGRA processing.
Sample usage:
((*theData)->bottleNecks->StretchBits) (*srcpix,
*dstpix,
&srcbox,
&srcbox,
0,
NULL);
Function¶
|
Description¶Stretches and copies an image, including the alpha channel. StretchBits only works on 8-bit PPixs. srcRect is the area of the source PPix to copy; dstRect is used to scale the copy.mode:Valid modes are cbBlend, cbInterp, and cbMaskHdl- cbBlend - The low byte of the mode defines the amount of blend between the source and destination in a range of 0-255.- Example: - To blend 30% of the source with the destination, use cbBlend \^ (30*255/100)- cbInterp - While much slower than cbBlend, this mode does bilinear interpolation when resizing a source PPix to a larger destination, resulting in a much smoother image.- cbMaskHdl tells StretchBits that prRgn is a handle to a 1-bit deep buffer the same size as the source and destination PPixs, to be used as a mask.prRgn: Pass 0 for no clipping. This parameter is only used on Windows.
|
|
|
Maps the source rectangle to a four-point polygon in the destination. When scaling up, DistortPolygon uses bilinear interpolation; it uses pixel averaging when scaling down.
|
|
|
Maps a four-point src polygon into a four-point polygon (dstpts). |
|
|
Equivalent to DistortPolygon, using fixed-point coordinates. |
|
|
Equivalent to MapPolygon, using fixed-point coordinates. |
|
|
Image map function. |
|
|
Convolution function. |