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.
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
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.
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.
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?
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
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!!!!!
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.