I'm just started using AAF SDK a month ago to generate an AAF file for my application, everything seems to be working fine until when i try to set rational value in IAAFControlPoint. I get an error "AAFRESULT_ILLEGAL_VALUE" when i try to use SetValue. Below is the example code, i'm not sure whether i use it correctly or not.
p.numerator = 345;
p.denominator = 345;
aafDataBuffer_t val = (aafDataBuffer_t)&p;
aafUInt32 valsize = sizeof(p);
I wish to get the output from InfoDumper as below:
Object of class: ControlPoint
Value: (indirect type: aafRational) (345/345)
Your code looks OK. Unfortunately IAAFControlValue::SetValue is not executed by the unit test so there could be some unknown evil hiding inside. Can you set the control point value via IAAFControlValue::Initialize? It should work.
Thanks for your reply. I use the IAAFControlPoint::Initialie to set the control point value but now I get an error "AAFRESULT_NO_MORE_OBJECTS".
pControlPoint->Initialize(pVaryingValue, p, valsize, val);
Anything I miss out?
I can't tell without debugging or at least seeing the whole thing. Try looking at at the IAAFControlPoint unit test:
for usage examples.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.