### Create Audio Renderer Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Prepare to get rendered audio from the host. Pass in exporterPluginID, start time, channel type, sample type (must be kPrAudioSampleType_32BitFloat), sample rate, and a pointer to receive the audio render ID. ```cpp prSuiteError (*MakeAudioRenderer)( csSDK_uint32 inPluginID, PrTime inStartTime, PrAudioChannelType inChannelType, PrAudioSampleType inSampleType, float inSampleRate, csSDK_uint32* outAudioRenderID); ``` -------------------------------- ### fsSetup Selector Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/video-filters/selector-descriptions.md Handles the setup of filter parameters, either by initializing defaults or loading existing values and displaying a modal dialog for user input. It's called when the filter is applied if fsInitSpec is not used, or when the user clicks the setup link. ```APIDOC ## fsSetup ### Description Optional. Sent when the filter is applied, if `fsInitSpec` doesn't allocate a valid specsHandle. Also sent when the user clicks on the setup link in the Effect Controls Panel. The filter can optionally display a (platform-dependent) modal dialog to get new parameter values from the user. First, check `VideoHandle.specsHandle`. If NULL, the plugin is being called for the first time. Initialize the parameters to their default values. If non-NULL, load the parameter values from specsHandle. Now use the parameter values to display a modal setup dialog to get new values. Return a handle to a structure containing the parameter values in specsHandle. In order to properly store parameter values between calls to the plugin, describe the structure of your specsHandle data in your PiPL's ANIM properties. Premiere interpolates animatable parameter values as appropriate before sending `fsExecute`. The filter is given the total duration in samples and the sample number of the first sample in the source buffer. During `fsSetup`, the frames passed to `VideoRecord.source` will almost always be 320x240. The exception is if the plugin is receiving the `fsSetup` selector when the effect is initially applied, in which case it will receive a full height frame, with the width adjusted to make the frame square pixel aspect ratio. For example, a filter applied in a 1440x1080 HDV sequence will receive a full 1920x1080 buffer. The frame is the layer the filter is applied to at the current time indicator. If the CTI is not on the clip the filter is applied to, the frame is transparent black. If the filter has a setup dialog, the VFilterCallbackProcPtr should be used to get source frames for previews. `getPreviewFrameEx` can be used to get rendered frames, although if this call is used, the video filter should be ready to be called reentrantly with `fsExecute`. ``` -------------------------------- ### Time Suite for Frame Rate and Time Calculations Source: https://context7.com/docsforadobe/premiere-plugin-guide/llms.txt Utilize the Time Suite to convert between frame rates and the internal tick-based time system. This example shows how to get ticks per second, ticks per frame for common rates, and calculate frame numbers from time. ```cpp // Use Time Suite for frame rate calculations PrSDKTimeSuite *timeSuite = NULL; SPBasic->AcquireSuite( kPrSDKTimeSuite, kPrSDKTimeSuiteVersion, (const void**)&timeSuite ); // Get ticks per second (constant for app runtime) PrTime ticksPerSecond; timeSuite->GetTicksPerSecond(&ticksPerSecond); // Get ticks per video frame for common frame rates PrTime ticksPerFrame_24; timeSuite->GetTicksPerVideoFrame(kVideoFrameRate_24, &ticksPerFrame_24); PrTime ticksPerFrame_NTSC; // 29.97 fps timeSuite->GetTicksPerVideoFrame(kVideoFrameRate_NTSC, &ticksPerFrame_NTSC); PrTime ticksPerFrame_PAL; // 25 fps timeSuite->GetTicksPerVideoFrame(kVideoFrameRate_PAL, &ticksPerFrame_PAL); // Get ticks per audio sample PrTime ticksPerSample; prSuiteError audioErr = timeSuite->GetTicksPerAudioSample(48000.0f, &ticksPerSample); // Returns kPrTimeSuite_RoundedAudioRate if sample rate doesn't divide evenly // Calculate frame number from time PrTime currentTime = exportRec->startTime; csSDK_int64 frameNumber = currentTime / ticksPerFrame_24; // Calculate time from frame number PrTime frameTime = frameNumber * ticksPerFrame_NTSC; ``` -------------------------------- ### PrefetchMediaWithRenderParameters() Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Prefetches media using all parameters required for rendering a frame, providing a hint to importers to start reading necessary media. ```APIDOC ## PrefetchMediaWithRenderParameters() ### Description Prefetch the media needed to render this frame, using all of the parameters used to render the frame. This is a hint to the importers to begin reading media needed to render this video frame. ### Method `PrefetchMediaWithRenderParameters` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **inVideoRenderID** (csSDK_uint32) - Required - The ID of the video renderer. - **inTime** (PrTime) - Required - The time of the frame to prefetch. - **inRenderParams** (SequenceRender_ParamsRec*) - Required - The rendering parameters. ### Request Example ```cpp prSuiteError (*PrefetchMediaWithRenderParameters)( csSDK_uint32 inVideoRenderID, PrTime inTime, SequenceRender_ParamsRec* inRenderParams); ``` ### Response #### Success Response (200) Returns `prSuiteError` indicating success or failure. #### Response Example None provided. ``` -------------------------------- ### fsHasSetupDialog Selector Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/video-filters/selector-descriptions.md Indicates whether the filter has a setup dialog. This is a new selector for Premiere Pro CS3. ```APIDOC ## fsHasSetupDialog ### Description New for Premiere Pro CS3. Optional. Specify whether or not the filter has a setup dialog, by `returning` `fsHasNoSetupDialog` or `fsNoErr`. ``` -------------------------------- ### Get Track Item Start Time Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Gets the start time of the track item in frames. Requires a valid effect reference. ```cpp prSuiteError(*GetTrackItemStart)( PF_ProgPtr effect_ref, A_long* frameDuration); ``` -------------------------------- ### Display Settings Dialog Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/transmitters/tmModule-functions.md SetupDialog displays a modal settings dialog for the plugin, but only if the plugin returned outHasSetup. Settings should be saved to ioSerializedPluginData, and NeedsReset will be called afterward. ```c tmResult (*SetupDialog)(tmStdParms* ioStdParms,prParentWnd inParent); ``` -------------------------------- ### Get Clip Start Time Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Retrieves the start time of the clip in frames. Ensure effect_ref is valid. ```cpp prSuiteError(*GetClipStart)( PF_ProgPtr effect_ref, A_long* frameDuration); ``` -------------------------------- ### Get Unscaled Clip Start Time Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Retrieves the start time of the clip, unaffected by speed or retiming changes. Use this for original media start time. ```cpp prSuiteError(*GetUnscaledClipStart)( PF_ProgPtr effect_ref, A_long* frameDuration); ``` -------------------------------- ### GPU Effect Entry Point and Rendering with PrGPU Framework Source: https://context7.com/docsforadobe/premiere-plugin-guide/llms.txt Implement GPU effects by handling PF_Cmd_GPU_DEVICE_SETUP, PF_Cmd_GPU_RENDER, and PF_Cmd_GPU_DEVICE_SETDOWN. This example shows initialization, rendering logic, and resource cleanup for CUDA. ```cpp // GPU effect entry point (extends AE effect) PF_Err PluginMain( PF_Cmd cmd, PF_InData *in_data, PF_OutData *out_data, PF_ParamDef *params[], PF_LayerDef *output, void *extra) { PF_Err err = PF_Err_NONE; switch (cmd) { case PF_Cmd_GPU_DEVICE_SETUP: // Initialize GPU resources PF_GPUDeviceSetupExtra *gpuSetup = (PF_GPUDeviceSetupExtra*)extra; // Check device framework (CUDA, OpenCL, Metal) if (gpuSetup->inDeviceInfo.device_framework == PrGPUDeviceFramework_CUDA) { // Initialize CUDA context } break; case PF_Cmd_GPU_RENDER: // Perform GPU rendering PF_GPURenderExtra *gpuRender = (PF_GPURenderExtra*)extra; // Get input/output GPU buffers PrGPUFilterRenderParams *renderParams = gpuRender->input->render_params; // Launch GPU kernel // For CUDA: myKernel<<>>(inputBuffer, outputBuffer, params); break; case PF_Cmd_GPU_DEVICE_SETDOWN: // Release GPU resources break; } return err; } ``` ```cuda // CUDA kernel example using PrGPU SDK macros __global__ void BrightnessKernel( const float4* inBuffer, float4* outBuffer, int width, int height, float brightness) { int x = blockIdx.x * blockDim.x + threadIdx.x; int y = blockIdx.y * blockDim.y + threadIdx.y; if (x < width && y < height) { int idx = y * width + x; float4 pixel = inBuffer[idx]; // Apply brightness adjustment outBuffer[idx] = make_float4( pixel.x * brightness, pixel.y * brightness, pixel.z * brightness, pixel.w // Preserve alpha ); } } ``` -------------------------------- ### Initialization and Preferences Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/importers/structures.md APIs for initializing the plugin and managing preferences. ```APIDOC ## POST /api/init ### Description Initializes the Adobe Premiere plugin. ### Method POST ### Endpoint /api/init ### Response #### Success Response (200) - **status** (string) - Indicates the success of the initialization. #### Response Example ```json { "status": "initialized" } ``` ## GET /api/preferences ### Description Retrieves the current plugin preferences. ### Method GET ### Endpoint /api/preferences ### Response #### Success Response (200) - **preferences** (object) - An object containing the plugin preferences. #### Response Example ```json { "preferences": { "defaultPath": "/Users/user/Documents", "logLevel": "info" } } ``` ``` -------------------------------- ### GetTrackItemStart Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Gets the start time of the track item. ```APIDOC ## GetTrackItemStart() ### Description Gets the start time of the track item. ### Method Not applicable (function signature provided) ### Endpoint Not applicable ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **frameDuration** (A_long*) - Pointer to store the start frame duration of the track item. #### Response Example None ``` -------------------------------- ### Initialize Transmitter Plugin Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/transmitters/tmModule-functions.md Use Startup to initialize a transmitter, provide basic plugin information, and allocate memory for user settings. It may return tmResult_ContinueIterate for multiple transmit plugins and can write to ioPrivatePluginData, ioSerializedPluginData, and ioSerializedPluginDataSize. ```c tmResult (*Startup)(tmStdParms* ioStdParms,tmPluginInfo* outPluginInfo); ``` -------------------------------- ### GetSourceTrackMediaActualStartTime() - Get Actual Start Time Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Retrieves the actual start time of the media for a specified layer parameter at a given sequence time. This is useful for understanding clip offsets. ```cpp prSuiteError(*GetSourceTrackMediaActualStartTime)( PF_ProgPtr inEffectRef, csSDK_uint32 inLayerParamIndex, PrTime inSequenceTime, PrTime* outClipActualStartTime); ``` -------------------------------- ### Get Work Area Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/universals/legacy-callback-suites.md Retrieves the start and end points of the current work area on a given timeline. ```APIDOC ## GET /timeline/workArea ### Description Retrieves the start and end points of the current work area on a given timeline. ### Method GET ### Endpoint /timeline/workArea ### Parameters #### Path Parameters - **timelineData** (PrTimelineID) - Required - The timeline identifier. #### Query Parameters - **workAreaStart** (csSDK_int32*) - Output - Pointer to store the start of the work area. - **workAreaEnd** (csSDK_int32*) - Output - Pointer to store the end of the work area. ### Response #### Success Response (200) - **workAreaStart** (csSDK_int32) - The start frame of the work area. - **workAreaEnd** (csSDK_int32) - The end frame of the work area. #### Response Example ```json { "workAreaStart": 0, "workAreaEnd": 100 } ``` ``` -------------------------------- ### Get Rendered Video Frames using Sequence Render Suite Source: https://context7.com/docsforadobe/premiere-plugin-guide/llms.txt Shows how to acquire the Sequence Render Suite, create a video renderer, set render parameters, and synchronously render a video frame. Remember to release the renderer when finished. ```cpp // Get rendered video frames using Sequence Render Suite PrSDKSequenceRenderSuite *renderSuite = NULL; SPBasic->AcquireSuite( kPrSDKSequenceRenderSuite, kPrSDKSequenceRenderSuiteVersion, (const void**)&renderSuite ); csSDK_uint32 videoRenderID = 0; PrTime ticksPerFrame; // Create a video renderer renderSuite->MakeVideoRenderer(exporterPluginID, &videoRenderID, ticksPerFrame); // Set up render parameters SequenceRender_ParamsRec renderParams; PrPixelFormat pixelFormats[] = { PrPixelFormat_BGRA_4444_8u, PrPixelFormat_VUYA_4444_8u }; renderParams.inRequestedPixelFormatArray = pixelFormats; renderParams.inRequestedPixelFormatArrayCount = 2; renderParams.inWidth = 1920; renderParams.inHeight = 1080; renderParams.inPixelAspectRatioNumerator = 1; renderParams.inPixelAspectRatioDenominator = 1; renderParams.inRenderQuality = kPrRenderQuality_High; renderParams.inFieldType = prFieldsNone; renderParams.inDeinterlace = 0; renderParams.inCompositeOnBlack = kPrTrue; // Render a frame synchronously SequenceRender_GetFrameReturnRec frameReturn; prSuiteError err = renderSuite->RenderVideoFrame( videoRenderID, currentTime, &renderParams, kRenderCacheType_None, &frameReturn ); if (err == suiteError_NoError && frameReturn.outFrame) { // Process the rendered frame PrSDKPPixSuite *ppixSuite; char *pixels; ppixSuite->GetPixels(frameReturn.outFrame, PrPPixBufferAccess_ReadOnly, &pixels); // Write pixels to output file... ppixSuite->Dispose(frameReturn.outFrame); } // Release the renderer when done renderSuite->ReleaseVideoRenderer(exporterPluginID, videoRenderID); ``` -------------------------------- ### Get Timeline Work Area Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/universals/legacy-callback-suites.md Retrieves the start and end points of the current work area on a given timeline. Requires a valid PrTimelineID. ```c csSDK_int32 getWorkArea ( PrTimelineID timelineData, csSDK_int32 *workAreaStart, csSDK_int32 *workAreaEnd); ``` -------------------------------- ### Define Windows on Arm Entry Point Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/intro/windows-on-arm-support.md Add this line to your plugin's .r resource file to specify the main entry point for Windows on Arm builds. Ensure Visual Studio 17.4 or greater is used. ```cpp #if defined(PRWIN_ENV) CodeWinARM64 {"EffectMain"}, CodeWin64X86 {"EffectMain"}, #endif ``` -------------------------------- ### Create PPix with PPix Creator Suite Source: https://context7.com/docsforadobe/premiere-plugin-guide/llms.txt Allocate pixel buffers using the PPix Creator Suite, which are managed by the media cache and optimized for performance. This example creates a new PPix and fills it with green pixel data. ```cpp // Create a new PPix PrSDKPPixCreatorSuite *creatorSuite = NULL; SPBasic->AcquireSuite( kPrSDKPPixCreatorSuite, kPrSDKPPixCreatorSuiteVersion, (const void**)&creatorSuite ); PPixHand newPPix = NULL; prRect bounds = {0, 0, 1920, 1080}; // Create a new PPix with write access prSuiteError err = creatorSuite->CreatePPix( &newPPix, PrPPixBufferAccess_WriteOnly, PrPixelFormat_BGRA_4444_8u, &bounds ); if (err == suiteError_NoError && newPPix) { PrSDKPPixSuite *ppixSuite; SPBasic->AcquireSuite(kPrSDKPPixSuite, kPrSDKPPixSuiteVersion, (const void**)&ppixSuite); // Get pixel buffer for writing char *pixels; ppixSuite->GetPixels(newPPix, PrPPixBufferAccess_WriteOnly, &pixels); csSDK_int32 rowBytes; ppixSuite->GetRowBytes(newPPix, &rowBytes); // Fill pixels with generated content for (int y = 0; y < 1080; y++) { char *row = pixels + (y * rowBytes); for (int x = 0; x < 1920; x++) { // BGRA format: Blue, Green, Red, Alpha row[x * 4 + 0] = 0; // Blue row[x * 4 + 1] = 255; // Green row[x * 4 + 2] = 0; // Red row[x * 4 + 3] = 255; // Alpha } } // Use the PPix, then dispose when done ppixSuite->Dispose(newPPix); } ``` -------------------------------- ### getPreviewFrameEx Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/universals/legacy-callback-suites.md Gets a fully rendered frame from the timeline (all layers). Used by video filters and transitions for previews in a modal setup dialog. Exporters rendering final movies should NOT use this callback. ```APIDOC ## getPreviewFrameEx ### Description Gets a fully rendered frame from the timeline (all layers). Used by video filters and transitions for previews in a modal setup dialog. If the return value is -1, an error occurred, but if it is 0, the callback has returned safely. Exporters rendering final movies should NOT use this callback. ### Method `csSDK_int32` (Return type) ### Endpoint N/A (This is a function call, not an HTTP endpoint) ### Parameters #### Path Parameters N/A #### Query Parameters N/A #### Request Body N/A ### Function Signature `csSDK_int32 getPreviewFrameEx( PrTimelineID timelineData, csSDK_int32 inFrame, PPixHand* outRenderedFrame, const prRect* inFrameRect, PrPixelFormat* inRequestedPixelFormatArray, csSDK_int32 inRequestedPixelFormatArrayCount, csSDK_uint32 inPixelAspectRatioNumerator, csSDK_uint32 inPixelAspectRatioDenominator, bool inAlwaysRender);` ### Parameter Details - **timelineData** (PrTimelineID) - The timelineData of the current sequence. Pass a timeline handle as provided in EffectRecord, VideoRecord, compDoCompileInfo, or imGetPrefsRec. - **inFrame** (csSDK_int32) - 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** (PPixHand*) - The destination buffer. Allocate prior to this call by the plugin using the [PPix Suite](sweetpea-suites.md#ppix-suite). Released by the caller before returning. - **inFrameRect** (const prRect*) - Specifies the rectangular region of the frame to render. - **inRequestedPixelFormatArray** (PrPixelFormat*) - An array of requested pixel formats, in order of preference. - **inRequestedPixelFormatArrayCount** (csSDK_int32) - The number of elements in `inRequestedPixelFormatArray`. - **inPixelAspectRatioNumerator** (csSDK_uint32) - The numerator of the pixel aspect ratio. - **inPixelAspectRatioDenominator** (csSDK_uint32) - The denominator of the pixel aspect ratio. - **inAlwaysRender** (bool) - If true, the frame will always be rendered, even if it's already cached. ### Request Example N/A (This is a function call) ### Response #### Success Response (0) Returns 0 if the callback has returned safely. #### Error Response (-1) Returns -1 if an error occurred. #### Response Example N/A (Return value indicates success or error) ``` -------------------------------- ### GetSourceTrackCurrentMediaTimeInfo() - Get Current Media Time Info Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Retrieves current media time, ticks per frame, and a formatted time string for a source track. Can optionally use sound timecode as the start time. ```cpp prSuiteError(*GetSourceTrackCurrentMediaTimeInfo)( PF_ProgPtr effect_ref, csSDK_uint32 inLayerParamIndex, bool inUseSoundTimecodeAsStartTime, PrTime inSequenceTime, PrTime* outCurrentMediaTime, PrTime* outMediaTicksPerFrame, PF_TimeDisplay* outMediaTimeDisplay); ``` -------------------------------- ### Startup Function Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/transmitters/tmModule-functions.md Initializes a transmitter, sets up basic plugin information, and allocates memory for user settings and other data. It can return `tmResult_ContinueIterate` for multiple transmit plugins and may write to `ioPrivatePluginData`, `ioSerializedPluginData`, and `ioSerializedPluginDataSize`. ```APIDOC ## Startup ### Description Initialize a transmitter, fill in basic plugin info, allocate memory to hold user settings and other data. ### Method `tmResult (*Startup)(tmStdParms* ioStdParms,tmPluginInfo* outPluginInfo); ` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - `tmResult` (enum) - Indicates the result of the operation. `tmResult_ContinueIterate` may be returned to support multiple transmit plugins within the same module. - `tmPluginInfo* outPluginInfo` - Pointer to a structure to be filled with basic plugin information. #### Response Example None ### Notes - `ioPrivatePluginData`, `ioSerializedPluginData` & `ioSerializedPluginDataSize` may be written from Startup. ``` -------------------------------- ### Acquire and Use a SweetPea Suite Source: https://context7.com/docsforadobe/premiere-plugin-guide/llms.txt Demonstrates how to acquire and release SweetPea suites using the SPBasic interface. Ensure suites are released when no longer needed. ```cpp // Acquire and use a SweetPea suite SPBasicSuite *SPBasic = NULL; PrSDKPixelFormatSuite *PixelFormatSuite = NULL; // Get the SPBasic suite from standard parameters SPBasic = stdParmsP->piSuites->utilFuncs->getSPBasicSuite(); if (SPBasic) { // Acquire the Pixel Format Suite SPBasic->AcquireSuite( kPrSDKPixelFormatSuite, kPrSDKPixelFormatSuiteVersion, (const void**)&PixelFormatSuite ); if (PixelFormatSuite) { // Use the suite to get pixel format information PrPixelFormat blackValue; PixelFormatSuite->GetBlackForPixelFormat(PrPixelFormat_BGRA_4444_8u, &blackValue); // Always release when done SPBasic->ReleaseSuite(kPrSDKPixelFormatSuite, kPrSDKPixelFormatSuiteVersion); } } ``` -------------------------------- ### Get Source Track Media Timecode Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Retrieves the source media timecode for a specified frame within a layer, with options to apply transforms and start time offsets. Requires layer index and boolean flags. ```cpp prSuiteError(*GetSourceTrackMediaTimecode)( PF_ProgPtr effect_ref, csSDK_uint32 inLayerParamIndex, bool inApplyTransform, bool inAddStartTimeOffset, A_long* outCurrentFrame); ``` -------------------------------- ### imInit Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/importers/selector-descriptions.md Sent during application startup to describe the importer's capabilities. It initializes the importer and can be used to indicate setup dialog requirements and cacheability. ```APIDOC ## imInit ### Description Sent during application startup to describe the importer's capabilities. It initializes the importer and can be used to indicate setup dialog requirements and cacheability. ### Parameters #### Path Parameters - **param1** (imImportInfoRec*) - Required - Describes the importer's capabilities. - **param2** (unused) - N/A - This parameter is unused. ### Request Example ```cpp // Example usage within the plugin // Set hasSetup to kPrTrue if the importer has a setup dialog // Set setupOnDblClk to kPrTrue to have that dialog display when the user double-clicks a file // Return imIsCacheable from _imInit_ if a plugin does not need to be called to initialize every time Premiere launched. // For synthetic importers: // noFile = kPrTrue; indicates the importer is synthetic. // addToMenu = kPrTrue; adds the importer to the File > New menu. // For custom importers: noFile = kPrTrue; hasSetup = kPrTrue; canOpen = kPrTrue; canCreate = kPrTrue; addToMenu = imMenuNew; ``` ### Response #### Success Response (200) - **imIsCacheable** (boolean) - Return true if the plugin does not need to be called to initialize every time Premiere launched. #### Response Example ``` // Return value indicates cacheability return imIsCacheable; ``` ``` -------------------------------- ### Start Pushing Audio Samples Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/transmitters/tmModule-functions.md Initializes the device for subsequent PushAudio() calls. This function is only called if the transmitter returned 'outPushAudioAvailable'. The device will be enabled for a secondary mode where audio from the primary or clock device is pushed to a secondary device. ```c tmResult (*StartPushAudio)(const tmStdParms* inStdParms,const tmInstance* inInstance,PrTime inStartTime,PrTime inOutTime,prBool inLoop,prBool inScrubbing,csSDK_int32* outSamplesPerFrame); ``` -------------------------------- ### Get Clip Name Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Gets the name of the clip or master clip to which the effect is applied. Use inGetMasterClipName to specify. ```cpp prSuiteError(*GetClipName)( PF_ProgPtr effect_ref, A_Boolean inGetMasterClipName, PrSDKString* outSDKString); ``` -------------------------------- ### Create PPix with PPix Creator Suite Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/universals/sweetpea-suites.md Use this callback to create a new PPix. Frames allocated are accounted for in the media cache and are 16-byte aligned. Ensure `inRequestedAccess` is not read-only. ```cpp prSuiteError (*CreatePPix)( PPixHand* outPPixHand, PrPPixBufferAccess inRequestedAccess, PrPixelFormat inPixelFormat, const prRect* inBoundingRect); ``` -------------------------------- ### Get Media Frame Rate Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Gets the number of ticks per frame for the media. The result is stored in PrTime. ```cpp prSuiteError(*GetMediaFrameRate)( PF_ProgPtr effect_ref, PrTime* outTicksPerFrame); ``` -------------------------------- ### Importer Entry Point Implementation Source: https://context7.com/docsforadobe/premiere-plugin-guide/llms.txt This C++ code defines the main entry point for an importer plugin. It handles various selectors to describe importer capabilities, retrieve file information, provide video frames, and manage audio data. Ensure proper initialization and cleanup for resources. ```cpp // Importer entry point function signature csSDK_int32 xImportEntry( csSDK_int32 selector, imStdParms *stdParms, void *param1, void *param2) { csSDK_int32 result = imUnsupported; switch (selector) { case imInit: // Describe importer capabilities during app startup imImportInfoRec *importInfo = (imImportInfoRec*)param1; importInfo->canOpen = kPrTrue; importInfo->canSave = kPrTrue; importInfo->hasSetup = kPrFalse; importInfo->avoidAudioConform = kPrTrue; result = imNoErr; break; case imGetSupports8: // Signal support for Premiere Pro 2.0+ API result = malSupports8; break; case imGetInfo8: // Describe clip properties when file is instantiated imFileAccessRec8 *fileAccess = (imFileAccessRec8*)param1; imFileInfoRec8 *fileInfo = (imFileInfoRec8*)param2; fileInfo->vidInfo.imageWidth = 1920; fileInfo->vidInfo.imageHeight = 1080; fileInfo->vidInfo.depth = 24; fileInfo->vidInfo.fieldType = prFieldsNone; fileInfo->vidInfo.pixelAspectNum = 1; fileInfo->vidInfo.pixelAspectDen = 1; fileInfo->vidDuration = 300 * fileInfo->vidScale; // 300 frames result = imNoErr; break; case imGetSourceVideo: // Provide unscaled video frame to host imSourceVideoRec *sourceVideo = (imSourceVideoRec*)param2; // Fill sourceVideo->outFrame with pixel data result = imNoErr; break; case imImportAudio7: // Provide audio in 32-bit float uninterleaved format imImportAudioRec7 *audioRec = (imImportAudioRec7*)param2; // Fill audioRec->buffer with audio samples result = imNoErr; break; case imCloseFile: // Clean up and release privateData result = imNoErr; break; case imShutdown: // Release all resources on quit result = imNoErr; break; } return result; } ``` -------------------------------- ### PrefetchMedia() - Premiere Plugin SDK Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Provides a hint to importers to begin reading media required for a specific video frame. This is a performance optimization to ensure media is ready when needed for rendering. ```cpp prSuiteError (*PrefetchMedia)( csSDK_uint32 inVideoRenderID, PrTime inFrame); ``` -------------------------------- ### Get Filter Instance ID Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Gets the filter ID for the current effect reference. Requires a valid effect reference. ```cpp prSuiteError(*GetFilterInstanceID)( PF_ProgPtr effect_ref, A_long* outFilterInstanceID); ``` -------------------------------- ### Get Containing Timeline ID Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Gets the ID of the timeline containing the clip to which the effect is applied. Requires a valid effect reference. ```cpp prSuiteError(*GetContainingTimelineID)( PF_ProgPtr effect_ref, PrTimelineID* outTimelineID); ``` -------------------------------- ### SetupDialog Function Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/transmitters/tmModule-functions.md Displays a modal settings dialog for the plugin. This function is only called if the plugin returned `outHasSetup`. Settings should be saved to `ioSerializedPluginData`, and `ioSerializedPluginDataSize` updated if necessary. `NeedsReset` will be invoked after this call. ```APIDOC ## SetupDialog ### Description Display your own modal settings dialog. ### Method `tmResult (*SetupDialog)(tmStdParms* ioStdParms,prParentWnd inParent); ` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - `tmResult` (enum) - Indicates the result of the operation. #### Response Example None ### Notes - Will only be called if the plugin returned `outHasSetup`. - Save any settings to `ioSerializedPluginData` and if needed update `ioSerializedPluginDataSize`. - `NeedsReset` will be invoked after this call, to allow your transmitter a chance to reset all open plugins and startup with the new settings. ``` -------------------------------- ### GetSequenceZeroPoint() - Retrieve Sequence Zero Point Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Retrieves the zero point (start time) of the sequence in which the effect is applied. This is essential for accurate time calculations relative to the sequence start. ```cpp prSuiteError(*GetSequenceZeroPoint)( PF_ProgPtr inEffectRef, PrTime* outZeroPointTime); ``` -------------------------------- ### imInit Selector Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/importers/selector-table.md Initializes the importer and provides information about the import process. ```APIDOC ## imInit ### Description Initializes the importer and provides information about the import process. ### Method Not Applicable (Selector) ### Endpoint Not Applicable (Selector) ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **imImportInfoRec*** (structure) - Required - Information record for the import. - **unused** (void) - Not Used ### Request Example None ### Response #### Success Response (200) None explicitly defined, typically handled internally. #### Response Example None ``` -------------------------------- ### Define imQueryInputFileListRec Structure Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/importers/structure-descriptions.md Defines the structure used to query input file lists for a media item. Fill outContentStateID with a GUID based on content state. If the state is unchanged, the GUID should be the same as the previous call. ```cpp typedef struct { void* inPrivateData; void* inPrefs; PrSDKString inBasePath; csSDK_int32 outNumFilePaths; PrSDKString *outFilePaths; } imQueryInputFileListRec; ``` -------------------------------- ### GetClipStart Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Retrieves the start time of the clip. ```APIDOC ## GetClipStart() ### Description Retrieves the start time of the clip. ### Method Not applicable (function signature provided) ### Endpoint Not applicable ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **frameDuration** (A_long*) - Pointer to store the start frame duration. #### Response Example None ``` -------------------------------- ### Enabling Per-Clip Peak Audio Data Provision Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/importers/getting-started.md Starting in CS6, set `imFileInfoRec8.canProvidePeakData` to enable your importer to provide peak audio data on a clip-by-clip basis. ```c imFileInfoRec8.canProvidePeakData = kPrTrue; ``` -------------------------------- ### Check Minimum Requirements for GPU Acceleration Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/gpu-effects-transitions/getting-started.md Before acquiring exclusive device access, verify if the system meets the minimum requirements for GPU acceleration using GetDeviceInfo. Do not proceed if requirements are not met. ```cpp GetDeviceInfo() outDeviceInfo.outMeetsMinimumRequirementsForAcceleration ``` -------------------------------- ### Metadata Selectors Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/importers/selector-table.md Selectors for getting and setting metadata. ```APIDOC ## GET imGetMetaData ### Description Retrieves metadata associated with the file. ### Method GET ### Endpoint /imGetMetaData ### Parameters #### Query Parameters - **imFileRef** (object) - Required - Reference to the file. ### Response #### Success Response (200) - **imMetaDataRec** (object) - The record containing metadata. ### Response Example ```json { "imMetaDataRec": { "key": "value" } } ``` ## POST imSetMetaData ### Description Sets metadata for the file. ### Method POST ### Endpoint /imSetMetaData ### Parameters #### Request Body - **imFileRef** (object) - Required - Reference to the file. - **imMetaDataRec** (object) - Required - The record containing metadata to set. ### Request Example ```json { "imFileRef": {}, "imMetaDataRec": { "key": "new_value" } } ``` ### Response #### Success Response (200) - (No specific response body defined, typically indicates success) ### Response Example ```json { "status": "success" } ``` ``` -------------------------------- ### PPix Creator 2 Suite Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/universals/sweetpea-suites.md Extends the PPix Creator Suite with additional callbacks for creating PPixs, including raw PPixs. Introduces `CreateCustomPPix` for custom pixel formats and new APIs for creating PPixs with specific color spaces, recommended for color-aware importers. ```APIDOC ## PPix Creator 2 Suite More callbacks to create PPixs, including raw PPixs. Starting in version 2 of this suite, introduced in Premiere Pro 4.0.1, there is a new `CreateCustomPPix` call to create a PPix in a custom pixel format. New APIs added to create PPix with specific color space. Color aware Importers should use new color managed APIs for PPix creation. See PrSDKPPixCreator2Suite.h. ``` -------------------------------- ### GetSourceTrackMediaActualStartTime() Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Retrieves the start time of the specified layer parameter. ```APIDOC ## GetSourceTrackMediaActualStartTime() ### Description Retrieves the start time of the specified layer parameter. ### Method Not applicable (function signature provided) ### Endpoint Not applicable ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **outClipActualStartTime** (PrTime*) - A pointer to a PrTime variable that will be populated with the actual start time of the clip. #### Response Example None ``` -------------------------------- ### Enabling Sequential Audio Importing for Scrubbing Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/importers/getting-started.md Set the `kSeparateSequentialAudio` access mode in `imFileInfoRec8.accessModes` to enable importers to get audio for scrubbing and timeline operations before conforming is complete, ensuring responsive audio feedback. ```c imFileInfoRec8.accessModes |= kSeparateSequentialAudio; ``` -------------------------------- ### Transmitter Entry Point Function Source: https://context7.com/docsforadobe/premiere-plugin-guide/llms.txt Implement this function as the entry point for transmitters. It sets up function pointers for module operations when loading. ```cpp // Transmitter entry point tmResult tmEntryFunc( csSDK_int32 inInterfaceVersion, prBool inLoadModule, piSuitesPtr piSuites, tmModule* outModule) { if (inLoadModule) { // Set up function pointers when loading outModule->Startup = MyStartup; outModule->Shutdown = MyShutdown; outModule->CreateInstance = MyCreateInstance; outModule->DisposeInstance = MyDisposeInstance; outModule->QueryVideoMode = MyQueryVideoMode; outModule->QueryAudioMode = MyQueryAudioMode; outModule->ActivateDeactivate = MyActivateDeactivate; outModule->StartPlaybackClock = MyStartPlaybackClock; outModule->StopPlaybackClock = MyStopPlaybackClock; outModule->PushVideo = MyPushVideo; } return tmResult_Success; } ``` -------------------------------- ### GetMediaFrameRate Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Gets the number of ticks per frame for the media. ```APIDOC ## GetMediaFrameRate() ### Description Gets the number of ticks per frame, for the media. ### Method Not applicable (function signature provided) ### Endpoint Not applicable ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **outTicksPerFrame** (PrTime*) - Pointer to store the ticks per frame. #### Response Example None ``` -------------------------------- ### GetFilterInstanceID Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Gets the filter ID for the current effect reference. ```APIDOC ## GetFilterInstanceID() ### Description Gets the filter ID for the current effect reference. ### Method Not applicable (function signature provided) ### Endpoint Not applicable ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **outFilterInstanceID** (A_long*) - Pointer to store the filter instance ID. #### Response Example None ``` -------------------------------- ### Basic PiPL Example for Premiere Importer Plugin Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/resources/pipl-resource.md This is a basic PiPL resource definition for a Premiere Importer plugin. It specifies the plugin's kind, display name, and internal match name. Ensure the plugInName and plugInMatchName macros are defined appropriately. ```cpp #define plugInName "SDK Custom Import" #define plugInMatchName "SDK Custom Import" resource 'PiPL' (16000) { { // The plugin type Kind {PrImporter}, // The name as it will appear in a Premiere menu, this can be localized Name {plugInName}, // The internal name of this plugin - do not localize this. This is used for both Premiere and After Effects plugins. AE_Effect_Match_Name {plugInMatchName} // Transitions and video filters define more PiPL attributes here } }; ``` -------------------------------- ### getFileVideo Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/universals/legacy-callback-suites.md Gets a frame of video from a file at a specified time. ```APIDOC ## getFileVideo ### Description Gets a frame of video (at a specified time) from a file. ### Method csSDK_int32 ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (csSDK_int32) None #### Response Example None ### Notes - `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 - If the file is already in the sequence, it is preferable to get a file's video using the [Clip Render Suite](sweetpea-suites.md#clip-render-suite). ``` -------------------------------- ### imQueryInputFileList Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/importers/selector-descriptions.md Allows importers to specify all source files for media composed of multiple files, supporting 'Collect Files' in After Effects. New for After Effects CS6. ```APIDOC ## imQueryInputFileList ### Description New for After Effects CS6; not used in Premiere Pro. If an importer supports media that uses more than a single file (i.e. a file structure with seperate files for metadata, or separate video and audio files), this is the way the importer can specify all of its source files, in order to support Collect Files in After Effects. In `imImportInfoRec`, a new member, `canProvideFileList`, specifies whether the importer can provide a list of all files for a copy operation. If the importer does not implement this selector, the host will assume the media just uses a single file at the original imported media path. ### Parameters #### Path Parameters - **param1** (imQueryInputFileListRec*) - Required - Structure to query the input file list. - **param2** (unused) - Unused parameter. ### Method Not specified (likely an internal SDK call) ### Endpoint Not applicable (internal function) ### Request Example Not applicable ### Response Not specified ``` -------------------------------- ### Get PPix Bounds Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/universals/legacy-callback-suites.md Retrieves the bounding box of a PPix. ```c void ppixGetBounds ( PPixHand pix; prRect *bounds); ``` -------------------------------- ### GetClipName Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Gets the name of the clip to which the effect is applied (or the master clip). ```APIDOC ## GetClipName() ### Description Gets the name of the clip to which the effect is applied (or the master clip). ### Method Not applicable (function signature provided) ### Endpoint Not applicable ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **inGetMasterClipName** (A_Boolean) - If true, gets the master clip name. - **outSDKString** (PrSDKString*) - Pointer to store the clip name. #### Response Example None ``` -------------------------------- ### PrefetchMedia() Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Prefetches the media needed to render a specific frame. This serves as a hint to importers to begin reading the necessary media. ```APIDOC ## PrefetchMedia() ### Description Prefetch the media needed to render this frame. This is a hint to the importers to begin reading media needed to render this video frame. ### Method `PrefetchMedia` ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body - **inVideoRenderID** (csSDK_uint32) - Required - The ID of the video renderer. - **inFrame** (PrTime) - Required - The time of the frame to prefetch. ### Request Example ```cpp prSuiteError (*PrefetchMedia)( csSDK_uint32 inVideoRenderID, PrTime inFrame); ``` ### Response #### Success Response (200) Returns `prSuiteError` indicating success or failure. #### Response Example None provided. ``` -------------------------------- ### Identify Source Settings Effects Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/intro/whats-new.md When applying source settings effects, use the SetIsSourceSettingsEffect() function during PF_Cmd_GLOBAL_SETUP. This ensures correct handling when the effect is applied to proxy video. ```c PF_Err SetIsSourceSettingsEffect(PF_InData *in_data, PF_Boolean is_source_settings_effect); ``` -------------------------------- ### GetContainingTimelineID Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/exporters/suites.md Gets the ID of the timeline containing the clip to which the effect is applied. ```APIDOC ## GetContainingTimelineID() ### Description Gets the ID of the timeline containing the clip to which the effect is applied. ### Method Not applicable (function signature provided) ### Endpoint Not applicable ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **outTimelineID** (PrTimelineID*) - Pointer to store the timeline ID. #### Response Example None ``` -------------------------------- ### Get Main Window Handle Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/universals/legacy-callback-suites.md The `getMainWnd` function is intended to return the main application HWND. However, its return type is `void`, suggesting it might be used for side effects or is incorrectly documented. ```c void getMainWnd (void); ``` -------------------------------- ### Get PPix Alpha Bounds Source: https://github.com/docsforadobe/premiere-plugin-guide/blob/master/docs/universals/legacy-callback-suites.md Retrieves the alpha bounds of a PPix. ```c void ppixGetAlphaBounds ( PPixHand pix, prRect *alphaBounds) ```