From: Phil T. <phi...@us...> - 2007-04-23 15:33:36
|
Update of /cvsroot/aaf/AAF/test/com/OpenExistingModify In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv31933/test/com/OpenExistingModify Modified Files: OpenExistingModify.cpp Log Message: Add encoding switch to OpenExistingModify Index: OpenExistingModify.cpp =================================================================== RCS file: /cvsroot/aaf/AAF/test/com/OpenExistingModify/OpenExistingModify.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** OpenExistingModify.cpp 3 Apr 2007 16:06:37 -0000 1.4 --- OpenExistingModify.cpp 23 Apr 2007 15:33:34 -0000 1.5 *************** *** 77,81 **** ! static HRESULT CreateAAFFile(aafWChar *filename) { TestProductID.companyName = L"AAF Developers Desk"; --- 77,81 ---- ! static HRESULT CreateAAFFile(aafWChar *filename, aafUID_constref fileKind) { TestProductID.companyName = L"AAF Developers Desk"; *************** *** 97,101 **** checkResult( AAFFileOpenNewModifyEx( filename, ! &kAAFFileKind_Aaf4KBinary, 0, &TestProductID, --- 97,101 ---- checkResult( AAFFileOpenNewModifyEx( filename, ! &fileKind, 0, &TestProductID, *************** *** 307,310 **** --- 307,315 ---- fprintf(stderr, "\t 3 - replace AIFCDescriptor with WAVEDescriptor\n"); fprintf(stderr, "\t 4 - add EssenceData\n"); + fprintf(stderr, "\t-e \"encoding\" of initial test file\n"); + fprintf(stderr, "\t AAF-S4K - AAF 4K Structured Storage encoding (default)\n"); + fprintf(stderr, "\t AAF-S - AAF Structured Storage encoding\n"); + fprintf(stderr, "\t KLV - AAF KLV encoding\n"); + fprintf(stderr, "\t XML - AAF XML encoding\n"); } *************** *** 314,317 **** --- 319,323 ---- int level = INT_MAX; bool create_input_file = true; + aafUID_t fileKind = kAAFFileKind_Aaf4KBinary; int i = 1; *************** *** 331,334 **** --- 337,360 ---- i += 2; } + else if (!strcmp(argv[i], "-e")) + { + if (!strcmp(argv[i+1], "AAF-S4K")) + { + fileKind = kAAFFileKind_Aaf4KBinary; + } + else if (!strcmp(argv[i+1], "AAF-S")) + { + fileKind = kAAFFileKind_Aaf512Binary; + } + else if (!strcmp(argv[i+1], "KLV")) + { + fileKind = kAAFFileKind_AafKlvBinary; + } + else if (!strcmp(argv[i+1], "XML")) + { + fileKind = kAAFFileKind_AafXmlText; + } + i += 2; + } else { *************** *** 357,361 **** if (create_input_file) { ! checkResult(CreateAAFFile(filename)); checkResult(ModifyAAFFile(filename, level)); --- 383,387 ---- if (create_input_file) { ! checkResult(CreateAAFFile(filename, fileKind)); checkResult(ModifyAAFFile(filename, level)); |