1 Reply Latest reply on Mar 19, 2014 12:09 PM by Rallymax-forum

    Why Priemere sends 'exSelBeginInstance' selector twice to export plugin?

    keesbor98 Level 1

      Is that correct, that my custom export plugin gets 'exSelBeginInstance' selector twice?

       

      Try better explain:

      Premiere run two instances of my exporter. It easy to see by looking at exporterPluginID value. It different. And at second instance exporter doesn't get selector 'exSelGenerateDefaultParams'.

        • 1. Re: Why Priemere sends 'exSelBeginInstance' selector twice to export plugin?
          Rallymax-forum Level 3

          Premiere and AME open the plugin multiple times.

          If you put a breakpoint on the selector you'll find that it most likely also called exSelEndInstance between them.

           

          here are the basic steps.

           

          1. in exSelStartup set any Global information about your plugin (there shouldn't be any to make it multi threaded though).
          2. in exSelBeginInstance|EndInstance Alloc/Free your export structure that holds EVERYTHING (your parameters and any per instance information that isn't expressed in the parameters) using the Adobe Memory Suite. BECAUSE AME/PPro call EndInstance you can't trust having your own ALLOC/FREE - you MUST use Adobe's since it keeps a copy of the pointer even after the plugin is unloaded and reloaded.
          3. Don't initialize anything in the exSelCreateInstance. It isn't called when you click the "EXPORT" button. You have to put it in the exSelPostProcessParams.

           

          If you do that you'll be thread safe (AME runs multiple instances of the plugin at once).

           

          good luck,

           

          Edward