Problem with MobAttributesList in AAF file

Lian Zhang
  • Lian Zhang

    Lian Zhang - 2011-06-14

    I exported an AAF file from Avid Media Composer. And then I used aafdump.exe to convert .aaf file to .txt file for reading aaf internal infomation.

    I need sequence resolution information and I found it's written in the MobAttributesList in Composition Mob within the txt file.

    I was trying using AAF SDK function "GetAttributes(IEnumAAFTaggedValues** ppEnum)"and "ppEnum->NextOne(IAAFTaggedValue** ppTaggedValue)" to get AAF tagged value. However it's failed and ppTaggedValue I got is always NULL.

    So frastrated with this issue now and hope someone met the same problem before could help me.

    I just wonder how could I get sequence resolution info from AAF file other than above method.

    Many thanks.

  • Philip de Nier

    Philip de Nier - 2011-06-14

    I haven't tried this, but these 2 suggestions might help:
    - aafdump is a low-level structured storage dumper. The output from InfoDumper is easier to understand
    - there are probably multiple CompositionMobs in the file and you might have called GetAttributes on the wrong one. The UsageCode or AppCode property should allow you to choose the correct CompositionMob


  • Lian Zhang

    Lian Zhang - 2011-06-15

    Hi, Philip. Thank you for your quick reply. I am pretty sure there is only one CompositionMob in the file. And I can use IAAFMob2 to get UsageCode and CreationTime correctly. UsageCode I got is "Usage_TopLevel". I believe I find the correct compositionMob however I still can't get any tagged value via GetAttributes function. It's weird and I have to doubt if "GetAttributes()" would have problem in the SDK.

    Have you tried to call GetAttributes() before? If yes, have you got tagged value successfully?

    Anyway I just want to get sequence resolution information from AAF file. And I can only find resolution information in the Tagged value within the compositionMob such as

        Value: (indirect type: aafString) "SD 30i NTSC"

    "SD 30i NTSC" is just the string I want to get.

    Do you have any suggestion to get above string? Many thank.

    It's an urgent work to sort this issue out for me so I think I really need your help until it's solved.


  • Philip de Nier

    Philip de Nier - 2011-06-15

    I've had a closer look at a sequence exported by Avid and I see that the MobAttributeList property, which contains the TaggedValues, is not the property corresponding to GetAttributes(). If you run InfoDumper with the -meta option you will see 2 similar property definitions, Attributes (with 0x0700) and MobAttributeList.

    This means that you'll need to use the property direct interface to access the TaggedValues contained within the MobAttributeList property. See IAAFObject/IAAFProperty/etc. There are some examples in AAF/examples/com-api/ComPropDirectAccess.


  • Lian Zhang

    Lian Zhang - 2011-06-16

    Hi Philip, thank you for your help. Using InfoDumper is really a good way to check AAF info.

    From it, I found mobAttributeList property belongs to Mob. While TaggedValue is a class which does not belong to Mob class. Via finding mob, I can get mobAttributeList  now. But I don't know how to find taggedvalue correctly and how to build connection between TaggedValues to MobAttributeList? IAAFObject has GetPropertyValue() function. But I don't know how to connect IAAFObject with IAAFTaggedvalues. Does it make sense to you?


  • Philip de Nier

    Philip de Nier - 2011-06-16

    I haven't tested this, but this is the sequence of things you need to do to get at the TaggedValues:
    - assume from above that you have a IAAFPropertyValue for the MobAttributeList property (either using GetProperties or GetProperty using a property definition looked up using the Mob class def looked up in the Dictionary)
    - call GetType() to get IAAFTypeDef
    - cast IAAFTypeDef to IAAFTypeDefVariableArray
    - call GetElements() to get IEnumAAFPropertyValues
    - in while loop call NextOne, which returns IAAFPropertyValue
    - call GetType() to get IAAFTypeDef
    - cast IAAFTypeDef to IAAFTypeDefObjectRef
    - call GetObject to get IAAFObject
    - cast IAAFObject to IAAFTaggedValue


  • Lian Zhang

    Lian Zhang - 2011-06-17

    Hi Philip, so happy to tell you under your effective guidance I could access TaggedValues within the compositionMob successfully now. The steps you provided is so important to exactly get TaggedValues I want. I couldn't find them from AAF spec or examples within the SDK at all. Thank you so much again!!!!!



Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks