Copy link to clipboard
Copied
When to delete private data ?
We have developed a custom importer plugin for premiere pro.
We render the frames within imImportImage call on the fly and return the data in imImportImageRec structure.
(1) When we create a new instance is like we get following calls.
imGetPrefs8 - we show a custom entry dialog here. Allocating private data by giving size like
if (getPrefsRec->prefs == NULL)
{
getPrefsRec->prefsLength = sizeof(InstanceData);//
}
else
{
//Data already allocated use it
}
imGetInfo8 - Here we new private data pointer if it is NULL it is intatiated and we store pointer to our custom class which actually renders the data( based on the variable set in imGetPrefs8 )
stdparms->piSuites->memFuncs->newHandle(sizeof(InstanceData));
imImportImage - with private data pointer filled in imGetInfo8 - rendering happens here based on the frame number received.
(2) When we delete seqence we do not get any call. We have set our imInit like below and allocated Private data in imGetInfo8 call.
importInfo->noFile = true;
importInfo->addToMenu = true;
importInfo->hasSetup = true;
importInfo->setupOnDblClk = true;
importInfo->canDoContinuousTime = true;
importInfo->canDoSubsize = true;
importInfo->canResize = true;
importInfo->keepLoaded = false;
importInfo->canSave = true;
importInfo->canDelete = true;
Have something to add?