Skip to main content
Participant
March 3, 2020
Answered

Premiere Importer Development With Source Settings Effect

  • March 3, 2020
  • 1 reply
  • 1119 views

I'm developing an video file importer with source settings effect, after read the section "Source Settings = Effect + Importer" from the premiere SDK development guide and wrote the code according to the suggestions from the SDK guide, my importer could communicate with my source settings effect.

But there are still two main problems: 

1. How can I remove the effect from the available effect list ? (So this effect will be used ONLY on source and set automatically). Because the source settings effect is only used for my importer, so should not dispaly at the video effects list.

2. Every time I click the master tab on the effect panel, there will be one more my source settings effect, after mulitple clicks, there are multiple source settings effect inside the master tab, this is weird. There should only be one my source settings effect.

 

I spent a lot of time trying to solve the problem, but nothing worked.

I'd appreciate it if you could help me.

 

This topic has been closed for replies.
Correct answer Bruce Bullis
More guidance from PPro Dev:
 
What I would expect is that as the user edits the param we will send a sequence of messages which will result in the cutlist getting invalidated, then we generate a new cutlist, and see a different hash, which causes the ui to request the frame again.
 
There are two easy experiments that will validate some things. First, render previews and then make a change. If the previews don’t get invalidated it means that the cutlist didn’t change. Second, after making a change, toggle the track visibility off and on and see if the frame refreshes.

But, the first thing I’d check if I were them is if the binary data blob actually changes. If it doesn’t, then the frame hash doesn’t, and the frame will be reused (rendered previews will still be invalidated).

1 reply

Bruce Bullis
Community Manager
Community Manager
March 4, 2020

Hello Paul,

Here is some guidance, from PPro developers. 

This is two distinct plugins. One is an AE effect, the other is the importer. The AE effect needs to tell us that it’s a source settings effect during global setup, which it does by getting the kPFSourceSettingsSuite, and calling SetIsSourceSettingsEffect(). On the Importer side it needs to tell us the match name of the source settings effect that it wants to be paired with by filling in sourceSettingsMatchName in imFileInfoRec8.We then call into the effect via PF_Cmd_TRANSLATE_PARAMS_TO_PREFS in order to translate the params at a point in time to a prefs blob, which is then used for the import at that time.


To prevent it from showing up in the UI, set PF_OutFlag_I_AM_OBSOLETE during PF_Cmd_GLOBAL_SETUP.

Paul.LiuAuthor
Participant
March 5, 2020

Dear bbb_999,

 

Thank you very much for the reply.

 

1. For the first question, I set PF_OutFlag_I_AM_OBSOLETE and SetIsSourceSettingsEffect(in_data->effect_ref, true) during PF_Cmd_GLOBAL_SETUP according to your suggestions, the source settings effect will not be displayed in the video effects list. This question is solved.

2. For the second question, I add the "AE." prefix to the sourceSettingsMatchName string in imFileInfoRec8. This question is fixed.

3. But currently there is a new problem, when the source settings effect UI parameters are changed, my source settings effect will be called with PF_Cmd_TRANSLATE_PARAMS_TO_PREFS and PF_Cmd_SEQUENCE_SETUP, after received message PF_Cmd_TRANSLATE_PARAMS_TO_PREFS, I will fill the new params to the prefs owned by the importer like this:

case PF_Cmd_TRANSLATE_PARAMS_TO_PREFS:
     err = SetNewParamsToPrefs(in_data,
                               out_data,
                               params,
                               (PF_TranslateParamsToPrefsExtra *)extra);
     break;

 the function "SetNewParamsToPrefs" is written by me for setting the new params to pref data owned by the importer. After these code, I expect the importer side will be sent the imGetSourceVideo message to refresh the frame, but actually, the importer is just called with the imPerformSourceSettingsCommand and imSelectClipFrameDescriptor, no imGetSourceVideo. So I can not refresh the frame using the new parameters changed by user in the effect UI. I hope the importer will be sent the  imGetSourceVideo to trigger the frame refresh.

 

The first two problems have been solved, I'd appreciate it if you could help me for the third question.

 

Regards,

Paul

Bruce Bullis
Community Manager
Bruce BullisCommunity ManagerCorrect answer
Community Manager
March 6, 2020
More guidance from PPro Dev:
 
What I would expect is that as the user edits the param we will send a sequence of messages which will result in the cutlist getting invalidated, then we generate a new cutlist, and see a different hash, which causes the ui to request the frame again.
 
There are two easy experiments that will validate some things. First, render previews and then make a change. If the previews don’t get invalidated it means that the cutlist didn’t change. Second, after making a change, toggle the track visibility off and on and see if the frame refreshes.

But, the first thing I’d check if I were them is if the binary data blob actually changes. If it doesn’t, then the frame hash doesn’t, and the frame will be reused (rendered previews will still be invalidated).