2 Replies Latest reply on Apr 6, 2016 3:55 AM by morleyease

    Source Settings = Effect + Importer

    morleyease

      The SDK guide has a paragraph on the newly introduced in the CC 2015 SDK effect control source settings. This paragraph is (to my knowledge) literally the only info on the subject. No comments in the headers either.

      What is the intended way of communication between the importer and source settings effect? Does the host chain the source settings effects plugin automatically, feeding it frames from the importer? What's the deal with imSourceSettingsCommandRec and PF_SourceSettingsSuite? Now, apparently that's for importer<-->effect communication since they (and only they) understand the actual data passed in the command but it is unclear (to me, anyway) how it works, and how and when the host passes the command to the effect. Any documentation or sample code to glimpse into?

        • 1. Re: Source Settings = Effect + Importer
          Zac Lam Adobe Employee

          Hi Morley,

          Does the host chain the source settings effects plugin automatically, feeding it frames from the importer?

          A source settings effect is used primarily for the parameter UI and management.  These effects are used for our DPX source settings, CinemaDNG, etc.  A source settings effect doesn't provide the actual frames.  In fact, the effect isn't even called with PF_Cmd_RENDER.  The frames come directly from the importer, which provides frames based on the settings as passed to the importer via prefs data.  When the source settings effect parameters are changed, the effect gets called with PF_Cmd_SEQUENCE_RESETUP, then PF_Cmd_TRANSLATE_PARAMS_TO_PREFS.  The function signature is:

           

          PF_Err TranslateParamsToPrefs(

              PF_InData* in_data,

              PF_OutData* out_data,

              PF_ParamDef* params[],

              PF_TranslateParamsToPrefsExtra *extra)

           

          With the new prefs, the importer will be sent imOpenFile8, imGetInfo8, imGetIndPixelFormat, imGetPreferredFrameSize, imGetSourceVideo, etc.

          What's the deal with imSourceSettingsCommandRec and PF_SourceSettingsSuite?

          This allows the effect to communicate directly with the importer, so that it can initialize its parameters properly, based on the source media.  In our DPX source settings effect, for example, in SequenceSetup, it calls PF_SourceSettingsSuite->PerformSourceSettingsCommand(), which calls through to the importer with the selector imPerformSourceSettingsCommand.  Here, the importer opens the media, looks at the header and initializes the prefs based on the media.  For DPX, the initial parameters and default prefs are based on the bit depth of the video. These default prefs are passed back to the effect, which sets the initial param values and stashes a copy of them in sequence_data to use again for future calls to SequenceResetup.

           

          I'll add this to the SDK documentation.   Congratulations on being one of the early intrepid explorers in this API area!

          • 2. Re: Source Settings = Effect + Importer
            morleyease Level 1

            Thanks Zac, this clears it pretty well.