### Build AAF SDK using Make Source: https://context7.com/dneg/aaf/llms.txt Instructions for compiling the AAF SDK on Linux/macOS using GNU make. The 'make everything' command builds all components, including libraries, examples, utilities, and tests. 'make check' is used to run the tests. ```bash # Linux/macOS - Build everything (library, examples, utilities, tests) make everything # Run tests make check ``` -------------------------------- ### Open and Create AAF Files C++ Source: https://context7.com/dneg/aaf/llms.txt Demonstrates how to open existing AAF files for reading and create new AAF files with different storage formats (e.g., 4KB sectors, MXF-compatible KLV). Includes essential header includes, product identification setup, and error handling with HRESULT. Requires the AAF SDK library. ```cpp #include "AAF.h" #include "AAFResult.h" #include "AAFFileKinds.h" // Open existing file for reading IAAFFile* pFile = NULL; aafProductIdentification_t ProductInfo; ProductInfo.companyName = L"My Company"; ProductInfo.productName = L"My Application"; ProductInfo.productVersion = &version; // Assuming 'version' is defined elsewhere ProductInfo.productVersionString = L"1.0.0"; ProductInfo.productID = MY_PRODUCT_ID; // Assuming 'MY_PRODUCT_ID' is defined elsewhere ProductInfo.platform = L"Windows"; HRESULT hr = AAFFileOpenExistingRead(L"example.aaf", 0, &pFile); if (SUCCEEDED(hr)) { IAAFHeader* pHeader = NULL; hr = pFile->GetHeader(&pHeader); // Work with file... if (pHeader) pHeader->Release(); if (pFile) { pFile->Close(); pFile->Release(); } } // Create new file with 4KB sectors for large essence hr = AAFFileOpenNewModifyEx( L"output.aaf", &kAAFFileKind_Aaf4KBinary, // Use 4KB sectors 0, &ProductInfo, &pFile ); // Create MXF-compatible AAF-KLV file hr = AAFFileOpenNewModifyEx( L"output.mxf", &kAAFFileKind_AafKlvBinary, 0, &ProductInfo, &pFile ); if (SUCCEEDED(hr)) { if (pFile) { pFile->Save(); pFile->Close(); pFile->Release(); } } ``` -------------------------------- ### COM Interface Inheritance Example (C++) Source: https://github.com/dneg/aaf/blob/master/doc/AAFProjectFAQ.html Demonstrates how implementation objects inherit from COM interfaces. The example shows a stored class inheriting from its associated COM interface and parent class COM interfaces. ```c++ class CAAFFiller : public IAAFFiller, public CAAFSegment { // ... implementation details ... }; ``` -------------------------------- ### Additional Interface Support Example (C++) Source: https://github.com/dneg/aaf/blob/master/doc/AAFProjectFAQ.html Illustrates an implementation object supporting additional interfaces beyond those directly associated with the AAF Specification class. This is shown in the CAAFMasterMob example. ```c++ class CAAFMasterMob : public IAAFMasterMob, public IAAFSearchSource, public CAAFMob { // ... implementation details ... }; ``` -------------------------------- ### C++ Object Creation and Release Source: https://github.com/dneg/aaf/blob/master/doc/AAFProjectFAQ.html This C++ code demonstrates object creation using CreateInstance and object retrieval using Get, highlighting a potential memory leak if Release() is not called. It's relevant for understanding object lifecycle management in the AAF Toolkit. ```cpp IAAFSomething* p = 0; // 1 d->CreateInstance(..., &p); // 2 e->Set(p); // 3 p->Release(); // 4 ``` ```cpp IAAFSomething* q = 0; // 1 e->Get(&q); // 2 ``` -------------------------------- ### Build AAF SDK on Windows using WinCvs Source: https://github.com/dneg/aaf/blob/master/doc/AAFProjectFAQ.html Instructions for obtaining and building the AAF SDK on Windows NT/2000 using the WinCvs client. This involves configuring WinCvs with the correct CVSROOT, logging in anonymously, checking out the AAFWinSDK module, and building the project in Visual Studio. ```bash Admin -> Preferences ... -> Enter the CVSROOT -> :pserver:anonymous@aaf.cvs.sourceforge.net:/cvsroot/aaf Admin -> Preferences ... -> Authentication -> "passwd" file on the cvs server Admin -> Login ... -> Create -> Checkout module -> Enter the module name and path on the server -> AAFWinSDK Open AAF/AAFWinSDK/AAFWinSDK.dsw with Visual Studio, click on the FileView tab in the workspace view then right click on "Everything files" and select "Build". ``` -------------------------------- ### RPM Package for UUID Library Source: https://github.com/dneg/aaf/blob/master/doc/AAFProjectFAQ.html This snippet shows how to check if the UUID library is installed on RPM-based Linux distributions. The library is typically part of the e2fsprogs-devel package. ```bash rpm -q e2fsprogs-devel e2fsprogs-devel-1.27-9 ``` -------------------------------- ### Build AAF SDK with Make Source: https://context7.com/dneg/aaf/llms.txt Commands to build the AAF SDK using the 'make' utility. Supports various configurations like debug/release, static/dynamic libraries, and platform-specific builds. Dependencies include a working Make environment and C++ compiler. ```bash # Build only the reference implementation library make ref-impl # Build and install SDK headers and libraries make install # Build release version instead of debug make AAFTARGET=Release install # Build static library make AAFTARGET=Debug-static everything # macOS - Build for specific architecture make AAFPLATFORM=x86_64Darwin everything make AAFPLATFORM=i386Darwin everything # Build with libgsf structured storage (instead of proprietary) make LIBGSF_PATH=/usr/local everything # Clean build artifacts make clean make realclean # More thorough cleaning ``` -------------------------------- ### Open AAF SDK Solution in Visual Studio (Windows) Source: https://context7.com/dneg/aaf/llms.txt Instructions for opening the AAF SDK solution file in Visual Studio on Windows to build the project. Supports different Visual Studio versions. ```bat # Windows - Using Visual Studio (open solution) # AAFWinSDK/vs9/AAFWinSDK.sln (VS 2008) # AAFWinSDK/vs10/AAFWinSDK.sln (VS 2010) # Build the "Everything" project for complete build ``` -------------------------------- ### Run dodo on Unix/Linux using GNU make Source: https://github.com/dneg/aaf/blob/master/dodo/enchiridion.txt The standard method for running dodo on Unix-like systems. It involves navigating to the dodo directory and executing the 'make' command. Note that 'make --just-print' may not function correctly due to recursive makefile issues. ```shell cd dodo make ``` -------------------------------- ### CVS Log Command Examples (Shell) Source: https://github.com/dneg/aaf/blob/master/build/history/VadeMecum.txt These shell commands demonstrate the usage of `cvs log` with different revision range specifiers. The first command uses tags ('T1', 'T2') to define the range, while the second uses dates/times ('D1', 'D2'). The explanation notes that the date-based range typically provides the output required for build analysis, as tag-based ranges can produce different results. ```shell cvs log -rT1:T2 cvs log -rD1:D2 ``` -------------------------------- ### SSH Access to SourceForge Source: https://github.com/dneg/aaf/blob/master/doc/AAFProjectFAQ.html Connect to SourceForge using SSH with your username. A home directory is created upon your first real login. ```bash ssh -l aaf.cvs.sourceforge.net ``` -------------------------------- ### Run dodo on Windows using MKS Korn shell and clearmake Source: https://github.com/dneg/aaf/blob/master/dodo/enchiridion.txt This method was originally used at Avid but is less common now due to clearmake's licensing. It requires specifying the makefile, enabling GNU make compatibility mode, and ensuring the MKS shell is accessible. ```shell clearmake -C gnu -f makefile SHELL=c:/mks/mksnt/sh.exe ``` -------------------------------- ### Generating Change Logs with AAFmkchangelogs Source: https://github.com/dneg/aaf/blob/master/build/history/VadeMecum.txt This example illustrates how to generate new change log pages and an index using the AAFmkchangelogs script. It involves copying the necessary scripts to a temporary directory and executing the script from there. The script requires the CVSROOT environment variable to be set or execution from within a valid CVS working copy. Options like -v (verbose), -f (force), and -n (include latest changes) can be used. ```bash cd your-working-copy/AAF cp ./build/history/AAFcolormap \ ./build/history/AAFmkchangelogs \ ./build/history/AAFtagdates \ ./build/history/cl2html.awk \ ./build/history/cvs2cl.pl \ ./build/history/mkchangelogs temporary-directory temporary-directory/AAFmkchangelogs ``` -------------------------------- ### Build AAF SDK on Linux using CVS Source: https://github.com/dneg/aaf/blob/master/doc/AAFProjectFAQ.html Steps to obtain and build the AAF SDK on Linux. This involves setting the CVSROOT environment variable, logging into the anonymous CVS server, checking out the AAFLinuxSDK module, navigating to the AAF directory, and running the make command. ```bash $ export CVSROOT=:pserver:anonymous@aaf.cvs.sourceforge.net:/cvsroot/aaf $ cvs login (Logging in to anonymous@aaf.cvs.sourceforge.net) CVS password: $ cvs checkout AAFLinuxSDK ... $ cd AAF $ make ... ``` -------------------------------- ### Run dodo on Macintosh using MPW and MacPerl Source: https://github.com/dneg/aaf/blob/master/dodo/enchiridion.txt This procedure involves setting environment variables for the AAF checkout directory and MacPerl, navigating to the dodo directory, cleaning the SDK, and then running dodo. It may require temporarily commenting out a line in 'copy_if_diff' to prevent issues with file modification timestamps. ```shell set -e aaf "MacintoshHD:TimsFolder:sf:AAF:" set -e MacDodo "{aaf}AAFMacSDK:dodo:" set Commands "{Commands},{MacDodo}Tool:" set -e MACPERL 'MacintoshHD:Applications (Mac OS 9):MPW 3.6d7:MacPerl:' directory {MacDodo} make cleansdk > make.out make.out rundodo ```