Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

HD VANC data to AAF file. How?

Bodi
2013-08-21
2013-08-26
  • Bodi
    Bodi
    2013-08-21

    Hi
    I have downloaded the SDK over 4 months ago now or so... I am trying to export HD VANC CDP 608 and DTVCC (EIA-708b-1999 spec) data to an AAF file. There is no C++ sample that shows how to do this in the SDK.
    I have made my app and tried it by calling CreateEssence but I'm not sure what codec or other parameters to use:

    AxContentStorage axContentStorage( axHeader.GetContentStorage() );
    AxDictionary axDictionary( axHeader.GetDictionary() );

    static const aafUID_t kAAFDataDef_GenCont = { 0x060E2B34, 0x0401, 0x0100, { 0x0D, 0x01, 0x03, 0x01, 0x02, 0x00, 0x00, 0x00 } };

    aafRational_t editRate = {25, 1};
    aafRational_t sampleRate = {25, 1};

    IAAFEssenceAccessSP spIaafEssenceAccess;

    // We will use ContainerAAF, hence no locator is required.
    IAAFLocatorSP nullLocator;

    IAAFDataDefSP pdd = axDictionary.LookupDataDef(kAAFDataDef_LegacyPicture);

    AxEssenceAccess axEssenceAccess ( masterMob.CreateEssence(
    1,
    pdd,
    kAAFNoCodec,
    editRate,
    sampleRate,
    kAAFCompressionDisable,
    nullLocator,
    ContainerAAF ));

    Code execution throws an exception AxEx ex.what() shows nothing.

    I drilled a bit more and the exception comes from here:
    (from c:...\AAF-src-1.1.6\AAF\ref-impl\src\impl\ImplAAFEssenceAccess.cpp)

    plugins = ImplAAFContext::GetInstance()->GetPluginManager(); // plugins is set to 0x00470840
    //!!!Handle case where multiple codecs exist for a codecID
    CHECK(plugins->GetPluginInstance(_codecID, &plugin)); // this line throws the exception
    _codecID is set to:
    Data1 = 0x568fb761
    Data2 = 0x9458
    Data3 = 0x11d2
    Data4 = 0x004f922c

    I just don't know what those parameters should be for my VANC data to export to this AAF file. Bit mad at the moment...

    Any help appreciated,

    Bodi

     
    Last edit: Bodi 2013-08-22
  • pieterb
    pieterb
    2013-08-26

    I suspect that CreateEssence fails because it needs a valid codec ID (different from kAAFNoCodec). I have no idea though what it should be in your case. I prefer creating the SourceMob and EssenceData objects directly rather than using EssenceAccess.