Skip to main content
marks81797503
Known Participant
February 4, 2022
Question

AE-2017 Sequence specific data and PF_Cmd_SEQUENCE_SETUP / PF_Cmd_SEQUENCE_SETDOWN events

  • February 4, 2022
  • 1 reply
  • 755 views

Hello Everyone.

Dear community teams, I would be very appreciated for your suggestion in AE plugin implementation. I'm develop my custom plugin with some number of controls (popups and checkboxes). In corresponding to state and value selected by user in these controls, inside of my plugin should be cretaed C++ class for create interface to algorithm module for frame sequence processing. If the control element changed by user (for example check-box unselected or selected other element in the popup) the previous C++ algorithm interface should be deleted (destructor should be called for avoid memory leaks) and new interface object should be created. Unfortunately I don't clearly understood how to implement it. Because on call of the PF_Cmd_SEQUENCE_SETUP API - when the handle of the Sequence Data may allocated and initialized and attached to the out_data structure, the parameters array PF_ParamDef *params[] has zero pointer and values from control elements can't be acquired in this function. From other side the control elements may be easy acquired on PF_Cmd_USER_CHANGED_PARAM, but I'm not sure about allocation/initialization of the sequence data allowed in this command selector. Unfortunately the AE SDK examples doesn't show this case with C++ object construction and destroying in corresponding to the filter controls values.

This topic has been closed for replies.

1 reply

Community Expert
February 6, 2022

i had a hard time following the description...

what exactly is your "algorithm interface"?

is it a class?

when is it used? (i.e. for rendering or for custom UI?)

should it be stored for the duration of the session, or with the project file?

marks81797503
Known Participant
February 6, 2022

Hello Shachar,

Thank you for reply. Yes, probably my description unclear. I'm speaking about Filter - image/video processing.

Yes, this is C++ class, actually instance of the one class from bunch of possible type of classes.

For example, I have number of possible C++ objects (classes) - Algo1, Algo2, Algo3, ... AlgoN. What kind of "Algo" type should be created is defined by user setting, by Plugin controls - checkboxes and pop-ups. When user apply this filter to the video sequence the C++ object should be created in coreesponding to the Plugin control setting and "associated" with ths sequence. Let's say the user aplly my filter and Algo1 object was created and "associated" with the sequence. When the user change the setting, select other item inside of popup, the previous object (Algo1) should be destrcuted, and new (for example Algo2) should be created and associated with the sequence. Render should using correct C++ object - Algo2.

My problem is following: I don't known how to detect when destruct this C++ class (Algo1) for avoid resource leaks? I payed attention, from reason non understandable by me the  PF_Cmd_SEQUENCE_SETDOWN called twice on one switch of the control param and on second call I got an exception because object already destroyed. And additional: unfortunately, on call of the PF_Cmd_SEQUENCE_SETUP event API - the param[] array has zero pointer and I can't acquire the user setting in this event.

 

 

marks81797503
Known Participant
February 6, 2022

quick addendum - "possible C++ objects" - meaning number of the processing parameters variants