Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
I am trying to write in an existing essence through the Write() method. I can properly Read() it, but writing it leads to nothing.
I'm positionning at the beginning of the stream in both cases. I tried to write then read back immediatly and write then save the file, but only old data got saved in my two tests.
Can anyone confirm that this method works?
Does your call to Write() succeed ? What status result does it return ? Is the file opened for modify ?
my dumb test code is as follows:
aafDataBuffer_t buffer = new aafUInt8;
pEssence->SetPosition( 0 );
aafUInt32 bytesWritten = 8;
for ( int loop = 0; loop < (720*576)/2; loop++ )
if (!SUCCEEDED( pEssence->Write( 8, buffer, &bytesWritten ) ) )
wprintf(L"ERROR in essence writing");
Based on your request, i did a test on the value and saw that write() returns 0x80000006 (0x80000006 -2147483642 Invalid handle).
Why is error not detected? I don't know, but if you have any idea, i'll take it.
File is not modifiable, which ought to be the root of the problem. Opening the file with AAFFileOpenExistingModify() results in an immediate crash so i can't test this option at the moment.
Anyway, for the test being, a quick and dirty write in the essence directly in the binary file showed that it would not yeld the results i was expecting.
Well, i feel pretty dumb at the moment. Thanks for your time and patience.
> Why is error not detected? I don't know,
> but if you have any idea, i'll take it.
Try adding a newline to the end of your
error message, perhaps then you'll see the