Problems with Embedding Essence Data

  • Lukas_H

    I have encountered a problem while trying to implement embedding of essence data (WAV audio) into AAF files. I have adopted the code from the AAF SDK example - ComEssenceDataTest. The code fails when calling:

    pMasterMob -> CreateEssence ( 1,    pAudioDef,    kAAFCodecWAVE,    editRate,    sampleRate,    kAAFCompressionDisable,
                                  NULL,    ContainerAAF,    &pEssenceAccess));

    The call returns: AARESULT_CODEC_INVALID (0x80120097).

    The same problem appears when trying the SDK example ComEssenceDataTest. I guess
    there might be some initialization missing?

    Thanks a lot for any help!


    • John Emmas
      John Emmas

      Does the sane error occur if you run the ComMod test for testing essence access?

      You'll need to build ComModAAF.exe if you haven't already (it's the ComModTestAAF branch in your main SDK project).

      Once you've done that, open an MSDOS prompt window, locate to the relevant output folder and type "ComModAAF AAFEssenceAccess" (without the quotes). See if you still get an error.

    • Yeah, you missed to load plugins.
      there is method RegisterRequiredPlugins(void) in example, so after you load AAFCOMAPI.dll you need to load AAFINTP.dll and AAFPGAPI.dll before use of CreateEssence().
      Good luck

    • Lukas_H

      Yes, we have figured this also, sergey, thank you - alas the IAAFPluginManager -> RegisterSharedPlugins method "Attempts to load and register all of the AAF plugin files found in shared installation directory." We used this method, but it appearently did not load anything because the "installation directory" location was unknown to us. We solved the problem by calling RegisterPluginFile explicitly.