• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
1

Source Settings = Effect + Importer

Guest
Apr 05, 2016 Apr 05, 2016

Copy link to clipboard

Copied

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?

TOPICS
SDK

Views

665

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advisor , Apr 05, 2016 Apr 05, 2016

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 importe

...

Votes

Translate

Translate
Advisor ,
Apr 05, 2016 Apr 05, 2016

Copy link to clipboard

Copied

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!

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 06, 2016 Apr 06, 2016

Copy link to clipboard

Copied

LATEST

Thanks Zac, this clears it pretty well.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines