13
0

Import libAAF into Ardour's source-tree

tools/update_libaaf.sh - libaaf v0.1-85-g3e4c2cd
This commit is contained in:
Robin Gareus 2023-11-13 20:11:35 +01:00
parent 47e437c2aa
commit 7593551e49
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
48 changed files with 24378 additions and 0 deletions

1114
libs/aaf/AAFClass.c Normal file

File diff suppressed because it is too large Load Diff

1904
libs/aaf/AAFCore.c Normal file

File diff suppressed because it is too large Load Diff

264
libs/aaf/AAFDump.c Normal file
View File

@ -0,0 +1,264 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <stdio.h>
#include <string.h>
#include "aaf/AAFDump.h"
#include "aaf/AAFToText.h"
#include "aaf/AAFTypes.h"
#include "aaf/AAFClass.h"
#include "aaf/utils.h"
void
aaf_dump_Header (AAF_Data* aafd)
{
int offset = 0;
struct dbg* dbg = aafd->dbg;
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ByteOrder : %ls (0x%04x)\n", aaft_ByteOrderToText (aafd->Header.ByteOrder), aafd->Header.ByteOrder);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " LastModified : %ls\n", aaft_TimestampToText (aafd->Header.LastModified));
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " AAF ObjSpec Version : %ls\n", aaft_VersionToText (aafd->Header.Version));
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ObjectModel Version : %u\n", aafd->Header.ObjectModelVersion);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Operational Pattern : %ls\n", aaft_OPDefToText (aafd->Header.OperationalPattern));
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n");
dbg->debug_callback (dbg, (void*)aafd, DEBUG_SRC_ID_DUMP, 0, "", "", 0, dbg->_dbg_msg, dbg->user);
}
void
aaf_dump_Identification (AAF_Data* aafd)
{
int offset = 0;
struct dbg* dbg = aafd->dbg;
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " CompanyName : %ls\n", (aafd->Identification.CompanyName) ? aafd->Identification.CompanyName : L"n/a");
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ProductName : %ls\n", (aafd->Identification.ProductName) ? aafd->Identification.ProductName : L"n/a");
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ProductVersion : %ls\n", aaft_ProductVersionToText (aafd->Identification.ProductVersion));
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ProductVersionString : %ls\n", (aafd->Identification.ProductVersionString) ? aafd->Identification.ProductVersionString : L"n/a");
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ProductID : %ls\n", AUIDToText (aafd->Identification.ProductID));
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Date : %ls\n", aaft_TimestampToText (aafd->Identification.Date));
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ToolkitVersion : %ls\n", aaft_ProductVersionToText (aafd->Identification.ToolkitVersion));
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Platform : %ls\n", (aafd->Identification.Platform) ? aafd->Identification.Platform : L"n/a");
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " GenerationAUID : %ls\n", AUIDToText (aafd->Identification.GenerationAUID));
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n");
dbg->debug_callback (dbg, (void*)aafd, DEBUG_SRC_ID_DUMP, 0, "", "", 0, dbg->_dbg_msg, dbg->user);
}
void
aaf_dump_ObjectProperty (AAF_Data* aafd, aafProperty* Prop)
{
int offset = 0;
struct dbg* dbg = aafd->dbg;
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " :.: (0x%04x) %ls (%ls)\n", Prop->pid, aaft_PIDToText (aafd, Prop->pid), aaft_StoredFormToText (Prop->sf) /*AUIDToText( &Prop->def->type ),*/ /*aaft_TypeIDToText( &(Prop->def->type) )*/);
// WARNING : Wont print strong references (set/vector) corectly.
offset += laaf_util_dump_hex (Prop->val, Prop->len, &aafd->dbg->_dbg_msg, &aafd->dbg->_dbg_msg_size, offset);
dbg->debug_callback (dbg, (void*)aafd, DEBUG_SRC_ID_DUMP, 0, "", "", 0, dbg->_dbg_msg, dbg->user);
}
void
aaf_dump_ObjectProperties (AAF_Data* aafd, aafObject* Obj)
{
/*
* List the properties once they have been parsed and interpreted by AAFCore.
*/
// int offset = 0;
// struct dbg *dbg = aafd->dbg;
aafProperty* Prop = NULL;
for (Prop = Obj->Properties; Prop != NULL; Prop = Prop->next) {
aaf_dump_ObjectProperty (aafd, Prop);
// offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " :.: (0x%04x) %ls (%ls)\n", Prop->pid, aaft_PIDToText( aafd, Prop->pid ), aaft_StoredFormToText( Prop->sf ) /*AUIDToText( &Prop->def->type ),*/ /*aaft_TypeIDToText( &(Prop->def->type) )*/ );
//
// // WARNING : Wont print strong references (set/vector) corectly.
// laaf_util_dump_hex( Prop->val, Prop->len );
}
}
void
aaf_dump_rawProperties (AAF_Data* aafd, aafByte_t* propStream)
{
int offset = 0;
struct dbg* dbg = aafd->dbg;
if (propStream == NULL) {
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset,
" ## Property_Header____________________________________________________\n\n"
" aafPropertyIndexHeader_t is NULL\n"
" ======================================================================\n\n");
return;
}
aafPropertyIndexHeader_t Header;
aafPropertyIndexEntry_t Prop;
aafByte_t* value = NULL;
memcpy (&Header, propStream, sizeof (aafPropertyIndexHeader_t));
uint32_t i = 0;
uint32_t valueOffset = 0;
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset,
" ## Property_Header____________________________________________________\n\n"
" _byteOrder : 0x%02x\n"
" _formatVersion : 0x%02x\n"
" _entryCount : %u\n\n"
" ======================================================================\n\n",
Header._byteOrder,
Header._formatVersion,
Header._entryCount);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n");
/*
* Since the following for-loop macro is not intended to be user
* accessible, it has been defined as a local macro in AAFCore.c.
*/
// foreachPropertyEntry( Header, Prop, value, i )
for (valueOffset = sizeof (aafPropertyIndexHeader_t) + (Header._entryCount * sizeof (aafPropertyIndexEntry_t)),
i = 0;
i < Header._entryCount &&
memcpy (&Prop, (propStream + ((sizeof (aafPropertyIndexHeader_t)) + (sizeof (aafPropertyIndexEntry_t) * i))), sizeof (aafPropertyIndexEntry_t)) &&
(value = propStream + valueOffset);
valueOffset += Prop._length,
i++) {
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset,
" #%u Property_Entry_____________________________________________________\n"
" _pid : 0x%04x (%ls)\n"
" _storedForm : %ls\n"
" _length : %u bytes\n",
i,
Prop._pid, aaft_PIDToText (aafd, Prop._pid),
aaft_StoredFormToText (Prop._storedForm),
Prop._length);
offset += laaf_util_dump_hex (value, Prop._length, &aafd->dbg->_dbg_msg, &aafd->dbg->_dbg_msg_size, offset);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n");
}
dbg->debug_callback (dbg, (void*)aafd, DEBUG_SRC_ID_DUMP, 0, "", "", 0, dbg->_dbg_msg, dbg->user);
}
void
aaf_dump_nodeStreamProperties (AAF_Data* aafd, cfbNode* node)
{
/*
* List the raw properties directly from a CFB Node's stream.
*/
aafByte_t* propStream = NULL;
cfb_getStream (aafd->cfbd, node, &propStream, NULL);
aaf_dump_rawProperties (aafd, propStream);
free (propStream);
}
void
aaf_dump_MetaDictionary (AAF_Data* aafd)
{
/*
* NOTE Only dumps the "custom" classes/properties, since those are the only
* ones we register when parsing. That is, all standard classes/properties
* wont be printed out.
*/
int offset = 0;
struct dbg* dbg = aafd->dbg;
aafClass* Class = NULL;
foreachClass (Class, aafd->Classes)
{
int print = 0;
aafPropertyDef* PDef = NULL;
foreachPropertyDefinition (PDef, Class->Properties)
{
if (Class->meta) {
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, ANSI_COLOR_YELLOW "%ls::%ls (0x%04x)\n" ANSI_COLOR_RESET,
Class->name,
PDef->name,
PDef->pid);
print++;
} else if (PDef->meta) {
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%ls::" ANSI_COLOR_YELLOW "%ls (0x%04x)\n" ANSI_COLOR_RESET,
aaft_ClassIDToText (aafd, Class->ID),
PDef->name,
PDef->pid);
print++;
}
}
if (print)
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n");
print = 1;
}
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n");
dbg->debug_callback (dbg, (void*)aafd, DEBUG_SRC_ID_DUMP, 0, "", "", 0, dbg->_dbg_msg, dbg->user);
}
void
aaf_dump_Classes (AAF_Data* aafd)
{
int offset = 0;
struct dbg* dbg = aafd->dbg;
aafClass* ConcreteClass = NULL;
aafClass* Class = NULL;
foreachClass (ConcreteClass, aafd->Classes)
{
foreachClassInheritance (Class, ConcreteClass)
{
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s%ls%s",
(Class->meta) ? ANSI_COLOR_YELLOW : "",
aaft_ClassIDToText (aafd, Class->ID),
(Class->meta) ? ANSI_COLOR_RESET : "");
if (Class->Parent != NULL)
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " > ");
}
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n");
}
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n");
dbg->debug_callback (dbg, (void*)aafd, DEBUG_SRC_ID_DUMP, 0, "", "", 0, dbg->_dbg_msg, dbg->user);
}

553
libs/aaf/AAFIAudioFiles.c Normal file
View File

@ -0,0 +1,553 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <ctype.h>
#include <inttypes.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
#include <wchar.h>
#include "aaf/AAFIAudioFiles.h"
#include "aaf/AAFIface.h"
#include "aaf/debug.h"
#include "aaf/RIFFParser.h"
#include "aaf/URIParser.h"
#include "aaf/utils.h"
#if defined(__linux__)
#include <linux/limits.h>
#include <arpa/inet.h>
#include <mntent.h>
#include <unistd.h> /* access() */
#elif defined(__APPLE__)
#include <sys/syslimits.h>
#include <unistd.h> /* access() */
#elif defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
#include <limits.h>
#define R_OK 4 /* Test for read permission. */
#define W_OK 2 /* Test for write permission. */
#define F_OK 0 /* Test for existence. */
#ifndef _MSC_VER
#include <unistd.h> // access()
#endif
#endif
#define WAV_FILE_EXT "wav"
#define AIFF_FILE_EXT "aif"
#define debug(...) \
_dbg (aafi->dbg, aafi, DEBUG_SRC_ID_AAF_IFACE, VERB_DEBUG, __VA_ARGS__)
#define warning(...) \
_dbg (aafi->dbg, aafi, DEBUG_SRC_ID_AAF_IFACE, VERB_WARNING, __VA_ARGS__)
#define error(...) \
_dbg (aafi->dbg, aafi, DEBUG_SRC_ID_AAF_IFACE, VERB_ERROR, __VA_ARGS__)
static size_t
embeddedAudioDataReaderCallback (unsigned char* buf, size_t offset, size_t reqLen, void* user1, void* user2, void* user3);
static size_t
externalAudioDataReaderCallback (unsigned char* buf, size_t offset, size_t reqLen, void* user1, void* user2, void* user3);
char*
aafi_locate_external_essence_file (AAF_Iface* aafi, const wchar_t* original_uri_filepath, const char* search_location)
{
/*
* Absolute Uniform Resource Locator (URL) complying with RFC 1738 or relative
* Uniform Resource Identifier (URI) complying with RFC 2396 for file containing
* the essence. If it is a relative URI, the base URI is determined from the URI
* of the AAF file itself.
*
* Informative note: A valid URL or URI uses a constrained character set and
* uses the / character as the path separator.
*/
char* uri_filepath = NULL;
char* local_filepath = NULL;
char* aaf_path = NULL;
char* retpath = NULL;
struct uri* uri = NULL;
if (original_uri_filepath == NULL) {
error ("Cant locate a NULL filepath");
goto err;
}
size_t uri_filepath_len = wcslen (original_uri_filepath) + 1;
uri_filepath = malloc (uri_filepath_len);
if (uri_filepath == NULL) {
error ("Could not allocate memory : %s", strerror (errno));
goto err;
}
int reqlen = snprintf (uri_filepath, uri_filepath_len, "%ls", original_uri_filepath);
if (reqlen < 0 || (unsigned)reqlen >= uri_filepath_len) {
error ("Failed converting wide char URI filepath to byte char%s", (reqlen < 0) ? " : encoding error" : "");
goto err;
}
// debug( "Original URI filepath : %s", uri_filepath );
if (search_location) {
local_filepath = laaf_util_build_path (DIR_SEP_STR, search_location, laaf_util_fop_get_file (uri_filepath), NULL);
if (local_filepath == NULL) {
error ("Could not build search filepath");
goto err;
}
// debug( "Search filepath : %s", fpath );
if (access (local_filepath, F_OK) != -1) {
// debug( "FOUND: %s", local_filepath );
retpath = local_filepath;
goto found;
}
free (local_filepath);
local_filepath = NULL;
}
/* Try AAF essence's URI */
if (access (uri_filepath, F_OK) != -1) {
// debug( "FOUND: %s", uri_filepath );
retpath = uri_filepath;
goto found;
}
/* Try <path> part of URI */
uri = uriParse (uri_filepath, URI_OPT_DECODE_ALL, aafi->dbg);
if (uri == NULL) {
error ("Could not parse URI");
goto err;
}
if (uri->path == NULL) {
error ("Could not retrieve <path> out of URI");
goto err;
}
// debug( "URI's filepath : %s", uri->path );
if (access (uri->path, F_OK) != -1) {
// debug( "FOUND: %s", path );
retpath = uri->path;
goto found;
}
if (uri->flags & URI_T_LOCALHOST) {
// debug( "URI targets localhost : %s", uri_filepath );
} else {
if (uri->flags & URI_T_HOST_IPV4) {
// debug( "URI targets IPV4 : %s", uri_filepath );
} else if (uri->flags & URI_T_HOST_IPV6) {
// debug( "URI targets IPV6 : %s", uri_filepath );
} else if (uri->flags & URI_T_HOST_REGNAME) {
// debug( "URI targets hostname : %s", uri_filepath );
}
}
/*
* Try to locate essence file from the AAF file location.
*
* e.g.
* - AAF filepath : /home/user/AAFFile.aaf
* - Essence URI : file://localhost/C:/Users/user/Desktop/AudioFiles/essence.wav
* = /home/user/AudioFiles/essence.file
*/
/* extract relative path to essence file : "<firstparent>/<essence.file>" */
char* relativeEssencePath = NULL;
char* p = uri->path + strlen (uri->path);
int sepcount = 0;
while (p > uri->path) {
if (*p == '/') { /* parsing URI, so will always be '/' as separator character */
sepcount++;
if (sepcount == 2) {
relativeEssencePath = (p + 1);
break;
}
}
p--;
}
/* extract path to AAF file */
aaf_path = laaf_util_c99strdup (aafi->aafd->cfbd->file);
if (aaf_path == NULL) {
error ("Could not duplicate AAF filepath");
goto err;
}
p = aaf_path + strlen (aaf_path);
while (p > aaf_path) {
if (IS_DIR_SEP (*p)) {
*p = 0x00;
break;
}
p--;
}
local_filepath = laaf_util_build_path (DIR_SEP_STR, aaf_path, relativeEssencePath, NULL);
if (local_filepath == NULL) {
error ("Could not build filepath");
goto err;
}
// debug( "AAF relative filepath : %s", local_filepath );
if (access (local_filepath, F_OK) != -1) {
// debug( "FOUND: %s", filepath );
retpath = local_filepath;
goto found;
}
// debug("File not found");
found:
retpath = laaf_util_c99strdup (retpath);
goto end;
err:
retpath = NULL;
end:
if (uri)
uriFree (uri);
if (uri_filepath)
free (uri_filepath);
if (local_filepath)
free (local_filepath);
if (aaf_path)
free (aaf_path);
return retpath;
/*
* AAFInfo --aaf-clips ../libaaf_testfiles/fonk_2.AAF
file://localhost/Users/horlaprod/Music/Logic/fonk_2/Audio Files_1/fonk_2_3#04.wav
* AAFInfo --aaf-clips ../libaaf_testfiles/ADP/ADP3_51-ST-MONO-NOBREAKOUT.aaf
file:///C:/Users/Loviniou/Downloads/ChID-BLITS-EBU-Narration441-16b.wav
* AAFInfo --aaf-clips ../libaaf_testfiles/ADP/ADP2_SEQ-FULL.aaf
file://?/E:/Adrien/ADPAAF/Sequence A Rendu.mxf
* AAFInfo --aaf-clips ../libaaf_testfiles/TEST-AVID_COMP2977052\ \ -\ \ OFF\ PODIUM\ ETAPE\ 2.aaf
file:////C:/Users/mix_limo/Desktop/TEST2977052 - OFF PODIUM ETAPE 2.aaf
* AAFInfo --aaf-clips ../ardio/watchfolder/3572607_RUGBY_F_1_1.aaf
file://10.87.230.71/mixage/DR2/Avid MediaFiles/MXF/1/3572607_RUGBY_F2_S65CFA3D0V.mxf
* AAFInfo --aaf-clips ../libaaf_testfiles/ProTools/pt2MCC.aaf
file:///_system/Users/horlaprod/pt2MCCzmhsFRHQgdgsTMQX.mxf
*/
}
int
aafi_extract_audio_essence (AAF_Iface* aafi, aafiAudioEssence* audioEssence, const char* outfilepath, const wchar_t* forcedFileName)
{
int rc = 0;
int reqlen = 0;
FILE* fp = NULL;
char* filename = NULL;
char* filepath = NULL;
unsigned char* data = NULL;
uint64_t datasz = 0;
if (audioEssence->is_embedded == 0) {
warning ("Audio essence is not embedded : nothing to extract");
return -1;
}
/* Retrieve stream from CFB */
cfb_getStream (aafi->aafd->cfbd, audioEssence->node, &data, &datasz);
if (data == NULL) {
error ("Could not retrieve audio essence stream from CFB");
goto err;
}
/* Build file path */
reqlen = snprintf (NULL, 0, "%ls.%s", (forcedFileName != NULL) ? forcedFileName : audioEssence->unique_file_name, (audioEssence->type == AAFI_ESSENCE_TYPE_AIFC) ? AIFF_FILE_EXT : WAV_FILE_EXT);
if (reqlen < 0) {
error ("Failed to build filename");
goto err;
}
int filenamelen = reqlen + 1;
filename = malloc (filenamelen);
if (filename == NULL) {
error ("Could not allocate memory : %s", strerror (errno));
goto err;
}
rc = snprintf (filename, filenamelen, "%ls.%s", (forcedFileName != NULL) ? forcedFileName : audioEssence->unique_file_name, (audioEssence->type == AAFI_ESSENCE_TYPE_AIFC) ? AIFF_FILE_EXT : WAV_FILE_EXT);
if (rc < 0 || (unsigned)rc >= (unsigned)filenamelen) {
error ("Failed to build filename");
goto err;
}
filepath = laaf_util_build_path (DIR_SEP_STR, outfilepath, laaf_util_clean_filename (filename), NULL);
if (filepath == NULL) {
error ("Could not build filepath");
goto err;
}
fp = fopen (filepath, "wb");
if (fp == NULL) {
error ("Could not open '%s' for writing : %s", filepath, strerror (errno));
goto err;
}
if (audioEssence->type == AAFI_ESSENCE_TYPE_PCM) {
struct wavFmtChunk wavFmt;
wavFmt.channels = audioEssence->channels;
wavFmt.samples_per_sec = audioEssence->samplerate;
wavFmt.bits_per_sample = audioEssence->samplesize;
struct wavBextChunk wavBext;
memset (&wavBext, 0x00, sizeof (wavBext));
memcpy (wavBext.umid, audioEssence->sourceMobID, sizeof (aafMobID_t));
if (audioEssence->mobSlotEditRate) {
wavBext.time_reference = eu2sample (audioEssence->samplerate, audioEssence->mobSlotEditRate, audioEssence->timeReference);
}
if (datasz >= (uint32_t)-1) {
// TODO RF64 support ?
error ("Audio essence is bigger than maximum wav file size (2^32 bytes) : %" PRIu64 " bytes", datasz);
goto err;
}
if (riff_writeWavFileHeader (fp, &wavFmt, &wavBext, (uint32_t)datasz, aafi->dbg) < 0) {
error ("Could not write wav audio header : %s", filepath);
goto err;
}
}
uint64_t writtenBytes = fwrite (data, sizeof (unsigned char), datasz, fp);
if (writtenBytes < datasz) {
error ("Could not write audio file (%" PRIu64 " bytes written out of %" PRIu64 " bytes) : %s", writtenBytes, datasz, filepath);
goto err;
}
audioEssence->usable_file_path = malloc ((strlen (filepath) + 1) * sizeof (wchar_t));
if (audioEssence->usable_file_path == NULL) {
error ("Could not allocate memory : %s", strerror (errno));
goto err;
}
reqlen = swprintf (audioEssence->usable_file_path, strlen (filepath) + 1, L"%" WPRIs, filepath);
if (reqlen < 0) {
error ("Failed setting usable_file_path");
goto err;
}
rc = 0;
goto end;
err:
rc = -1;
end:
if (filename)
free (filename);
if (filepath)
free (filepath);
if (data)
free (data);
if (fp)
fclose (fp);
return rc;
}
int
aafi_parse_audio_summary (AAF_Iface* aafi, aafiAudioEssence* audioEssence)
{
// laaf_util_dump_hex( audioEssence->summary->val, audioEssence->summary->len );
int rc = 0;
char* externalFilePath = NULL;
FILE* fp = NULL;
struct RIFFAudioFile RIFFAudioFile;
if (audioEssence->is_embedded) {
if (audioEssence->summary == NULL) {
warning ("TODO: Audio essence has no summary. Should try essence data stream ?");
goto err;
}
/*
* Adobe Premiere Pro, embedded mp3/mp4 files converted to PCM/AIFF on export, AAFClassID_AIFCDescriptor, 'COMM' is valid.
* ______________________________ Hex Dump ______________________________
*
* 46 4f 52 4d 00 00 00 32 41 49 46 43 43 4f 4d 4d | FORM...2 AIFCCOMM
* 00 00 00 26 00 01 00 00 00 00 00 10 40 0e bb 80 | ........ ........
* 00 00 00 00 00 00 4e 4f 4e 45 0e 4e 6f 74 20 43 | ......NO NE.Not.C
* 6f 6d 70 72 65 73 73 65 64 00 | ompresse d.
* ______________________________________________________________________
*/
// laaf_util_dump_hex( audioEssence->summary->val, audioEssence->summary->len );
rc = riff_parseAudioFile (&RIFFAudioFile, RIFF_PARSE_ONLY_HEADER, &embeddedAudioDataReaderCallback, audioEssence->summary->val, &audioEssence->summary->len, aafi, aafi->dbg);
if (rc < 0) {
warning ("TODO: Could not parse embedded essence summary. Should try essence data stream ?");
goto err;
}
} else {
/* TODO: can external essence have audioEssence->summary too ? If mp3 (Resolve 18.5.aaf) ? */
externalFilePath = aafi_locate_external_essence_file (aafi, audioEssence->original_file_path, aafi->ctx.options.media_location);
if (externalFilePath == NULL) {
error ("Could not locate external audio essence file '%ls'", audioEssence->original_file_path);
return -1;
}
audioEssence->usable_file_path = malloc ((strlen (externalFilePath) + 1) * sizeof (wchar_t));
if (audioEssence->usable_file_path == NULL) {
error ("Could not allocate memory : %s", strerror (errno));
goto err;
}
rc = swprintf (audioEssence->usable_file_path, strlen (externalFilePath) + 1, L"%" WPRIs, externalFilePath);
if (rc < 0) {
error ("Failed setting usable_file_path");
goto err;
}
fp = fopen (externalFilePath, "rb");
if (fp == NULL) {
error ("Could not open external audio essence file for reading : %s", externalFilePath);
goto err;
}
rc = riff_parseAudioFile (&RIFFAudioFile, RIFF_PARSE_ONLY_HEADER, &externalAudioDataReaderCallback, fp, externalFilePath, aafi, aafi->dbg);
if (rc < 0) {
error ("TODO IF MP3 ? Failed parsing external essence file : %s", externalFilePath);
goto err;
}
}
audioEssence->channels = RIFFAudioFile.channels;
audioEssence->samplerate = RIFFAudioFile.sampleRate;
audioEssence->samplesize = RIFFAudioFile.sampleSize;
audioEssence->length = RIFFAudioFile.duration;
rc = 0;
goto end;
err:
rc = -1;
end:
if (fp)
fclose (fp);
if (externalFilePath)
free (externalFilePath);
return rc;
}
static size_t
embeddedAudioDataReaderCallback (unsigned char* buf, size_t offset, size_t reqLen, void* user1, void* user2, void* user3)
{
unsigned char* data = user1;
size_t datasz = *(size_t*)user2;
AAF_Iface* aafi = (AAF_Iface*)user3;
if (offset >= datasz) {
error ("Requested data starts beyond data length");
return -1;
}
if (offset + reqLen >= datasz) {
reqLen = datasz - (offset + reqLen);
}
memcpy (buf, data + offset, reqLen);
return reqLen;
}
static size_t
externalAudioDataReaderCallback (unsigned char* buf, size_t offset, size_t reqLen, void* user1, void* user2, void* user3)
{
FILE* fp = (FILE*)user1;
const char* filename = (const char*)user2;
AAF_Iface* aafi = (AAF_Iface*)user3;
if (fseek (fp, offset, SEEK_SET) < 0) {
error ("Could not seek to %zu in file '%s' : %s", offset, filename, strerror (errno));
return -1;
}
size_t read = fread (buf, sizeof (unsigned char), reqLen, fp);
if (read < reqLen) {
error ("File read failed at %zu (expected %zu, read %zu) in file '%s' : %s", offset, reqLen, read, filename, strerror (errno));
return -1;
}
return read;
}

4169
libs/aaf/AAFIParser.c Normal file

File diff suppressed because it is too large Load Diff

848
libs/aaf/AAFIface.c Normal file
View File

@ -0,0 +1,848 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
/**
* @file LibAAF/AAFIface/AAFIface.c
* @brief AAF processing
* @author Adrien Gesta-Fline
* @version 0.1
* @date 04 october 2017
*
* @ingroup AAFIface
* @addtogroup AAFIface
*
* The AAFIface provides the actual processing of the AAF Objects in order to show
* essences and clips in a simplified manner. Indeed, AAF has many different ways to
* store data and metadata. Thus, the AAFIface is an abstraction layer that provides
* a constant and unique representation method of essences and clips.
*
*
*
* @{
*/
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aaf/AAFIParser.h"
#include "aaf/AAFIface.h"
#include "aaf/debug.h"
#include "aaf/utils.h"
#ifdef _WIN32
#ifndef ENABLE_VIRTUAL_TERMINAL_PROCESSING
#define ENABLE_VIRTUAL_TERMINAL_PROCESSING 0x0004
#endif
#endif
#define debug(...) \
_dbg (aafi->dbg, aafi, DEBUG_SRC_ID_AAF_IFACE, VERB_DEBUG, __VA_ARGS__)
#define warning(...) \
_dbg (aafi->dbg, aafi, DEBUG_SRC_ID_AAF_IFACE, VERB_WARNING, __VA_ARGS__)
#define error(...) \
_dbg (aafi->dbg, aafi, DEBUG_SRC_ID_AAF_IFACE, VERB_ERROR, __VA_ARGS__)
AAF_Iface*
aafi_alloc (AAF_Data* aafd)
{
AAF_Iface* aafi = calloc (sizeof (AAF_Iface), sizeof (unsigned char));
if (aafi == NULL) {
return NULL;
}
aafi->dbg = laaf_new_debug ();
if (aafi->dbg == NULL) {
return NULL;
}
aafi->Audio = calloc (sizeof (aafiAudio), sizeof (unsigned char));
if (aafi->Audio == NULL) {
return NULL;
}
aafi->Audio->Essences = NULL;
aafi->Audio->samplerate = 0;
aafi->Audio->samplesize = 0;
aafi->Audio->Tracks = NULL;
aafi->Audio->track_count = 0;
aafi->Audio->length = 0;
aafi->Video = calloc (sizeof (aafiVideo), sizeof (unsigned char));
if (aafi->Video == NULL) {
return NULL;
}
aafi->Video->Essences = NULL;
aafi->Video->Tracks = NULL;
aafi->Video->length = 0;
if (aafd != NULL) {
aafi->aafd = aafd;
} else {
aafi->aafd = aaf_alloc (aafi->dbg);
}
aafi->Markers = NULL;
aafi->compositionName = NULL;
aafi->ctx.is_inside_derivation_chain = 0;
aafi->ctx.options.forbid_nonlatin_filenames = 0;
aafi->ctx.options.trace = 0;
return aafi;
}
void
aafi_enable_windows_VT100_output (void)
{
#ifdef _WIN32
/* enables ANSI colors and unicode chars */
HANDLE hOut = GetStdHandle (STD_OUTPUT_HANDLE);
DWORD dwMode = 0;
GetConsoleMode (hOut, &dwMode);
SetConsoleMode (hOut, (dwMode | ENABLE_VIRTUAL_TERMINAL_PROCESSING));
#endif
}
void
aafi_set_debug (AAF_Iface* aafi, verbosityLevel_e v, FILE* fp, void (*callback) (struct dbg* dbg, void* ctxdata, int lib, int type, const char* srcfile, const char* srcfunc, int lineno, const char* msg, void* user), void* user)
{
aafi->dbg->verb = v;
aafi->dbg->fp = fp;
if (callback) {
aafi->dbg->debug_callback = callback;
}
if (user) {
aafi->dbg->user = user;
}
}
int
aafi_set_media_location (AAF_Iface* aafi, const char* path)
{
if (aafi->ctx.options.media_location) {
free (aafi->ctx.options.media_location);
}
aafi->ctx.options.media_location = (path) ? laaf_util_c99strdup (path) : NULL;
return 0;
}
int
aafi_set_trace_class (AAF_Iface* aafi, const char* className)
{
if (aafi->ctx.options.trace_class) {
free (aafi->ctx.options.trace_class);
aafi->ctx.options.trace_class = NULL;
}
aafi->ctx.options.trace_class = malloc ((strlen (className) + 1) * sizeof (wchar_t));
if (aafi->ctx.options.trace_class == NULL) {
return -1;
}
swprintf (aafi->ctx.options.trace_class, strlen (className) + 1, L"%" WPRIs, className);
return 0;
}
void
aafi_release (AAF_Iface** aafi)
{
if (*aafi == NULL)
return;
aaf_release (&(*aafi)->aafd);
if ((*aafi)->compositionName != NULL) {
free ((*aafi)->compositionName);
}
if ((*aafi)->Comments) {
aafi_freeUserComments (&((*aafi)->Comments));
}
if ((*aafi)->Audio != NULL) {
if ((*aafi)->Audio->Tracks != NULL) {
aafi_freeAudioTracks (&(*aafi)->Audio->Tracks);
}
if ((*aafi)->Audio->Essences != NULL) {
aafi_freeAudioEssences (&(*aafi)->Audio->Essences);
}
free ((*aafi)->Audio);
}
if ((*aafi)->Video != NULL) {
if ((*aafi)->Video->Tracks != NULL) {
aafi_freeVideoTracks (&(*aafi)->Video->Tracks);
}
if ((*aafi)->Video->Essences != NULL) {
aafi_freeVideoEssences (&(*aafi)->Video->Essences);
}
free ((*aafi)->Video);
}
if ((*aafi)->Markers) {
aafi_freeMarkers (&(*aafi)->Markers);
}
if ((*aafi)->ctx.options.trace_class) {
free ((*aafi)->ctx.options.trace_class);
}
if ((*aafi)->ctx.options.media_location) {
free ((*aafi)->ctx.options.media_location);
}
if ((*aafi)->Timecode != NULL) {
free ((*aafi)->Timecode);
}
if ((*aafi)->dbg) {
laaf_free_debug ((*aafi)->dbg);
}
free (*aafi);
*aafi = NULL;
}
int
aafi_load_file (AAF_Iface* aafi, const char* file)
{
if (aaf_load_file (aafi->aafd, file)) {
error ("Could not load file : %s\n", file);
return 1;
}
aafi_retrieveData (aafi);
return 0;
}
aafiTransition*
aafi_get_fadein (aafiTimelineItem* audioItem)
{
if (audioItem->prev != NULL &&
audioItem->prev->type == AAFI_TRANS) {
aafiTransition* Trans = audioItem->prev->data;
if (Trans->flags & AAFI_TRANS_FADE_IN)
return Trans;
}
return NULL;
}
aafiTransition*
aafi_get_fadeout (aafiTimelineItem* audioItem)
{
if (audioItem->next != NULL &&
audioItem->next->type == AAFI_TRANS) {
aafiTransition* Trans = audioItem->next->data;
if (Trans->flags & AAFI_TRANS_FADE_OUT)
return Trans;
}
return NULL;
}
aafiTransition*
aafi_get_xfade (aafiTimelineItem* audioItem)
{
if (audioItem->prev != NULL &&
audioItem->prev->type == AAFI_TRANS) {
aafiTransition* Trans = audioItem->prev->data;
if (Trans->flags & AAFI_TRANS_XFADE)
return Trans;
}
return NULL;
}
aafiMarker*
aafi_newMarker (AAF_Iface* aafi, aafRational_t* editRate, aafPosition_t start, aafPosition_t length, wchar_t* name, wchar_t* comment, uint16_t*(RVBColor[3]))
{
aafiMarker* marker = malloc (sizeof (aafiMarker));
marker->edit_rate = editRate;
marker->start = start;
marker->length = length;
marker->name = name;
marker->comment = comment;
marker->prev = NULL;
marker->next = NULL;
if (RVBColor) {
marker->RVBColor[0] = (*RVBColor)[0];
marker->RVBColor[1] = (*RVBColor)[1];
marker->RVBColor[2] = (*RVBColor)[2];
}
if (aafi->Markers != NULL) {
aafiMarker* tmp = aafi->Markers;
for (; tmp != NULL; tmp = tmp->next)
if (tmp->next == NULL)
break;
tmp->next = marker;
marker->prev = marker;
} else {
aafi->Markers = marker;
marker->prev = NULL;
}
return marker;
}
void
aafi_freeMarkers (aafiMarker** Markers)
{
aafiMarker* marker = NULL;
aafiMarker* nextMarker = NULL;
for (marker = (*Markers); marker != NULL; marker = nextMarker) {
nextMarker = marker->next;
if (marker->name)
free (marker->name);
if (marker->comment)
free (marker->comment);
free (marker);
}
*Markers = NULL;
}
aafiTimelineItem*
aafi_newTimelineItem (AAF_Iface* aafi, void* track, int itemType)
{
aafiTimelineItem* item = NULL;
if (itemType == AAFI_AUDIO_CLIP) {
item = calloc (sizeof (aafiTimelineItem), sizeof (char));
if (item == NULL) {
error ("%s.", strerror (errno));
return NULL;
}
item->type = AAFI_AUDIO_CLIP;
item->data = calloc (sizeof (aafiAudioClip), sizeof (char));
aafiAudioClip* audioClip = item->data;
audioClip->track = (aafiAudioTrack*)track;
audioClip->Item = item;
} else if (itemType == AAFI_VIDEO_CLIP) {
item = calloc (sizeof (aafiTimelineItem), sizeof (char));
if (item == NULL) {
error ("%s.", strerror (errno));
return NULL;
}
item->type = AAFI_VIDEO_CLIP;
item->data = calloc (sizeof (aafiVideoClip), sizeof (char));
aafiVideoClip* videoClip = item->data;
videoClip->track = (aafiVideoTrack*)track;
} else if (itemType == AAFI_TRANS) {
item = calloc (sizeof (aafiTimelineItem), sizeof (char));
if (item == NULL) {
error ("%s.", strerror (errno));
return NULL;
}
item->type = AAFI_TRANS;
item->data = calloc (sizeof (aafiTransition), sizeof (char));
}
if (itemType == AAFI_AUDIO_CLIP || itemType == AAFI_TRANS) {
if (track != NULL) {
/* Add to track's item list */
if (((aafiAudioTrack*)track)->Items != NULL) {
aafiTimelineItem* tmp = ((aafiAudioTrack*)track)->Items;
for (; tmp != NULL; tmp = tmp->next)
if (tmp->next == NULL)
break;
tmp->next = item;
item->prev = tmp;
} else {
((aafiAudioTrack*)track)->Items = item;
item->prev = NULL;
}
}
} else if (itemType == AAFI_VIDEO_CLIP) {
if (track != NULL) {
/* Add to track's item list */
if (((aafiVideoTrack*)track)->Items != NULL) {
aafiTimelineItem* tmp = ((aafiVideoTrack*)track)->Items;
for (; tmp != NULL; tmp = tmp->next)
if (tmp->next == NULL)
break;
tmp->next = item;
item->prev = tmp;
} else {
((aafiVideoTrack*)track)->Items = item;
item->prev = NULL;
}
}
}
return item;
}
int
aafi_removeTimelineItem (AAF_Iface* aafi, aafiTimelineItem* item)
{
if (item->prev != NULL) {
item->prev->next = item->next;
}
if (item->next != NULL) {
item->next->prev = item->prev;
}
aafiAudioTrack* audioTrack = NULL;
foreach_audioTrack (audioTrack, aafi)
{
if (audioTrack->Items == item) {
audioTrack->Items = item->next;
}
}
aafi_freeTimelineItem (&item);
return 0;
}
void
aafi_freeAudioGain (aafiAudioGain* gain)
{
if (gain == NULL) {
return;
}
if (gain->time != NULL) {
free (gain->time);
}
if (gain->value != NULL) {
free (gain->value);
}
free (gain);
}
void
aafi_freeAudioPan (aafiAudioPan* pan)
{
aafi_freeAudioGain ((aafiAudioGain*)pan);
}
void
aafi_freeAudioClip (aafiAudioClip* audioClip)
{
if (audioClip->gain != NULL) {
aafi_freeAudioGain (audioClip->gain);
}
if (audioClip->automation != NULL) {
aafi_freeAudioGain (audioClip->automation);
}
}
void
aafi_freeTimelineItem (aafiTimelineItem** item)
{
if ((*item)->type == AAFI_TRANS) {
aafi_freeTransition ((aafiTransition*)((*item)->data));
free ((*item)->data);
} else if ((*item)->type == AAFI_AUDIO_CLIP) {
aafi_freeAudioClip ((aafiAudioClip*)((*item)->data));
free ((*item)->data);
} else if ((*item)->type == AAFI_VIDEO_CLIP) {
free ((*item)->data);
}
free (*item);
*item = NULL;
}
void
aafi_freeTimelineItems (aafiTimelineItem** items)
{
aafiTimelineItem* item = NULL;
aafiTimelineItem* nextItem = NULL;
for (item = (*items); item != NULL; item = nextItem) {
nextItem = item->next;
aafi_freeTimelineItem (&item);
}
*items = NULL;
}
aafiUserComment*
aafi_newUserComment (AAF_Iface* aafi, aafiUserComment** CommentList)
{
aafiUserComment* UserComment = calloc (sizeof (aafiUserComment), 1);
if (UserComment == NULL) {
error ("%s.", strerror (errno));
return NULL;
}
if (CommentList != NULL) {
UserComment->next = *CommentList;
*CommentList = UserComment;
} else {
*CommentList = UserComment;
}
return UserComment;
}
void
aafi_freeUserComments (aafiUserComment** CommentList)
{
aafiUserComment* UserComment = *CommentList;
aafiUserComment* tmp = NULL;
while (UserComment != NULL) {
tmp = UserComment;
UserComment = UserComment->next;
if (tmp->name != NULL) {
free (tmp->name);
}
if (tmp->text != NULL) {
free (tmp->text);
}
free (tmp);
}
*CommentList = NULL;
}
void
aafi_freeTransition (aafiTransition* Transition)
{
if (Transition->value_a != NULL) {
free (Transition->value_a);
}
if (Transition->value_b != NULL) {
free (Transition->value_b);
}
if (Transition->time_a != NULL) {
free (Transition->time_a);
}
if (Transition->time_b != NULL) {
free (Transition->time_b);
}
}
aafiAudioTrack*
aafi_newAudioTrack (AAF_Iface* aafi)
{
aafiAudioTrack* track = calloc (sizeof (aafiAudioTrack), sizeof (unsigned char));
if (track == NULL) {
error ("%s.", strerror (errno));
return NULL;
}
track->Audio = aafi->Audio;
track->format = AAFI_TRACK_FORMAT_NOT_SET;
track->pan = NULL;
track->gain = NULL;
track->current_pos = 0;
track->next = NULL;
/* Add to track list */
if (aafi->Audio->Tracks != NULL) {
aafiAudioTrack* tmp = aafi->Audio->Tracks;
for (; tmp != NULL; tmp = tmp->next)
if (tmp->next == NULL)
break;
tmp->next = track;
} else {
aafi->Audio->Tracks = track;
}
return track;
}
void
aafi_freeAudioTracks (aafiAudioTrack** tracks)
{
if (*(tracks) == NULL) {
return;
}
aafiAudioTrack* track = NULL;
aafiAudioTrack* nextTrack = NULL;
for (track = (*tracks); track != NULL; track = nextTrack) {
nextTrack = track->next;
if (track->name != NULL) {
free (track->name);
}
if (track->gain != NULL) {
aafi_freeAudioGain (track->gain);
}
if (track->pan != NULL) {
aafi_freeAudioPan (track->pan);
}
if (track->Items != NULL) {
aafi_freeTimelineItems (&(track->Items));
}
free (track);
}
*tracks = NULL;
}
aafiVideoTrack*
aafi_newVideoTrack (AAF_Iface* aafi)
{
aafiVideoTrack* track = calloc (sizeof (aafiVideoTrack), sizeof (unsigned char));
if (track == NULL) {
error ("%s.", strerror (errno));
return NULL;
}
track->Video = aafi->Video;
track->current_pos = 0;
track->next = NULL;
/* Add to track list */
if (aafi->Video->Tracks != NULL) {
aafiVideoTrack* tmp = aafi->Video->Tracks;
for (; tmp != NULL; tmp = tmp->next)
if (tmp->next == NULL)
break;
tmp->next = track;
} else {
aafi->Video->Tracks = track;
}
return track;
}
void
aafi_freeVideoTracks (aafiVideoTrack** tracks)
{
if (*(tracks) == NULL) {
return;
}
aafiVideoTrack* track = NULL;
aafiVideoTrack* nextTrack = NULL;
for (track = (*tracks); track != NULL; track = nextTrack) {
nextTrack = track->next;
if (track->name != NULL) {
free (track->name);
}
if (track->Items != NULL) {
aafi_freeTimelineItems (&(track->Items));
}
free (track);
}
*tracks = NULL;
}
aafiAudioEssence*
aafi_newAudioEssence (AAF_Iface* aafi)
{
aafiAudioEssence* audioEssence = calloc (sizeof (aafiAudioEssence), sizeof (char));
if (audioEssence == NULL) {
error ("%s.", strerror (errno));
return NULL;
}
audioEssence->next = aafi->Audio->Essences;
audioEssence->original_file_path = NULL;
audioEssence->usable_file_path = NULL;
audioEssence->file_name = NULL;
audioEssence->unique_file_name = NULL;
audioEssence->clip_count = 0;
audioEssence->user = NULL;
aafi->Audio->Essences = audioEssence;
return audioEssence;
}
void
aafi_freeAudioEssences (aafiAudioEssence** audioEssence)
{
if (*(audioEssence) == NULL) {
return;
}
aafiAudioEssence* nextAudioEssence = NULL;
for (; (*audioEssence) != NULL; *audioEssence = nextAudioEssence) {
nextAudioEssence = (*audioEssence)->next;
if ((*audioEssence)->original_file_path != NULL) {
free ((*audioEssence)->original_file_path);
}
if ((*audioEssence)->usable_file_path != NULL) {
free ((*audioEssence)->usable_file_path);
}
if ((*audioEssence)->file_name != NULL) {
free ((*audioEssence)->file_name);
}
if ((*audioEssence)->unique_file_name != NULL) {
free ((*audioEssence)->unique_file_name);
}
free (*audioEssence);
}
*audioEssence = NULL;
}
aafiVideoEssence*
aafi_newVideoEssence (AAF_Iface* aafi)
{
aafiVideoEssence* videoEssence = calloc (sizeof (aafiVideoEssence), sizeof (char));
if (videoEssence == NULL) {
error ("%s.", strerror (errno));
return NULL;
}
videoEssence->next = aafi->Video->Essences;
videoEssence->original_file_path = NULL;
videoEssence->usable_file_path = NULL;
videoEssence->file_name = NULL;
videoEssence->unique_file_name = NULL;
aafi->Video->Essences = videoEssence;
return videoEssence;
}
void
aafi_freeVideoEssences (aafiVideoEssence** videoEssence)
{
if (*(videoEssence) == NULL) {
return;
}
aafiVideoEssence* nextVideoEssence = NULL;
for (; (*videoEssence) != NULL; *videoEssence = nextVideoEssence) {
nextVideoEssence = (*videoEssence)->next;
if ((*videoEssence)->original_file_path != NULL) {
free ((*videoEssence)->original_file_path);
}
if ((*videoEssence)->usable_file_path != NULL) {
free ((*videoEssence)->usable_file_path);
}
if ((*videoEssence)->file_name != NULL) {
free ((*videoEssence)->file_name);
}
if ((*videoEssence)->unique_file_name != NULL) {
free ((*videoEssence)->unique_file_name);
}
free (*videoEssence);
}
*videoEssence = NULL;
}
/**
* @}
*/

2438
libs/aaf/AAFToText.c Normal file

File diff suppressed because it is too large Load Diff

346
libs/aaf/CFBDump.c Normal file
View File

@ -0,0 +1,346 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <inttypes.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include "aaf/CFBDump.h"
#include "aaf/LibCFB.h"
#include "aaf/utils.h"
#define debug(...) \
_dbg (cfbd->dbg, cfbd, DEBUG_SRC_ID_LIB_CFB, VERB_DEBUG, __VA_ARGS__)
#define warning(...) \
_dbg (cfbd->dbg, cfbd, DEBUG_SRC_ID_LIB_CFB, VERB_WARNING, __VA_ARGS__)
#define error(...) \
_dbg (cfbd->dbg, cfbd, DEBUG_SRC_ID_LIB_CFB, VERB_ERROR, __VA_ARGS__)
void
cfb_dump_node (CFB_Data* cfbd, cfbNode* node, int print_stream)
{
if (node == NULL)
return;
if (node->_mse == STGTY_INVALID)
return;
wchar_t nodeName[CFB_NODE_NAME_SZ];
cfb_w16towchar (nodeName, node->_ab, node->_cb);
int offset = 0;
struct dbg* dbg = cfbd->dbg;
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n");
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _ab : %ls\n", nodeName);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _cb : %u\n", node->_cb);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _mse : %s\n",
node->_mse == 0 ? "STGTY_INVALID" : node->_mse == 1 ? "STGTY_STORAGE"
: node->_mse == 2 ? "STGTY_STREAM"
: node->_mse == 3 ? "STGTY_LOCKBYTES"
: node->_mse == 4 ? "STGTY_PROPERTY"
: node->_mse == 5 ? "STGTY_ROOT"
: "");
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _bflags : %s\n", node->_bflags == 1 ? "BLACK" : "RED");
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _sidLeftSib : 0x%08x\n", node->_sidLeftSib);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _sidRightSib : 0x%08x\n", node->_sidRightSib);
if (node->_mse == STGTY_STORAGE ||
node->_mse == STGTY_ROOT) {
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _sidChild : 0x%08x\n", node->_sidChild);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _clsid : %ls\n", cfb_CLSIDToText (&(node->_clsId)));
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _dwUserFlags : 0x%08x (%d)\n", node->_dwUserFlags, node->_dwUserFlags);
}
if (node->_mse == STGTY_INVALID) {
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _time (cre) : 0x%08x%08x\n",
node->_time[0].dwHighDateTime,
node->_time[0].dwLowDateTime);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _ (mod) : 0x%08x%08x\n",
node->_time[1].dwHighDateTime,
node->_time[1].dwLowDateTime);
}
if (node->_mse == STGTY_STREAM ||
node->_mse == STGTY_ROOT) {
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _sectStart : 0x%08x (%d)\n", node->_sectStart, node->_sectStart);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _ulSizeLow : 0x%08x (%d)\n", node->_ulSizeLow, node->_ulSizeLow);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _ulSizeHigh : 0x%08x (%d)\n", node->_ulSizeHigh, node->_ulSizeHigh);
}
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n");
if (print_stream == 1) {
cfb_dump_nodeStream (cfbd, node);
}
}
void
cfb_dump_nodePath (CFB_Data* cfbd, const wchar_t* path, int print_stream)
{
cfbNode* node = cfb_getNodeByPath (cfbd, path, 0);
if (node == NULL) {
error ("cfb_dump_nodePath() : Could not find node at \"%ls\"\n", path);
return;
}
int offset = 0;
struct dbg* dbg = cfbd->dbg;
cfb_dump_node (cfbd, node, print_stream);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n");
}
void
cfb_dump_nodeStream (CFB_Data* cfbd, cfbNode* node)
{
unsigned char* stream = NULL;
uint64_t stream_sz = 0;
cfb_getStream (cfbd, node, &stream, &stream_sz);
if (stream == NULL) {
return;
}
laaf_util_dump_hex (stream, stream_sz, &cfbd->dbg->_dbg_msg, &cfbd->dbg->_dbg_msg_size, 0);
free (stream);
}
void
cfb_dump_nodePathStream (CFB_Data* cfbd, const wchar_t* path)
{
cfbNode* node = cfb_getNodeByPath (cfbd, path, 0);
if (node == NULL) {
error ("cfb_dump_nodePathStream() : Could not find node at \"%ls\"\n", path);
return;
}
unsigned char* stream = NULL;
uint64_t stream_sz = 0;
cfb_getStream (cfbd, node, &stream, &stream_sz);
laaf_util_dump_hex (stream, stream_sz, &cfbd->dbg->_dbg_msg, &cfbd->dbg->_dbg_msg_size, 0);
free (stream);
}
void
cfb_dump_nodePaths (CFB_Data* cfbd, uint32_t prevPath, char* strArray[], uint32_t* str_i, cfbNode* node)
{
if (node == NULL) {
/* the begining of the first function call. */
node = &cfbd->nodes[0];
strArray = calloc (cfbd->nodes_cnt, sizeof (char*));
}
uint32_t thisPath = (*str_i);
wchar_t nodeName[CFB_NODE_NAME_SZ];
cfb_w16towchar (nodeName, node->_ab, node->_cb);
int pathlen = snprintf (NULL, 0, "%s/%ls", strArray[prevPath], nodeName);
if (pathlen < 0) {
// TODO error
return;
}
pathlen++;
strArray[thisPath] = malloc (pathlen);
snprintf (strArray[thisPath], pathlen, "%s/%ls", strArray[prevPath], nodeName);
(*str_i)++;
if ((int32_t)node->_sidChild > 0)
cfb_dump_nodePaths (cfbd, thisPath, strArray, str_i, &cfbd->nodes[node->_sidChild]);
if ((int32_t)node->_sidLeftSib > 0)
cfb_dump_nodePaths (cfbd, prevPath, strArray, str_i, &cfbd->nodes[node->_sidLeftSib]);
if ((int32_t)node->_sidRightSib > 0)
cfb_dump_nodePaths (cfbd, prevPath, strArray, str_i, &cfbd->nodes[node->_sidRightSib]);
/* the end of the first function call, recursion is over. */
if (node == &cfbd->nodes[0]) {
int offset = 0;
struct dbg* dbg = cfbd->dbg;
/* commented out because output is proper this way... why did we call qsort() in the first place ?! */
// qsort( strArray, *str_i, sizeof(char*), compareStrings );
for (uint32_t i = 0; i < cfbd->nodes_cnt && strArray[i] != NULL; i++) {
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%05i : %s\n", i, strArray[i]);
free (strArray[i]);
}
free (strArray);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n");
}
}
void
cfb_dump_header (CFB_Data* cfbd)
{
cfbHeader* cfbh = cfbd->hdr;
int offset = 0;
struct dbg* dbg = cfbd->dbg;
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_abSig : 0x%08" PRIx64 "\n", cfbh->_abSig);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_clsId : %ls\n", cfb_CLSIDToText (&(cfbh->_clsid)));
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " version : %u.%u ( 0x%04x 0x%04x )\n",
cfbh->_uMinorVersion, cfbh->_uDllVersion,
cfbh->_uMinorVersion, cfbh->_uDllVersion);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_uByteOrder : %s ( 0x%04x )\n",
cfbh->_uByteOrder == 0xFFFE ? "little-endian" : cfbh->_uByteOrder == 0xFEFF ? "big-endian"
: "?",
cfbh->_uByteOrder);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_uSectorShift : %u (%u bytes sectors)\n",
cfbh->_uSectorShift,
1 << cfbh->_uSectorShift);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_uMiniSectorShift : %u (%u bytes mini-sectors)\n",
cfbh->_uMiniSectorShift,
1 << cfbh->_uMiniSectorShift);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_usReserved0 : 0x%02x\n", cfbh->_usReserved);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_ulReserved1 : 0x%04x\n", cfbh->_ulReserved1);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_csectDir : %u\n", cfbh->_csectDir);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_csectFat : %u\n", cfbh->_csectFat);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_sectDirStart : %u\n", cfbh->_sectDirStart);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_signature : %u\n", cfbh->_signature);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_ulMiniSectorCutoff : %u\n", cfbh->_ulMiniSectorCutoff);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_sectMiniFatStart : %u\n", cfbh->_sectMiniFatStart);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_csectMiniFat : %u\n", cfbh->_csectMiniFat);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_sectDifStart : %u\n", cfbh->_sectDifStart);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_csectDif : %u\n", cfbh->_csectDif);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n");
}
void
cfb_dump_FAT (CFB_Data* cfbd)
{
int offset = 0;
struct dbg* dbg = cfbd->dbg;
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_CFB_FAT_______________________________________________________________________________________\n\n");
uint32_t i = 0;
for (i = 0; i < cfbd->fat_sz; i++) {
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " SECT[%u] : 0x%08x %s\n",
i,
cfbd->fat[i],
(cfbd->fat[i] == CFB_MAX_REG_SECT) ? "(CFB_MAX_REG_SECT)" : (cfbd->fat[i] == CFB_DIFAT_SECT) ? "(CFB_DIFAT_SECT)"
: (cfbd->fat[i] == CFB_FAT_SECT) ? "(CFB_FAT_SECT)"
: (cfbd->fat[i] == CFB_END_OF_CHAIN) ? "(CFB_END_OF_CHAIN)"
: (cfbd->fat[i] == CFB_FREE_SECT) ? "(CFB_FREE_SECT)"
: "");
}
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n");
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " End of FAT.\n\n");
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Total FAT entries : %u\n", cfbd->fat_sz);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Count of FAT sector : %u\n", cfbd->hdr->_csectFat);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n");
}
void
cfb_dump_MiniFAT (CFB_Data* cfbd)
{
int offset = 0;
struct dbg* dbg = cfbd->dbg;
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_CFB_MiniFAT___________________________________________________________________________________\n\n");
uint32_t i = 0;
for (i = 0; i < cfbd->miniFat_sz; i++) {
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " SECT[%u] : 0x%08x %s\n",
i,
cfbd->miniFat[i],
(cfbd->miniFat[i] == CFB_MAX_REG_SECT) ? "(CFB_MAX_REG_SECT)" : (cfbd->miniFat[i] == CFB_DIFAT_SECT) ? "(CFB_DIFAT_SECT)"
: (cfbd->miniFat[i] == CFB_FAT_SECT) ? "(CFB_FAT_SECT)"
: (cfbd->miniFat[i] == CFB_END_OF_CHAIN) ? "(CFB_END_OF_CHAIN)"
: (cfbd->miniFat[i] == CFB_FREE_SECT) ? "(CFB_FREE_SECT)"
: "");
}
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n");
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " End of MiniFAT.\n\n");
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Total MiniFAT entries : %u\n", cfbd->miniFat_sz);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " First MiniFAT sector ID : %u\n", cfbd->hdr->_sectMiniFatStart);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Count of MiniFAT sector : %u\n", cfbd->hdr->_csectMiniFat);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n");
}
void
cfb_dump_DiFAT (CFB_Data* cfbd)
{
int offset = 0;
struct dbg* dbg = cfbd->dbg;
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_CFB_DiFAT_____________________________________________________________________________________\n\n");
uint32_t i = 0;
for (i = 0; i < cfbd->DiFAT_sz; i++) {
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " SECT[%u] : 0x%08x %s\n",
i,
cfbd->DiFAT[i],
(cfbd->DiFAT[i] == CFB_MAX_REG_SECT) ? "(CFB_MAX_REG_SECT)" : (cfbd->DiFAT[i] == CFB_DIFAT_SECT) ? "(CFB_DIFAT_SECT)"
: (cfbd->DiFAT[i] == CFB_FAT_SECT) ? "(CFB_FAT_SECT)"
: (cfbd->DiFAT[i] == CFB_END_OF_CHAIN) ? "(CFB_END_OF_CHAIN)"
: (cfbd->DiFAT[i] == CFB_FREE_SECT) ? "(CFB_FREE_SECT)"
: "");
}
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n");
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " End of DiFAT.\n\n");
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Total DiFAT entries : %u\n", cfbd->DiFAT_sz);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " First DiFAT sector ID : %u\n", cfbd->hdr->_sectDifStart);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Count of DiFAT sector : Header + %u\n", cfbd->hdr->_csectDif);
offset += laaf_util_snprintf_realloc (&dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n");
}

1346
libs/aaf/LibCFB.c Normal file

File diff suppressed because it is too large Load Diff

303
libs/aaf/ProTools.c Normal file
View File

@ -0,0 +1,303 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <stdio.h>
#include "aaf/AAFIface.h"
#include "aaf/ProTools.h"
#define PROTOOLS_CLIP_NAME_FADE_EN_LEN 5 // +1
#define PROTOOLS_CLIP_NAME_FADE_DE_LEN 5 // +1
#define PROTOOLS_CLIP_NAME_FADE_JA_LEN 5 // +1
#define PROTOOLS_CLIP_NAME_FADE_FR_LEN 6 // +1
#define PROTOOLS_CLIP_NAME_FADE_ES_LEN 8 // +1
#define PROTOOLS_CLIP_NAME_FADE_ZH_CN_LEN 3 // +1
#define PROTOOLS_CLIP_NAME_FADE_ZH_TW_LEN 3 // +1
#define PROTOOLS_CLIP_NAME_FADE_KO_LEN 3 // +1
#define PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_EN_LEN 20 // +1
#define PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_DE_LEN 24 // +1
#define PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_ES_LEN 32 // +1
#define PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_FR_LEN 33 // +1
#define PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_JA_LEN 8 // +1
#define PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_ZH_CN_LEN 6 // +1
#define PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_ZH_TW_LEN 6 // +1
#define PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_KO_LEN 11 // +1
/* English : "Fade " (Same as JA and DE) */
static const wchar_t PROTOOLS_CLIP_NAME_FADE_EN[] = L"\x0046\x0061\x0064\x0065\x0020\x0000";
/* German : "Fade " (Same as JA and EN) */
// static const wchar_t PROTOOLS_CLIP_NAME_FADE_DE[] = L"\x0046\x0061\x0064\x0065\x0020\x0000";
/* Japanese : "Fade " (Same as EN and DE) */
// static const wchar_t PROTOOLS_CLIP_NAME_FADE_JA[] = L"\x0046\x0061\x0064\x0065\x0020\x0000";
/* French : "Fondu " */
static const wchar_t PROTOOLS_CLIP_NAME_FADE_FR[] = L"\x0046\x006f\x006e\x0064\x0075\x0020\x0000";
/* Spanish : "Fundido" */
static const wchar_t PROTOOLS_CLIP_NAME_FADE_ES[] = L"\x0046\x0075\x006e\x0064\x0069\x0064\x006f\x0020\x0000";
/* Chinese (S) : "淡变 " */
static const wchar_t PROTOOLS_CLIP_NAME_FADE_ZH_CN[] = L"\x6de1\x53d8\x0020\x0000";
/* Chinese (T) : "淡變 " */
static const wchar_t PROTOOLS_CLIP_NAME_FADE_ZH_TW[] = L"\x6de1\x8b8a\x0020\x0000";
/* Korean : "페이드" */
static const wchar_t PROTOOLS_CLIP_NAME_FADE_KO[] = L"\xd398\xc774\xb4dc\x0000";
/* English : "Sample accurate edit" */
static const wchar_t PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_EN[] = L"\x0053\x0061\x006d\x0070\x006c\x0065\x0020\x0061\x0063\x0063\x0075\x0072\x0061\x0074\x0065\x0020\x0065\x0064\x0069\x0074\x0000";
/* German : "Samplegenaue Bearbeitung" */
static const wchar_t PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_DE[] = L"\x0053\x0061\x006d\x0070\x006c\x0065\x0067\x0065\x006e\x0061\x0075\x0065\x0020\x0042\x0065\x0061\x0072\x0062\x0065\x0069\x0074\x0075\x006e\x0067\x0000";
/* Spanish : "Edición con precisión de muestra" */
static const wchar_t PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_ES[] = L"\x0045\x0064\x0069\x0063\x0069\x00f3\x006e\x0020\x0063\x006f\x006e\x0020\x0070\x0072\x0065\x0063\x0069\x0073\x0069\x00f3\x006e\x0020\x0064\x0065\x0020\x006d\x0075\x0065\x0073\x0074\x0072\x0061\x0000";
/* French : "Modification à l'échantillon près" */
static const wchar_t PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_FR[] = L"\x004d\x006f\x0064\x0069\x0066\x0069\x0063\x0061\x0074\x0069\x006f\x006e\x0020\x00e0\x0020\x006c\x0027\x00e9\x0063\x0068\x0061\x006e\x0074\x0069\x006c\x006c\x006f\x006e\x0020\x0070\x0072\x00e8\x0073\x0000";
/* Japanese : "サンプル精度編集" */
static const wchar_t PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_JA[] = L"\x30b5\x30f3\x30d7\x30eb\x7cbe\x5ea6\x7de8\x96c6\x0000";
/* Chinese (S) : "精确采样编辑" */
static const wchar_t PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_ZH_CN[] = L"\x7cbe\x786e\x91c7\x6837\x7f16\x8f91\x0000";
/* Chinese (T) : "精確取樣編輯" */
static const wchar_t PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_ZH_TW[] = L"\x7cbe\x78ba\x53d6\x6a23\x7de8\x8f2f\x0000";
/* Korean : "샘플 단위 정밀 편집" */
static const wchar_t PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_KO[] = L"\xc0d8\xd50c\x0020\xb2e8\xc704\x0020\xc815\xbc00\x0020\xd3b8\xc9d1\x0000";
static int
is_rendered_fade (const wchar_t* clipName);
static int
is_sample_accurate_edit (const wchar_t* clipName);
static int
replace_clipfade_with_fade (AAF_Iface* aafi, aafiTimelineItem* Item);
int
protools_AAF (struct AAF_Iface* aafi)
{
int probe = 0;
/* TODO: CompanyName is "Digidesign, Inc." in ProTools 10.3.10.613 AAF, but what about since ? */
// if ( aafi->aafd->Identification.CompanyName && wcscmp( aafi->aafd->Identification.CompanyName, L"Digidesign, Inc." ) == 0 ) {
// probe++;
// }
if (aafi->aafd->Identification.ProductName && wcscmp (aafi->aafd->Identification.ProductName, L"ProTools") == 0) {
probe++;
}
if (probe == 1) {
return 1;
}
return 0;
}
static int
is_rendered_fade (const wchar_t* clipName)
{
return (memcmp (clipName, PROTOOLS_CLIP_NAME_FADE_EN, PROTOOLS_CLIP_NAME_FADE_EN_LEN) == 0) ||
(memcmp (clipName, PROTOOLS_CLIP_NAME_FADE_ES, PROTOOLS_CLIP_NAME_FADE_ES_LEN) == 0) ||
(memcmp (clipName, PROTOOLS_CLIP_NAME_FADE_FR, PROTOOLS_CLIP_NAME_FADE_FR_LEN) == 0) ||
(memcmp (clipName, PROTOOLS_CLIP_NAME_FADE_ZH_CN, PROTOOLS_CLIP_NAME_FADE_ZH_CN_LEN) == 0) ||
(memcmp (clipName, PROTOOLS_CLIP_NAME_FADE_ZH_TW, PROTOOLS_CLIP_NAME_FADE_ZH_TW_LEN) == 0) ||
(memcmp (clipName, PROTOOLS_CLIP_NAME_FADE_KO, PROTOOLS_CLIP_NAME_FADE_KO_LEN) == 0);
}
static int
is_sample_accurate_edit (const wchar_t* clipName)
{
return (memcmp (clipName, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_EN, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_EN_LEN) == 0) ||
(memcmp (clipName, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_DE, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_DE_LEN) == 0) ||
(memcmp (clipName, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_ES, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_ES_LEN) == 0) ||
(memcmp (clipName, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_FR, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_FR_LEN) == 0) ||
(memcmp (clipName, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_JA, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_JA_LEN) == 0) ||
(memcmp (clipName, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_ZH_CN, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_ZH_CN_LEN) == 0) ||
(memcmp (clipName, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_ZH_TW, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_ZH_TW_LEN) == 0) ||
(memcmp (clipName, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_KO, PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_KO_LEN) == 0);
}
static int
replace_clipfade_with_fade (AAF_Iface* aafi, aafiTimelineItem* Item)
{
if (Item->type != AAFI_AUDIO_CLIP) {
return -1;
}
aafiAudioClip* audioClip = (aafiAudioClip*)Item->data;
aafPosition_t currentpos = audioClip->pos;
aafPosition_t currentlen = audioClip->len;
aafiTimelineItem* transItem = calloc (sizeof (aafiTimelineItem) + sizeof (aafiTransition), sizeof (char));
memset (transItem, 0x00, sizeof (aafiTimelineItem) + sizeof (aafiTransition));
transItem->type = AAFI_TRANS;
transItem->next = NULL;
transItem->prev = NULL;
transItem->data = calloc (sizeof (aafiTransition), sizeof (char));
aafiTransition* trans = transItem->data;
trans->len = audioClip->len;
trans->flags = AAFI_INTERPOL_NONE;
// debug( "%ls", audioClip->Essence->unique_file_name );
aafiAudioClip* prevClip = NULL;
aafiAudioClip* nextClip = NULL;
if (Item->prev != NULL) {
if (Item->prev->type == AAFI_AUDIO_CLIP) {
prevClip = (aafiAudioClip*)Item->prev->data;
// debug( "PREVIOUS POS %lu", prevClip->pos + prevClip->len );
// debug( "CURENT POS %lu", currentpos );
if (prevClip->pos + prevClip->len < currentpos - 1) {
prevClip = NULL;
}
}
}
if (Item->next != NULL) {
if (Item->next->type == AAFI_AUDIO_CLIP) {
nextClip = (aafiAudioClip*)Item->next->data;
if (is_sample_accurate_edit (nextClip->Essence->file_name)) {
if (Item->next->next != NULL) {
nextClip = (aafiAudioClip*)Item->next->next->data;
// debug( "NEXT POS %lu", nextClip->pos );
// debug( "CURENT POS %lu", currentpos + currentlen );
if (nextClip->pos != currentpos + currentlen + 1) {
nextClip = NULL;
}
} else {
nextClip = NULL;
}
} else {
// nextClip = (aafiAudioClip*)Item->next->data;
// debug( "NEXT POS %lu", nextClip->pos );
// debug( "CURENT POS %lu", currentpos + currentlen );
if (nextClip->pos != currentpos + currentlen) {
nextClip = NULL;
}
}
}
}
trans->time_a = calloc (2, sizeof (aafRational_t));
trans->value_a = calloc (2, sizeof (aafRational_t));
trans->time_a[0].numerator = 0;
trans->time_a[0].denominator = 0;
trans->time_a[1].numerator = 1;
trans->time_a[1].denominator = 1;
if (prevClip && nextClip) {
// debug( ":: XFADE" );
trans->flags |= AAFI_TRANS_XFADE;
trans->value_a[0].numerator = 0;
trans->value_a[0].denominator = 0;
trans->value_a[1].numerator = 1;
trans->value_a[1].denominator = 1;
} else if (prevClip) {
// debug( ":: FADE OUT" );
trans->flags |= AAFI_TRANS_FADE_OUT;
trans->value_a[0].numerator = 1;
trans->value_a[0].denominator = 1;
trans->value_a[1].numerator = 0;
trans->value_a[1].denominator = 0;
} else if (nextClip) {
// debug( ":: FADE IN" );
trans->flags |= AAFI_TRANS_FADE_IN;
trans->value_a[0].numerator = 0;
trans->value_a[0].denominator = 0;
trans->value_a[1].numerator = 1;
trans->value_a[1].denominator = 1;
}
if (Item->prev) {
Item->prev->next = transItem;
transItem->prev = Item->prev;
} else {
aafiAudioTrack* audioTrack = NULL;
foreach_audioTrack (audioTrack, aafi)
{
if (audioTrack->Items == Item) {
audioTrack->Items = transItem;
}
}
transItem->prev = NULL;
}
if (Item->next) {
Item->next->prev = transItem;
}
transItem->next = Item->next;
aafi_freeTimelineItem (&Item);
return 0;
}
int
protools_post_processing (AAF_Iface* aafi /*, enum protools_options flags*/)
{
aafiAudioTrack* audioTrack = NULL;
foreach_audioTrack (audioTrack, aafi)
{
aafiTimelineItem* audioItem = audioTrack->Items;
while (audioItem != NULL) {
if (audioItem->type != AAFI_AUDIO_CLIP) {
audioItem = audioItem->next;
continue;
}
aafiAudioClip* audioClip = (aafiAudioClip*)audioItem->data;
wchar_t* clipName = audioClip->Essence->file_name;
if ((aafi->ctx.options.protools & PROTOOLS_REPLACE_CLIP_FADES) && is_rendered_fade (clipName)) {
replace_clipfade_with_fade (aafi, audioItem);
audioItem = audioTrack->Items;
continue;
} else if ((aafi->ctx.options.protools & PROTOOLS_REMOVE_SAMPLE_ACCURATE_EDIT) && is_sample_accurate_edit (clipName)) {
aafi_removeTimelineItem (aafi, audioItem);
audioItem = audioTrack->Items;
continue;
}
audioItem = audioItem->next;
}
}
return 0;
}

322
libs/aaf/RIFFParser.c Normal file
View File

@ -0,0 +1,322 @@
/*
* Copyright (C) 2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <inttypes.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aaf/RIFFParser.h"
#define debug(...) \
_dbg (dbg, NULL, DEBUG_SRC_ID_AAF_IFACE, VERB_DEBUG, __VA_ARGS__)
#define warning(...) \
_dbg (dbg, NULL, DEBUG_SRC_ID_AAF_IFACE, VERB_WARNING, __VA_ARGS__)
#define error(...) \
_dbg (dbg, NULL, DEBUG_SRC_ID_AAF_IFACE, VERB_ERROR, __VA_ARGS__)
#define BE2LE32(val) \
(((val >> 24) & 0xff) | ((val << 8) & 0xff0000) | ((val >> 8) & 0xff00) | ((val << 24) & 0xff000000))
#define BE2LE16(val) \
((val << 8) | (val >> 8))
static uint32_t
beExtended2leUint32 (const unsigned char numx[10]);
int
riff_writeWavFileHeader (FILE* fp, struct wavFmtChunk* wavFmt, struct wavBextChunk* wavBext, uint32_t audioDataSize, struct dbg* dbg)
{
(void)dbg;
uint32_t filesize = (4 /* WAVE */) + sizeof (struct wavFmtChunk) + ((wavBext) ? sizeof (struct wavBextChunk) : 0) + (8 /*data chunk header*/) + audioDataSize;
size_t writtenBytes = fwrite ("RIFF", sizeof (unsigned char), 4, fp);
if (writtenBytes < 4) {
return -1;
}
writtenBytes = fwrite (&filesize, sizeof (uint32_t), 1, fp);
if (writtenBytes < 1) {
return -1;
}
writtenBytes = fwrite ("WAVE", sizeof (unsigned char), 4, fp);
if (writtenBytes < 4) {
return -1;
}
wavFmt->ckid[0] = 'f';
wavFmt->ckid[1] = 'm';
wavFmt->ckid[2] = 't';
wavFmt->ckid[3] = ' ';
wavFmt->cksz = sizeof (struct wavFmtChunk) - sizeof (struct riffChunk);
wavFmt->format_tag = 1; /* PCM */
wavFmt->avg_bytes_per_sec = wavFmt->samples_per_sec * wavFmt->channels * wavFmt->bits_per_sample / 8;
wavFmt->block_align = wavFmt->channels * wavFmt->bits_per_sample / 8;
writtenBytes = fwrite ((unsigned char*)wavFmt, sizeof (unsigned char), sizeof (struct wavFmtChunk), fp);
if (writtenBytes < sizeof (struct wavFmtChunk)) {
return -1;
}
if (wavBext) {
wavBext->ckid[0] = 'b';
wavBext->ckid[1] = 'e';
wavBext->ckid[2] = 'x';
wavBext->ckid[3] = 't';
wavBext->cksz = sizeof (struct wavBextChunk) - sizeof (struct riffChunk);
wavBext->version = 1;
writtenBytes = fwrite ((unsigned char*)wavBext, sizeof (unsigned char), sizeof (struct wavBextChunk), fp);
if (writtenBytes < sizeof (struct wavBextChunk)) {
return -1;
}
}
writtenBytes = fwrite ("data", sizeof (unsigned char), 4, fp);
if (writtenBytes < 4) {
return -1;
}
writtenBytes = fwrite (&audioDataSize, sizeof (uint32_t), 1, fp);
if (writtenBytes < 1) {
return -1;
}
return 0;
}
int
riff_parseAudioFile (struct RIFFAudioFile* RIFFAudioFile, enum RIFF_PARSER_FLAGS flags, size_t (*readerCallback) (unsigned char*, size_t, size_t, void*, void*, void*), void* user1, void* user2, void* user3, struct dbg* dbg)
{
struct riffChunk chunk;
struct riffHeaderChunk riff;
memset (RIFFAudioFile, 0x00, sizeof (struct RIFFAudioFile));
size_t bytesRead = readerCallback ((unsigned char*)&riff, 0, sizeof (riff), user1, user2, user3);
if (bytesRead < sizeof (riff)) {
error ("Could not read file");
return -1;
}
int be = 0; /* big endian */
if (riff.format[0] == 'A' &&
riff.format[1] == 'I' &&
riff.format[2] == 'F' &&
riff.format[3] == 'F') {
be = 1;
riff.cksz = BE2LE32 (riff.cksz);
} else if (riff.format[0] == 'A' &&
riff.format[1] == 'I' &&
riff.format[2] == 'F' &&
riff.format[3] == 'C') {
be = 1;
riff.cksz = BE2LE32 (riff.cksz);
} else if (riff.format[0] == 'W' &&
riff.format[1] == 'A' &&
riff.format[2] == 'V' &&
riff.format[3] == 'E') {
be = 0;
} else {
error ("File is not a valid RIFF/WAVE or RIFF/AIFF : Missing format identifier");
return -1;
}
// debug( "%.4s %.4s (%u bytes)", riff.ckid, riff.format, riff.cksz );
size_t filesize = riff.cksz + sizeof (chunk);
size_t pos = sizeof (struct riffHeaderChunk);
while (pos < filesize) {
bytesRead = readerCallback ((unsigned char*)&chunk, pos, sizeof (chunk), user1, user2, user3);
if (bytesRead < sizeof (chunk)) {
error ("Could not read chunk @ %" PRIu64 " (%" PRIu64 " bytes returned)", pos, bytesRead);
break;
}
if (be) {
chunk.cksz = BE2LE32 (chunk.cksz);
}
// debug( "Got chunk : %.4s (%u bytes)", chunk.ckid, chunk.cksz );
if (!be) { /* WAVE */
if (chunk.ckid[0] == 'f' &&
chunk.ckid[1] == 'm' &&
chunk.ckid[2] == 't' &&
chunk.ckid[3] == ' ') {
struct wavFmtChunk wavFmtChunk;
bytesRead = readerCallback ((unsigned char*)&wavFmtChunk, pos, sizeof (wavFmtChunk), user1, user2, user3);
RIFFAudioFile->channels = wavFmtChunk.channels;
RIFFAudioFile->sampleSize = wavFmtChunk.bits_per_sample;
RIFFAudioFile->sampleRate = wavFmtChunk.samples_per_sec;
if (flags & RIFF_PARSE_ONLY_HEADER) {
return 0;
}
} else if (chunk.ckid[0] == 'd' &&
chunk.ckid[1] == 'a' &&
chunk.ckid[2] == 't' &&
chunk.ckid[3] == 'a') {
if (RIFFAudioFile->channels > 0 && RIFFAudioFile->sampleSize > 0) {
RIFFAudioFile->duration = chunk.cksz / RIFFAudioFile->channels / (RIFFAudioFile->sampleSize / 8);
}
}
} else { /* AIFF */
if (chunk.ckid[0] == 'C' &&
chunk.ckid[1] == 'O' &&
chunk.ckid[2] == 'M' &&
chunk.ckid[3] == 'M') {
struct aiffCOMMChunk aiffCOMMChunk;
bytesRead = readerCallback ((unsigned char*)&aiffCOMMChunk, pos, sizeof (aiffCOMMChunk), user1, user2, user3);
RIFFAudioFile->channels = BE2LE16 (aiffCOMMChunk.numChannels);
RIFFAudioFile->sampleSize = BE2LE16 (aiffCOMMChunk.sampleSize);
RIFFAudioFile->sampleRate = beExtended2leUint32 (aiffCOMMChunk.sampleRate);
RIFFAudioFile->duration = BE2LE32 (aiffCOMMChunk.numSampleFrames);
if (flags & RIFF_PARSE_ONLY_HEADER) {
return 0;
}
}
/*
* We don't care about AIFF "SSND" chunk because we already know duration
* from "COMM". Could we double check validity of duration by checking
* "SSND" chunk size, like we do with WAV "DATA" chunk ? is it possible
* with AAF audio file summary ?
*/
// else
// if ( chunk.ckid[0] == 'S' &&
// chunk.ckid[1] == 'S' &&
// chunk.ckid[2] == 'N' &&
// chunk.ckid[3] == 'D' )
// {
// }
}
pos += chunk.cksz + sizeof (chunk);
}
return 0;
}
static uint32_t
beExtended2leUint32 (const unsigned char numx[10])
{
/*
* https://stackoverflow.com/a/18854415/16400184
*/
unsigned char x[10];
/* be -> le */
x[0] = numx[9];
x[1] = numx[8];
x[2] = numx[7];
x[3] = numx[6];
x[4] = numx[5];
x[5] = numx[4];
x[6] = numx[3];
x[7] = numx[2];
x[8] = numx[1];
x[9] = numx[0];
int exponent = (((x[9] << 8) | x[8]) & 0x7FFF);
uint64_t mantissa = ((uint64_t)x[7] << 56) | ((uint64_t)x[6] << 48) | ((uint64_t)x[5] << 40) | ((uint64_t)x[4] << 32) |
((uint64_t)x[3] << 24) | ((uint64_t)x[2] << 16) | ((uint64_t)x[1] << 8) | (uint64_t)x[0];
unsigned char d[8] = { 0 };
double result;
d[7] = x[9] & 0x80; /* Set sign. */
if ((exponent == 0x7FFF) || (exponent == 0)) {
/* Infinite, NaN or denormal */
if (exponent == 0x7FFF) {
/* Infinite or NaN */
d[7] |= 0x7F;
d[6] = 0xF0;
} else {
/* Otherwise it's denormal. It cannot be represented as double. Translate as singed zero. */
memcpy (&result, d, 8);
return result;
}
} else {
/* Normal number. */
exponent = exponent - 0x3FFF + 0x03FF; /*< exponent for double precision. */
if (exponent <= -52) { /*< Too small to represent. Translate as (signed) zero. */
memcpy (&result, d, 8);
return result;
} else if (exponent < 0) {
/* Denormal, exponent bits are already zero here. */
} else if (exponent >= 0x7FF) { /*< Too large to represent. Translate as infinite. */
d[7] |= 0x7F;
d[6] = 0xF0;
memset (d, 0x00, 6);
memcpy (&result, d, 8);
return result;
} else {
/* Representable number */
d[7] |= (exponent & 0x7F0) >> 4;
d[6] |= (exponent & 0xF) << 4;
}
}
/* Translate mantissa. */
mantissa >>= 11;
if (exponent < 0) {
/* Denormal, further shifting is required here. */
mantissa >>= (-exponent + 1);
}
d[0] = mantissa & 0xFF;
d[1] = (mantissa >> 8) & 0xFF;
d[2] = (mantissa >> 16) & 0xFF;
d[3] = (mantissa >> 24) & 0xFF;
d[4] = (mantissa >> 32) & 0xFF;
d[5] = (mantissa >> 40) & 0xFF;
d[6] |= (mantissa >> 48) & 0x0F;
memcpy (&result, d, 8);
return (uint32_t)result;
}

222
libs/aaf/Resolve.c Normal file
View File

@ -0,0 +1,222 @@
/*
* Copyright (C) 2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <stdint.h>
#include <stdio.h>
#include "aaf/AAFDefs/AAFPropertyIDs.h"
#include "aaf/AAFDefs/AAFTypeDefUIDs.h"
#include "aaf/AAFIParser.h"
#include "aaf/AAFToText.h"
#include "aaf/debug.h"
#include "aaf/libaaf.h"
#define debug(...) \
_dbg (aafi->dbg, aafi, DEBUG_SRC_ID_AAF_IFACE, VERB_DEBUG, __VA_ARGS__)
#define warning(...) \
_dbg (aafi->dbg, aafi, DEBUG_SRC_ID_AAF_IFACE, VERB_WARNING, __VA_ARGS__)
#define error(...) \
_dbg (aafi->dbg, aafi, DEBUG_SRC_ID_AAF_IFACE, VERB_ERROR, __VA_ARGS__)
int
resolve_AAF (struct AAF_Iface* aafi)
{
int probe = 0;
if (aafi->aafd->Identification.CompanyName && wcsncmp (aafi->aafd->Identification.CompanyName, L"Blackmagic Design", wcslen (L"Blackmagic Design")) == 0) {
probe++;
}
if (aafi->aafd->Identification.ProductName && wcsncmp (aafi->aafd->Identification.ProductName, L"DaVinci Resolve", wcslen (L"DaVinci Resolve")) == 0) {
probe++;
}
if (probe == 2) {
return 1;
}
return 0;
}
int
resolve_parse_aafObject_Selector (struct AAF_Iface* aafi, aafObject* Selector, td* __ptd)
{
/*
* Resolve 18.5
*
* The Selector Object was only seen used to describe a disabled clip :
* - Selected property Object is an empty Filler
* - Alternate keeps track of the original clip.
*
03411 AAFClassID_Selector
01926 Selected --> AAFClassID_Filler
02359 Alternate -> AAFClassID_OperationGroup (OpIdent: AAFOperationDef_MonoAudioGain)
03822 AAFClassID_VaryingValue
02877 AAFClassID_SourceClip
02882 AAFClassID_MasterMob (UsageCode: n/a) : speech-sample.mp3 - disabled
04460 AAFClassID_TimelineMobSlot
03089 AAFClassID_SourceClip
04167 AAFClassID_SourceMob (UsageCode: n/a) : speech-sample.mp3 - disabled
01249 AAFClassID_PCMDescriptor
01455 AAFClassID_NetworkLocator : file:///C:/Users/user/Desktop/libAAF/test/res/speech-sample.mp3
*/
struct trace_dump __td;
__td_set (__td, __ptd, 0);
aafObject* Selected = aaf_get_propertyValue (Selector, PID_Selector_Selected, &AAFTypeID_SegmentStrongReference);
if (Selected == NULL) { /* req */
DUMP_OBJ_ERROR (aafi, Selector, &__td, "Missing PID_Selector_Selected");
return -1;
}
aafObject* Alternates = aaf_get_propertyValue (Selector, PID_Selector_Alternates, &AAFTypeID_SegmentStrongReferenceVector);
if (Alternates == NULL) { /* opt */
DUMP_OBJ_WARNING (aafi, Selector, &__td, "Missing PID_Selector_Alternates");
return -1;
}
void* ComponentAttributeList = aaf_get_propertyValue (Selector, aaf_get_PropertyIDByName (aafi->aafd, L"ComponentAttributeList"), &AAFUID_NULL);
if (ComponentAttributeList == NULL) {
DUMP_OBJ_ERROR (aafi, Selector, &__td, "Missing AAFClassID_Selector::ComponentAttributeList");
return -1;
}
DUMP_OBJ (aafi, Selector, &__td);
// aaf_dump_ObjectProperties( aafi->aafd, Selector );
// aaf_dump_ObjectProperties( aafi->aafd, ComponentAttributeList );
int ismuted = 0;
aafObject* ComponentAttribute = NULL;
aaf_foreach_ObjectInSet (&ComponentAttribute, ComponentAttributeList, NULL)
{
/* TODO implement retrieve_TaggedValue() */
wchar_t* name = aaf_get_propertyValue (ComponentAttribute, PID_TaggedValue_Name, &AAFTypeID_String);
if (name == NULL) { /* req */
DUMP_OBJ_ERROR (aafi, ComponentAttribute, &__td, "Missing PID_TaggedValue_Name");
continue;
}
aafIndirect_t* Indirect = aaf_get_propertyValue (ComponentAttribute, PID_TaggedValue_Value, &AAFTypeID_Indirect);
if (Indirect == NULL) {
DUMP_OBJ_ERROR (aafi, ComponentAttribute, &__td, "Missing PID_TaggedValue_Value");
free (name);
continue;
}
int32_t* value = aaf_get_indirectValue (aafi->aafd, Indirect, &AAFTypeID_Int32);
if (value == NULL) {
DUMP_OBJ_ERROR (aafi, ComponentAttribute, &__td, "Could not retrieve Indirect value for PID_TaggedValue_Value");
free (name);
continue;
}
// debug( "Tagged | Name: %ls Value : %u", name, *value );
if (aafi->ctx.options.resolve & RESOLVE_INCLUDE_DISABLED_CLIPS) {
if (wcsncmp (name, L"_DISABLE_CLIP_FLAG", wcslen (L"_DISABLE_CLIP_FLAG")) == 0 && *value == 1) {
ismuted = 1;
aafi->ctx.current_clip_is_muted = 1;
aafObject* Alternate = NULL;
int i = 0;
aaf_foreach_ObjectInSet (&Alternate, Alternates, NULL)
{
if (i == 0) { /* there should be only one Segment in set, but still. Let's be carefull */
aafi_parse_Segment (aafi, Alternate, &__td);
} else {
DUMP_OBJ_ERROR (aafi, Alternate, &__td, "Multiple Alternates in Davinci Resolve selector");
}
i++;
}
}
}
free (name);
}
/* aafi->ctx.current_clip_is_muted was already reset at this point */
if (ismuted == 0) {
return aafi_parse_Segment (aafi, Selected, &__td);
}
return 0;
}
int
resolve_parse_aafObject_DescriptiveMarker (struct AAF_Iface* aafi, aafObject* DescriptiveMarker, td* __ptd)
{
/*
* Resolve 18.5
*/
struct trace_dump __td;
__td_set (__td, __ptd, 1);
aafPosition_t* start = aaf_get_propertyValue (DescriptiveMarker, PID_Event_Position, &AAFTypeID_PositionType);
if (start == NULL) { /* req (TODO: conditional) */
DUMP_OBJ_ERROR (aafi, DescriptiveMarker, &__td, "Missing PID_Event_Position");
return -1;
}
aafPosition_t* length = aaf_get_propertyValue (DescriptiveMarker, PID_Component_Length, &AAFTypeID_PositionType);
wchar_t* comment = aaf_get_propertyValue (DescriptiveMarker, PID_Event_Comment, &AAFTypeID_String);
wchar_t* name = aaf_get_propertyValue (DescriptiveMarker, aaf_get_PropertyIDByName (aafi->aafd, L"CommentMarkerUser"), &AAFTypeID_String);
uint16_t* RGBColor = NULL;
aafProperty* RGBColorProp = aaf_get_property (DescriptiveMarker, aaf_get_PropertyIDByName (aafi->aafd, L"CommentMarkerColor"));
if (RGBColorProp) {
if (RGBColorProp->len != sizeof (uint16_t) * 3) {
error ("CommentMarkerColor has wrong size of %u", RGBColorProp->len);
} else {
RGBColor = RGBColorProp->val;
/* big endian to little endian */
RGBColor[0] = (RGBColor[0] >> 8) | (RGBColor[0] << 8);
RGBColor[1] = (RGBColor[1] >> 8) | (RGBColor[1] << 8);
RGBColor[2] = (RGBColor[2] >> 8) | (RGBColor[2] << 8);
}
}
aafi_newMarker (aafi, aafi->ctx.current_markers_edit_rate, *start, ((length) ? *length : 0), name, comment, &RGBColor);
DUMP_OBJ (aafi, DescriptiveMarker, &__td);
return 0;
}

1314
libs/aaf/URIParser.c Normal file

File diff suppressed because it is too large Load Diff

65
libs/aaf/aaf/AAFClass.h Normal file
View File

@ -0,0 +1,65 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __AAFClass_h__
#define __AAFClass_h__
/**
* @brief AAF core functions.
* @author Adrien Gesta-Fline
* @version 0.1
* @date 04 october 2017
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "aaf/AAFCore.h"
#include "aaf/AAFTypes.h"
#define foreachClass(Class, Classes) \
for (Class = Classes; Class != NULL; Class = Class->next)
#define foreachClassInheritance(Class, Classes) \
for (Class = Classes; Class != NULL; Class = Class->Parent)
#define foreachPropertyDefinition(PDef, PDefs) \
for (PDef = PDefs; PDef != NULL; PDef = PDef->next)
int
aafclass_classExists (AAF_Data* aafd, aafUID_t* ClassID);
aafClass*
aafclass_defineNewClass (AAF_Data* aafd, const aafUID_t* id, uint8_t isConcrete, aafClass* parent);
aafClass*
aafclass_getClassByID (AAF_Data* aafd, const aafUID_t* id);
aafPropertyDef*
aafclass_getPropertyDefinitionByID (aafClass* Classes, aafPID_t PID);
void
aafclass_printClasses (aafClass* Class, int depth); // TODO move to AAFDump ?
int
aafclass_setDefaultClasses (AAF_Data* aafd);
#endif // ! __AAFClass_h__

810
libs/aaf/aaf/AAFCore.h Normal file
View File

@ -0,0 +1,810 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __AAFCore_h__
#define __AAFCore_h__
/**
* @file AAFCore/AAFCore.h
* @brief Retrieves the AAF Objects Tree from the Compound File Binary.
* @author Adrien Gesta-Fline
* @version 0.1
* @date 04 october 2017
*
* @ingroup AAFCore
* @addtogroup AAFCore
* @brief Retrieves the AAF Objects Tree from the Compound File Binary.
*
* The AAF file structure is based on the Compound File Binary, implemented by LibCFB
* and defined at https://www.amwa.tv/projects/MS-03.shtml
*
* The specifications of the low-level AAF can be found at https://amwa.tv/projects/MS-02.shtml
*
* The specifications of the overall AAF and standard Classes / Properties can be found at
* https://amwa.tv/projects/MS-01.shtml
*
* This is the core of the libAAF library. AAFCore is intendend to :
* - Define the standard AAF classes and properties at run time,
* - retrieve potential custom classes and properties out of the MetaDictionary,
* - retrieve the entire object tree and their properties out of the CFB Tree,
* - provide functions to navigate in the tree and access objects and properties.
*
* Therefore, AAFCore makes a bridge between the low-level Compound File Binary and the
* high level AAFIface, which is used to interpret objects and thus retrieve usable data.
*
* Even though AAFCore can be used as is, it is recommended for complex operations
* like essences and clips retrieval, to use AAFIface.
*
* ### Usage
*
* In order to use libAAF, you should start by allocating AAF_Data with aaf_alloc(), then
* you can load a file by calling aaf_load_file(). aaf_load_file() will not load the entire
* file to memory, but will instead parse the CFB Tree and set AAF_Data accordingly.
*
* @code
* AAF_Data *aafd = aaf_alloc();
* aaf_load_file( aafd, "./path/to/file.aaf" );
* @endcode
*
* Then, you can access the object tree thanks to the access functions, or use the AAFIface
* to extract usable data through a convenient interface.
*
* @code
* // TODO
* @endcode
*
* Once you're done, you can close the file and free the AAF_Data structure by calling
* aaf_release( &aafd );
*
* @code
* aaf_release( &aafd );
* @endcode
*
* @{
*/
#include "aaf/AAFTypes.h"
#include "aaf/LibCFB.h"
/**
* Possible values for aafPropertyDef.isReq.
*/
enum aafPropertyIsRequired_e {
PROP_REQUIRED = 1,
PROP_REQ = 1,
PROP_OPTIONAL = 0,
PROP_OPT = 0
};
/**
* This structure defines a Class property, with a property ID
* and tells if that property is either #REQUIRED or #OPTIONAL.
* This structure is to be added to an aafClass.Properties list
* with the attachNewProperty() macro, and to be pointed to by
* the aafProperty.def field of each parsed property.
*/
typedef struct aafPropertyDefinition {
/**
* Specifies the property ID.
*
* All the standard IDs can be found in AAFDefs/AAFPropertyIDs.h.
*/
uint16_t pid;
/**
* Tells if that property is either #REQUIRED or #OPTIONAL.
*/
aafBoolean_t isReq;
aafBoolean_t meta;
wchar_t* name;
/*
* Looks like nobody cares about AAF standard TypeDefinition. All observed files
* had incorrect values for Type's Name and Identification, even Avid's files.
* Thus, PDef->type should NOT be trusted
*/
aafUID_t type; // TODO: Should be set by attachNewProperty() in AAFClass.c
/**
* Pointer to the next aafPropertyDef in the list.
*/
struct aafPropertyDefinition* next;
} aafPropertyDef;
/**
* Possible values for aafClass.isConcrete.
*/
enum aafClassIsConcrete_e {
ABSTRACT = 0,
ABS = 0,
CONCRETE = 1,
CON = 1
};
/**
* This structure defines an AAF Class.
*
* An AAF Class can be identified thanks to its ClassID.
*
* An AAF Class holds some properties.
*
* An AAF Class can inherit other Classes properties from
* its parents.
*
* An AAF Class can be either a #CONCRETE or an #ABSTRACT
* Class. It is a #CONCRETE Class if it can be directly
* retrieved from the Compound File Nodes Tree as an object.
* Else, it is an #ABSTRACT Class and has to be inherited by
* another Class for its properties to be retrieved.
*/
typedef struct aafclass {
/**
* The ClassID of the Class. When parsing, the ClassID
* correspond to the cfbNode._clsId.
* Note that the CLSID and aafUID_t types are binary
* compatible.
*
* All the standard ClassIDs can be found in AAFDefs/AAFClassDefUIDs.h.
*/
const aafUID_t* ID;
/**
* Tells if the Class is either #CONCRETE or #ABSTRACT.
*
* A Class is #CONCRETE if it can be retrieved as an
* object. Else, a Class is #ABSTRACT if it can't be
* directly retrieved and can only be inherited by
* another Class, so only its memebers can be retrieved.
*/
aafBoolean_t isConcrete;
/**
* Pointer to a list of aafPropertyDef structs.
*
* These aafPropertyDef define the properties
* owned by the Class.
*/
aafPropertyDef* Properties;
/**
* Pointer to the Parent Class. If this Class has no
* Parent (is root), then the pointer shall be NULL.
*/
struct aafclass* Parent;
aafBoolean_t meta;
wchar_t* name; // this is set at runtime
/**
* Pointer to the next Class in the AAF_Data.Class list.
*/
struct aafclass* next;
} aafClass;
/**
* This structure represents a property once it has been parsed.
*
* This structure is to be added to an aafObject.Properties list.
*/
typedef struct aafProperty {
/**
* Specifies the property ID. The pid shall be the same as in the
* #def aafPropertyDef structure.
*
* All the standard IDs can be found in AAFDefs/AAFPropertyIDs.h.
*/
uint16_t pid;
/**
* The _storedForm identifies the type of representation chosen
* for this property. This field describes how the property value
* should be interpreted. Note that the stored form described here
* is not the data type of the property value, rather it is the
* type of external representation employed. The data type of a
* given property value is implied by the property ID.
*
* Can take one of the value from #aafStoredForm_e enum.
*/
uint16_t sf;
/**
* Holds a pointer to the corresponding property definition
* aafPropertyDef struct.
*/
aafPropertyDef* def;
/**
* The length, in bytes, of the #val property value.
*/
uint16_t len;
/**
* The actual property value, of #len length.
*/
void* val;
/**
* Pointer to the next property in an aafObject.Properties list.
*/
struct aafProperty* next;
} aafProperty;
/**
* This structure represents an AAF Object, once it has been parsed.
*
* This structure is to be added to the AAF_Data.Objects list.
*
* Each aafObject correspond to a Compound File Tree Node.
*
* Each aafObject property correspond to a property entry in this
* Node/properties stream.
*/
typedef struct aafObject {
/**
* Pointer to the corresponding Class, in the AAF_Data.Class list.
*/
aafClass* Class;
/**
* Pointer to the corresponding Node in the Compound File Tree.
*/
cfbNode* Node;
/**
* The name of the Node in the Compound File Tree : cfbNode._ab.
*/
wchar_t Name[CFB_NODE_NAME_SZ];
/**
* Pointer to an aafProperty list. This list holds the retrieved
* Object properties.
*/
aafProperty* Properties;
/**
* Pointer to an aafStrongRefSetHeader_t struct.
*
* This pointer keeps track of the Index Header, when the
* Object belongs to either a Set or a Vector, else, it shall
* remain NULL.
*
* Here we can use an aafStrongRefSetHeader_t struct to hold
* an aafStrongRefVectorHeader_t, because both structs begin
* with the same bytes, exept the first one is bigger. So in
* case of a Vector, the remaining bytes will simply remain
* NULL.
*/
aafStrongRefSetHeader_t* Header;
/**
* Pointer to an aafStrongRefSetEntry_t struct.
*
* This pointer keeps track of the Index Entry, when the
* Object belongs to either a Set or a Vector, else, it shall
* remain NULL.
*
* Here we can use an aafStrongRefSetEntry_t struct to hold
* an aafStrongRefVectorEntry_t, because both structs begin
* with the same bytes, exept the first one is bigger. So in
* case of a Vector, the remaining bytes will simply remain
* NULL.
*/
aafStrongRefSetEntry_t* Entry;
/**
* Pointer to the Parent Object, that is the upper "Node" in
* the Compound File Tree.
*/
struct aafObject* Parent;
/**
* Pointer to the next Object in Set/Vector
*/
struct aafObject* next;
struct aafObject* prev;
/**
* Pointer to the next Object in the AAF_Data.Objects list.
*/
struct aafObject* nextObj;
struct _aafData* aafd; // only to access aafd->verb
} aafObject;
/**
* This structure is the main structure when using LibAAF.
*
* It holds a pointer to the CFB_Data structure for file
* access, a pointer to the AAF Classes list, a pointer to
* the AAF Objects list and a bunch of pointers to some
* key Objects in the AAF Objects Tree called shortcuts.
*
* Those shortcuts allows to quickly retrieve some AAF
* key Objects without the need to parse the tree everytime.
*/
typedef struct _aafData {
/**
* Pointer to the LibCFB CFB_Data structure.
*/
CFB_Data* cfbd;
/**
* Pointer to the AAF Classes list.
*/
aafClass* Classes;
/**
* Pointer to the AAF Object list.
*
* @note This list is intended to keep track of all the allocated Objects, not for
* parsing. For tree access, the AAF_Data.Root pointer should be used.
*/
aafObject* Objects;
struct Header {
aafObject* obj;
int16_t ByteOrder;
aafTimeStamp_t* LastModified;
aafVersionType_t* Version;
uint32_t ObjectModelVersion;
const aafUID_t* OperationalPattern;
// EssenceContainers; TODO AUIDSet_t
// DescriptiveSchemes: TODO AUIDSet_t
} Header;
struct Identification {
aafObject* obj;
wchar_t* CompanyName;
wchar_t* ProductName;
aafProductVersion_t* ProductVersion;
wchar_t* ProductVersionString;
aafUID_t* ProductID;
aafTimeStamp_t* Date;
aafProductVersion_t* ToolkitVersion;
wchar_t* Platform;
aafUID_t* GenerationAUID;
} Identification;
/**
* Pointer to the first Root Object, that is to the the top of the Tree.
*/
aafObject* Root;
/**
* (Shortcut) pointer to the Header Object in the Tree.
*/
// aafObject *Header;
/**
* (Shortcut) pointer to the MetaDictionary Object in the Tree.
*/
aafObject* MetaDictionary;
/**
* (Shortcut) pointer to the ClassDefinition Object in the Tree.
*/
aafObject* ClassDefinition;
/**
* (Shortcut) pointer to the TypeDefinition Object in the Tree.
*/
aafObject* TypeDefinition;
/**
* (Shortcut) pointer to the Identification Object in the Tree.
*/
// aafObject *Identification;
/**
* (Shortcut) pointer to the Content Object in the Tree.
*/
aafObject* Content;
/**
* (Shortcut) pointer to the Dictionary Object in the Tree.
*/
aafObject* Dictionary;
/**
* (Shortcut) pointer to the Mobs Object in the Tree.
*/
aafObject* Mobs;
/**
* (Shortcut) pointer to the EssenceData Object in the Tree.
*/
aafObject* EssenceData;
/**
* (Shortcut) pointer to the OperationDefinition Object in the Tree.
*/
aafObject* OperationDefinition;
/**
* (Shortcut) pointer to the ParameterDefinition Object in the Tree.
*/
aafObject* ParameterDefinition;
/**
* (Shortcut) pointer to the DataDefinition Object in the Tree.
*/
aafObject* DataDefinition;
/**
* (Shortcut) pointer to the PluginDefinition Object in the Tree.
*/
aafObject* PluginDefinition;
/**
* (Shortcut) pointer to the CodecDefinition Object in the Tree.
*/
aafObject* CodecDefinition;
/**
* (Shortcut) pointer to the ContainerDefinition Object in the Tree.
*/
aafObject* ContainerDefinition;
/**
* (Shortcut) pointer to the InterpolationDefinition Object in the Tree.
*/
aafObject* InterpolationDefinition;
/**
* (Shortcut) pointer to the KLVDataDefinition Object in the Tree.
*/
aafObject* KLVDataDefinition;
/**
* (Shortcut) pointer to the TaggedValueDefinition Object in the Tree.
*/
aafObject* TaggedValueDefinition;
struct dbg* dbg;
} AAF_Data;
/**
* Compares two aafUID_t, returns 1 if equal or 0 otherwise.
* https://github.com/Ardour/ardour/pull/805#issuecomment-1595788696
*/
#define aafUIDCmp(auid1, auid2) \
((auid1) != NULL && \
((auid2)) != NULL && \
(auid1)->Data1 == (auid2)->Data1 && \
(auid1)->Data2 == (auid2)->Data2 && \
(auid1)->Data3 == (auid2)->Data3 && \
(auid1)->Data4[0] == (auid2)->Data4[0] && \
(auid1)->Data4[1] == (auid2)->Data4[1] && \
(auid1)->Data4[2] == (auid2)->Data4[2] && \
(auid1)->Data4[3] == (auid2)->Data4[3] && \
(auid1)->Data4[4] == (auid2)->Data4[4] && \
(auid1)->Data4[5] == (auid2)->Data4[5] && \
(auid1)->Data4[6] == (auid2)->Data4[6] && \
(auid1)->Data4[7] == (auid2)->Data4[7])
/**
* Compares two aafMobID_t, returns 1 if equal or 0 otherwise.
*/
#define aafMobIDCmp(mobID1, mobID2) \
((mobID1) != NULL && (mobID2) != NULL && memcmp ((mobID1), (mobID2), sizeof (aafMobID_t)) == 0)
/**
* Compares two aafSlotID_t, returns 1 if equal or 0 otherwise.
* NOTE: is unused.
*/
#define aafSlotIDCmp(slotID1, slotID2) \
((slotID1) == (slotID2))
/**
* Converts an aafRational_t to a float number.
*/
#define aafRationalToFloat(r) \
(((r).denominator == 0) ? 0 : ((float)(r).numerator / (r).denominator))
/**
* Converts an aafRational_t to a int64 number.
* NOTE: is unused.
*/
#define aafRationalToint64(r) \
(((r).denominator == 0) ? 0 : (int64_t) ((r).numerator / (r).denominator))
/**
* @name Initialisation functions
* @{
*/
/**
* Allocates a new AAF_Data structure.
*
* @return A pointer to the newly allocated structure.
*/
AAF_Data*
aaf_alloc (struct dbg* dbg);
/**
* Loads an AAF file and sets the AAF_Data sructure accordingly.
*
* @param aafd Pointer to the AAF_Data structure.
* @param file Pointer to a null terminated string holding the filepath.
*
* @return 0 on success\n
* 1 on failure
*/
int
aaf_load_file (AAF_Data* aafd,
const char* file);
/**
* @}
*/
/**
* @name Release function
* @{
*/
/**
* Releases the CFB_Data structure, fclose() the file and frees the AAF_Data structure.
*
* @param aafd Pointer to the AAF_Data structure.
*/
void
aaf_release (AAF_Data** aafd);
/**
* @}
*/
/**
* @name Access functions
* @{
*/
/**
* Retrieves, for a given Object, its path in the Compound File Binary Tree.
*
* @note It is the caller responsability to free the returned pointer.
*
* @param Obj Pointer to the aafObject.
*
* @return Pointer to a null-terminated string holding the Object's path.
*/
wchar_t*
aaf_get_ObjectPath (aafObject* Obj);
/**
* Resolves a given WeakReference from a given Dictionary (a Set or Vector list of
* aafObjects), and returns a pointer to the corresponding Object if it was found.
*
* @param ref Pointer to the WeakReference to search for.
* @param list Pointer to the aafObject list from which the Reference will be searched for.
*
* @return A pointer to the aafObject if found,\n
* NULL otherwise.
*
*/
aafObject*
aaf_get_ObjectByWeakRef (aafObject* list,
aafWeakRef_t* ref);
/**
* Retrieves a Mob Object by its given MobID.
*
* @param Mobs Pointer to the Mob Object list.
* @param MobID Pointer to the MobID where're looking for.
*
* @return A pointer to the Mob aafObject if found,\n
* NULL otherwise.
*/
aafObject*
aaf_get_MobByID (aafObject* Mobs,
aafMobID_t* MobID);
aafObject*
aaf_get_MobSlotBySlotID (aafObject* MobSlots,
aafSlotID_t SlotID);
/**
* Loops through each aafObject of a list, that is of a Set or Vector. It is also
* possible to filter the returned Object by ClassID.
*
* This function should be used as the conditional expression of a while loop. The
* aaf_foreach_ObjectInSet() is an implementation of this.
*
* @param Obj Pointer to pointer to an aafObject structure that will receive each
* Object of the list.
* @param head Pointer to the first Object of the list.
* @param filter Pointer to a ClassID to use as a filter, shall be NULL if unused.
*
* @return 1 if has another Object,\n
* 0 if has no more Object.
*/
int
_aaf_foreach_ObjectInSet (aafObject** Obj,
aafObject* head,
const aafUID_t* filter);
/**
* Convenience macro, that implements the _aaf_foreach_ObjectInSet() function. This should
* be used istead of directly calling _aaf_foreach_ObjectInSet().
*/
#define aaf_foreach_ObjectInSet(Obj, head, filter) \
while (_aaf_foreach_ObjectInSet (Obj, head, filter))
/**
* Retrieves an Object property by ID.
*
* @param Obj Pointer to the Object to get the property from.
* @param pid Index of the requested property.
*
* @return A pointer to the property if found,\n
* NULL otherwise.
*/
aafProperty*
aaf_get_property (aafObject* Obj,
aafPID_t pid);
/**
* Retrieves a Property ID by its name.
*
* @param aafd Pointer to the AAF_Data structure.
* @param name Name of the property to look for.
*
* @return The PID of the property if it was found\n
* 0 otherwise.
*/
aafPID_t
aaf_get_PropertyIDByName (AAF_Data* aafd,
const wchar_t* name);
/**
* Retrieves an Object property by ID, and returns its value.
*
* Special case is the StrongReference, where the function returns
* the Object directly, instead of its reference.
*
* Function performs a type check before it returns.
*
* Caller must free the returned value, only if property is of type
* AAFTypeID_String.
*
* @param Obj Pointer to the Object to get the property from.
* @param pid Index of the requested property.
*
* @return A pointer to the property's value if found,\n
* NULL otherwise.
*/
void*
aaf_get_propertyValue (aafObject* Obj,
aafPID_t pid,
const aafUID_t* typeID);
/**
* Safely get an Indirect value, after it was retrieved using aaf_get_propertyValue().
* Function checks value type and in case of AAFTypeID_String, performs allocation
* and conversion to system wchar_t*.
*
* Caller must free the returned value, only if Indirect is of type
* AAFTypeID_String.
*
* @param aafd Pointer to the AAF_Data structure.
* @param Indirect Pointer to the Indirect structure.
* @param typeDef Type definition expected from the Indirect.
*
* @return A pointer to the Indirect value, or a pointer to an allocated wchar_t if Indirect is AAFTypeID_String\n
* NULL in case of error.
*/
void*
aaf_get_indirectValue (AAF_Data* aafd,
aafIndirect_t* Indirect,
const aafUID_t* typeDef);
/**
* @}
*/
/**
* @}
*/
#endif // ! __AAFCore_h__

View File

@ -0,0 +1,461 @@
#ifndef __AAFClassDefUIDs_h__
#define __AAFClassDefUIDs_h__
#include "aaf/AAFTypes.h"
// AAF class definition UIDs.
//
// The AAF reference implementation uses shorter names than
// SMPTE. The names are shortened by the following aliases.
//
#define AAFClassID_ClassDef AAFClassID_ClassDefinition
#define AAFClassID_CodecDef AAFClassID_CodecDefinition
#define AAFClassID_DataDef AAFClassID_DataDefinition
#define AAFClassID_DefObject AAFClassID_DefinitionObject
#define AAFClassID_Edgecode AAFClassID_EdgeCode
#define AAFClassID_OperationDef AAFClassID_OperationDefinition
#define AAFClassID_Object AAFClassID_InterchangeObject
#define AAFClassID_ParameterDef AAFClassID_ParameterDefinition
#define AAFClassID_InterpolationDef AAFClassID_InterpolationDefinition
#define AAFClassID_PropertyDef AAFClassID_PropertyDefinition
#define AAFClassID_TypeDef AAFClassID_TypeDefinition
#define AAFClassID_TypeDefCharacter AAFClassID_TypeDefinitionCharacter
#define AAFClassID_TypeDefEnum AAFClassID_TypeDefinitionEnumeration
#define AAFClassID_TypeDefExtEnum AAFClassID_TypeDefinitionExtendibleEnumeration
#define AAFClassID_TypeDefFixedArray AAFClassID_TypeDefinitionFixedArray
#define AAFClassID_TypeDefInt AAFClassID_TypeDefinitionInteger
#define AAFClassID_TypeDefRecord AAFClassID_TypeDefinitionRecord
#define AAFClassID_TypeDefRename AAFClassID_TypeDefinitionRename
#define AAFClassID_TypeDefSet AAFClassID_TypeDefinitionSet
#define AAFClassID_TypeDefStream AAFClassID_TypeDefinitionStream
#define AAFClassID_TypeDefString AAFClassID_TypeDefinitionString
#define AAFClassID_TypeDefIndirect AAFClassID_TypeDefinitionIndirect
#define AAFClassID_TypeDefOpaque AAFClassID_TypeDefinitionOpaque
#define AAFClassID_TypeDefStrongObjRef AAFClassID_TypeDefinitionStrongObjectReference
#define AAFClassID_TypeDefVariableArray AAFClassID_TypeDefinitionVariableArray
#define AAFClassID_TypeDefWeakObjRef AAFClassID_TypeDefinitionWeakObjectReference
#define AAFClassID_ContainerDef AAFClassID_ContainerDefinition
#define AAFClassID_PluginDef AAFClassID_PluginDefinition
// https://github.com/nevali/aaf/blob/a03404ad8dc371757f3847b8dae0a9d70fff6a4e/ref-impl/include/OM/OMDictionary.h
static const aafUID_t AAFClassID_Root =
{0xb3b398a5, 0x1c90, 0x11d4, {0x80, 0x53, 0x08, 0x00, 0x36, 0x21, 0x08, 0x04}};
//{0d010101-0101-0100-060e-2b3402060101}
static const aafUID_t AAFClassID_InterchangeObject =
{0x0d010101, 0x0101, 0x0100, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-0200-060e-2b3402060101}
static const aafUID_t AAFClassID_Component =
{0x0d010101, 0x0101, 0x0200, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-0300-060e-2b3402060101}
static const aafUID_t AAFClassID_Segment =
{0x0d010101, 0x0101, 0x0300, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-0400-060e-2b3402060101}
static const aafUID_t AAFClassID_EdgeCode =
{0x0d010101, 0x0101, 0x0400, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-0500-060e-2b3402060101}
static const aafUID_t AAFClassID_EssenceGroup =
{0x0d010101, 0x0101, 0x0500, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-0600-060e-2b3402060101}
static const aafUID_t AAFClassID_Event =
{0x0d010101, 0x0101, 0x0600, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-0700-060e-2b3402060101}
static const aafUID_t AAFClassID_GPITrigger =
{0x0d010101, 0x0101, 0x0700, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-0800-060e-2b3402060101}
static const aafUID_t AAFClassID_CommentMarker =
{0x0d010101, 0x0101, 0x0800, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-0900-060e-2b3402060101}
static const aafUID_t AAFClassID_Filler =
{0x0d010101, 0x0101, 0x0900, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-0a00-060e-2b3402060101}
static const aafUID_t AAFClassID_OperationGroup =
{0x0d010101, 0x0101, 0x0a00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-0b00-060e-2b3402060101}
static const aafUID_t AAFClassID_NestedScope =
{0x0d010101, 0x0101, 0x0b00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-0c00-060e-2b3402060101}
static const aafUID_t AAFClassID_Pulldown =
{0x0d010101, 0x0101, 0x0c00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-0d00-060e-2b3402060101}
static const aafUID_t AAFClassID_ScopeReference =
{0x0d010101, 0x0101, 0x0d00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-0e00-060e-2b3402060101}
static const aafUID_t AAFClassID_Selector =
{0x0d010101, 0x0101, 0x0e00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-0f00-060e-2b3402060101}
static const aafUID_t AAFClassID_Sequence =
{0x0d010101, 0x0101, 0x0f00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1000-060e-2b3402060101}
static const aafUID_t AAFClassID_SourceReference =
{0x0d010101, 0x0101, 0x1000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1100-060e-2b3402060101}
static const aafUID_t AAFClassID_SourceClip =
{0x0d010101, 0x0101, 0x1100, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1200-060e-2b3402060101}
static const aafUID_t AAFClassID_TextClip =
{0x0d010101, 0x0101, 0x1200, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1300-060e-2b3402060101}
static const aafUID_t AAFClassID_HTMLClip =
{0x0d010101, 0x0101, 0x1300, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1400-060e-2b3402060101}
static const aafUID_t AAFClassID_Timecode =
{0x0d010101, 0x0101, 0x1400, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1500-060e-2b3402060101}
static const aafUID_t AAFClassID_TimecodeStream =
{0x0d010101, 0x0101, 0x1500, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1600-060e-2b3402060101}
static const aafUID_t AAFClassID_TimecodeStream12M =
{0x0d010101, 0x0101, 0x1600, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1700-060e-2b3402060101}
static const aafUID_t AAFClassID_Transition =
{0x0d010101, 0x0101, 0x1700, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1800-060e-2b3402060101}
static const aafUID_t AAFClassID_ContentStorage =
{0x0d010101, 0x0101, 0x1800, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1900-060e-2b3402060101}
static const aafUID_t AAFClassID_ControlPoint =
{0x0d010101, 0x0101, 0x1900, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1a00-060e-2b3402060101}
static const aafUID_t AAFClassID_DefinitionObject =
{0x0d010101, 0x0101, 0x1a00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1b00-060e-2b3402060101}
static const aafUID_t AAFClassID_DataDefinition =
{0x0d010101, 0x0101, 0x1b00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1c00-060e-2b3402060101}
static const aafUID_t AAFClassID_OperationDefinition =
{0x0d010101, 0x0101, 0x1c00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1d00-060e-2b3402060101}
static const aafUID_t AAFClassID_ParameterDefinition =
{0x0d010101, 0x0101, 0x1d00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1e00-060e-2b3402060101}
static const aafUID_t AAFClassID_PluginDefinition =
{0x0d010101, 0x0101, 0x1e00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-1f00-060e-2b3402060101}
static const aafUID_t AAFClassID_CodecDefinition =
{0x0d010101, 0x0101, 0x1f00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2000-060e-2b3402060101}
static const aafUID_t AAFClassID_ContainerDefinition =
{0x0d010101, 0x0101, 0x2000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2100-060e-2b3402060101}
static const aafUID_t AAFClassID_InterpolationDefinition =
{0x0d010101, 0x0101, 0x2100, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2200-060e-2b3402060101}
static const aafUID_t AAFClassID_Dictionary =
{0x0d010101, 0x0101, 0x2200, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2300-060e-2b3402060101}
static const aafUID_t AAFClassID_EssenceData =
{0x0d010101, 0x0101, 0x2300, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2400-060e-2b3402060101}
static const aafUID_t AAFClassID_EssenceDescriptor =
{0x0d010101, 0x0101, 0x2400, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2500-060e-2b3402060101}
static const aafUID_t AAFClassID_FileDescriptor =
{0x0d010101, 0x0101, 0x2500, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2600-060e-2b3402060101}
static const aafUID_t AAFClassID_AIFCDescriptor =
{0x0d010101, 0x0101, 0x2600, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2700-060e-2b3402060101}
static const aafUID_t AAFClassID_DigitalImageDescriptor =
{0x0d010101, 0x0101, 0x2700, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2800-060e-2b3402060101}
static const aafUID_t AAFClassID_CDCIDescriptor =
{0x0d010101, 0x0101, 0x2800, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2900-060e-2b3402060101}
static const aafUID_t AAFClassID_RGBADescriptor =
{0x0d010101, 0x0101, 0x2900, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2a00-060e-2b3402060101}
static const aafUID_t AAFClassID_HTMLDescriptor =
{0x0d010101, 0x0101, 0x2a00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2b00-060e-2b3402060101}
static const aafUID_t AAFClassID_TIFFDescriptor =
{0x0d010101, 0x0101, 0x2b00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2c00-060e-2b3402060101}
static const aafUID_t AAFClassID_WAVEDescriptor =
{0x0d010101, 0x0101, 0x2c00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2d00-060e-2b3402060101}
static const aafUID_t AAFClassID_FilmDescriptor =
{0x0d010101, 0x0101, 0x2d00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2e00-060e-2b3402060101}
static const aafUID_t AAFClassID_TapeDescriptor =
{0x0d010101, 0x0101, 0x2e00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-2f00-060e-2b3402060101}
static const aafUID_t AAFClassID_Header =
{0x0d010101, 0x0101, 0x2f00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3000-060e-2b3402060101}
static const aafUID_t AAFClassID_Identification =
{0x0d010101, 0x0101, 0x3000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3100-060e-2b3402060101}
static const aafUID_t AAFClassID_Locator =
{0x0d010101, 0x0101, 0x3100, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3200-060e-2b3402060101}
static const aafUID_t AAFClassID_NetworkLocator =
{0x0d010101, 0x0101, 0x3200, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3300-060e-2b3402060101}
static const aafUID_t AAFClassID_TextLocator =
{0x0d010101, 0x0101, 0x3300, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3400-060e-2b3402060101}
static const aafUID_t AAFClassID_Mob =
{0x0d010101, 0x0101, 0x3400, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3500-060e-2b3402060101}
static const aafUID_t AAFClassID_CompositionMob =
{0x0d010101, 0x0101, 0x3500, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3600-060e-2b3402060101}
static const aafUID_t AAFClassID_MasterMob =
{0x0d010101, 0x0101, 0x3600, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3700-060e-2b3402060101}
static const aafUID_t AAFClassID_SourceMob =
{0x0d010101, 0x0101, 0x3700, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3800-060e-2b3402060101}
static const aafUID_t AAFClassID_MobSlot =
{0x0d010101, 0x0101, 0x3800, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3900-060e-2b3402060101}
static const aafUID_t AAFClassID_EventMobSlot =
{0x0d010101, 0x0101, 0x3900, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3a00-060e-2b3402060101}
static const aafUID_t AAFClassID_StaticMobSlot =
{0x0d010101, 0x0101, 0x3a00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3b00-060e-2b3402060101}
static const aafUID_t AAFClassID_TimelineMobSlot =
{0x0d010101, 0x0101, 0x3b00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3c00-060e-2b3402060101}
static const aafUID_t AAFClassID_Parameter =
{0x0d010101, 0x0101, 0x3c00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3d00-060e-2b3402060101}
static const aafUID_t AAFClassID_ConstantValue =
{0x0d010101, 0x0101, 0x3d00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3e00-060e-2b3402060101}
static const aafUID_t AAFClassID_VaryingValue =
{0x0d010101, 0x0101, 0x3e00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-3f00-060e-2b3402060101}
static const aafUID_t AAFClassID_TaggedValue =
{0x0d010101, 0x0101, 0x3f00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4000-060e-2b3402060101}
static const aafUID_t AAFClassID_KLVData =
{0x0d010101, 0x0101, 0x4000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4100-060e-2b3402060101}
static const aafUID_t AAFClassID_DescriptiveMarker =
{0x0d010101, 0x0101, 0x4100, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4200-060e-2b3402060101}
static const aafUID_t AAFClassID_SoundDescriptor =
{0x0d010101, 0x0101, 0x4200, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4300-060e-2b3402060101}
static const aafUID_t AAFClassID_DataEssenceDescriptor =
{0x0d010101, 0x0101, 0x4300, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4400-060e-2b3402060101}
static const aafUID_t AAFClassID_MultipleDescriptor =
{0x0d010101, 0x0101, 0x4400, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4500-060e-2b3402060101}
static const aafUID_t AAFClassID_DescriptiveClip =
{0x0d010101, 0x0101, 0x4500, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4700-060e-2b3402060101}
static const aafUID_t AAFClassID_AES3PCMDescriptor =
{0x0d010101, 0x0101, 0x4700, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4800-060e-2b3402060101}
static const aafUID_t AAFClassID_PCMDescriptor =
{0x0d010101, 0x0101, 0x4800, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4900-060e-2b3402060101}
static const aafUID_t AAFClassID_PhysicalDescriptor =
{0x0d010101, 0x0101, 0x4900, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4a00-060e-2b3402060101}
static const aafUID_t AAFClassID_ImportDescriptor =
{0x0d010101, 0x0101, 0x4a00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4b00-060e-2b3402060101}
static const aafUID_t AAFClassID_RecordingDescriptor =
{0x0d010101, 0x0101, 0x4b00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4c00-060e-2b3402060101}
static const aafUID_t AAFClassID_TaggedValueDefinition =
{0x0d010101, 0x0101, 0x4c00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4d00-060e-2b3402060101}
static const aafUID_t AAFClassID_KLVDataDefinition =
{0x0d010101, 0x0101, 0x4d00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4e00-060e-2b3402060101}
static const aafUID_t AAFClassID_AuxiliaryDescriptor =
{0x0d010101, 0x0101, 0x4e00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-4f00-060e-2b3402060101}
static const aafUID_t AAFClassID_RIFFChunk =
{0x0d010101, 0x0101, 0x4f00, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-5000-060e-2b3402060101}
static const aafUID_t AAFClassID_BWFImportDescriptor =
{0x0d010101, 0x0101, 0x5000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0101-5100-060e-2b3402060101}
static const aafUID_t AAFClassID_MPEGVideoDescriptor =
{0x0d010101, 0x0101, 0x5100, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0201-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_ClassDefinition =
{0x0d010101, 0x0201, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0202-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_PropertyDefinition =
{0x0d010101, 0x0202, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0203-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinition =
{0x0d010101, 0x0203, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0204-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionInteger =
{0x0d010101, 0x0204, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0205-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionStrongObjectReference =
{0x0d010101, 0x0205, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0206-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionWeakObjectReference =
{0x0d010101, 0x0206, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0207-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionEnumeration =
{0x0d010101, 0x0207, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0208-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionFixedArray =
{0x0d010101, 0x0208, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0209-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionVariableArray =
{0x0d010101, 0x0209, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-020a-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionSet =
{0x0d010101, 0x020a, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-020b-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionString =
{0x0d010101, 0x020b, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-020c-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionStream =
{0x0d010101, 0x020c, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-020d-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionRecord =
{0x0d010101, 0x020d, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-020e-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionRename =
{0x0d010101, 0x020e, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0220-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionExtendibleEnumeration =
{0x0d010101, 0x0220, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0221-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionIndirect =
{0x0d010101, 0x0221, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0222-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionOpaque =
{0x0d010101, 0x0222, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0223-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_TypeDefinitionCharacter =
{0x0d010101, 0x0223, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0224-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_MetaDefinition =
{0x0d010101, 0x0224, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010101-0225-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_MetaDictionary =
{0x0d010101, 0x0225, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010400-0000-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_DescriptiveObject =
{0x0d010400, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
//{0d010401-0000-0000-060e-2b3402060101}
static const aafUID_t AAFClassID_DescriptiveFramework =
{0x0d010401, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x02, 0x06, 0x01, 0x01}};
#endif // ! __AAFClassDefUIDs_h__

View File

@ -0,0 +1,223 @@
#ifndef __CodecDefinition_h__
#define __CodecDefinition_h__
#include "aaf/AAFTypes.h"
// AAF well-known CodecDefinition instances
//
//{568fb761-9458-11d2-8089-006008143e6f}
static const aafUID_t kAAFCodecDef_None =
{0x568fb761, 0x9458, 0x11d2, {0x80, 0x89, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{90ac17c8-e3e2-4596-9e9e-a6dd1c70c892}
static const aafUID_t kAAFCodecDef_PCM =
{0x90ac17c8, 0xe3e2, 0x4596, {0x9e, 0x9e, 0xa6, 0xdd, 0x1c, 0x70, 0xc8, 0x92}};
//{820f09b1-eb9b-11d2-809f-006008143e6f}
static const aafUID_t kAAFCodecDef_WAVE =
{0x820f09b1, 0xeb9b, 0x11d2, {0x80, 0x9f, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{4b1c1a45-03f2-11d4-80fb-006008143e6f}
static const aafUID_t kAAFCodecDef_AIFC =
{0x4b1c1a45, 0x03f2, 0x11d4, {0x80, 0xfb, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{18634f8c-3bab-11d3-bfd6-00104bc9156d}
static const aafUID_t kAAFCodecDef_JPEG =
{0x18634f8c, 0x3bab, 0x11d3, {0xbf, 0xd6, 0x00, 0x10, 0x4b, 0xc9, 0x15, 0x6d}};
//{4e84045e-0f29-11d4-a359-009027dfca6a}
static const aafUID_t kAAFCodecDef_CDCI =
{0x4e84045e, 0x0f29, 0x11d4, {0xa3, 0x59, 0x00, 0x90, 0x27, 0xdf, 0xca, 0x6a}};
//{4e84045f-0f29-11d4-a359-009027dfca6a}
static const aafUID_t kAAFCodecDef_RGBA =
{0x4e84045f, 0x0f29, 0x11d4, {0xa3, 0x59, 0x00, 0x90, 0x27, 0xdf, 0xca, 0x6a}};
//{6c2a61c2-e7a2-46ee-8d90-6a1d06e15f41}
static const aafUID_t kAAFCodecDef_VC3 =
{0x6c2a61c2, 0xe7a2, 0x46ee, {0x8d, 0x90, 0x6a, 0x1d, 0x06, 0xe1, 0x5f, 0x41}};
//{8ef593f6-9521-4344-9ede-b84e8cfdc7da}
static const aafUID_t kAAFCodecDef_DNxHD =
{0x8ef593f6, 0x9521, 0x4344, {0x9e, 0xde, 0xb8, 0x4e, 0x8c, 0xfd, 0xc7, 0xda}};
//{1b31f3b1-9450-11d2-8089-006008143e6f}
static const aafUID_t kAAFCodecFlavour_None =
{0x1b31f3b1, 0x9450, 0x11d2, {0x80, 0x89, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{af4de587-23d7-4c8a-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_DV_Based_100Mbps_1080x50I =
{0xaf4de587, 0x23d7, 0x4c8a, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c8b-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_DV_Based_100Mbps_1080x5994I =
{0xaf4de587, 0x23d7, 0x4c8b, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c8c-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_DV_Based_100Mbps_720x50P =
{0xaf4de587, 0x23d7, 0x4c8c, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c8d-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_DV_Based_100Mbps_720x5994P =
{0xaf4de587, 0x23d7, 0x4c8d, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c80-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_DV_Based_25Mbps_525_60 =
{0xaf4de587, 0x23d7, 0x4c80, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c81-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_DV_Based_25Mbps_625_50 =
{0xaf4de587, 0x23d7, 0x4c81, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c82-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_DV_Based_50Mbps_525_60 =
{0xaf4de587, 0x23d7, 0x4c82, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c83-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_DV_Based_50Mbps_625_50 =
{0xaf4de587, 0x23d7, 0x4c83, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c7f-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_IEC_DV_525_60 =
{0xaf4de587, 0x23d7, 0x4c7f, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c7e-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_IEC_DV_625_50 =
{0xaf4de587, 0x23d7, 0x4c7e, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c7d-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_LegacyDV_525_60 =
{0xaf4de587, 0x23d7, 0x4c7d, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c7c-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_LegacyDV_625_50 =
{0xaf4de587, 0x23d7, 0x4c7c, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c84-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_SMPTE_D10_50Mbps_625x50I =
{0xaf4de587, 0x23d7, 0x4c84, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c85-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_SMPTE_D10_50Mbps_525x5994I =
{0xaf4de587, 0x23d7, 0x4c85, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c86-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_SMPTE_D10_40Mbps_625x50I =
{0xaf4de587, 0x23d7, 0x4c86, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c87-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_SMPTE_D10_40Mbps_525x5994I =
{0xaf4de587, 0x23d7, 0x4c87, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c88-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_SMPTE_D10_30Mbps_625x50I =
{0xaf4de587, 0x23d7, 0x4c88, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{af4de587-23d7-4c89-b37b-c1c13870e711}
static const aafUID_t kAAFCodecFlavour_SMPTE_D10_30Mbps_525x5994I =
{0xaf4de587, 0x23d7, 0x4c89, {0xb3, 0x7b, 0xc1, 0xc1, 0x38, 0x70, 0xe7, 0x11}};
//{effdb6b4-fe99-4768-88fe-3422a5762961}
static const aafUID_t kAAFCodecFlavour_VC3_1235 =
{0xeffdb6b4, 0xfe99, 0x4768, {0x88, 0xfe, 0x34, 0x22, 0xa5, 0x76, 0x29, 0x61}};
//{21b15f27-2781-4656-aa1b-dc5e63862738}
static const aafUID_t kAAFCodecFlavour_VC3_1237 =
{0x21b15f27, 0x2781, 0x4656, {0xaa, 0x1b, 0xdc, 0x5e, 0x63, 0x86, 0x27, 0x38}};
//{62f37363-b1d1-4fa0-9fb7-6e7044371396}
static const aafUID_t kAAFCodecFlavour_VC3_1238 =
{0x62f37363, 0xb1d1, 0x4fa0, {0x9f, 0xb7, 0x6e, 0x70, 0x44, 0x37, 0x13, 0x96}};
//{1e9b855a-323e-4999-b0fa-8444267a63a7}
static const aafUID_t kAAFCodecFlavour_VC3_1241 =
{0x1e9b855a, 0x323e, 0x4999, {0xb0, 0xfa, 0x84, 0x44, 0x26, 0x7a, 0x63, 0xa7}};
//{8b4c29cf-b255-4ef0-bf79-b5b616479238}
static const aafUID_t kAAFCodecFlavour_VC3_1242 =
{0x8b4c29cf, 0xb255, 0x4ef0, {0xbf, 0x79, 0xb5, 0xb6, 0x16, 0x47, 0x92, 0x38}};
//{e063fd16-6a70-4128-936d-ac776f2630cf}
static const aafUID_t kAAFCodecFlavour_VC3_1243 =
{0xe063fd16, 0x6a70, 0x4128, {0x93, 0x6d, 0xac, 0x77, 0x6f, 0x26, 0x30, 0xcf}};
//{c80d0143-be86-45fd-aacc-7f612b4b9139}
static const aafUID_t kAAFCodecFlavour_VC3_1244 =
{0xc80d0143, 0xbe86, 0x45fd, {0xaa, 0xcc, 0x7f, 0x61, 0x2b, 0x4b, 0x91, 0x39}};
//{47eb10b5-72fa-4dbb-9801-e0fe9ab8d9f0}
static const aafUID_t kAAFCodecFlavour_VC3_1250 =
{0x47eb10b5, 0x72fa, 0x4dbb, {0x98, 0x01, 0xe0, 0xfe, 0x9a, 0xb8, 0xd9, 0xf0}};
//{26cf3984-c716-4315-9de7-9228b5c0f922}
static const aafUID_t kAAFCodecFlavour_VC3_1251 =
{0x26cf3984, 0xc716, 0x4315, {0x9d, 0xe7, 0x92, 0x28, 0xb5, 0xc0, 0xf9, 0x22}};
//{0909cf52-475a-4abc-9e13-0ddb9d60d16c}
static const aafUID_t kAAFCodecFlavour_VC3_1252 =
{0x0909cf52, 0x475a, 0x4abc, {0x9e, 0x13, 0x0d, 0xdb, 0x9d, 0x60, 0xd1, 0x6c}};
//{7f5d77dd-5402-45e0-9128-038016f55406}
static const aafUID_t kAAFCodecFlavour_VC3_1253 =
{0x7f5d77dd, 0x5402, 0x45e0, {0x91, 0x28, 0x03, 0x80, 0x16, 0xf5, 0x54, 0x06}};
//{a362d3cb-dcef-4ffb-bb35-be72a16561ce}
static const aafUID_t kAAFCodecFlavour_VC3_1254 =
{0xa362d3cb, 0xdcef, 0x4ffb, {0xbb, 0x35, 0xbe, 0x72, 0xa1, 0x65, 0x61, 0xce}};
// AAF CodecDefinition legacy aliases
//
static const aafUID_t kAAFNoCodec = kAAFCodecDef_None;
static const aafUID_t kAAFCodecPCM = kAAFCodecDef_PCM;
static const aafUID_t kAAFCodecWAVE = kAAFCodecDef_WAVE;
static const aafUID_t kAAFCODEC_AIFC = kAAFCodecDef_AIFC;
static const aafUID_t kAAFCodecJPEG = kAAFCodecDef_JPEG;
static const aafUID_t kAAFCodecCDCI = kAAFCodecDef_CDCI;
static const aafUID_t kAAFCodecRGBA = kAAFCodecDef_RGBA;
static const aafUID_t kAAFCodecVC3 = kAAFCodecDef_VC3;
static const aafUID_t kAAFCodecDNxHD = kAAFCodecDef_DNxHD;
static const aafUID_t kAAFNilCodecFlavour = kAAFCodecFlavour_None;
#endif // ! __CodecDefinition_h__

View File

@ -0,0 +1,120 @@
#ifndef __CompressionDefinition_h__
#define __CompressionDefinition_h__
#include "aaf/AAFTypes.h"
// AAF well-known CompressionDefinition instances
//
//{edb35383-6d30-11d3-a036-006094eb75cb}
static const aafUID_t AAFCompressionDef_AAF_CMPR_FULL_JPEG =
{0xedb35383, 0x6d30, 0x11d3, {0xa0, 0x36, 0x00, 0x60, 0x94, 0xeb, 0x75, 0xcb}};
//{edb35391-6d30-11d3-a036-006094eb75cb}
static const aafUID_t AAFCompressionDef_AAF_CMPR_AUNC422 =
{0xedb35391, 0x6d30, 0x11d3, {0xa0, 0x36, 0x00, 0x60, 0x94, 0xeb, 0x75, 0xcb}};
//{edb35390-6d30-11d3-a036-006094eb75cb}
static const aafUID_t AAFCompressionDef_LegacyDV =
{0xedb35390, 0x6d30, 0x11d3, {0xa0, 0x36, 0x00, 0x60, 0x94, 0xeb, 0x75, 0xcb}};
//{04010202-0102-0101-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_SMPTE_D10_50Mbps_625x50I =
{0x04010202, 0x0102, 0x0101, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0102-0102-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_SMPTE_D10_50Mbps_525x5994I =
{0x04010202, 0x0102, 0x0102, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0102-0103-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_SMPTE_D10_40Mbps_625x50I =
{0x04010202, 0x0102, 0x0103, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0102-0104-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_SMPTE_D10_40Mbps_525x5994I =
{0x04010202, 0x0102, 0x0104, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0102-0105-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_SMPTE_D10_30Mbps_625x50I =
{0x04010202, 0x0102, 0x0105, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0102-0106-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_SMPTE_D10_30Mbps_525x5994I =
{0x04010202, 0x0102, 0x0106, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0201-0100-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_IEC_DV_525_60 =
{0x04010202, 0x0201, 0x0100, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0201-0200-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_IEC_DV_625_50 =
{0x04010202, 0x0201, 0x0200, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0202-0100-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_DV_Based_25Mbps_525_60 =
{0x04010202, 0x0202, 0x0100, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0202-0200-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_DV_Based_25Mbps_625_50 =
{0x04010202, 0x0202, 0x0200, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0202-0300-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_DV_Based_50Mbps_525_60 =
{0x04010202, 0x0202, 0x0300, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0202-0400-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_DV_Based_50Mbps_625_50 =
{0x04010202, 0x0202, 0x0400, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0202-0500-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_DV_Based_100Mbps_1080x5994I =
{0x04010202, 0x0202, 0x0500, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0202-0600-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_DV_Based_100Mbps_1080x50I =
{0x04010202, 0x0202, 0x0600, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0202-0700-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_DV_Based_100Mbps_720x5994P =
{0x04010202, 0x0202, 0x0700, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-0202-0800-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_DV_Based_100Mbps_720x50P =
{0x04010202, 0x0202, 0x0800, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010202-7100-0000-060e-2b340401010a}
static const aafUID_t AAFCompressionDef_VC3_1 =
{0x04010202, 0x7100, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0a}};
//{0e040201-0204-0100-060e-2b3404010101}
static const aafUID_t AAFCompressionDef_Avid_DNxHD_Legacy =
{0x0e040201, 0x0204, 0x0100, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
// AAF CompressionDefinition legacy aliases
//
//static const aafUID_t AAF_CMPR_FULL_JPEG = AAFCompressionDef_AAF_CMPR_FULL_JPEG;
//static const aafUID_t AAF_CMPR_AUNC422 = AAFCompressionDef_AAF_CMPR_AUNC422;
#endif // ! __CompressionDefinition_h__

View File

@ -0,0 +1,484 @@
#ifndef __ContainerDefinition_h__
#define __ContainerDefinition_h__
#include "aaf/AAFTypes.h"
// AAF well-known ContainerDefinition instances
//
//{4313b572-d8ba-11d2-809b-006008143e6f}
static const aafUID_t AAFContainerDef_External =
{0x4313b572, 0xd8ba, 0x11d2, {0x80, 0x9b, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{4b1c1a46-03f2-11d4-80fb-006008143e6f}
static const aafUID_t AAFContainerDef_OMF =
{0x4b1c1a46, 0x03f2, 0x11d4, {0x80, 0xfb, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{4313b571-d8ba-11d2-809b-006008143e6f}
static const aafUID_t AAFContainerDef_AAF =
{0x4313b571, 0xd8ba, 0x11d2, {0x80, 0x9b, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{42464141-000d-4d4f-060e-2b34010101ff}
static const aafUID_t AAFContainerDef_AAFMSS =
{0x42464141, 0x000d, 0x4d4f, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0xff}};
//{4b464141-000d-4d4f-060e-2b34010101ff}
static const aafUID_t AAFContainerDef_AAFKLV =
{0x4b464141, 0x000d, 0x4d4f, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0xff}};
//{58464141-000d-4d4f-060e-2b34010101ff}
static const aafUID_t AAFContainerDef_AAFXML =
{0x58464141, 0x000d, 0x4d4f, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0xff}};
//{0d010301-0201-0101-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_625x50I_50Mbps_DefinedTemplate =
{0x0d010301, 0x0201, 0x0101, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0201-0102-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_625x50I_50Mbps_ExtendedTemplate =
{0x0d010301, 0x0201, 0x0102, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0201-017f-060e-2b3404010102}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_625x50I_50Mbps_PictureOnly =
{0x0d010301, 0x0201, 0x017f, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x02}};
//{0d010301-0201-0201-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_525x5994I_50Mbps_DefinedTemplate =
{0x0d010301, 0x0201, 0x0201, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0201-0202-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_525x5994I_50Mbps_ExtendedTemplate =
{0x0d010301, 0x0201, 0x0202, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0201-027f-060e-2b3404010102}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_525x5994I_50Mbps_PictureOnly =
{0x0d010301, 0x0201, 0x027f, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x02}};
//{0d010301-0201-0301-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_625x50I_40Mbps_DefinedTemplate =
{0x0d010301, 0x0201, 0x0301, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0201-0302-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_625x50I_40Mbps_ExtendedTemplate =
{0x0d010301, 0x0201, 0x0302, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0201-037f-060e-2b3404010102}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_625x50I_40Mbps_PictureOnly =
{0x0d010301, 0x0201, 0x037f, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x02}};
//{0d010301-0201-0401-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_525x5994I_40Mbps_DefinedTemplate =
{0x0d010301, 0x0201, 0x0401, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0201-0402-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_525x5994I_40Mbps_ExtendedTemplate =
{0x0d010301, 0x0201, 0x0402, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0201-047f-060e-2b3404010102}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_525x5994I_40Mbps_PictureOnly =
{0x0d010301, 0x0201, 0x047f, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x02}};
//{0d010301-0201-0501-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_625x50I_30Mbps_DefinedTemplate =
{0x0d010301, 0x0201, 0x0501, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0201-0502-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_625x50I_30Mbps_ExtendedTemplate =
{0x0d010301, 0x0201, 0x0502, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0201-057f-060e-2b3404010102}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_625x50I_30Mbps_PictureOnly =
{0x0d010301, 0x0201, 0x057f, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x02}};
//{0d010301-0201-0601-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_525x5994I_30Mbps_DefinedTemplate =
{0x0d010301, 0x0201, 0x0601, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0201-0602-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_525x5994I_30Mbps_ExtendedTemplate =
{0x0d010301, 0x0201, 0x0602, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0201-067f-060e-2b3404010102}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_SMPTE_D10_525x5994I_30Mbps_PictureOnly =
{0x0d010301, 0x0201, 0x067f, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x02}};
//{0d010301-0202-0101-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_IECDV_525x5994I_25Mbps =
{0x0d010301, 0x0202, 0x0101, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-0102-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_IECDV_525x5994I_25Mbps =
{0x0d010301, 0x0202, 0x0102, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-0201-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_IECDV_625x50I_25Mbps =
{0x0d010301, 0x0202, 0x0201, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-0202-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_IECDV_625x50I_25Mbps =
{0x0d010301, 0x0202, 0x0202, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-0301-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_IECDV_525x5994I_25Mbps_SMPTE322M =
{0x0d010301, 0x0202, 0x0301, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-0302-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_IECDV_525x5994I_25Mbps_SMPTE322M =
{0x0d010301, 0x0202, 0x0302, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-0401-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_IECDV_625x50I_25Mbps_SMPTE322M =
{0x0d010301, 0x0202, 0x0401, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-0402-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_IECDV_625x50I_25Mbps_SMPTE322M =
{0x0d010301, 0x0202, 0x0402, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-3f01-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_IECDV_UndefinedSource_25Mbps =
{0x0d010301, 0x0202, 0x3f01, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-3f02-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_IECDV_UndefinedSource_25Mbps =
{0x0d010301, 0x0202, 0x3f02, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-4001-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_DVbased_525x5994I_25Mbps =
{0x0d010301, 0x0202, 0x4001, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-4002-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_DVbased_525x5994I_25Mbps =
{0x0d010301, 0x0202, 0x4002, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-4101-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_DVbased_625x50I_25Mbps =
{0x0d010301, 0x0202, 0x4101, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-4102-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_DVbased_625x50I_25Mbps =
{0x0d010301, 0x0202, 0x4102, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-5001-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_DVbased_525x5994I_50Mbps =
{0x0d010301, 0x0202, 0x5001, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-5002-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_DVbased_525x5994I_50Mbps =
{0x0d010301, 0x0202, 0x5002, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-5101-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_DVbased_625x50I_50Mbps =
{0x0d010301, 0x0202, 0x5101, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-5102-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_DVbased_625x50I_50Mbps =
{0x0d010301, 0x0202, 0x5102, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-6001-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_DVbased_1080x5994I_100Mbps =
{0x0d010301, 0x0202, 0x6001, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-6002-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_DVbased_1080x5994I_100Mbps =
{0x0d010301, 0x0202, 0x6002, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-6101-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_DVbased_1080x50I_100Mbps =
{0x0d010301, 0x0202, 0x6101, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-6102-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_DVbased_1080x50I_100Mbps =
{0x0d010301, 0x0202, 0x6102, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-6201-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_DVbased_720x5994P_100Mbps =
{0x0d010301, 0x0202, 0x6201, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-6202-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_DVbased_720x5994P_100Mbps =
{0x0d010301, 0x0202, 0x6202, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-6301-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_DVbased_720x50P_100Mbps =
{0x0d010301, 0x0202, 0x6301, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-6302-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_DVbased_720x50P_100Mbps =
{0x0d010301, 0x0202, 0x6302, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-7f01-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_DVbased_UndefinedSource =
{0x0d010301, 0x0202, 0x7f01, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0202-7f02-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_DVbased_UndefinedSource =
{0x0d010301, 0x0202, 0x7f02, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0204-6001-060e-2b3404010102}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_MPEGES_VideoStream0_SID =
{0x0d010301, 0x0204, 0x6001, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x02}};
//{0d010301-0204-6107-060e-2b3404010102}
static const aafUID_t AAFContainerDef_MXFGC_CustomClosedGOPwrapped_MPEGES_VideoStream1_SID =
{0x0d010301, 0x0204, 0x6107, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x02}};
//{0d010301-0205-0101-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_Uncompressed_525x5994I_720_422 =
{0x0d010301, 0x0205, 0x0101, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0205-0102-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_Uncompressed_525x5994I_720_422 =
{0x0d010301, 0x0205, 0x0102, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0205-0103-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Linewrapped_Uncompressed_525x5994I_720_422 =
{0x0d010301, 0x0205, 0x0103, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0205-0105-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_Uncompressed_625x50I_720_422 =
{0x0d010301, 0x0205, 0x0105, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0205-0106-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_Uncompressed_625x50I_720_422 =
{0x0d010301, 0x0205, 0x0106, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0205-0107-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Linewrapped_Uncompressed_625x50I_720_422 =
{0x0d010301, 0x0205, 0x0107, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0205-0119-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_Uncompressed_525x5994P_960_422 =
{0x0d010301, 0x0205, 0x0119, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0205-011a-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_Uncompressed_525x5994P_960_422 =
{0x0d010301, 0x0205, 0x011a, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0205-011b-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Linewrapped_Uncompressed_525x5994P_960_422 =
{0x0d010301, 0x0205, 0x011b, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0205-011d-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_Uncompressed_625x50P_960_422 =
{0x0d010301, 0x0205, 0x011d, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0205-011e-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_Uncompressed_625x50P_960_422 =
{0x0d010301, 0x0205, 0x011e, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0205-011f-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Linewrapped_Uncompressed_625x50P_960_422 =
{0x0d010301, 0x0205, 0x011f, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0206-0100-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_Broadcast_Wave_audio_data =
{0x0d010301, 0x0206, 0x0100, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0206-0200-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_Broadcast_Wave_audio_data =
{0x0d010301, 0x0206, 0x0200, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0206-0300-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_AES3_audio_data =
{0x0d010301, 0x0206, 0x0300, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-0206-0400-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_AES3_audio_data =
{0x0d010301, 0x0206, 0x0400, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010301-020a-0100-060e-2b3404010103}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_Alaw_Audio =
{0x0d010301, 0x020a, 0x0100, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x03}};
//{0d010301-020a-0200-060e-2b3404010103}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_Alaw_Audio =
{0x0d010301, 0x020a, 0x0200, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x03}};
//{0d010301-020a-0300-060e-2b3404010103}
static const aafUID_t AAFContainerDef_MXFGC_Customwrapped_Alaw_Audio =
{0x0d010301, 0x020a, 0x0300, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x03}};
//{0d010301-0210-6002-060e-2b340401010a}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_AVCbytestream_VideoStream0_SID =
{0x0d010301, 0x0210, 0x6002, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0a}};
//{0d010301-0211-0100-060e-2b340401010a}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_VC3 =
{0x0d010301, 0x0211, 0x0100, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0a}};
//{0d010301-0211-0200-060e-2b340401010a}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_VC3 =
{0x0d010301, 0x0211, 0x0200, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0a}};
//{0d010301-0212-0100-060e-2b340401010a}
static const aafUID_t AAFContainerDef_MXFGC_Framewrapped_VC1 =
{0x0d010301, 0x0212, 0x0100, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0a}};
//{0d010301-0212-0200-060e-2b340401010a}
static const aafUID_t AAFContainerDef_MXFGC_Clipwrapped_VC1 =
{0x0d010301, 0x0212, 0x0200, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x0a}};
//{0d010301-027f-0100-060e-2b3404010103}
static const aafUID_t AAFContainerDef_MXFGC_Generic_Essence_Multiple_Mappings =
{0x0d010301, 0x027f, 0x0100, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x03}};
//{0d011301-0101-0100-060e-2b3404010106}
static const aafUID_t AAFContainerDef_RIFFWAVE =
{0x0d011301, 0x0101, 0x0100, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x06}};
//{0d011301-0102-0200-060e-2b3404010107}
static const aafUID_t AAFContainerDef_JFIF =
{0x0d011301, 0x0102, 0x0200, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x07}};
//{0d011301-0104-0100-060e-2b3404010106}
static const aafUID_t AAFContainerDef_AIFFAIFC =
{0x0d011301, 0x0104, 0x0100, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x06}};
//{0e040301-0206-0101-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Avid_DNX_220X_1080p =
{0x0e040301, 0x0206, 0x0101, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0e040301-0206-0102-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Avid_DNX_145_1080p =
{0x0e040301, 0x0206, 0x0102, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0e040301-0206-0103-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Avid_DNX_220_1080p =
{0x0e040301, 0x0206, 0x0103, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0e040301-0206-0104-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Avid_DNX_36_1080p =
{0x0e040301, 0x0206, 0x0104, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0e040301-0206-0201-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Avid_DNX_220X_1080i =
{0x0e040301, 0x0206, 0x0201, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0e040301-0206-0202-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Avid_DNX_145_1080i =
{0x0e040301, 0x0206, 0x0202, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0e040301-0206-0203-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Avid_DNX_220_1080i =
{0x0e040301, 0x0206, 0x0203, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0e040301-0206-0204-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Avid_DNX_145_1440_1080i =
{0x0e040301, 0x0206, 0x0204, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0e040301-0206-0301-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Avid_DNX_220X_720p =
{0x0e040301, 0x0206, 0x0301, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0e040301-0206-0302-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Avid_DNX_220_720p =
{0x0e040301, 0x0206, 0x0302, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0e040301-0206-0303-060e-2b3404010101}
static const aafUID_t AAFContainerDef_MXFGC_Avid_DNX_145_720p =
{0x0e040301, 0x0206, 0x0303, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
// AAF ContainerDefinition legacy aliases
//
// const aafUID_t ContainerFile = kAAFContainerDef_External;
// const aafUID_t ContainerOMF = kAAFContainerDef_OMF;
// const aafUID_t ContainerAAF = kAAFContainerDef_AAF;
// const aafUID_t ContainerAAFMSS = kAAFContainerDef_AAFMSS;
// const aafUID_t ContainerAAFKLV = kAAFContainerDef_AAFKLV;
// const aafUID_t ContainerAAFXML = kAAFContainerDef_AAFXML;
#endif // ! __ContainerDefinition_h__

View File

@ -0,0 +1,81 @@
#ifndef __DataDefinition_h__
#define __DataDefinition_h__
#include "aaf/AAFTypes.h"
// AAF well-known DataDefinition instances
//
//{01030202-0100-0000-060e-2b3404010101}
static const aafUID_t AAFDataDef_Picture =
{0x01030202, 0x0100, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{6f3c8ce1-6cef-11d2-807d-006008143e6f}
static const aafUID_t AAFDataDef_LegacyPicture =
{0x6f3c8ce1, 0x6cef, 0x11d2, {0x80, 0x7d, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{05cba731-1daa-11d3-80ad-006008143e6f}
static const aafUID_t AAFDataDef_Matte =
{0x05cba731, 0x1daa, 0x11d3, {0x80, 0xad, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{05cba732-1daa-11d3-80ad-006008143e6f}
static const aafUID_t AAFDataDef_PictureWithMatte =
{0x05cba732, 0x1daa, 0x11d3, {0x80, 0xad, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{01030202-0200-0000-060e-2b3404010101}
static const aafUID_t AAFDataDef_Sound =
{0x01030202, 0x0200, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{78e1ebe1-6cef-11d2-807d-006008143e6f}
static const aafUID_t AAFDataDef_LegacySound =
{0x78e1ebe1, 0x6cef, 0x11d2, {0x80, 0x7d, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{01030201-0100-0000-060e-2b3404010101}
static const aafUID_t AAFDataDef_Timecode =
{0x01030201, 0x0100, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{7f275e81-77e5-11d2-807f-006008143e6f}
static const aafUID_t AAFDataDef_LegacyTimecode =
{0x7f275e81, 0x77e5, 0x11d2, {0x80, 0x7f, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{d2bb2af0-d234-11d2-89ee-006097116212}
static const aafUID_t AAFDataDef_Edgecode =
{0xd2bb2af0, 0xd234, 0x11d2, {0x89, 0xee, 0x00, 0x60, 0x97, 0x11, 0x62, 0x12}};
//{01030201-1000-0000-060e-2b3404010101}
static const aafUID_t AAFDataDef_DescriptiveMetadata =
{0x01030201, 0x1000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{01030203-0100-0000-060e-2b3404010105}
static const aafUID_t AAFDataDef_Auxiliary =
{0x01030203, 0x0100, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x05}};
//{851419d0-2e4f-11d3-8a5b-0050040ef7d2}
static const aafUID_t AAFDataDef_Unknown =
{0x851419d0, 0x2e4f, 0x11d3, {0x8a, 0x5b, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
// AAF DataDefinition legacy aliases
//
/*
static const aafUID_t DDEF_Picture = AAFDataDef_LegacyPicture;
static const aafUID_t DDEF_Matte = AAFDataDef_Matte;
static const aafUID_t DDEF_PictureWithMatte = AAFDataDef_PictureWithMatte;
static const aafUID_t DDEF_Sound = AAFDataDef_LegacySound;
static const aafUID_t DDEF_Timecode = AAFDataDef_LegacyTimecode;
static const aafUID_t DDEF_Edgecode = AAFDataDef_Edgecode;
static const aafUID_t DDEF_Unknown = AAFDataDef_Unknown;
*/
#endif // ! __DataDefinition_h__

106
libs/aaf/aaf/AAFDefs/AAFExtEnum.h Executable file
View File

@ -0,0 +1,106 @@
#ifndef __AAFExtEnum_h__
#define __AAFExtEnum_h__
#include "aaf/AAFTypes.h"
// AAF extensible enumeration member UIDs.
//
// Members of OperationCategoryType
//
//{0d010102-0101-0100-060e-2b3404010101}
static const aafUID_t AAFOperationCategory_Effect =
{0x0d010102, 0x0101, 0x0100, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
// Members of TransferCharacteristicType
//
//{04010101-0101-0000-060e-2b3404010101}
static const aafUID_t AAFTransferCharacteristic_ITU470_PAL =
{0x04010101, 0x0101, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010101-0102-0000-060e-2b3404010101}
static const aafUID_t AAFTransferCharacteristic_ITU709 =
{0x04010101, 0x0102, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010101-0103-0000-060e-2b3404010101}
static const aafUID_t AAFTransferCharacteristic_SMPTE240M =
{0x04010101, 0x0103, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010101-0104-0000-060e-2b3404010101}
static const aafUID_t AAFTransferCharacteristic_274M_296M =
{0x04010101, 0x0104, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010101-0105-0000-060e-2b3404010101}
static const aafUID_t AAFTransferCharacteristic_ITU1361 =
{0x04010101, 0x0105, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010101-0106-0000-060e-2b3404010101}
static const aafUID_t AAFTransferCharacteristic_linear =
{0x04010101, 0x0106, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
// Members of PluginCategoryType
//
//{0d010102-0101-0200-060e-2b3404010101}
static const aafUID_t AAFPluginCategory_Effect =
{0x0d010102, 0x0101, 0x0200, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010102-0101-0300-060e-2b3404010101}
static const aafUID_t AAFPluginCategory_Codec =
{0x0d010102, 0x0101, 0x0300, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010102-0101-0400-060e-2b3404010101}
static const aafUID_t AAFPluginCategory_Interpolation =
{0x0d010102, 0x0101, 0x0400, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
// Members of UsageType
//
//{0d010102-0101-0500-060e-2b3404010101}
static const aafUID_t AAFUsage_SubClip =
{0x0d010102, 0x0101, 0x0500, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010102-0101-0600-060e-2b3404010101}
static const aafUID_t AAFUsage_AdjustedClip =
{0x0d010102, 0x0101, 0x0600, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010102-0101-0700-060e-2b3404010101}
static const aafUID_t AAFUsage_TopLevel =
{0x0d010102, 0x0101, 0x0700, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010102-0101-0800-060e-2b3404010101}
static const aafUID_t AAFUsage_LowerLevel =
{0x0d010102, 0x0101, 0x0800, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{0d010102-0101-0900-060e-2b3404010101}
static const aafUID_t AAFUsage_Template =
{0x0d010102, 0x0101, 0x0900, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
// Members of ColorPrimariesType
//
//{04010101-0301-0000-060e-2b3404010106}
static const aafUID_t AAFColorPrimaries_SMPTE170M =
{0x04010101, 0x0301, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x06}};
//{04010101-0302-0000-060e-2b3404010106}
static const aafUID_t AAFColorPrimaries_ITU470_PAL =
{0x04010101, 0x0302, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x06}};
//{04010101-0303-0000-060e-2b3404010106}
static const aafUID_t AAFColorPrimaries_ITU709 =
{0x04010101, 0x0303, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x06}};
// Members of CodingEquationsType
//
//{04010101-0201-0000-060e-2b3404010101}
static const aafUID_t AAFCodingEquations_ITU601 =
{0x04010101, 0x0201, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010101-0202-0000-060e-2b3404010101}
static const aafUID_t AAFCodingEquations_ITU709 =
{0x04010101, 0x0202, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
//{04010101-0203-0000-060e-2b3404010101}
static const aafUID_t AAFCodingEquations_SMPTE240M =
{0x04010101, 0x0203, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x01}};
#endif // ! __AAFExtEnum_h__

View File

@ -0,0 +1,146 @@
#ifndef __AAFFileKinds_h__
#define __AAFFileKinds_h__
#include "aaf/AAFTypes.h"
//
// The following enumerations select the file encoding type without
// specifying the implementation (in cases where multiple
// implementations are available)
//
// New code should use one of these encodings.
//
// AAF file encoded using the default encoding for the particular SDK
// release.
static const aafUID_t AAFFileKind_DontCare =
{0,0,0,{0,0,0,0,0,0,0,0}};
// AAF files encoded as structured storage with a 512 bytes sector size
static const aafUID_t AAFFileKind_Aaf512Binary =
{ 0x42464141, 0x000d, 0x4d4f, { 0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0xff } };
// AAF files structured storage with a 4096 bytes sector size
static const aafUID_t AAFFileKind_Aaf4KBinary =
{ 0x92b02efb, 0xaf40, 0x4896, { 0xa5, 0x8e, 0xd1, 0x57, 0x2f, 0x42, 0x2b, 0x58 } };
/*
Looks like Avid's Media Composer own AAFFileKind_Aaf4KBinary :
{ 0x0d010201, 0x0200, 0x0000, { 0x06, 0x0e, 0x2b, 0x34, 0x03, 0x02, 0x01, 0x01 } }
_CFB_Header____________________________________________________________________________________
_abSig : 0xe11ab1a1e011cfd0
_clsId : {0x0d010201, 0x0200, 0x0000, { 0x06 0x0e 0x2b 0x34 0x03 0x02 0x01 0x01 }}
version : 62.4 ( 0x003e 0x0004 )
_uByteOrder : little-endian ( 0xfffe )
_uSectorShift : 12 (4096 bytes sectors)
_uMiniSectorShift : 6 (64 bytes mini-sectors)
_usReserved0 : 0x00
_ulReserved1 : 0x0000
_csectDir : 92
_csectFat : 3
_sectDirStart : 1
_signature : 0
_ulMiniSectorCutoff : 4096
_sectMiniFatStart : 2721
_csectMiniFat : 4
_sectDifStart : -2
_csectDif : 0
ByteOrder : Little-Endian (0x4949)
LastModified : 2017-09-23 09:38:53.00
AAF ObjSpec Version : 1.1
ObjectModel Version : 1
Operational Pattern : AAFOPDef_EditProtocol
CompanyName : Avid Technology, Inc.
ProductName : Avid Media Composer 8.4.5
ProductVersion : 8.4.0.0 (1)
ProductVersionString : Unknown version
ProductID : {d0b7c06e cd3d 4ad7 {ac fb f0 3a 4f 42 a2 31}}
Date : 2017-09-23 09:38:53.00
ToolkitVersion : 1.1.6.8635 (0)
Platform : AAFSDK (Win64)
GenerationAUID : {feadd9ba e1d3 474d {8b 3f 6a 79 a6 29 1d 2f}}
*/
// AAF files encoded as XML (text)
static const aafUID_t AAFFileKind_AafXmlText =
{ 0xfe0d0101, 0x60e1, 0x4e78, { 0xb2, 0xcd, 0x2b, 0x03, 0xdb, 0xb0, 0xfa, 0x87 } };
// AAF files encoded as KLV (binary) (MXF)
//
static const aafUID_t AAFFileKind_AafKlvBinary =
{0x4b464141, 0x000d, 0x4d4f, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x01, 0x01, 0xff } };
// the enum to select the default implementation with 4096 byte sectors
//
// The following encodings select a specific encoding implementation
// in cases where multiple implementations are available. It is not
// advisable to use these in new code. The exist primarily for test
// purposes.
//
// the enum to select the Microsoft implementation with 512 byte sectors
static const aafUID_t AAFFileKind_AafM512Binary =
{ 0xc95e8ee6, 0xa6ec, 0x4e53, { 0x92, 0x28, 0xbd, 0x9b, 0x57, 0x23, 0x57, 0xe5 } };
// the enum to select the SchemaSoft implementation with 512 byte sectors
static const aafUID_t AAFFileKind_AafS512Binary =
{ 0xbb153a22, 0xc2ed, 0x4b2e, { 0xbb, 0x69, 0x19, 0xbd, 0x58, 0x9d, 0xf6, 0xdc } };
// the enum to select the GSF implementation with 512 byte sectors
static const aafUID_t AAFFileKind_AafG512Binary =
{ 0xb965c7f1, 0xf89d, 0x4490, { 0xbd, 0x22, 0x77, 0x35, 0x69, 0xb4, 0xd3, 0x61 } };
// the enum to select the Microsoft implementation with 4096 byte sectors
static const aafUID_t AAFFileKind_AafM4KBinary =
{ 0x7653a218, 0x3e03, 0x4ecf, { 0x87, 0x98, 0xf4, 0x5f, 0xc1, 0x17, 0x11, 0x78 } };
// the enum to select the SchemaSoft implementation with 4096 byte sectors
static const aafUID_t AAFFileKind_AafS4KBinary =
{ 0xa8ab424a, 0xc5a0, 0x48d0, { 0x9e, 0xea, 0x96, 0x69, 0x69, 0x75, 0xc6, 0xd0 } };
// the enum to select the GSF implementation with 4096 byte sectors
static const aafUID_t AAFFileKind_AafG4KBinary =
{ 0xb44818b, 0xc3dd, 0x4f0a, { 0xad, 0x37, 0xe9, 0x71, 0x0, 0x7a, 0x88, 0xe8 } };
//
// The folloing enumerations exist for testing purposes only and will
// trigger anb error if used.
//
static const aafUID_t AAFFileKind_Pathological =
{0xff,0xff,0xff,{0,0,0,0,0,0,0,0}};
//
// Old deprecated symbols which may be removed in a future release.
// Don't use these in new code.
//
/*
static const aafUID_t aafFileKindDontCare = AAFFileKind_DontCare;
static const aafUID_t aafFileKindPathalogical = AAFFileKind_Pathological;
static const aafUID_t aafFileKindAafKlvBinary = AAFFileKind_AafKlvBinary;
static const aafUID_t aafFileKindAafMSSBinary = AAFFileKind_AafM512Binary;
static const aafUID_t aafFileKindAafM4KBinary = AAFFileKind_AafM4KBinary;
static const aafUID_t aafFileKindAafSSSBinary = AAFFileKind_AafS512Binary;
static const aafUID_t aafFileKindAafS4KBinary = AAFFileKind_AafS4KBinary;
static const aafUID_t aafFileKindAafXmlText = AAFFileKind_AafXmlText;
static const aafUID_t aafFileKindAafSSBinary = AAFFileKind_Aaf512Binary;
static const aafUID_t aafFileKindAaf4KBinary = AAFFileKind_Aaf4KBinary;
*/
#endif // ! __AAFFileKinds_h__

View File

@ -0,0 +1,49 @@
#ifndef __InterpolationDefinition_h__
#define __InterpolationDefinition_h__
#include "aaf/AAFTypes.h"
// AAF well-known InterpolationDefinition instances
//
//{5b6c85a3-0ede-11d3-80a9-006008143e6f}
static const aafUID_t AAFInterpolationDef_None =
{0x5b6c85a3, 0x0ede, 0x11d3, {0x80, 0xa9, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{5b6c85a4-0ede-11d3-80a9-006008143e6f}
static const aafUID_t AAFInterpolationDef_Linear =
{0x5b6c85a4, 0x0ede, 0x11d3, {0x80, 0xa9, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{5b6c85a5-0ede-11d3-80a9-006008143e6f}
static const aafUID_t AAFInterpolationDef_Constant =
{0x5b6c85a5, 0x0ede, 0x11d3, {0x80, 0xa9, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{5b6c85a6-0ede-11d3-80a9-006008143e6f}
static const aafUID_t AAFInterpolationDef_BSpline =
{0x5b6c85a6, 0x0ede, 0x11d3, {0x80, 0xa9, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{15829ec3-1f24-458a-960d-c65bb23c2aa1}
static const aafUID_t AAFInterpolationDef_Log =
{0x15829ec3, 0x1f24, 0x458a, {0x96, 0x0d, 0xc6, 0x5b, 0xb2, 0x3c, 0x2a, 0xa1}};
//{c09153f7-bd18-4e5a-ad09-cbdd654fa001}
static const aafUID_t AAFInterpolationDef_Power =
{0xc09153f7, 0xbd18, 0x4e5a, {0xad, 0x09, 0xcb, 0xdd, 0x65, 0x4f, 0xa0, 0x01}};
// AAF InterpolationDefinition legacy aliases
//
/*
static const aafUID_t NoInterpolator = AAFInterpolationDef_None;
static const aafUID_t LinearInterpolator = AAFInterpolationDef_Linear;
static const aafUID_t ConstantInterpolator = AAFInterpolationDef_Constant;
static const aafUID_t BSplineInterpolator = AAFInterpolationDef_BSpline;
static const aafUID_t LogInterpolator = AAFInterpolationDef_Log;
static const aafUID_t PowerInterpolator = AAFInterpolationDef_Power;
*/
#endif // ! __InterpolationDefinition_h__

View File

@ -0,0 +1,23 @@
#ifndef __OPDefinition_h__
#define __OPDefinition_h__
#include "aaf/AAFTypes.h"
// AAF well-known OPDefinition instances
//
//{0d011201-0100-0000-060e-2b3404010105}
static const aafUID_t AAFOPDef_EditProtocol =
{0x0d011201, 0x0100, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x05}};
//{0d011201-0200-0000-060e-2b3404010109}
static const aafUID_t AAFOPDef_Unconstrained =
{0x0d011201, 0x0200, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x04, 0x01, 0x01, 0x09}};
// AAF OPDefinition legacy aliases
//
#endif // ! __OPDefinition_h__

View File

@ -0,0 +1,171 @@
#ifndef __OperationDefinition_h__
#define __OperationDefinition_h__
#include "aaf/AAFTypes.h"
// AAF well-known OperationDefinition instances
//
//{0c3bea40-fc05-11d2-8a29-0050040ef7d2}
static const aafUID_t AAFOperationDef_VideoDissolve =
{0x0c3bea40, 0xfc05, 0x11d2, {0x8a, 0x29, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{0c3bea44-fc05-11d2-8a29-0050040ef7d2}
static const aafUID_t AAFOperationDef_SMPTEVideoWipe =
{0x0c3bea44, 0xfc05, 0x11d2, {0x8a, 0x29, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9d2ea890-0968-11d3-8a38-0050040ef7d2}
static const aafUID_t AAFOperationDef_VideoSpeedControl =
{0x9d2ea890, 0x0968, 0x11d3, {0x8a, 0x38, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9d2ea891-0968-11d3-8a38-0050040ef7d2}
static const aafUID_t AAFOperationDef_VideoRepeat =
{0x9d2ea891, 0x0968, 0x11d3, {0x8a, 0x38, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{f1db0f32-8d64-11d3-80df-006008143e6f}
static const aafUID_t AAFOperationDef_Flip =
{0xf1db0f32, 0x8d64, 0x11d3, {0x80, 0xdf, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{f1db0f34-8d64-11d3-80df-006008143e6f}
static const aafUID_t AAFOperationDef_Flop =
{0xf1db0f34, 0x8d64, 0x11d3, {0x80, 0xdf, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{f1db0f33-8d64-11d3-80df-006008143e6f}
static const aafUID_t AAFOperationDef_FlipFlop =
{0xf1db0f33, 0x8d64, 0x11d3, {0x80, 0xdf, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{86f5711e-ee72-450c-a118-17cf3b175dff}
static const aafUID_t AAFOperationDef_VideoPosition =
{0x86f5711e, 0xee72, 0x450c, {0xa1, 0x18, 0x17, 0xcf, 0x3b, 0x17, 0x5d, 0xff}};
//{f5826680-26c5-4149-8554-43d3c7a3bc09}
static const aafUID_t AAFOperationDef_VideoCrop =
{0xf5826680, 0x26c5, 0x4149, {0x85, 0x54, 0x43, 0xd3, 0xc7, 0xa3, 0xbc, 0x09}};
//{2e0a119d-e6f7-4bee-b5dc-6dd42988687e}
static const aafUID_t AAFOperationDef_VideoScale =
{0x2e0a119d, 0xe6f7, 0x4bee, {0xb5, 0xdc, 0x6d, 0xd4, 0x29, 0x88, 0x68, 0x7e}};
//{f2ca330d-8d45-4db4-b1b5-136ab055586f}
static const aafUID_t AAFOperationDef_VideoRotate =
{0xf2ca330d, 0x8d45, 0x4db4, {0xb1, 0xb5, 0x13, 0x6a, 0xb0, 0x55, 0x58, 0x6f}};
//{21d5c51a-8acb-46d5-9392-5cae640c8836}
static const aafUID_t AAFOperationDef_VideoCornerPinning =
{0x21d5c51a, 0x8acb, 0x46d5, {0x93, 0x92, 0x5c, 0xae, 0x64, 0x0c, 0x88, 0x36}};
//{14db900e-d537-49f6-889b-012568fcc234}
static const aafUID_t AAFOperationDef_VideoAlphaWithinVideoKey =
{0x14db900e, 0xd537, 0x49f6, {0x88, 0x9b, 0x01, 0x25, 0x68, 0xfc, 0xc2, 0x34}};
//{e599cb0f-ba5f-4192-9356-51eb19c08589}
static const aafUID_t AAFOperationDef_VideoSeparateAlphaKey =
{0xe599cb0f, 0xba5f, 0x4192, {0x93, 0x56, 0x51, 0xeb, 0x19, 0xc0, 0x85, 0x89}};
//{38ff7903-69e5-476b-be5a-eafc2000f011}
static const aafUID_t AAFOperationDef_VideoLuminanceKey =
{0x38ff7903, 0x69e5, 0x476b, {0xbe, 0x5a, 0xea, 0xfc, 0x20, 0x00, 0xf0, 0x11}};
//{30a315c2-71e5-4e82-a4ef-0513ee056b65}
static const aafUID_t AAFOperationDef_VideoChromaKey =
{0x30a315c2, 0x71e5, 0x4e82, {0xa4, 0xef, 0x05, 0x13, 0xee, 0x05, 0x6b, 0x65}};
//{9d2ea894-0968-11d3-8a38-0050040ef7d2}
static const aafUID_t AAFOperationDef_MonoAudioGain =
{0x9d2ea894, 0x0968, 0x11d3, {0x8a, 0x38, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9d2ea893-0968-11d3-8a38-0050040ef7d2}
static const aafUID_t AAFOperationDef_MonoAudioPan =
{0x9d2ea893, 0x0968, 0x11d3, {0x8a, 0x38, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{0c3bea41-fc05-11d2-8a29-0050040ef7d2}
static const aafUID_t AAFOperationDef_MonoAudioDissolve =
{0x0c3bea41, 0xfc05, 0x11d2, {0x8a, 0x29, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{2311bd90-b5da-4285-aa3a-8552848779b3}
static const aafUID_t AAFOperationDef_TwoParameterMonoAudioDissolve =
{0x2311bd90, 0xb5da, 0x4285, {0xaa, 0x3a, 0x85, 0x52, 0x84, 0x87, 0x79, 0xb3}};
//{9bb90dfd-2aad-49af-b09c-8ba6cd5281d1}
static const aafUID_t AAFOperationDef_VideoOpacity =
{0x9bb90dfd, 0x2aad, 0x49af, {0xb0, 0x9c, 0x8b, 0xa6, 0xcd, 0x52, 0x81, 0xd1}};
//{2c50831c-572e-4042-b1dd-55ed0b7c49df}
static const aafUID_t AAFOperationDef_VideoTitle =
{0x2c50831c, 0x572e, 0x4042, {0xb1, 0xdd, 0x55, 0xed, 0x0b, 0x7c, 0x49, 0xdf}};
//{5aba98f8-f389-471f-8fee-dfde7ec7f9bb}
static const aafUID_t AAFOperationDef_VideoColor =
{0x5aba98f8, 0xf389, 0x471f, {0x8f, 0xee, 0xdf, 0xde, 0x7e, 0xc7, 0xf9, 0xbb}};
//{1575e350-fca3-11d2-8a2a-0050040ef7d2}
static const aafUID_t AAFOperationDef_Unknown =
{0x1575e350, 0xfca3, 0x11d2, {0x8a, 0x2a, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{0c3bea43-fc05-11d2-8a29-0050040ef7d2}
static const aafUID_t AAFOperationDef_VideoFadeToBlack =
{0x0c3bea43, 0xfc05, 0x11d2, {0x8a, 0x29, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{0a3c75e0-fd82-11d2-8a2b-0050040ef7d2}
static const aafUID_t AAFOperationDef_PictureWithMate =
{0x0a3c75e0, 0xfd82, 0x11d2, {0x8a, 0x2b, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9d2ea892-0968-11d3-8a38-0050040ef7d2}
static const aafUID_t AAFOperationDef_VideoFrameToMask =
{0x9d2ea892, 0x0968, 0x11d3, {0x8a, 0x38, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{0c3bea42-fc05-11d2-8a29-0050040ef7d2}
static const aafUID_t AAFOperationDef_StereoAudioDissolve =
{0x0c3bea42, 0xfc05, 0x11d2, {0x8a, 0x29, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9d2ea895-0968-11d3-8a38-0050040ef7d2}
static const aafUID_t AAFOperationDef_StereoAudioGain =
{0x9d2ea895, 0x0968, 0x11d3, {0x8a, 0x38, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{8d896ad0-2261-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFOperationDef_MonoAudioMixdown =
{0x8d896ad0, 0x2261, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
/*
* NOTE looks like it is the way ProTools represents Stereo (5.1, 7.1 ???) Tracks
* whenever "Export Stereo, 5.1 and 7.1 tracks as multi-channel" is enabled.
*/
static const aafUID_t AAFOperationDef_AudioChannelCombiner =
{0x6b46dd7a, 0x132d, 0x4856, {0xab, 0x21, 0x8b, 0x75, 0x1d, 0x84, 0x62, 0xec}};
#endif // ! __OperationDefinition_h__

View File

@ -0,0 +1,356 @@
#ifndef __ParameterDefinition_h__
#define __ParameterDefinition_h__
#include "aaf/AAFTypes.h"
// AAF well-known ParameterDefinition instances
//
//{e4962320-2267-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_Level =
{0xe4962320, 0x2267, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{e4962323-2267-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_SMPTEWipeNumber =
{0xe4962323, 0x2267, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9c894ba0-2277-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_SMPTEReverse =
{0x9c894ba0, 0x2277, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{72559a80-24d7-11d3-8a50-0050040ef7d2}
static const aafUID_t AAFParameterDef_SpeedRatio =
{0x72559a80, 0x24d7, 0x11d3, {0x8a, 0x50, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{c573a510-071a-454f-b617-ad6ae69054c2}
static const aafUID_t AAFParameterDef_PositionOffsetX =
{0xc573a510, 0x071a, 0x454f, {0xb6, 0x17, 0xad, 0x6a, 0xe6, 0x90, 0x54, 0xc2}};
//{82e27478-1336-4ea3-bcb9-6b8f17864c42}
static const aafUID_t AAFParameterDef_PositionOffsetY =
{0x82e27478, 0x1336, 0x4ea3, {0xbc, 0xb9, 0x6b, 0x8f, 0x17, 0x86, 0x4c, 0x42}};
//{d47b3377-318c-4657-a9d8-75811b6dc3d1}
static const aafUID_t AAFParameterDef_CropLeft =
{0xd47b3377, 0x318c, 0x4657, {0xa9, 0xd8, 0x75, 0x81, 0x1b, 0x6d, 0xc3, 0xd1}};
//{5ecc9dd5-21c1-462b-9fec-c2bd85f14033}
static const aafUID_t AAFParameterDef_CropRight =
{0x5ecc9dd5, 0x21c1, 0x462b, {0x9f, 0xec, 0xc2, 0xbd, 0x85, 0xf1, 0x40, 0x33}};
//{8170a539-9b55-4051-9d4e-46598d01b914}
static const aafUID_t AAFParameterDef_CropTop =
{0x8170a539, 0x9b55, 0x4051, {0x9d, 0x4e, 0x46, 0x59, 0x8d, 0x01, 0xb9, 0x14}};
//{154ba82b-990a-4c80-9101-3037e28839a1}
static const aafUID_t AAFParameterDef_CropBottom =
{0x154ba82b, 0x990a, 0x4c80, {0x91, 0x01, 0x30, 0x37, 0xe2, 0x88, 0x39, 0xa1}};
//{8d568129-847e-11d5-935a-50f857c10000}
static const aafUID_t AAFParameterDef_ScaleX =
{0x8d568129, 0x847e, 0x11d5, {0x93, 0x5a, 0x50, 0xf8, 0x57, 0xc1, 0x00, 0x00}};
//{8d56812a-847e-11d5-935a-50f857c10000}
static const aafUID_t AAFParameterDef_ScaleY =
{0x8d56812a, 0x847e, 0x11d5, {0x93, 0x5a, 0x50, 0xf8, 0x57, 0xc1, 0x00, 0x00}};
//{062cfbd8-f4b1-4a50-b944-f39e2fc73c17}
static const aafUID_t AAFParameterDef_Rotation =
{0x062cfbd8, 0xf4b1, 0x4a50, {0xb9, 0x44, 0xf3, 0x9e, 0x2f, 0xc7, 0x3c, 0x17}};
//{72a3b4a2-873d-4733-9052-9f83a706ca5b}
static const aafUID_t AAFParameterDef_PinTopLeftX =
{0x72a3b4a2, 0x873d, 0x4733, {0x90, 0x52, 0x9f, 0x83, 0xa7, 0x06, 0xca, 0x5b}};
//{29e4d78f-a502-4ebb-8c07-ed5a0320c1b0}
static const aafUID_t AAFParameterDef_PinTopLeftY =
{0x29e4d78f, 0xa502, 0x4ebb, {0x8c, 0x07, 0xed, 0x5a, 0x03, 0x20, 0xc1, 0xb0}};
//{a95296c0-1ed9-4925-8481-2096c72e818d}
static const aafUID_t AAFParameterDef_PinTopRightX =
{0xa95296c0, 0x1ed9, 0x4925, {0x84, 0x81, 0x20, 0x96, 0xc7, 0x2e, 0x81, 0x8d}};
//{ce1757ae-7a0b-45d9-b3f3-3686adff1e2d}
static const aafUID_t AAFParameterDef_PinTopRightY =
{0xce1757ae, 0x7a0b, 0x45d9, {0xb3, 0xf3, 0x36, 0x86, 0xad, 0xff, 0x1e, 0x2d}};
//{08b2bc81-9b1b-4c01-ba73-bba3554ed029}
static const aafUID_t AAFParameterDef_PinBottomLeftX =
{0x08b2bc81, 0x9b1b, 0x4c01, {0xba, 0x73, 0xbb, 0xa3, 0x55, 0x4e, 0xd0, 0x29}};
//{c163f2ff-cd83-4655-826e-3724ab7fa092}
static const aafUID_t AAFParameterDef_PinBottomLeftY =
{0xc163f2ff, 0xcd83, 0x4655, {0x82, 0x6e, 0x37, 0x24, 0xab, 0x7f, 0xa0, 0x92}};
//{53bc5884-897f-479e-b833-191f8692100d}
static const aafUID_t AAFParameterDef_PinBottomRightX =
{0x53bc5884, 0x897f, 0x479e, {0xb8, 0x33, 0x19, 0x1f, 0x86, 0x92, 0x10, 0x0d}};
//{812fb15b-0b95-4406-878d-efaa1cffc129}
static const aafUID_t AAFParameterDef_PinBottomRightY =
{0x812fb15b, 0x0b95, 0x4406, {0x87, 0x8d, 0xef, 0xaa, 0x1c, 0xff, 0xc1, 0x29}};
//{a2667f65-65d8-4abf-a179-0b9b93413949}
static const aafUID_t AAFParameterDef_AlphaKeyInvertAlpha =
{0xa2667f65, 0x65d8, 0x4abf, {0xa1, 0x79, 0x0b, 0x9b, 0x93, 0x41, 0x39, 0x49}};
//{21ed5b0f-b7a0-43bc-b779-c47f85bf6c4d}
static const aafUID_t AAFParameterDef_LumKeyLevel =
{0x21ed5b0f, 0xb7a0, 0x43bc, {0xb7, 0x79, 0xc4, 0x7f, 0x85, 0xbf, 0x6c, 0x4d}};
//{cbd39b25-3ece-441e-ba2c-da473ab5cc7c}
static const aafUID_t AAFParameterDef_LumKeyClip =
{0xcbd39b25, 0x3ece, 0x441e, {0xba, 0x2c, 0xda, 0x47, 0x3a, 0xb5, 0xcc, 0x7c}};
//{e4962321-2267-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_Amplitude =
{0xe4962321, 0x2267, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{e4962322-2267-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_Pan =
{0xe4962322, 0x2267, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9e610007-1be2-41e1-bb11-c95de9964d03}
static const aafUID_t AAFParameterDef_OutgoingLevel =
{0x9e610007, 0x1be2, 0x41e1, {0xbb, 0x11, 0xc9, 0x5d, 0xe9, 0x96, 0x4d, 0x03}};
//{48cea642-a8f9-455b-82b3-86c814b797c7}
static const aafUID_t AAFParameterDef_IncomingLevel =
{0x48cea642, 0xa8f9, 0x455b, {0x82, 0xb3, 0x86, 0xc8, 0x14, 0xb7, 0x97, 0xc7}};
//{cb7c0ec4-f45f-4ee6-aef0-c63ddb134924}
static const aafUID_t AAFParameterDef_OpacityLevel =
{0xcb7c0ec4, 0xf45f, 0x4ee6, {0xae, 0xf0, 0xc6, 0x3d, 0xdb, 0x13, 0x49, 0x24}};
//{7b92827b-5ae3-465e-b5f9-5ee21b070859}
static const aafUID_t AAFParameterDef_TitleText =
{0x7b92827b, 0x5ae3, 0x465e, {0xb5, 0xf9, 0x5e, 0xe2, 0x1b, 0x07, 0x08, 0x59}};
//{e8eb7f50-602f-4a2f-8fb2-86c8826ccf24}
static const aafUID_t AAFParameterDef_TitleFontName =
{0xe8eb7f50, 0x602f, 0x4a2f, {0x8f, 0xb2, 0x86, 0xc8, 0x82, 0x6c, 0xcf, 0x24}};
//{01c55287-31b3-4f8f-bb87-c92f06eb7f5a}
static const aafUID_t AAFParameterDef_TitleFontSize =
{0x01c55287, 0x31b3, 0x4f8f, {0xbb, 0x87, 0xc9, 0x2f, 0x06, 0xeb, 0x7f, 0x5a}};
//{dfe86f24-8a71-4dc5-83a2-988f583af711}
static const aafUID_t AAFParameterDef_TitleFontColorR =
{0xdfe86f24, 0x8a71, 0x4dc5, {0x83, 0xa2, 0x98, 0x8f, 0x58, 0x3a, 0xf7, 0x11}};
//{f9f41222-36d9-4650-bd5a-a17866cf86b9}
static const aafUID_t AAFParameterDef_TitleFontColorG =
{0xf9f41222, 0x36d9, 0x4650, {0xbd, 0x5a, 0xa1, 0x78, 0x66, 0xcf, 0x86, 0xb9}};
//{f5ba87fa-cf72-4f37-a736-d7096fcb06f1}
static const aafUID_t AAFParameterDef_TitleFontColorB =
{0xf5ba87fa, 0xcf72, 0x4f37, {0xa7, 0x36, 0xd7, 0x09, 0x6f, 0xcb, 0x06, 0xf1}};
//{47c1733f-6afb-4168-9b6d-476adfbae7ab}
static const aafUID_t AAFParameterDef_TitleAlignment =
{0x47c1733f, 0x6afb, 0x4168, {0x9b, 0x6d, 0x47, 0x6a, 0xdf, 0xba, 0xe7, 0xab}};
//{8b5732c0-be8e-4332-aa71-5d866add777d}
static const aafUID_t AAFParameterDef_TitleBold =
{0x8b5732c0, 0xbe8e, 0x4332, {0xaa, 0x71, 0x5d, 0x86, 0x6a, 0xdd, 0x77, 0x7d}};
//{e4a3c91b-f96a-4dd4-91d8-1ba32000ab72}
static const aafUID_t AAFParameterDef_TitleItalic =
{0xe4a3c91b, 0xf96a, 0x4dd4, {0x91, 0xd8, 0x1b, 0xa3, 0x20, 0x00, 0xab, 0x72}};
//{a25061da-db25-402e-89ff-a6d0efa39444}
static const aafUID_t AAFParameterDef_TitlePositionX =
{0xa25061da, 0xdb25, 0x402e, {0x89, 0xff, 0xa6, 0xd0, 0xef, 0xa3, 0x94, 0x44}};
//{6151541f-9d3f-4a0e-a3f9-24cc60eea969}
static const aafUID_t AAFParameterDef_TitlePositionY =
{0x6151541f, 0x9d3f, 0x4a0e, {0xa3, 0xf9, 0x24, 0xcc, 0x60, 0xee, 0xa9, 0x69}};
//{be2033da-723b-4146-ace0-3299e0ff342e}
static const aafUID_t AAFParameterDef_ColorSlopeR =
{0xbe2033da, 0x723b, 0x4146, {0xac, 0xe0, 0x32, 0x99, 0xe0, 0xff, 0x34, 0x2e}};
//{7ca8e01b-c6d8-4b3f-b251-28a53e5b958f}
static const aafUID_t AAFParameterDef_ColorSlopeG =
{0x7ca8e01b, 0xc6d8, 0x4b3f, {0xb2, 0x51, 0x28, 0xa5, 0x3e, 0x5b, 0x95, 0x8f}};
//{1aeb007b-3cd5-4814-87b5-cbd6a3cdfe8d}
static const aafUID_t AAFParameterDef_ColorSlopeB =
{0x1aeb007b, 0x3cd5, 0x4814, {0x87, 0xb5, 0xcb, 0xd6, 0xa3, 0xcd, 0xfe, 0x8d}};
//{4d1e65e0-85fc-4bb9-a264-13cf320a8539}
static const aafUID_t AAFParameterDef_ColorOffsetR =
{0x4d1e65e0, 0x85fc, 0x4bb9, {0xa2, 0x64, 0x13, 0xcf, 0x32, 0x0a, 0x85, 0x39}};
//{76f783e4-0bbd-41d7-b01e-f418c1602a6f}
static const aafUID_t AAFParameterDef_ColorOffsetG =
{0x76f783e4, 0x0bbd, 0x41d7, {0xb0, 0x1e, 0xf4, 0x18, 0xc1, 0x60, 0x2a, 0x6f}};
//{57110628-522d-4b48-8a28-75477ced984d}
static const aafUID_t AAFParameterDef_ColorOffsetB =
{0x57110628, 0x522d, 0x4b48, {0x8a, 0x28, 0x75, 0x47, 0x7c, 0xed, 0x98, 0x4d}};
//{c2d79c3a-9263-40d9-827d-953ac6b88813}
static const aafUID_t AAFParameterDef_ColorPowerR =
{0xc2d79c3a, 0x9263, 0x40d9, {0x82, 0x7d, 0x95, 0x3a, 0xc6, 0xb8, 0x88, 0x13}};
//{524d52e6-86a3-4f41-864b-fb53b15b1d5d}
static const aafUID_t AAFParameterDef_ColorPowerG =
{0x524d52e6, 0x86a3, 0x4f41, {0x86, 0x4b, 0xfb, 0x53, 0xb1, 0x5b, 0x1d, 0x5d}};
//{5f0cc7dc-907d-4153-bf00-1f3cdf3c05bb}
static const aafUID_t AAFParameterDef_ColorPowerB =
{0x5f0cc7dc, 0x907d, 0x4153, {0xbf, 0x00, 0x1f, 0x3c, 0xdf, 0x3c, 0x05, 0xbb}};
//{0b135705-3312-4d03-ba89-be9ef45e5470}
static const aafUID_t AAFParameterDef_ColorSaturation =
{0x0b135705, 0x3312, 0x4d03, {0xba, 0x89, 0xbe, 0x9e, 0xf4, 0x5e, 0x54, 0x70}};
//{f3b9466a-2579-4168-beb5-66b996919a3f}
static const aafUID_t AAFParameterDef_ColorCorrectionDescription =
{0xf3b9466a, 0x2579, 0x4168, {0xbe, 0xb5, 0x66, 0xb9, 0x96, 0x91, 0x9a, 0x3f}};
//{b0124dbe-7f97-443c-ae39-c49c1c53d728}
static const aafUID_t AAFParameterDef_ColorInputDescription =
{0xb0124dbe, 0x7f97, 0x443c, {0xae, 0x39, 0xc4, 0x9c, 0x1c, 0x53, 0xd7, 0x28}};
//{5a9dfc6f-611f-4db8-8eff-3b9cdb6e1220}
static const aafUID_t AAFParameterDef_ColorViewingDescription =
{0x5a9dfc6f, 0x611f, 0x4db8, {0x8e, 0xff, 0x3b, 0x9c, 0xdb, 0x6e, 0x12, 0x20}};
//{9c894ba1-2277-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_SMPTESoft =
{0x9c894ba1, 0x2277, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9c894ba2-2277-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_SMPTEBorder =
{0x9c894ba2, 0x2277, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9c894ba3-2277-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_SMPTEPosition =
{0x9c894ba3, 0x2277, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9c894ba4-2277-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_SMPTEModulator =
{0x9c894ba4, 0x2277, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9c894ba5-2277-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_SMPTEShadow =
{0x9c894ba5, 0x2277, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9c894ba6-2277-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_SMPTETumble =
{0x9c894ba6, 0x2277, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9c894ba7-2277-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_SMPTESpotlight =
{0x9c894ba7, 0x2277, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9c894ba8-2277-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_SMPTEReplicationH =
{0x9c894ba8, 0x2277, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9c894ba9-2277-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_SMPTEReplicationV =
{0x9c894ba9, 0x2277, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{9c894baa-2277-11d3-8a4c-0050040ef7d2}
static const aafUID_t AAFParameterDef_SMPTECheckerboard =
{0x9c894baa, 0x2277, 0x11d3, {0x8a, 0x4c, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
//{5f1c2560-2415-11d3-8a4f-0050040ef7d2}
static const aafUID_t AAFParameterDef_PhaseOffset =
{0x5f1c2560, 0x2415, 0x11d3, {0x8a, 0x4f, 0x00, 0x50, 0x04, 0x0e, 0xf7, 0xd2}};
// AAF ParameterDefinition legacy aliases
//
/*
static const aafUID_t AAFParameterDefLevel = AAFParameterDef_Level;
static const aafUID_t AAFParameterDefSMPTEWipeNumber = AAFParameterDef_SMPTEWipeNumber;
static const aafUID_t AAFParameterDefSMPTEReverse = AAFParameterDef_SMPTEReverse;
static const aafUID_t AAFParameterDefSpeedRatio = AAFParameterDef_SpeedRatio;
static const aafUID_t AAFParameterDefAmplitude = AAFParameterDef_Amplitude;
static const aafUID_t AAFParameterDefPan = AAFParameterDef_Pan;
static const aafUID_t AAFParameterDefSMPTESoft = AAFParameterDef_SMPTESoft;
static const aafUID_t AAFParameterDefSMPTEBorder = AAFParameterDef_SMPTEBorder;
static const aafUID_t AAFParameterDefSMPTEPosition = AAFParameterDef_SMPTEPosition;
static const aafUID_t AAFParameterDefSMPTEModulator = AAFParameterDef_SMPTEModulator;
static const aafUID_t AAFParameterDefSMPTEShadow = AAFParameterDef_SMPTEShadow;
static const aafUID_t AAFParameterDefSMPTETumble = AAFParameterDef_SMPTETumble;
static const aafUID_t AAFParameterDefSMPTESpotlight = AAFParameterDef_SMPTESpotlight;
static const aafUID_t AAFParameterDefSMPTEReplicationH = AAFParameterDef_SMPTEReplicationH;
static const aafUID_t AAFParameterDefSMPTEReplicationV = AAFParameterDef_SMPTEReplicationV;
static const aafUID_t AAFParameterDefSMPTECheckerboard = AAFParameterDef_SMPTECheckerboard;
static const aafUID_t AAFParameterDefPhaseOffset = AAFParameterDef_PhaseOffset;
*/
/* Seen in Avid and PT files */
// static const aafUID_t PanVol_IsTrimGainEffect =
// {0x922d458d, 0x8f22, 0x11d4, {0xa0, 0x3c, 0x00, 0x04, 0xac, 0x96, 0x9f, 0x50}};
#endif // ! __ParameterDefinition_h__

View File

@ -0,0 +1,37 @@
#ifndef __PluginDefinition_h__
#define __PluginDefinition_h__
#include "aaf/AAFTypes.h"
// AAF well-known PluginDefinition instances
//
//{3d1dd891-e793-11d2-809e-006008143e6f}
static const aafUID_t kAAFPlatform_Independent =
{0x3d1dd891, 0xe793, 0x11d2, {0x80, 0x9e, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{9fdef8c1-e847-11d2-809e-006008143e6f}
static const aafUID_t kAAFEngine_None =
{0x9fdef8c1, 0xe847, 0x11d2, {0x80, 0x9e, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{69c870a1-e793-11d2-809e-006008143e6f}
static const aafUID_t kAAFPluginAPI_EssenceAccess =
{0x69c870a1, 0xe793, 0x11d2, {0x80, 0x9e, 0x00, 0x60, 0x08, 0x14, 0x3e, 0x6f}};
//{56905e0b-537d-11d4-a36c-009027dfca6a}
static const aafUID_t kAAFPluginCategory_Codec =
{0x56905e0b, 0x537d, 0x11d4, {0xa3, 0x6c, 0x00, 0x90, 0x27, 0xdf, 0xca, 0x6a}};
// AAF PluginDefinition legacy aliases
//
static const aafUID_t kAAFPlatformIndependant = kAAFPlatform_Independent;
static const aafUID_t kAAFNoEngine = kAAFEngine_None;
static const aafUID_t kAAFEssencePluginAPI = kAAFPluginAPI_EssenceAccess;
static const aafUID_t kAAFPluginNoCategory = kAAFPluginCategory_Codec;
#endif // ! __PluginDefinition_h__

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,364 @@
#ifndef __AAFPropertyIDs_h__
#define __AAFPropertyIDs_h__
// https://github.com/nevali/aaf/blob/a03404ad8dc371757f3847b8dae0a9d70fff6a4e/ref-impl/include/OM/OMDictionary.h
#define PID_Root_MetaDictionary 0x0001
#define PID_Root_Header 0x0002
// AAF property identifiers (PIDs).
//
// A property is identified by a globally unique 16-byte
// identifier. To save space in an AAF file we store a
// 2-byte file unique PID with each property.
// The mapping for a particular file is recorded in the
// dictionary contained in that file.
// For the predefined properties we optimize by using a
// fixed, compiled-in mapping.
// This file defines that mapping.
//
#define PID_InterchangeObject_ObjClass 0x0101
#define PID_InterchangeObject_Generation 0x0102
#define PID_Component_DataDefinition 0x0201
#define PID_Component_Length 0x0202
#define PID_Component_KLVData 0x0203
#define PID_Component_UserComments 0x0204
#define PID_Component_Attributes 0x0205
#define PID_EdgeCode_Start 0x0401
#define PID_EdgeCode_FilmKind 0x0402
#define PID_EdgeCode_CodeFormat 0x0403
#define PID_EdgeCode_Header 0x0404
#define PID_EssenceGroup_Choices 0x0501
#define PID_EssenceGroup_StillFrame 0x0502
#define PID_Event_Position 0x0601
#define PID_Event_Comment 0x0602
#define PID_GPITrigger_ActiveState 0x0801
#define PID_CommentMarker_Annotation 0x0901
#define PID_OperationGroup_Operation 0x0B01
#define PID_OperationGroup_InputSegments 0x0B02
#define PID_OperationGroup_Parameters 0x0B03
#define PID_OperationGroup_BypassOverride 0x0B04
#define PID_OperationGroup_Rendering 0x0B05
#define PID_NestedScope_Slots 0x0C01
#define PID_Pulldown_InputSegment 0x0D01
#define PID_Pulldown_PulldownKind 0x0D02
#define PID_Pulldown_PulldownDirection 0x0D03
#define PID_Pulldown_PhaseFrame 0x0D04
#define PID_ScopeReference_RelativeScope 0x0E01
#define PID_ScopeReference_RelativeSlot 0x0E02
#define PID_Selector_Selected 0x0F01
#define PID_Selector_Alternates 0x0F02
#define PID_Sequence_Components 0x1001
#define PID_SourceReference_SourceID 0x1101
#define PID_SourceReference_SourceMobSlotID 0x1102
#define PID_SourceReference_ChannelIDs 0x1103
#define PID_SourceReference_MonoSourceSlotIDs 0x1104
#define PID_SourceClip_StartTime 0x1201
#define PID_SourceClip_FadeInLength 0x1202
#define PID_SourceClip_FadeInType 0x1203
#define PID_SourceClip_FadeOutLength 0x1204
#define PID_SourceClip_FadeOutType 0x1205
#define PID_HTMLClip_BeginAnchor 0x1401
#define PID_HTMLClip_EndAnchor 0x1402
#define PID_Timecode_Start 0x1501
#define PID_Timecode_FPS 0x1502
#define PID_Timecode_Drop 0x1503
#define PID_TimecodeStream_SampleRate 0x1601
#define PID_TimecodeStream_Source 0x1602
#define PID_TimecodeStream_SourceType 0x1603
#define PID_TimecodeStream12M_IncludeSync 0x1701
#define PID_Transition_OperationGroup 0x1801
#define PID_Transition_CutPoint 0x1802
#define PID_ContentStorage_Mobs 0x1901
#define PID_ContentStorage_EssenceData 0x1902
#define PID_ControlPoint_Value 0x1A02
#define PID_ControlPoint_Time 0x1A03
#define PID_ControlPoint_EditHint 0x1A04
#define PID_DefinitionObject_Identification 0x1B01
#define PID_DefinitionObject_Name 0x1B02
#define PID_DefinitionObject_Description 0x1B03
#define PID_OperationDefinition_DataDefinition 0x1E01
#define PID_OperationDefinition_IsTimeWarp 0x1E02
#define PID_OperationDefinition_DegradeTo 0x1E03
#define PID_OperationDefinition_OperationCategory 0x1E06
#define PID_OperationDefinition_NumberInputs 0x1E07
#define PID_OperationDefinition_Bypass 0x1E08
#define PID_OperationDefinition_ParametersDefined 0x1E09
#define PID_ParameterDefinition_Type 0x1F01
#define PID_ParameterDefinition_DisplayUnits 0x1F03
#define PID_PluginDefinition_PluginCategory 0x2203
#define PID_PluginDefinition_VersionNumber 0x2204
#define PID_PluginDefinition_VersionString 0x2205
#define PID_PluginDefinition_Manufacturer 0x2206
#define PID_PluginDefinition_ManufacturerInfo 0x2207
#define PID_PluginDefinition_ManufacturerID 0x2208
#define PID_PluginDefinition_Platform 0x2209
#define PID_PluginDefinition_MinPlatformVersion 0x220A
#define PID_PluginDefinition_MaxPlatformVersion 0x220B
#define PID_PluginDefinition_Engine 0x220C
#define PID_PluginDefinition_MinEngineVersion 0x220D
#define PID_PluginDefinition_MaxEngineVersion 0x220E
#define PID_PluginDefinition_PluginAPI 0x220F
#define PID_PluginDefinition_MinPluginAPI 0x2210
#define PID_PluginDefinition_MaxPluginAPI 0x2211
#define PID_PluginDefinition_SoftwareOnly 0x2212
#define PID_PluginDefinition_Accelerator 0x2213
#define PID_PluginDefinition_Locators 0x2214
#define PID_PluginDefinition_Authentication 0x2215
#define PID_PluginDefinition_DefinitionObject 0x2216
#define PID_CodecDefinition_FileDescriptorClass 0x2301
#define PID_CodecDefinition_DataDefinitions 0x2302
#define PID_ContainerDefinition_EssenceIsIdentified 0x2401
#define PID_Dictionary_OperationDefinitions 0x2603
#define PID_Dictionary_ParameterDefinitions 0x2604
#define PID_Dictionary_DataDefinitions 0x2605
#define PID_Dictionary_PluginDefinitions 0x2606
#define PID_Dictionary_CodecDefinitions 0x2607
#define PID_Dictionary_ContainerDefinitions 0x2608
#define PID_Dictionary_InterpolationDefinitions 0x2609
#define PID_Dictionary_KLVDataDefinitions 0x260A
#define PID_Dictionary_TaggedValueDefinitions 0x260B
#define PID_EssenceData_MobID 0x2701
#define PID_EssenceData_Data 0x2702
#define PID_EssenceData_SampleIndex 0x2B01
#define PID_EssenceDescriptor_Locator 0x2F01
#define PID_FileDescriptor_SampleRate 0x3001
#define PID_FileDescriptor_Length 0x3002
#define PID_FileDescriptor_ContainerFormat 0x3004
#define PID_FileDescriptor_CodecDefinition 0x3005
#define PID_FileDescriptor_LinkedSlotID 0x3006
#define PID_AIFCDescriptor_Summary 0x3101
#define PID_DigitalImageDescriptor_Compression 0x3201
#define PID_DigitalImageDescriptor_StoredHeight 0x3202
#define PID_DigitalImageDescriptor_StoredWidth 0x3203
#define PID_DigitalImageDescriptor_SampledHeight 0x3204
#define PID_DigitalImageDescriptor_SampledWidth 0x3205
#define PID_DigitalImageDescriptor_SampledXOffset 0x3206
#define PID_DigitalImageDescriptor_SampledYOffset 0x3207
#define PID_DigitalImageDescriptor_DisplayHeight 0x3208
#define PID_DigitalImageDescriptor_DisplayWidth 0x3209
#define PID_DigitalImageDescriptor_DisplayXOffset 0x320A
#define PID_DigitalImageDescriptor_DisplayYOffset 0x320B
#define PID_DigitalImageDescriptor_FrameLayout 0x320C
#define PID_DigitalImageDescriptor_VideoLineMap 0x320D
#define PID_DigitalImageDescriptor_ImageAspectRatio 0x320E
#define PID_DigitalImageDescriptor_AlphaTransparency 0x320F
#define PID_DigitalImageDescriptor_TransferCharacteristic 0x3210
#define PID_DigitalImageDescriptor_ColorPrimaries 0x3219
#define PID_DigitalImageDescriptor_CodingEquations 0x321A
#define PID_DigitalImageDescriptor_ImageAlignmentFactor 0x3211
#define PID_DigitalImageDescriptor_FieldDominance 0x3212
#define PID_DigitalImageDescriptor_FieldStartOffset 0x3213
#define PID_DigitalImageDescriptor_FieldEndOffset 0x3214
#define PID_DigitalImageDescriptor_SignalStandard 0x3215
#define PID_DigitalImageDescriptor_StoredF2Offset 0x3216
#define PID_DigitalImageDescriptor_DisplayF2Offset 0x3217
#define PID_DigitalImageDescriptor_ActiveFormatDescriptor 0x3218
#define PID_CDCIDescriptor_ComponentWidth 0x3301
#define PID_CDCIDescriptor_HorizontalSubsampling 0x3302
#define PID_CDCIDescriptor_ColorSiting 0x3303
#define PID_CDCIDescriptor_BlackReferenceLevel 0x3304
#define PID_CDCIDescriptor_WhiteReferenceLevel 0x3305
#define PID_CDCIDescriptor_ColorRange 0x3306
#define PID_CDCIDescriptor_PaddingBits 0x3307
#define PID_CDCIDescriptor_VerticalSubsampling 0x3308
#define PID_CDCIDescriptor_AlphaSamplingWidth 0x3309
#define PID_CDCIDescriptor_ReversedByteOrder 0x330B
#define PID_RGBADescriptor_PixelLayout 0x3401
#define PID_RGBADescriptor_Palette 0x3403
#define PID_RGBADescriptor_PaletteLayout 0x3404
#define PID_RGBADescriptor_ScanningDirection 0x3405
#define PID_RGBADescriptor_ComponentMaxRef 0x3406
#define PID_RGBADescriptor_ComponentMinRef 0x3407
#define PID_RGBADescriptor_AlphaMaxRef 0x3408
#define PID_RGBADescriptor_AlphaMinRef 0x3409
#define PID_TIFFDescriptor_IsUniform 0x3701
#define PID_TIFFDescriptor_IsContiguous 0x3702
#define PID_TIFFDescriptor_LeadingLines 0x3703
#define PID_TIFFDescriptor_TrailingLines 0x3704
#define PID_TIFFDescriptor_JPEGTableID 0x3705
#define PID_TIFFDescriptor_Summary 0x3706
#define PID_WAVEDescriptor_Summary 0x3801
#define PID_FilmDescriptor_FilmFormat 0x3901
#define PID_FilmDescriptor_FrameRate 0x3902
#define PID_FilmDescriptor_PerforationsPerFrame 0x3903
#define PID_FilmDescriptor_FilmAspectRatio 0x3904
#define PID_FilmDescriptor_Manufacturer 0x3905
#define PID_FilmDescriptor_Model 0x3906
#define PID_FilmDescriptor_FilmGaugeFormat 0x3907
#define PID_FilmDescriptor_FilmBatchNumber 0x3908
#define PID_TapeDescriptor_FormFactor 0x3A01
#define PID_TapeDescriptor_VideoSignal 0x3A02
#define PID_TapeDescriptor_TapeFormat 0x3A03
#define PID_TapeDescriptor_Length 0x3A04
#define PID_TapeDescriptor_ManufacturerID 0x3A05
#define PID_TapeDescriptor_Model 0x3A06
#define PID_TapeDescriptor_TapeBatchNumber 0x3A07
#define PID_TapeDescriptor_TapeStock 0x3A08
#define PID_Header_ByteOrder 0x3B01
#define PID_Header_LastModified 0x3B02
#define PID_Header_Content 0x3B03
#define PID_Header_Dictionary 0x3B04
#define PID_Header_Version 0x3B05
#define PID_Header_IdentificationList 0x3B06
#define PID_Header_ObjectModelVersion 0x3B07
#define PID_Header_OperationalPattern 0x3B09
#define PID_Header_EssenceContainers 0x3B0A
#define PID_Header_DescriptiveSchemes 0x3B0B
#define PID_Identification_CompanyName 0x3C01
#define PID_Identification_ProductName 0x3C02
#define PID_Identification_ProductVersion 0x3C03
#define PID_Identification_ProductVersionString 0x3C04
#define PID_Identification_ProductID 0x3C05
#define PID_Identification_Date 0x3C06
#define PID_Identification_ToolkitVersion 0x3C07
#define PID_Identification_Platform 0x3C08
#define PID_Identification_GenerationAUID 0x3C09
#define PID_NetworkLocator_URLString 0x4001
#define PID_TextLocator_Name 0x4101
#define PID_Mob_MobID 0x4401
#define PID_Mob_Name 0x4402
#define PID_Mob_Slots 0x4403
#define PID_Mob_LastModified 0x4404
#define PID_Mob_CreationTime 0x4405
#define PID_Mob_UserComments 0x4406
#define PID_Mob_KLVData 0x4407
#define PID_Mob_Attributes 0x4409
#define PID_Mob_UsageCode 0x4408
#define PID_CompositionMob_DefaultFadeLength 0x4501
#define PID_CompositionMob_DefFadeType 0x4502
#define PID_CompositionMob_DefFadeEditUnit 0x4503
#define PID_CompositionMob_Rendering 0x4504
#define PID_SourceMob_EssenceDescription 0x4701
#define PID_MobSlot_SlotID 0x4801
#define PID_MobSlot_SlotName 0x4802
#define PID_MobSlot_Segment 0x4803
#define PID_MobSlot_PhysicalTrackNumber 0x4804
#define PID_EventMobSlot_EditRate 0x4901
#define PID_EventMobSlot_EventSlotOrigin 0x4902
#define PID_TimelineMobSlot_EditRate 0x4B01
#define PID_TimelineMobSlot_Origin 0x4B02
#define PID_TimelineMobSlot_MarkIn 0x4B03
#define PID_TimelineMobSlot_MarkOut 0x4B04
#define PID_TimelineMobSlot_UserPos 0x4B05
#define PID_Parameter_Definition 0x4C01
#define PID_ConstantValue_Value 0x4D01
#define PID_VaryingValue_Interpolation 0x4E01
#define PID_VaryingValue_PointList 0x4E02
#define PID_TaggedValue_Name 0x5001
#define PID_TaggedValue_Value 0x5003
#define PID_KLVData_Value 0x5101
#define PID_DescriptiveMarker_DescribedSlots 0x6102
#define PID_DescriptiveMarker_Description 0x6101
#define PID_SoundDescriptor_AudioSamplingRate 0x3D03
#define PID_SoundDescriptor_Locked 0x3D02
#define PID_SoundDescriptor_AudioRefLevel 0x3D04
#define PID_SoundDescriptor_ElectroSpatial 0x3D05
#define PID_SoundDescriptor_Channels 0x3D07
#define PID_SoundDescriptor_QuantizationBits 0x3D01
#define PID_SoundDescriptor_DialNorm 0x3D0C
#define PID_SoundDescriptor_Compression 0x3D06
#define PID_DataEssenceDescriptor_DataEssenceCoding 0x3E01
#define PID_MultipleDescriptor_FileDescriptors 0x3F01
#define PID_DescriptiveClip_DescribedSlotIDs 0x6103
#define PID_AES3PCMDescriptor_Emphasis 0x3D0D
#define PID_AES3PCMDescriptor_BlockStartOffset 0x3D0F
#define PID_AES3PCMDescriptor_AuxBitsMode 0x3D08
#define PID_AES3PCMDescriptor_ChannelStatusMode 0x3D10
#define PID_AES3PCMDescriptor_FixedChannelStatusData 0x3D11
#define PID_AES3PCMDescriptor_UserDataMode 0x3D12
#define PID_AES3PCMDescriptor_FixedUserData 0x3D13
#define PID_PCMDescriptor_BlockAlign 0x3D0A
#define PID_PCMDescriptor_SequenceOffset 0x3D0B
#define PID_PCMDescriptor_AverageBPS 0x3D09
#define PID_PCMDescriptor_ChannelAssignment 0x3D32
#define PID_PCMDescriptor_PeakEnvelopeVersion 0x3D29
#define PID_PCMDescriptor_PeakEnvelopeFormat 0x3D2A
#define PID_PCMDescriptor_PointsPerPeakValue 0x3D2B
#define PID_PCMDescriptor_PeakEnvelopeBlockSize 0x3D2C
#define PID_PCMDescriptor_PeakChannels 0x3D2D
#define PID_PCMDescriptor_PeakFrames 0x3D2E
#define PID_PCMDescriptor_PeakOfPeaksPosition 0x3D2F
#define PID_PCMDescriptor_PeakEnvelopeTimestamp 0x3D30
#define PID_PCMDescriptor_PeakEnvelopeData 0x3D31
#define PID_KLVDataDefinition_KLVDataType 0x4D12
#define PID_AuxiliaryDescriptor_MimeType 0x4E11
#define PID_AuxiliaryDescriptor_CharSet 0x4E12
#define PID_RIFFChunk_ChunkID 0x4F01
#define PID_RIFFChunk_ChunkLength 0x4F02
#define PID_RIFFChunk_ChunkData 0x4F03
#define PID_BWFImportDescriptor_QltyFileSecurityReport 0x3D15
#define PID_BWFImportDescriptor_QltyFileSecurityWave 0x3D16
#define PID_BWFImportDescriptor_BextCodingHistory 0x3D21
#define PID_BWFImportDescriptor_QltyBasicData 0x3D22
#define PID_BWFImportDescriptor_QltyStartOfModulation 0x3D23
#define PID_BWFImportDescriptor_QltyQualityEvent 0x3D24
#define PID_BWFImportDescriptor_QltyEndOfModulation 0x3D25
#define PID_BWFImportDescriptor_QltyQualityParameter 0x3D26
#define PID_BWFImportDescriptor_QltyOperatorComment 0x3D27
#define PID_BWFImportDescriptor_QltyCueSheet 0x3D28
#define PID_BWFImportDescriptor_UnknownBWFChunks 0x3D33
#define PID_MPEGVideoDescriptor_SingleSequence 0x0000
#define PID_MPEGVideoDescriptor_ConstantBPictureCount 0x0000
#define PID_MPEGVideoDescriptor_CodedContentScanning 0x0000
#define PID_MPEGVideoDescriptor_LowDelay 0x0000
#define PID_MPEGVideoDescriptor_ClosedGOP 0x0000
#define PID_MPEGVideoDescriptor_IdenticalGOP 0x0000
#define PID_MPEGVideoDescriptor_MaxGOP 0x0000
#define PID_MPEGVideoDescriptor_MaxBPictureCount 0x0000
#define PID_MPEGVideoDescriptor_BitRate 0x0000
#define PID_MPEGVideoDescriptor_ProfileAndLevel 0x0000
/* MULTIPLE_VALUE_MATCHES
https://sourceforge.net/p/aaf/mailman/aaf-commits/?viewmonth=200704&page=4
"Log message : Set MPEGVideoDescriptor PIDs to 0x0000 (dynamic)"
! const int PID_MPEGVideoDescriptor_SingleSequence = 0xFF01;
! const int PID_MPEGVideoDescriptor_ConstantBPictureCount = 0xFF02;
! const int PID_MPEGVideoDescriptor_CodedContentScanning = 0xFF03;
! const int PID_MPEGVideoDescriptor_LowDelay = 0xFF04;
! const int PID_MPEGVideoDescriptor_ClosedGOP = 0xFF05;
! const int PID_MPEGVideoDescriptor_IdenticalGOP = 0xFF06;
! const int PID_MPEGVideoDescriptor_MaxGOP = 0xFF07;
! const int PID_MPEGVideoDescriptor_MaxBPictureCount = 0xFF08;
! const int PID_MPEGVideoDescriptor_BitRate = 0xFF09;
! const int PID_MPEGVideoDescriptor_ProfileAndLevel = 0xFF10;
*/
#define PID_ClassDefinition_ParentClass 0x0008
#define PID_ClassDefinition_Properties 0x0009
#define PID_ClassDefinition_IsConcrete 0x000A
#define PID_PropertyDefinition_Type 0x000B
#define PID_PropertyDefinition_IsOptional 0x000C
#define PID_PropertyDefinition_LocalIdentification 0x000D
#define PID_PropertyDefinition_IsUniqueIdentifier 0x000E
#define PID_TypeDefinitionInteger_Size 0x000F
#define PID_TypeDefinitionInteger_IsSigned 0x0010
#define PID_TypeDefinitionStrongObjectReference_ReferencedType 0x0011
#define PID_TypeDefinitionWeakObjectReference_ReferencedType 0x0012
#define PID_TypeDefinitionWeakObjectReference_TargetSet 0x0013
#define PID_TypeDefinitionEnumeration_ElementType 0x0014
#define PID_TypeDefinitionEnumeration_ElementNames 0x0015
#define PID_TypeDefinitionEnumeration_ElementValues 0x0016
#define PID_TypeDefinitionFixedArray_ElementType 0x0017
#define PID_TypeDefinitionFixedArray_ElementCount 0x0018
#define PID_TypeDefinitionVariableArray_ElementType 0x0019
#define PID_TypeDefinitionSet_ElementType 0x001A
#define PID_TypeDefinitionString_ElementType 0x001B
#define PID_TypeDefinitionRecord_MemberTypes 0x001C
#define PID_TypeDefinitionRecord_MemberNames 0x001D
#define PID_TypeDefinitionRename_RenamedType 0x001E
#define PID_TypeDefinitionExtendibleEnumeration_ElementNames 0x001F
#define PID_TypeDefinitionExtendibleEnumeration_ElementValues 0x0020
#define PID_MetaDefinition_Identification 0x0005
#define PID_MetaDefinition_Name 0x0006
#define PID_MetaDefinition_Description 0x0007
#define PID_MetaDictionary_ClassDefinitions 0x0003
#define PID_MetaDictionary_TypeDefinitions 0x0004
#endif // ! __AAFPropertyIDs_h__

View File

@ -0,0 +1,627 @@
#ifndef __AAFTypeDefUIDs_h__
#define __AAFTypeDefUIDs_h__
#include "aaf/AAFTypes.h"
// AAF type definition UIDs.
//
//{01010100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_UInt8 =
{0x01010100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01010200-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_UInt16 =
{0x01010200, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01010300-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_UInt32 =
{0x01010300, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01010400-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_UInt64 =
{0x01010400, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01010500-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_Int8 =
{0x01010500, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01010600-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_Int16 =
{0x01010600, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01010700-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_Int32 =
{0x01010700, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01010800-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_Int64 =
{0x01010800, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01012001-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_PositionType =
{0x01012001, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01012002-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_LengthType =
{0x01012002, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01012003-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_JPEGTableIDType =
{0x01012003, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01012300-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_PhaseFrameType =
{0x01012300, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01030100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_AUID =
{0x01030100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01030200-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_MobIDType =
{0x01030200, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01040100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_Boolean =
{0x01040100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01100100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_Character =
{0x01100100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{01100200-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_String =
{0x01100200, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010101-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ProductReleaseType =
{0x02010101, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010102-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TapeFormatType =
{0x02010102, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010103-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_VideoSignalType =
{0x02010103, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010104-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TapeCaseType =
{0x02010104, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010105-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ColorSitingType =
{0x02010105, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010106-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_EditHintType =
{0x02010106, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010107-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_FadeType =
{0x02010107, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010108-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_LayoutType =
{0x02010108, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010109-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TCSource =
{0x02010109, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{0201010a-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_PulldownDirectionType =
{0x0201010a, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{0201010b-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_PulldownKindType =
{0x0201010b, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{0201010c-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_EdgeType =
{0x0201010c, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{0201010d-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_FilmType =
{0x0201010d, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{0201010e-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_RGBAComponentKind =
{0x0201010e, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{0201010f-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ReferenceType =
{0x0201010f, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010120-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_AlphaTransparencyType =
{0x02010120, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010121-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_FieldNumber =
{0x02010121, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010122-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ElectroSpatialFormulation =
{0x02010122, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010123-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_EmphasisType =
{0x02010123, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010124-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_AuxBitsModeType =
{0x02010124, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010125-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ChannelStatusModeType =
{0x02010125, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010126-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_UserDataModeType =
{0x02010126, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010127-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_SignalStandardType =
{0x02010127, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02010128-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ScanningDirectionType =
{0x02010128, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{0201012a-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ContentScanningType =
{0x0201012a, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{0201012b-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TitleAlignmentType =
{0x0201012b, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02020101-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_OperationCategoryType =
{0x02020101, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02020102-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TransferCharacteristicType =
{0x02020102, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02020103-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_PluginCategoryType =
{0x02020103, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02020104-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_UsageType =
{0x02020104, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02020105-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ColorPrimariesType =
{0x02020105, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{02020106-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_CodingEquationsType =
{0x02020106, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{03010100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_Rational =
{0x03010100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{03010200-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ProductVersion =
{0x03010200, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{03010300-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_VersionType =
{0x03010300, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{03010400-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_RGBAComponent =
{0x03010400, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{03010500-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_DateStruct =
{0x03010500, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{03010600-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TimeStruct =
{0x03010600, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{03010700-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TimeStamp =
{0x03010700, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04010100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_UInt8Array =
{0x04010100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04010200-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_UInt8Array12 =
{0x04010200, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04010300-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_Int32Array =
{0x04010300, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04010400-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_Int64Array =
{0x04010400, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04010500-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_StringArray =
{0x04010500, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04010600-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_AUIDArray =
{0x04010600, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04010700-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_PositionArray =
{0x04010700, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04010800-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_UInt8Array8 =
{0x04010800, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04010900-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_UInt32Array =
{0x04010900, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04010a00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ChannelStatusModeArray =
{0x04010a00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04010b00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_UserDataModeArray =
{0x04010b00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04020100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_RGBALayout =
{0x04020100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04030100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_AUIDSet =
{0x04030100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04030200-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_UInt32Set =
{0x04030200, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04100100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_DataValue =
{0x04100100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04100200-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_Stream =
{0x04100200, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04100300-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_Indirect =
{0x04100300, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{04100400-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_Opaque =
{0x04100400, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05010100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ClassDefinitionWeakReference =
{0x05010100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05010200-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ContainerDefinitionWeakReference =
{0x05010200, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05010300-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_DataDefinitionWeakReference =
{0x05010300, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05010500-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_InterpolationDefinitionWeakReference =
{0x05010500, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05010600-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_MobWeakReference =
{0x05010600, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05010700-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_OperationDefinitionWeakReference =
{0x05010700, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05010800-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ParameterDefinitionWeakReference =
{0x05010800, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05010900-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TypeDefinitionWeakReference =
{0x05010900, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05010a00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_PluginDefinitionWeakReference =
{0x05010a00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05010b00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_CodecDefinitionWeakReference =
{0x05010b00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05010c00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_PropertyDefinitionWeakReference =
{0x05010c00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ContentStorageStrongReference =
{0x05020100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020200-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_DictionaryStrongReference =
{0x05020200, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020300-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_EssenceDescriptorStrongReference =
{0x05020300, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020400-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_NetworkLocatorStrongReference =
{0x05020400, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020500-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_OperationGroupStrongReference =
{0x05020500, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020600-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_SegmentStrongReference =
{0x05020600, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020700-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_SourceClipStrongReference =
{0x05020700, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020800-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_SourceReferenceStrongReference =
{0x05020800, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020900-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ClassDefinitionStrongReference =
{0x05020900, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020a00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_CodecDefinitionStrongReference =
{0x05020a00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020b00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ComponentStrongReference =
{0x05020b00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020c00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ContainerDefinitionStrongReference =
{0x05020c00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020d00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ControlPointStrongReference =
{0x05020d00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020e00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_DataDefinitionStrongReference =
{0x05020e00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05020f00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_EssenceDataStrongReference =
{0x05020f00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021000-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_IdentificationStrongReference =
{0x05021000, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_InterpolationDefinitionStrongReference =
{0x05021100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021200-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_LocatorStrongReference =
{0x05021200, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021300-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_MobStrongReference =
{0x05021300, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021400-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_MobSlotStrongReference =
{0x05021400, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021500-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_OperationDefinitionStrongReference =
{0x05021500, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021600-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ParameterStrongReference =
{0x05021600, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021700-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ParameterDefinitionStrongReference =
{0x05021700, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021800-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_PluginDefinitionStrongReference =
{0x05021800, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021900-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_PropertyDefinitionStrongReference =
{0x05021900, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021a00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TaggedValueStrongReference =
{0x05021a00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021b00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TypeDefinitionStrongReference =
{0x05021b00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021c00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_KLVDataStrongReference =
{0x05021c00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021d00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_FileDescriptorStrongReference =
{0x05021d00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021e00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_RIFFChunkStrongReference =
{0x05021e00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05021f00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_DescriptiveFrameworkStrongReference =
{0x05021f00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05022000-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_KLVDataDefinitionStrongReference =
{0x05022000, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05022100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TaggedValueDefinitionStrongReference =
{0x05022100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05022200-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_DescriptiveObjectStrongReference =
{0x05022200, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05030d00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_DataDefinitionWeakReferenceSet =
{0x05030d00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05030e00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ParameterDefinitionWeakReferenceSet =
{0x05030e00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05030f00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_PluginDefinitionWeakReferenceSet =
{0x05030f00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05031000-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_PropertyDefinitionWeakReferenceSet =
{0x05031000, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05040100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_OperationDefinitionWeakReferenceVector =
{0x05040100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05040200-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TypeDefinitionWeakReferenceVector =
{0x05040200, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05040300-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_DataDefinitionWeakReferenceVector =
{0x05040300, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ClassDefinitionStrongReferenceSet =
{0x05050100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050200-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_CodecDefinitionStrongReferenceSet =
{0x05050200, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050300-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ContainerDefinitionStrongReferenceSet =
{0x05050300, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050400-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_DataDefinitionStrongReferenceSet =
{0x05050400, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050500-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_EssenceDataStrongReferenceSet =
{0x05050500, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050600-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_InterpolationDefinitionStrongReferenceSet =
{0x05050600, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050700-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_MobStrongReferenceSet =
{0x05050700, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050800-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_OperationDefinitionStrongReferenceSet =
{0x05050800, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050900-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ParameterDefinitionStrongReferenceSet =
{0x05050900, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050a00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_PluginDefinitionStrongReferenceSet =
{0x05050a00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050b00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_PropertyDefinitionStrongReferenceSet =
{0x05050b00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050c00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TypeDefinitionStrongReferenceSet =
{0x05050c00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050d00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_KLVDataDefinitionStrongReferenceSet =
{0x05050d00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050e00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TaggedValueDefinitionStrongReferenceSet =
{0x05050e00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05050f00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_DescriptiveObjectStrongReferenceSet =
{0x05050f00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05060100-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ComponentStrongReferenceVector =
{0x05060100, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05060200-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ControlPointStrongReferenceVector =
{0x05060200, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05060300-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_IdentificationStrongReferenceVector =
{0x05060300, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05060400-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_LocatorStrongReferenceVector =
{0x05060400, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05060500-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_MobSlotStrongReferenceVector =
{0x05060500, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05060600-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_SegmentStrongReferenceVector =
{0x05060600, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05060700-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_SourceReferenceStrongReferenceVector =
{0x05060700, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05060800-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_TaggedValueStrongReferenceVector =
{0x05060800, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05060900-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_KLVDataStrongReferenceVector =
{0x05060900, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05060a00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_ParameterStrongReferenceVector =
{0x05060a00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05060b00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_FileDescriptorStrongReferenceVector =
{0x05060b00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05060c00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_RIFFChunkStrongReferenceVector =
{0x05060c00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
//{05060d00-0000-0000-060e-2b3401040101}
static const aafUID_t AAFTypeID_DescriptiveObjectStrongReferenceVector =
{0x05060d00, 0x0000, 0x0000, {0x06, 0x0e, 0x2b, 0x34, 0x01, 0x04, 0x01, 0x01}};
#endif // ! __AAFTypeDefUIDs_h__

52
libs/aaf/aaf/AAFDump.h Normal file
View File

@ -0,0 +1,52 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __AAFDump_h__
#define __AAFDump_h__
#include "aaf/AAFCore.h"
#include "aaf/AAFTypes.h"
#include "aaf/LibCFB.h"
void
aaf_dump_Header (AAF_Data* aafd);
void
aaf_dump_Identification (AAF_Data* aafd);
void
aaf_dump_rawProperties (AAF_Data* aafd, aafByte_t* propStream);
void
aaf_dump_ObjectProperty (AAF_Data* aafd, aafProperty* Prop);
void
aaf_dump_ObjectProperties (AAF_Data* aafd, aafObject* Obj);
void
aaf_dump_nodeStreamProperties (AAF_Data* aafd, cfbNode* node);
void
aaf_dump_MetaDictionary (AAF_Data* aafd);
void
aaf_dump_Classes (AAF_Data* aafd);
#endif // ! __AAFDump_h__

View File

@ -0,0 +1,37 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __AAFIAudioFiles_h__
#define __AAFIAudioFiles_h__
#include <wchar.h>
#include "aaf/AAFIface.h"
char*
aafi_locate_external_essence_file (AAF_Iface* aafi, const wchar_t* original_file_path, const char* search_location);
int
aafi_extract_audio_essence (AAF_Iface* aafi, aafiAudioEssence* audioEssence, const char* outfilepath, const wchar_t* forcedFileName);
int
aafi_parse_audio_summary (AAF_Iface* aafi, aafiAudioEssence* audioEssence);
#endif // !__AAFIAudioFiles_h__

104
libs/aaf/aaf/AAFIParser.h Normal file
View File

@ -0,0 +1,104 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __AAFIParser_h__
#define __AAFIParser_h__
/**
* @file LibAAF/AAFIface/AAFIParser.h
* @brief AAF processing
* @author Adrien Gesta-Fline
* @version 0.1
* @date 27 june 2018
*
* @ingroup AAFIface
* @addtogroup AAFIface
* @{
*/
#include "aaf/AAFCore.h"
#include "aaf/AAFIface.h"
enum trace_dump_state {
TD_OK = 0,
TD_INFO,
TD_WARNING,
TD_ERROR,
TD_NOT_SUPPORTED
};
typedef struct trace_dump {
int fn; // line number of current __td
int pfn; // line number of previous __td
int lv; // current level
int* ll; // level loop : each entry correspond to a level and tell if there is more to print
int eob; // end of branch
int hc; // have children
int sub;
} td;
#define __td_set(__td, __ptd, offset) \
__td.fn = __LINE__; \
__td.pfn = __ptd->fn; \
__td.lv = __ptd->lv + offset; \
__td.ll = __ptd->ll; \
__td.ll[__td.lv] = (offset > 0) ? 0 : __td.ll[__td.lv]; \
__td.eob = 0; \
__td.hc = 0; \
__td.sub = 0;
#define DUMP_OBJ(aafi, Obj, __td) \
aafi_dump_obj (aafi, Obj, __td, TD_OK, __LINE__, "");
#define DUMP_OBJ_INFO(aafi, Obj, __td, ...) \
aafi_dump_obj (aafi, Obj, __td, TD_OK, __LINE__, __VA_ARGS__);
#define DUMP_OBJ_WARNING(aafi, Obj, __td, ...) \
aafi_dump_obj (aafi, Obj, __td, TD_WARNING, __LINE__, __VA_ARGS__);
#define DUMP_OBJ_ERROR(aafi, Obj, __td, ...) \
(__td)->eob = 1; \
aafi_dump_obj (aafi, Obj, __td, TD_ERROR, __LINE__, __VA_ARGS__);
#define DUMP_OBJ_NO_SUPPORT(aafi, Obj, __td) \
(__td)->eob = 1; \
aafi_dump_obj_no_support (aafi, Obj, __td, __LINE__);
int
aafi_retrieveData (AAF_Iface* aafi);
/*
* The following functions are declared beyond AAFIparser.c scope,
* so they are accessible to vendor-specific files (Resolve.c, ProTools.c, etc.)
*/
void
aafi_dump_obj (AAF_Iface* aafi, aafObject* Obj, struct trace_dump* __td, int state, int line, const char* fmt, ...);
void
aafi_dump_obj_no_support (AAF_Iface* aafi, aafObject* Obj, struct trace_dump* __td, int line);
void
aafi_trace_obj (AAF_Iface* aafi, aafObject* Obj, const char* color);
int
aafi_parse_Segment (AAF_Iface* aafi, aafObject* Segment, td* __ptd);
#endif // !__AAFIParser_h__

861
libs/aaf/aaf/AAFIface.h Normal file
View File

@ -0,0 +1,861 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __AAFIface_h__
#define __AAFIface_h__
/**
* @file LibAAF/AAFIface/AAFIface.h
* @brief AAF processing
* @author Adrien Gesta-Fline
* @version 0.1
* @date 04 october 2017
*
* @ingroup AAFIface
* @addtogroup AAFIface
* @{
* @brief Abstraction layer to interpret the Objects/Class and retrieve data.
*/
#include "aaf/AAFCore.h"
#include "aaf/AAFTypes.h"
enum aafiEssenceType {
AAFI_ESSENCE_TYPE_PCM = 0x01,
AAFI_ESSENCE_TYPE_WAVE = 0x02,
AAFI_ESSENCE_TYPE_AIFC = 0x03,
AAFI_ESSENCE_TYPE_BWAV = 0x04,
};
/**
* Flags for aafiAudioGain.flags.
*/
typedef enum aafiAudioGain_e {
AAFI_AUDIO_GAIN_CONSTANT = 1 << 0, //0x0001
AAFI_AUDIO_GAIN_VARIABLE = 1 << 1, //0x0002
} aafiAudioGain_e;
#define AAFI_AUDIO_GAIN_MASK ( \
AAFI_AUDIO_GAIN_CONSTANT | AAFI_AUDIO_GAIN_VARIABLE)
/**
* Flags for aafiTransition.flags.
*/
typedef enum aafiTransition_e {
AAFI_TRANS_SINGLE_CURVE = 1 << 4, //0x0010
AAFI_TRANS_TWO_CURVE = 1 << 5, //0x0020
AAFI_TRANS_FADE_IN = 1 << 6, //0x0040
AAFI_TRANS_FADE_OUT = 1 << 7, //0x0080
AAFI_TRANS_XFADE = 1 << 8, //0x0100
} aafiTransition_e;
#define AAFI_TRANS_CURVE_COUNT_MASK ( \
AAFI_TRANS_SINGLE_CURVE | AAFI_TRANS_TWO_CURVE)
#define AAFI_TRANS_FADE_MASK ( \
AAFI_TRANS_FADE_IN | AAFI_TRANS_FADE_OUT | AAFI_TRANS_XFADE)
/**
* Flags for aafiTransition.flags and aafiAudioGain.flags
*/
typedef enum aafiInterpolation_e {
AAFI_INTERPOL_NONE = 1 << 10, //0x0400
AAFI_INTERPOL_LINEAR = 1 << 11, //0x0800
AAFI_INTERPOL_LOG = 1 << 12, //0x1000
AAFI_INTERPOL_CONSTANT = 1 << 13, //0x2000
AAFI_INTERPOL_POWER = 1 << 14, //0x4000
AAFI_INTERPOL_BSPLINE = 1 << 15, //0x8000
} aafiInterpolation_e;
#define AAFI_INTERPOL_MASK ( \
AAFI_INTERPOL_NONE | AAFI_INTERPOL_LINEAR | AAFI_INTERPOL_LOG | AAFI_INTERPOL_CONSTANT | AAFI_INTERPOL_POWER | AAFI_INTERPOL_BSPLINE)
/**
* Specifies a Transition that can be a fade in, a fade out or a Cross fade, and that can
* have one or two curves.
*
* With a single curve (AAFI_TRANS_SINGLE_CURVE), the same curve is mirrored and applied
* as fade in and fade out to obtain a cross fade.
*
* Having two curves (AAFI_TRANS_TWO_CURVE) allows a cross fade to have one curve per fade.
*
* A transition should have at least two points, one at time zero and one at time 1.
* TODO To finish
*/
typedef struct aafiTransition {
/**
* Should hold the transition type (either single param or two param),
* the transition fade type (in, out, x) and the interpolation used.
*/
int flags;
/**
* Length of the transition, in edit units.
*/
aafPosition_t len;
/**
* The cut point. In the case the transition is removed or cannot be played, the
* cut point specifies where in the transition, the preceding segment should end
* and where the following segment should start.
*/
aafPosition_t cut_pt;
/**
* Points count for the single curve, or the first one of the two. This specifies
* both the number of points (time/value) in the transition curve, and consequently
* the size of time_a[] and value_a[] arrays.
*/
int pts_cnt_a;
/**
* Array of time points, where the corresponding level value should apply either to
* the single curve, or to the first one of the two.
*/
aafRational_t* time_a;
/**
* Multiplier level values, each one applying at the corresponding indexed time for
* either the single curve, or the first one of the two.
* The interval between two points shall be calculated using the specified
* interpolation.
*/
aafRational_t* value_a;
/**
* Points count for the second curve, only when Transition has the AAFI_TRANS_TWO_CURVE
* flag. This specifies both the number of points (time/value) in the transition curve,
* and consequently the size of time_b[] and value_b[] arrays.
*/
int pts_cnt_b;
/**
* Array of time points, where the corresponding level value should apply to the
* second curve. Used only if Transition has the AAFI_TRANS_TWO_CURVE flag.
*/
aafRational_t** time_b;
/**
* Multiplier level values, each one applying at the corresponding indexed time.
* The interval between two points shall be calculated using the specified
* interpolation. Used only if Transitions has the AAFI_TRANS_TWO_CURVE flag.
*/
aafRational_t** value_b;
} aafiTransition;
/**
* Specifies a Gain to apply either to a Clip (aafiAudioClip.gain) or to an entire Track
* (aafiAudioTrack.gain), that is to all the Clips contained by that Track.
*
* A Gain can be of to types :
*
* * Constant (AAFI_AUDIO_GAIN_CONSTANT) : A Constant gain specifies a single value
* as a multiplier to be applied to the Clip or Track.
*
* * Variable (AAFI_AUDIO_GAIN_VARIABLE) : A Variable gain specifies multiple points
* ( time / value ) that form all together the automation curve. The values between
* two points are calculated by interpolating between the two values.
*
* Both the Gain type and the interpolation mode are specified in the aafiAudioGain.flags
* with the values from aafiAudioGain_e and aafiInterpolation_e.
*
* In the case of a Constant Gain, the single multiplier value should be retrieved from
* aafiAudioGain.value[0].
*/
typedef struct aafiAudioGain {
/**
* Should hold the gain type (either Constant or Variable), and if it is Variable,
* the interpolation used to calculate the values between two time points.
*/
uint16_t flags; // Type : Constant (single multiplier for entire clip) or
// Variable (automation)
// Interpolation : Linear, Log, Constant, Power, BSpline
/**
* Points count. This specifies both the number of points (time/value) in the
* gain automation, and is consequently the size of time[] and value[] arrays.
*/
int64_t pts_cnt;
/**
* Array of time points, where the corresponding level value should apply.
*/
aafRational_t* time;
/**
* Multiplier level values, each one applying at the corresponding indexed time.
* The interval between two points shall be calculated using the specified
* interpolation.
*/
aafRational_t* value;
} aafiAudioGain;
typedef struct aafiAudioGain aafiAudioPan;
typedef struct aafiAudioEssence {
wchar_t* original_file_path; // NetworkLocator::URLString the original URI hold in AAF
wchar_t* usable_file_path; // Holds a real usable file path, once an embedded essence has been extracted, or once en external essence has been found.
wchar_t* file_name; // MasterMob::Name the original file name. Might be NULL if MasterMob has no name. One should always use unique_file_name which is guaranted to be set.
wchar_t* unique_file_name; // unique name generated from file_name. Sometimes, multiple files share the same names so this unique name should be used on export.
uint16_t clip_count; // number of clips with this essence
/* total samples for 1 channel (no matter channel count). (duration / sampleRate) = duration in seconds */
uint64_t length; // Length of Essence Data
cfbNode* node; // The node holding the audio stream if embedded
aafMobID_t* sourceMobID; // Holds the SourceMob Mob::ID references this EssenceData
uint32_t sourceMobSlotID; // SlotID of the MobSlot inside MasterMob (CompoMob's Sequence SourceClip::SourceMobSlotID)
aafMobID_t* masterMobID; // Holds the MasterMob Mob::ID (used by CompoMob's Sequence SourceClip::SourceID)
uint32_t masterMobSlotID; // SlotID of the MobSlot inside MasterMob (CompoMob's Sequence SourceClip::SourceMobSlotID)
aafObject* SourceMob;
enum aafiEssenceType type; // depends on PCMDescriptor WAVEDescriptor AIFCDescriptor
uint8_t is_embedded;
aafProperty* summary; // WAVEDescriptor AIFCDescriptor
// uint32_t format;
uint32_t samplerate;
int16_t samplesize;
int16_t channels;
aafRational_t* mobSlotEditRate;
// BWF BEXT chunk data
char description[256];
char originator[32]; // could be set with header::ProductName
char originatorReference[32];
uint64_t timeReference; // SourceMob TimelineMobSlot::Origin
unsigned char umid[64]; // SourceMob::MobID (32 Bytes, basic form)
char originationDate[10 + 1]; // SourceMob::CreationDate
char originationTime[8 + 1]; // SourceMob::CreationTime
void* user;
// TODO peakEnveloppe
struct aafiAudioEssence* next;
} aafiAudioEssence;
typedef struct aafiVideoEssence {
wchar_t* original_file_path; // NetworkLocator::URLString should point to original essence file if external (and in some cases, points to the AAF itself if internal..)
wchar_t* usable_file_path; // TODO, not that used.. to be tweaked. ---- Holds the file path, once the essence has been exported, copied or linked.
wchar_t* file_name; // MasterMob::Name -> file name
wchar_t* unique_file_name; // unique name generated from file_name. Sometimes, multiple files share the same names so this unique name should be used on export.
uint64_t length; // Length of Essence Data
cfbNode* node; // The node holding the audio stream if embedded
aafRational_t* framerate;
aafMobID_t* sourceMobID; // Holds the SourceMob Mob::ID references this EssenceData
uint32_t sourceMobSlotID; // SlotID of the MobSlot inside MasterMob (CompoMob's Sequence SourceClip::SourceMobSlotID)
aafMobID_t* masterMobID; // Holds the MasterMob Mob::ID (used by CompoMob's Sequence SourceClip::SourceID)
uint32_t masterMobSlotID; // SlotID of the MobSlot inside MasterMob (CompoMob's Sequence SourceClip::SourceMobSlotID)
aafObject* SourceMob;
// uint16_t type; // depends on PCMDescriptor WAVEDescriptor AIFCDescriptor
uint8_t is_embedded;
aafProperty* summary;
// TODO peakEnveloppe
struct aafiVideoEssence* next;
} aafiVideoEssence;
/* forward declaration */
struct aafiAudioTrack;
struct aafiVideoTrack;
typedef struct aafiAudioClip {
struct aafiAudioTrack* track;
aafiAudioEssence* Essence;
/*
* Some editors (like Resolve) support automation attached to a clip AND a fixed value clip gain
*/
aafiAudioGain* gain;
aafiAudioGain* automation;
int mute;
int channel_count;
aafPosition_t pos; /* in edit unit, edit rate definition is aafiAudioTrack->edit_rate */
aafPosition_t len; /* in edit unit, edit rate definition is aafiAudioTrack->edit_rate */
/*
* Start position in source file, set from SourceClip::StartTime
*
* « Specifies the offset from the origin of the referenced Mob MobSlot in edit units
* determined by the SourceClip objects context.
*
* A SourceClips StartTime and Length values are in edit units determined by the slot
* owning the SourceClip.
* Informative note: If the SourceClip references a MobSlot that specifies a different
* edit rate than the MobSlot owning the SourceClip, the StartTime and Length are in
* edit units of the slot owning the SourceClip, and not edit units of the referenced slot.»
*/
aafPosition_t essence_offset; /* in edit unit, edit rate definition is aafiAudioTrack->edit_rate */
struct aafiTimelineItem* Item; // Corresponding timeline item, currently used in ardour to retrieve fades/x-fades
aafMobID_t* masterMobID; // MobID of the associated MasterMob (PID_SourceReference_SourceID)
} aafiAudioClip;
typedef struct aafiVideoClip {
struct aafiVideoTrack* track;
aafiVideoEssence* Essence;
aafPosition_t pos;
aafPosition_t len;
aafPosition_t essence_offset; // start position in the source file
aafMobID_t* masterMobID; // MobID of the associated MasterMob (PID_SourceReference_SourceID)
} aafiVideoClip;
typedef enum aafiTimelineItem_type_e {
AAFI_AUDIO_CLIP = 0x0001,
AAFI_VIDEO_CLIP = 0x0002,
AAFI_TRANS = 0x0003,
} aafiTimelineItem_type_e;
/**
* This structure can old either an aafiAudioClip, aafiVideoClip or an aafiTransition struct.
*/
typedef struct aafiTimelineItem {
int type;
struct aafiTimelineItem* next;
struct aafiTimelineItem* prev;
void* data; /* aafiTransition or aafiAudioClip or aafiVideoClip */
} aafiTimelineItem;
/**
*
*/
typedef struct aafiTimecode {
/**
* Timecode start in EditUnit. (session start)
*/
aafPosition_t start;
/**
* Timecode end in EditUnit. (session end)
*/
aafPosition_t end;
/**
* Frame per second.
*/
uint16_t fps;
/**
* Indicates whether the timecode is drop (True value) or nondrop (False value)
*/
uint8_t drop;
/**
* Keeps track of the TimelineMobSlot EditRate.
* TODO do we care ?
*/
aafRational_t* edit_rate;
} aafiTimecode;
/**
* Values for aafiAudioTrack.format.
*/
typedef enum aafiTrackFormat_e {
AAFI_TRACK_FORMAT_NOT_SET = 0,
AAFI_TRACK_FORMAT_MONO = 1,
AAFI_TRACK_FORMAT_STEREO = 2,
AAFI_TRACK_FORMAT_5_1 = 6,
AAFI_TRACK_FORMAT_7_1 = 8,
AAFI_TRACK_FORMAT_UNKNOWN = 99
} aafiTrackFormat_e;
/* forward declaration */
struct aafiAudio;
struct aafiVideo;
typedef struct aafiAudioTrack {
/**
* Track number
* TODO Should it start at one ?
* TODO Optional, should have a guess (i++) option.
*/
uint32_t number;
uint16_t format; // aafiTrackFormat_e, value = channel count
/**
* Track name
*/
wchar_t* name;
/**
* Holds the Gain to apply on that track, that is the track volume Fader.
*/
aafiAudioGain* gain;
aafiAudioPan* pan;
/**
* Holds the timeline items of that track, that is aafiAudioClip and aafiTransition
* structures.
*/
struct aafiTimelineItem* Items;
/**
* The edit rate of all the contained Clips, Transitions, also lengths and track->current_pos;
*/
aafRational_t* edit_rate;
/**
* Pointer to the aafiAudio for convenient access.
*/
struct aafiAudio* Audio;
/**
* Pointer to the next aafiAudioTrack structure in the aafiAudio.Tracks list.
*/
aafPosition_t current_pos;
struct aafiAudioTrack* next;
} aafiAudioTrack;
typedef struct aafiVideoTrack {
/**
* Track number
* TODO Should it start at one ?
* TODO Optional, should have a guess (i++) option.
*/
uint32_t number;
/**
* Track name
*/
wchar_t* name;
/**
* Holds the timeline items of that track, that is aafiVideoClip and aafiTransition
* structures.
*/
struct aafiTimelineItem* Items;
/**
* The edit rate of all the contained Clips and Transitions.
*/
aafRational_t* edit_rate;
/**
* Pointer to the aafiVideo for convenient access.
*/
struct aafiVideo* Video;
/**
* Pointer to the next aafiVideoTrack structure in the aafiVideo.Tracks list.
*/
aafPosition_t current_pos;
struct aafiVideoTrack* next;
} aafiVideoTrack;
typedef struct aafiUserComment {
wchar_t* name;
wchar_t* text;
struct aafiUserComment* next;
} aafiUserComment;
typedef struct aafiAudio {
/**
* Holds the sequence start timecode.
*/
aafPosition_t start;
aafPosition_t length;
aafRational_t length_editRate;
int64_t samplerate;
int16_t samplesize;
/**
* Holds the Essence list.
*/
aafiAudioEssence* Essences;
/**
* Holds the Track list.
*/
aafiAudioTrack* Tracks;
uint32_t track_count;
} aafiAudio;
typedef struct aafiVideo {
/**
* Holds the sequence start timecode.
*/
aafPosition_t start;
aafPosition_t length;
aafRational_t length_editRate;
/**
* Holds the Essence list.
*/
aafiVideoEssence* Essences;
/**
* Holds the Track list.
*/
aafiVideoTrack* Tracks;
} aafiVideo;
typedef struct aafiMarker {
/*
* TODO: link marker to specific track ? (optional in AAF standard, not yet seen in AAF files)
*/
aafPosition_t start;
aafPosition_t length;
aafRational_t* edit_rate;
wchar_t* name;
wchar_t* comment;
uint16_t RVBColor[3];
struct aafiMarker* prev;
struct aafiMarker* next;
} aafiMarker;
// typedef enum aafiCurrentTreeType_e
// {
// AAFI_TREE_TYPE_AUDIO = 0,
// AAFI_TREE_TYPE_VIDEO = 1
//
// } aafiCurrentTreeType_e;
typedef struct aafiContext {
/* Set in parse_MobSlot(), specifies if we're inside an audio or video context */
// aafiCurrentTreeType_e current_tree_type;
/*
* Current MobSlot Segment's DataDefinition
* Mob::Slots > MobSlot::Segment > Component::DataDefinition
*/
// aafUID_t *DataDef;
/* Clip */
aafiAudioTrack* current_track;
/* Must be casted to aafiAudioTrack or aafiVideoTrack, according to aafiContext::current_tree_type */
// void * current_track;
// int current_track_number; // used only when missing MobSlot::PhysicalTrackNumber
// aafPosition_t current_pos;
aafiAudioClip* current_clip;
aafiVideoClip* current_video_clip;
int current_clip_is_muted;
int current_clip_is_combined; // Inside OperationGroup::AAFOperationDef_AudioChannelCombiner
int current_combined_clip_total_channel;
int current_combined_clip_channel_num; // current SourceClip represents channel num
/* Transition */
aafiTransition* current_transition;
/* Gain */
aafiAudioGain* current_clip_gain;
aafiAudioGain* current_clip_automation;
int clips_using_gain; // if none then free( current_clip_gain );
int clips_using_automation;
/* Essence */
// aafiAudioEssence *current_audioEssence;
// void *current_essence;
aafiAudioEssence* current_essence;
aafiVideoEssence* current_video_essence;
aafRational_t* current_markers_edit_rate;
int is_inside_derivation_chain;
struct options {
verbosityLevel_e verb;
int trace;
int trace_meta;
wchar_t* trace_class;
char* media_location;
char forbid_nonlatin_filenames;
/* vendor specific */
uint32_t resolve;
uint32_t protools;
} options;
} aafiContext;
typedef struct AAF_Iface {
aafiContext ctx;
/**
* Keeps track of the AAF_Data structure.
*/
AAF_Data* aafd;
aafiAudio* Audio;
aafiVideo* Video;
aafiTimecode* Timecode;
aafiMarker* Markers;
wchar_t* compositionName;
aafPosition_t compositionStart; // set from aafi->Timecode->start
aafRational_t compositionStart_editRate;
aafPosition_t compositionLength;
aafRational_t compositionLength_editRate;
aafiUserComment* Comments;
struct dbg* dbg;
} AAF_Iface;
#define foreach_audioTrack(audioTrack, aafi) \
for (audioTrack = aafi->Audio->Tracks; \
audioTrack != NULL; \
audioTrack = audioTrack->next)
#define foreach_videoTrack(videoTrack, aafi) \
for (videoTrack = aafi->Video->Tracks; \
videoTrack != NULL; \
videoTrack = videoTrack->next)
#define foreach_Item(item, track) \
for (item = track->Items; \
item != NULL; \
item = item->next)
#define foreachEssence(essence, essenceList) \
for (essence = essenceList; essence != NULL; essence = essence->next)
#define foreachMarker(marker, aafi) \
for (marker = aafi->Markers; marker != NULL; marker = marker->next)
#define aeDuration_h(audioEssence) \
((audioEssence->samplerate == 0) ? 0 : ((uint16_t) (audioEssence->length / audioEssence->samplerate / (audioEssence->samplesize / 8)) / 3600))
#define aeDuration_m(audioEssence) \
((audioEssence->samplerate == 0) ? 0 : ((uint16_t) (audioEssence->length / audioEssence->samplerate / (audioEssence->samplesize / 8)) % 3600 / 60))
#define aeDuration_s(audioEssence) \
((audioEssence->samplerate == 0) ? 0 : ((uint16_t) (audioEssence->length / audioEssence->samplerate / (audioEssence->samplesize / 8)) % 3600 % 60))
#define aeDuration_ms(audioEssence) \
((audioEssence->samplerate == 0) ? 0 : ((uint16_t) (audioEssence->length / (audioEssence->samplerate / 1000) / (audioEssence->samplesize / 8)) % 3600000 % 60000 % 1000))
#define convertEditUnit(val, fromRate, toRate) \
(int64_t) ((val) * (aafRationalToFloat ((toRate)) * (1 / aafRationalToFloat ((fromRate)))))
#define eu2sample(samplerate, edit_rate, val) \
(int64_t) (val * (samplerate * (1 / aafRationalToFloat ((*edit_rate)))))
void
aafi_enable_windows_VT100_output (void);
void
aafi_set_debug (AAF_Iface* aafi, verbosityLevel_e v, FILE* fp, void (*callback) (struct dbg* dbg, void* ctxdata, int lib, int type, const char* srcfile, const char* srcfunc, int lineno, const char* msg, void* user), void* user);
AAF_Iface*
aafi_alloc (AAF_Data* aafd);
int
aafi_set_media_location (AAF_Iface* aafi, const char* path);
int
aafi_set_trace_class (AAF_Iface* aafi, const char* className);
void
aafi_release (AAF_Iface** aafi);
int
aafi_load_file (AAF_Iface* aafi, const char* file);
aafiTransition*
aafi_get_fadein (aafiTimelineItem* audioItem);
aafiTransition*
aafi_get_fadeout (aafiTimelineItem* audioItem);
aafiTransition*
aafi_get_xfade (aafiTimelineItem* audioItem);
aafiMarker*
aafi_newMarker (AAF_Iface* aafi, aafRational_t* editRate, aafPosition_t start, aafPosition_t length, wchar_t* name, wchar_t* comment, uint16_t* RVBColor[3]);
void
aafi_freeMarkers (aafiMarker** aafi);
aafiAudioTrack*
aafi_newAudioTrack (AAF_Iface* aafi);
void
aafi_freeAudioTracks (aafiAudioTrack** tracks);
aafiVideoTrack*
aafi_newVideoTrack (AAF_Iface* aafi);
void
aafi_freeVideoTracks (aafiVideoTrack** tracks);
aafiTimelineItem*
aafi_newTimelineItem (AAF_Iface* aafi, void* track, int itemType);
int
aafi_removeTimelineItem (AAF_Iface* aafi, aafiTimelineItem* item);
void
aafi_freeAudioGain (aafiAudioGain* gain);
void
aafi_freeAudioPan (aafiAudioPan* pan);
void
aafi_freeAudioClip (aafiAudioClip* audioClip);
void
aafi_freeTimelineItem (aafiTimelineItem** item);
void
aafi_freeTimelineItems (aafiTimelineItem** items);
aafiUserComment*
aafi_newUserComment (AAF_Iface* aafi, aafiUserComment** CommentList);
void
aafi_freeUserComments (aafiUserComment** CommentList);
void
aafi_freeTransition (aafiTransition* trans);
aafiAudioEssence*
aafi_newAudioEssence (AAF_Iface* aafi);
void
aafi_freeAudioEssences (aafiAudioEssence** essences);
aafiVideoEssence*
aafi_newVideoEssence (AAF_Iface* aafi);
void
aafi_freeVideoEssences (aafiVideoEssence** videoEssence);
/**
* @}
*/
#endif // !__AAFIface_h__

145
libs/aaf/aaf/AAFToText.h Normal file
View File

@ -0,0 +1,145 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __AAFToText_h__
#define __AAFToText_h__
#include <stdio.h>
#include <wchar.h>
#include "aaf/AAFCore.h"
#include "aaf/AAFTypes.h"
#include "aaf/LibCFB.h"
#define AUIDToText(auid) \
cfb_CLSIDToText ((const cfbCLSID_t*)auid)
const wchar_t*
aaft_MobIDToText (aafMobID_t* mobid);
const wchar_t*
aaft_TimestampToText (aafTimeStamp_t* ts);
const wchar_t*
aaft_VersionToText (aafVersionType_t* vers);
const wchar_t*
aaft_ProductVersionToText (aafProductVersion_t* vers);
const wchar_t*
aaft_FileKindToText (const aafUID_t* auid);
const wchar_t*
aaft_TapeCaseTypeToText (aafTapeCaseType_t t);
const wchar_t*
aaft_VideoSignalTypeToText (aafVideoSignalType_t v);
const wchar_t*
aaft_TapeFormatTypeToText (aafTapeFormatType_t t);
const wchar_t*
aaft_FilmTypeToText (aafFilmType_t f);
const wchar_t*
aaft_SignalStandardToText (aafSignalStandard_t s);
const wchar_t*
aaft_FieldNumberToText (aafFieldNumber_t f);
const wchar_t*
aaft_AlphaTransparencyToText (aafAlphaTransparency_t a);
const wchar_t*
aaft_FrameLayoutToText (aafFrameLayout_t f);
const wchar_t*
aaft_ColorSitingToText (aafColorSiting_t c);
const wchar_t*
aaft_ProductReleaseTypeToText (aafProductReleaseType_t t);
const wchar_t*
aaft_FadeTypeToText (aafFadeType_t f);
const wchar_t*
aaft_BoolToText (aafBoolean_t b);
const wchar_t*
aaft_OperationCategoryToText (const aafUID_t* auid);
const wchar_t*
aaft_PluginCategoryToText (const aafUID_t* auid);
const wchar_t*
aaft_ScanningDirectionToText (aafScanningDirection_t s);
const wchar_t*
aaft_ByteOrderToText (int16_t e);
const wchar_t*
aaft_ElectroSpatialToText (aafElectroSpatialFormulation_t e);
const wchar_t*
aaft_TypeIDToText (const aafUID_t* auid);
const wchar_t*
aaft_StoredFormToText (enum aafStoredForm_e sf);
const wchar_t*
aaft_OPDefToText (const aafUID_t* auid);
const wchar_t*
aaft_DataDefToText (AAF_Data* aafd, const aafUID_t* auid);
const wchar_t*
aaft_OperationDefToText (AAF_Data* aafd, const aafUID_t* auid);
const wchar_t*
aaft_InterpolationToText (const aafUID_t* auid);
const wchar_t*
aaft_ParameterToText (AAF_Data* aafd, const aafUID_t* auid);
const wchar_t*
aaft_TransferCharacteristicToText (const aafUID_t* auid);
const wchar_t*
aaft_CodingEquationsToText (const aafUID_t* auid);
const wchar_t*
aaft_ColorPrimariesToText (const aafUID_t* auid);
const wchar_t*
aaft_UsageCodeToText (const aafUID_t* auid);
const wchar_t*
aaft_PIDToText (AAF_Data* aafd, aafPID_t pid);
const wchar_t*
aaft_ClassIDToText (AAF_Data* aafd, const aafUID_t* auid);
const wchar_t*
aaft_ContainerToText (const aafUID_t* auid);
const wchar_t*
aaft_CompressionToText (const aafUID_t* auid);
#endif // !__AAFToText_h__

692
libs/aaf/aaf/AAFTypes.h Normal file
View File

@ -0,0 +1,692 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __AAFTypes_h__
#define __AAFTypes_h__
#include <stdint.h>
#ifdef __GNUC__
#define PACK(__Declaration__) __Declaration__ __attribute__ ((__packed__))
#endif
#ifdef _MSC_VER
#define PACK(__Declaration__) __pragma (pack (push, 1)) __Declaration__ __pragma (pack (pop))
#endif
#define AAF_HEADER_BYTEORDER_LE 0x4949 // II
#define AAF_HEADER_BYTEORDER_BE 0x4D4D // MM
#define AAF_PROPERTIES_BYTEORDER_LE 0x4c // L
#define AAF_PROPERTIES_BYTEORDER_BE 0x42 // B
#define AAF_PROPERTIES_BYTEORDER_UNSPECIFIED 0x55 // U
typedef enum aafStoredForm_e {
SF_DATA = 0x0082,
SF_DATA_STREAM = 0x0042,
SF_STRONG_OBJECT_REFERENCE = 0x0022,
SF_STRONG_OBJECT_REFERENCE_VECTOR = 0x0032,
SF_STRONG_OBJECT_REFERENCE_SET = 0x003A,
SF_WEAK_OBJECT_REFERENCE = 0x0002,
SF_WEAK_OBJECT_REFERENCE_VECTOR = 0x0012,
SF_WEAK_OBJECT_REFERENCE_SET = 0x001A,
SF_WEAK_OBJECT_REFERENCE_STORED_OBJECT_ID = 0x0003,
SF_UNIQUE_OBJECT_ID = 0x0086,
SF_OPAQUE_STREAM = 0x0040
} aafStoredForm_e;
/*
typedef int32_t AAFTypeCategory_t;
typedef enum _eAAFTypeCategory_e
{
AAFTypeCatUnknown = 0, // can only occur in damaged files
AAFTypeCatInt = 1, // any integral type
AAFTypeCatCharacter = 2, // any character type
AAFTypeCatStrongObjRef = 3, // strong object reference
AAFTypeCatWeakObjRef = 4, // weak object reference
AAFTypeCatRename = 5, // renamed type
AAFTypeCatEnum = 6, // enumerated type
AAFTypeCatFixedArray = 7, // fixed-size array
AAFTypeCatVariableArray = 8, // variably-sized array
AAFTypeCatSet = 9, // set of strong object references or
// set of weak object references
AAFTypeCatRecord = 10, // a structured type
AAFTypeCatStream = 11, // potentially huge amount of data
AAFTypeCatString = 12, // null-terminated variably-sized
// array of characters
AAFTypeCatExtEnum = 13, // extendible enumerated type
AAFTypeCatIndirect = 14, // type must be determined at runtime
AAFTypeCatOpaque = 15, // type can be determined at runtime
AAFTypeCatEncrypted = 16 // type can be determined at runtime
// but bits are encrypted
} AAFTypeCategory_e;
*/
/*
* :: Types Definition
* see Git nevali/aaf/ref-impl/include/ref-api/AAFTypes.h
*/
typedef unsigned char aafByte_t;
typedef char* aafString_t;
typedef uint16_t aafPID_t;
typedef int64_t aafLength_t;
typedef uint8_t aafBoolean_t;
typedef int64_t aafPosition_t;
typedef uint32_t aafSlotID_t;
typedef struct _aafStream_t {
uint64_t size;
aafByte_t* data;
} aafStream_t;
typedef int32_t aafJPEGTableID_t; /* for TIFF objects */
typedef struct _aafRational_t {
int32_t numerator;
int32_t denominator;
} aafRational_t;
typedef struct _aafDateStruct_t {
int16_t year; /* range -32,767 to +32767 */
uint8_t month; /* range: 1-12, inclusive */
uint8_t day; /* range: 1-31, inclusive */
} aafDateStruct_t;
typedef struct _aafTimeStruct_t {
uint8_t hour; /* range 0-23 inclusive */
uint8_t minute; /* range 0-59 inclusive */
uint8_t second; /* range 0-59 inclusive */
uint8_t fraction; /* range 0..99 inclusive; accuracy: .01 sec */
} aafTimeStruct_t;
typedef struct _aafTimeStamp_t {
aafDateStruct_t date;
aafTimeStruct_t time;
} aafTimeStamp_t;
// TODO is int32_t in the original AAFTypes.h, but does not match when parsing..
typedef int8_t aafProductReleaseType_t;
typedef enum _aafProductReleaseType_e {
AAFVersionUnknown = 0,
AAFVersionReleased = 1,
AAFVersionDebug = 2,
AAFVersionPatched = 3,
AAFVersionBeta = 4,
AAFVersionPrivateBuild = 5
} aafProductReleaseType_e;
/* Version Format for ObjHeader->Version */
typedef PACK (struct _aafVersionType_t {
int8_t major;
int8_t minor;
}) aafVersionType_t;
/* Version Format for ObjIdentification->ProductVersion */
typedef PACK (struct _aafProductVersion_t {
uint16_t major;
uint16_t minor;
uint16_t tertiary;
uint16_t patchLevel;
int8_t type;
}) aafProductVersion_t;
/* aafFadeType_t: describes values for SCLP fadein and fadeout types */
typedef int32_t aafFadeType_t;
typedef enum _aafFadeType_e {
AAFFadeNone = 0,
AAFFadeLinearAmp = 1,
AAFFadeLinearPower = 2
} aafFadeType_e;
/* binary compatibility with GUID/CLSID and IID structures. */
typedef struct _aafUID_t {
uint32_t Data1;
uint16_t Data2;
uint16_t Data3;
uint8_t Data4[8];
} aafUID_t;
#define AAFUID_PRINTED_LEN 35 // excluding NULL terminating char
static const aafUID_t AUID_NULL = { 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } };
typedef struct _aafMobID_t {
uint8_t SMPTELabel[12]; // 12-bytes of label prefix
uint8_t length;
uint8_t instanceHigh;
uint8_t instanceMid;
uint8_t instanceLow;
aafUID_t material; // 16 bytes
} aafMobID_t; // 32 bytes total
typedef struct _aafIndirect_t {
/*
* byteOrder disabled for memory alignement and to avoid -Waddress-of-packed-member
* It is always little-endian (0x4c), or unspecified (0x55) but LE, anyway.
*/
// uint8_t byteOrder; // 0x4c, 0x42, 0x55
aafUID_t TypeDef;
aafByte_t Value[];
} /*__attribute__((packed))*/ aafIndirect_t;
typedef int32_t aafElectroSpatialFormulation_t;
typedef enum _aafElectroSpatialFormulation_e {
AAFElectroSpatialFormulation_Default = 0,
AAFElectroSpatialFormulation_TwoChannelMode = 1,
AAFElectroSpatialFormulation_SingleChannelMode = 2,
AAFElectroSpatialFormulation_PrimarySecondaryMode = 3,
AAFElectroSpatialFormulation_StereophonicMode = 4,
AAFElectroSpatialFormulation_SingleChannelDoubleSamplingFrequencyMode = 7,
AAFElectroSpatialFormulation_StereoLeftChannelDoubleSamplingFrequencyMode = 8,
AAFElectroSpatialFormulation_StereoRightChannelDoubleSamplingFrequencyMode = 9,
AAFElectroSpatialFormulation_MultiChannelMode = 15
} aafElectroSpatialFormulation_e;
typedef int32_t aafFrameLayout_t;
typedef enum _aafFrameLayout_e {
AAFFullFrame = 0,
AAFSeparateFields = 1,
AAFOneField = 2,
AAFMixedFields = 3,
AAFSegmentedFrame = 4
} aafFrameLayout_e;
typedef int32_t aafAlphaTransparency_t;
typedef enum _aafAlphaTransparency_e {
AAFMinValueTransparent = 0,
AAFMaxValueTransparent = 1
} aafAlphaTransparency_e;
typedef int32_t aafFieldNumber_t;
typedef enum _aafFieldNumber_e {
AAFUnspecifiedField = 0,
AAFFieldOne = 1,
AAFFieldTwo = 2
} aafFieldNumber_e;
typedef int32_t aafSignalStandard_t;
typedef enum _aafSignalStandard_e {
AAFSignalStandard_None = 0,
AAFSignalStandard_ITU601 = 1,
AAFSignalStandard_ITU1358 = 2,
AAFSignalStandard_SMPTE347M = 3,
AAFSignalStandard_SMPTE274M = 4,
AAFSignalStandard_SMPTE296M = 5,
AAFSignalStandard_SMPTE349M = 6
} aafSignalStandard_e;
typedef int32_t aafContentScanningType_t;
typedef enum _aafContentScanningType_e {
kAAFContentScanning_NotKnown = 0,
kAAFContentScanning_Progressive = 1,
kAAFContentScanning_Interlace = 2,
kAAFContentScanning_Mixed = 3
} aafContentScanningType_e;
typedef int32_t aafColorSiting_t;
typedef enum _aafColorSiting_e {
AAFCoSiting = 0,
AAFAveraging = 1,
AAFThreeTap = 2,
AAFQuincunx = 3,
AAFRec601 = 4,
AAFUnknownSiting = 255
} aafColorSiting_e;
typedef int32_t aafScanningDirection_t;
typedef enum _aafScanningDirection_e {
AAFScanningDirection_LeftToRightTopToBottom = 0,
AAFScanningDirection_RightToLeftTopToBottom = 1,
AAFScanningDirection_LeftToRightBottomToTop = 2,
AAFScanningDirection_RightToLeftBottomToTop = 3,
AAFScanningDirection_TopToBottomLeftToRight = 4,
AAFScanningDirection_TopToBottomRightToLeft = 5,
AAFScanningDirection_BottomToTopLeftToRight = 6,
AAFScanningDirection_BottomToTopRightToLeft = 7
} aafScanningDirection_e;
typedef int32_t aafFilmType_t;
typedef enum _aafFilmType_e {
AAFFtNull = 0,
AAFFt35MM = 1,
AAFFt16MM = 2,
AAFFt8MM = 3,
AAFFt65MM = 4
} aafFilmType_e;
typedef int32_t aafTapeCaseType_t;
typedef enum _aafTapeCaseType_e {
AAFTapeCaseNull = 0,
AAFThreeFourthInchVideoTape = 1,
AAFVHSVideoTape = 2,
AAF8mmVideoTape = 3,
AAFBetacamVideoTape = 4,
AAFCompactCassette = 5,
AAFDATCartridge = 6,
AAFNagraAudioTape = 7
} aafTapeCaseType_e;
typedef int32_t aafVideoSignalType_t;
typedef enum _aafVideoSignalType_e {
AAFVideoSignalNull = 0,
AAFNTSCSignal = 1,
AAFPALSignal = 2,
AAFSECAMSignal = 3
} aafVideoSignalType_e;
typedef int32_t aafTapeFormatType_t;
typedef enum _aafTapeFormatType_e {
AAFTapeFormatNull = 0,
AAFBetacamFormat = 1,
AAFBetacamSPFormat = 2,
AAFVHSFormat = 3,
AAFSVHSFormat = 4,
AAF8mmFormat = 5,
AAFHi8Format = 6
} aafTapeFormatType_e;
typedef int32_t aafRGBAComponentKind_t;
typedef enum _aafRGBAComponentKind_e {
AAFCompNone = 0x30,
AAFCompAlpha = 0x41,
AAFCompBlue = 0x42,
AAFCompFill = 0x46,
AAFCompGreen = 0x47,
AAFCompPalette = 0x50,
AAFCompRed = 0x52,
AAFCompNull = 0x00
} aafRGBAComponentKind_e;
typedef struct _aafRGBAComponent_t {
aafRGBAComponentKind_t Code;
uint8_t Size;
} aafRGBAComponent_t;
//typedef aafRGBAComponent_t aafRGBALayout[8];
static const aafUID_t AAFUID_NULL = { 0x00000000, 0x0000, 0x0000, { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } };
/**
* This structure map the first bytes in a **properties** stream
* node.
*
* This Header is followed by #_entryCount aafPropertyIndexEntry_t
* structures, which are then followed by aafPropertyIndexHeader_t._entryCount variable
* sized property values.
*/
typedef struct aafPropertyIndexHeader_t {
/**
* The byte order of :
* - the remaining fields of the aafPropertyIndexHeader_t struct
* - the aafPropertyIndexEntry_t structs that follow
* - the actual property data
*
* Currently unused when parsing.
*/
uint8_t _byteOrder;
/**
* The version number of the stored format. This allows
* for otherwise incompatible changes to the stored format.
*
* Currently unused when parsing.
*/
uint8_t _formatVersion;
/**
* The number of aafPropertyIndexEntry_t structs that follow.
*/
uint16_t _entryCount;
} /* __attribute__((packed)) */ aafPropertyIndexHeader_t;
/**
* This structure represents one property entry inside a
* **properties** stream node. The actual property value
* is located bellow all the property entries.
*
* The offset to the property values is calculated by :
*
* @code
*
* int offset = sizeof(aafPropertyIndexHeader_t) + (aafPropertyIndexHeader_t._entryCount * sizeof(aafPropertyIndexEntry_t))
*
* @endcode
* The offset inside the property values is calculated by :
*
*
* ```
* for( PropEntry[i]; PropEntry[i] < i; i++ )
* offset += PropEntry. _length;
* ```
*/
typedef struct aafPropertyIndexEntry_t {
/**
* The ID that describes the property.
*
* All the standard IDs can be found in AAFDefs/AAFPropertyIDs.h.
*/
aafPID_t _pid;
/**
* Identifies the type of representation chosen for this
* property. Note that the stored form described here is not
* the data type of the property value, rather it is the type
* of external representation employed. The data type of a
* given property value is implied by the property ID.
*
* Can take one of the value from #aafStoredForm_e enum.
*
* Even though only 1 byte is needed, _storedForm is 2 bytes
* in size in order to keep each property index entry an even
* number of bytes in size.
*/
uint16_t _storedForm;
/**
* The length, in bytes, of the property value in the property
* value stream.
*/
uint16_t _length;
} /* __attribute__((packed)) */ aafPropertyIndexEntry_t;
/**
* An unordered collection of strongly referenced (contained)
* uniquely identified objects, each of which can be :
* - efficiently located by key - O(lg N)
* - the target of a weak reference
*
* Each set index consists of an aafStrongRefSetHeader_t
* followed by #_entryCount aafStrongRefSetEntry_t structs.
*/
typedef PACK (struct aafStrongRefSetHeader_t {
/**
* The number of aafStrongRefSetEntry_t structs that follow.
*/
uint32_t _entryCount;
/**
* The next local key that will be assigned in this set.
*/
uint32_t _firstFreeKey;
/**
* The highest unassigned key above #_firstFreeKey. The keys
* between #_firstFreeKey and #_lastFreeKey are unassigned,
* while there may be other gaps in key assignement this
* represents the largest one.
*/
uint32_t _lastFreeKey;
/**
* The property id of each aafStrongRefSetEntry_t._identification field
* @TODO Understand that field..
*/
aafPID_t _identificationPid;
/**
* The length, in bytes, of each aafStrongRefSetEntry_t._identification
* field.
*/
uint8_t _identificationSize;
}) aafStrongRefSetHeader_t;
typedef struct aafStrongRefSetEntry_t {
/**
* The #_localKey uniquely identifies this strong reference
* within this collection independently of its position
* within this collection. The #_localKey is used to form
* the name assigned to the element in this set at the
* corresponding ordinal position. That is, the #_localKey
* of the first aafStrongRefSetEntry_t is used to
* form the name of the first element in the set and so
* on. The #_localKey is an insertion key.
*/
uint32_t _localKey;
/**
* The count of weak references to this object.
*/
uint32_t _referenceCount;
/**
* The type of the #_identification field varies from one instance
* of a StrongReferenceSet to another. The value of the #_identification
* field uniquely identifies this object within the set. It is the
* search key.
*/
aafByte_t _identification[];
} /* __attribute__((packed)) */ aafStrongRefSetEntry_t;
/**
* An ordered collection of strongly referenced (contained) objects.
* Each vector index consists of an aafStrongRefVectorHeader_t
* followed by #_entryCount aafStrongRefVectorEntry_t structs.
*/
typedef struct aafStrongRefVectorHeader_t {
/**
* The number of aafStrongRefVectorEntry_t structs that follow.
*/
uint32_t _entryCount;
/**
* The next local key that will be assigned in this vector.
*/
uint32_t _firstFreeKey;
/**
* The highest unassigned key above #_firstFreeKey. The keys
* between #_firstFreeKey and #_lastFreeKey are unassigned,
* while there may be other gaps in key assignement this
* represents the largest one.
*/
uint32_t _lastFreeKey;
} /* __attribute__((packed)) */ aafStrongRefVectorHeader_t;
/**
* An ordered collection of strongly referenced (contained) objects.
* Each vector index consists of an aafStrongRefVectorHeader_t
* followed by aafStrongRefVectorHeader_t._entryCount aafStrongRefVectorEntry_t structs.
*/
typedef struct aafStrongRefVectorEntry_t {
/**
* The _localKey uniquely identifies this strong reference
* within this collection independently of its position
* within this collection. The #_localKey is used to form
* the name assigned to the element in this vector at the
* corresponding ordinal position. That is, the #_localKey
* of the first aafStrongRefVectorEntry_t is used to
* form the name of the first element in the vector and so
* on. The #_localKey is an insertion key.
*/
uint32_t _localKey;
} /* __attribute__((packed)) */ aafStrongRefVectorEntry_t;
/**
* A weak object reference is a persistent data type that denotes
* a weak reference to a uniquely identified object. In memory,
* weak references are similar to pointers. When persisted, weak
* references contain the unique identifier of the referenced object.
*
* An aafWeakRef_t can appears as a property value with the
* stored form #SF_WEAK_OBJECT_REFERENCE, as an entry into
* a weak reference vector index or set index.
*/
typedef struct _WeakObjectReference {
/**
* The index into the referenced property table of
* the path to the property (a strong reference set)
* containing the referenced object.
*/
uint16_t _referencedPropertyIndex;
/**
* The property id of the #_identification field
* @TODO Understand that field..
*/
aafPID_t _identificationPid;
/**
* The length, in bytes, of the #_identification field.
*/
uint8_t _identificationSize;
/**
* The type of the #_identification field varies from one instance
* of a WeakObjectReference to another. The #_identification field
* uniquely identifies the object within the target set.
*/
aafByte_t _identification[];
} /* __attribute__((packed)) */ aafWeakRef_t;
/**
* An ordered collection of aafWeakRef_t. The aafWeakRefHeader_t
* is common to weak reference Set and Vector.
*
*/
typedef struct _WeakReferenceIndexHeader {
/**
* The number of aafWeakRef_t structs that follow.
*/
uint32_t _entryCount;
/**
* The index into the referenced property table of
* the path to the property (a strong reference set)
* containing the referenced object.
* @TODO Understand that field..
*/
uint16_t _referencedPropertyIndex;
/**
* The property id of each aafStrongRefSetEntry_t._identification field.
* @TODO Understand that field..
*/
uint16_t _identificationPid;
/**
* The length, in bytes, of each aafWeakRef_t._identification
* field.
*/
uint8_t _identificationSize;
} /* __attribute__((packed)) */ aafWeakRefHeader_t;
/* TODO : indirect vs opaque types ? */
/*
typedef struct _aafIndirect_t
{
int type;
size_t size;
aafByte_t *data;
} aafIndirect_t;
typedef struct _AAF_TaggedValueClass
{
aafString_t Name;
aafIndirect_t Value;
} AAF_ObjTaggedValue;
*/
#endif

56
libs/aaf/aaf/CFBDump.h Normal file
View File

@ -0,0 +1,56 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __CFBDump_h__
#define __CFBDump_h__
#include <stdio.h>
#include <wchar.h>
#include "aaf/LibCFB.h"
void
cfb_dump_node (CFB_Data* cfbd, cfbNode* node, int print_stream);
void
cfb_dump_nodePath (CFB_Data* cfbd, const wchar_t* path, int print_stream);
void
cfb_dump_nodeStream (CFB_Data* cfbd, cfbNode* node);
void
cfb_dump_nodePathStream (CFB_Data* cfbd, const wchar_t* path);
void
cfb_dump_nodePaths (CFB_Data* cfbd, uint32_t prevPath, char* strArray[], uint32_t* str_i, cfbNode* node);
void
cfb_dump_header (CFB_Data* cfbd);
void
cfb_dump_FAT (CFB_Data* cfbd);
void
cfb_dump_MiniFAT (CFB_Data* cfbd);
void
cfb_dump_DiFAT (CFB_Data* cfbd);
#endif // !__CFBDump_h__

817
libs/aaf/aaf/LibCFB.h Normal file
View File

@ -0,0 +1,817 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __LibCFB_h__
#define __LibCFB_h__
#include <stdint.h>
#include <wchar.h>
#include "aaf/debug.h"
#if defined(__linux__)
#include <linux/limits.h>
#elif defined(__APPLE__)
#include <sys/syslimits.h>
#elif defined(_MSC_VER) // MSVC
#include <windows.h> // MAX_PATH
#include <limits.h>
#define PATH_MAX MAX_PATH // TODO: can we get rid of it ?
#elif defined(_WIN32)
#include <windows.h> // MAX_PATH
#include <limits.h>
#endif
/**
* @file LibCFB/LibCFB.h
* @brief Compound File Binary Library
* @author Adrien Gesta-Fline
* @version 0.1
* @date 04 october 2017
*
* @ingroup LibCFB
* @addtogroup LibCFB
* @{
*/
#define CFB_W16TOWCHAR_STRLEN SIZE_MAX
/**
* Class Identifier structure.
*
* Used by cfbHeader._clsid and cfbNode._clsId.
*
* 16-byte long, binary compatible with GUID and AAF's AUID.
*/
struct cfbCLSID_t {
uint32_t Data1;
uint16_t Data2;
uint16_t Data3;
uint8_t Data4[8];
}; // __attribute__((packed));
typedef struct cfbCLSID_t cfbCLSID_t;
/**
* 64-bit value representing number of 100 nanoseconds since January 1, 1601.
*
* Used in cfbNode.
*/
struct cfbFiletime_t {
uint32_t dwLowDateTime;
uint32_t dwHighDateTime;
}; // __attribute__((packed));
typedef struct cfbFiletime_t cfbFiletime_t;
/**
* A sector ID, that is an index into the FAT or the MiniFAT.
*/
typedef uint32_t cfbSectorID_t;
/**
* A stream identifier, that is an index into the array of nodes (directory entries).
*/
typedef uint32_t cfbSID_t;
/**
* This enum defines sector IDs and storage IDs (SID) with special meanings.
* NOTE: enum was turned to MACRO, because of -Wpedantic (and even though they are valid 32bits...)
*/
#define CFB_MAX_REG_SECT 0xfffffffa
/**
* Denotes a DiFAT sector ID in the FAT or MiniFAT.
*/
#define CFB_DIFAT_SECT 0xfffffffc
/**
* Denotes a FAT sector ID in the FAT or MiniFAT.
*/
#define CFB_FAT_SECT 0xfffffffd
/**
* End of a virtual stream chain.
*/
#define CFB_END_OF_CHAIN 0xfffffffe
/**
* Unallocated FAT or MiniFAT sector.
*/
#define CFB_FREE_SECT 0xffffffff
/**
* Maximum directory entry ID.
*/
#define CFB_MAX_REG_SID 0xfffffffa
/**
* Unallocated directory entry.
*/
#define CFB_NO_STREAM 0xffffffff
// typedef enum cfbSpecialSectorID_e
// {
// /**
// * Maximum sector ID.
// */
//
// CFB_MAX_REG_SECT = 0xfffffffa,
//
//
// /**
// * Denotes a DiFAT sector ID in the FAT or MiniFAT.
// */
//
// CFB_DIFAT_SECT = 0xfffffffc,
//
//
// /**
// * Denotes a FAT sector ID in the FAT or MiniFAT.
// */
//
// CFB_FAT_SECT = 0xfffffffd,
//
//
// /**
// * End of a virtual stream chain.
// */
//
// CFB_END_OF_CHAIN = 0xfffffffe,
//
//
// /**
// * Unallocated FAT or MiniFAT sector.
// */
//
// CFB_FREE_SECT = 0xffffffff,
//
//
// /**
// * Maximum directory entry ID.
// */
//
// CFB_MAX_REG_SID = 0xfffffffa,
//
//
// /**
// * Unallocated directory entry.
// */
//
// CFB_NO_STREAM = 0xffffffff
//
// } cfbSpecialSectorID_e;
/**
* Storage Type. These are the values used by cfbNode._mse
* to specify the type of the node.
*
* NOTE: microsoft already define enum tagSTGTY, but it lacks of STGTY_INVALID and STGTY_ROOT.
*/
typedef enum customTagSTGTY {
/**
* Unknown storage type.
*/
STGTY_INVALID = 0,
#ifndef _WIN32
/**
* The node is a storage object, that is a "directory" node.
*
* For AAF, this node represents an aafObject.
*/
STGTY_STORAGE = 1,
/**
* The node is a stream object, that is a "file" node.
*
* For AAF, this node can be a "Properties" node, a StrongRefSet,
* a StrongRefVector or a data stream containing some essence.
*/
STGTY_STREAM = 2,
/**
* The node is an ILockBytes object.
*
* TODO What is an ILockBytes object ?
*/
STGTY_LOCKBYTES = 3,
/**
* The node is an IPropertyStorage object.
*
* TODO What is an IPropertyStorage object ?
*/
STGTY_PROPERTY = 4,
#endif
/**
* The node is the Root node (SID 0).
*/
STGTY_ROOT = 5
} cfbStorageType_e;
/**
* This enum defines the colors for the red/black Tree.
*
* Used by cfbNode._bflags.
*/
typedef enum tagDECOLOR {
CFB_RED = 0,
CFB_BLACK = 1
} cfbColor_e;
/**
* This enum defines the values for cfbHeader._uByteOrder.
*/
typedef enum cfbByteOrder_e {
CFB_BYTE_ORDER_LE = 0xfffe,
CFB_BYTE_ORDER_BE = 0xfeff
} cfbByteOrder_e;
/**
* The length of the cfbNode._ab uint16_t array holding the node's UTF-16 name, including
* the NULL terminating Unicode.
*/
#define CFB_NODE_NAME_SZ 32
/**
* This is an arbitrary length chosen for defining a char array to store a path in the
* directory Tree.
*/
#define CFB_PATH_NAME_SZ CFB_NODE_NAME_SZ * 64
/**
* This is the header of the Compound File. It corresponds to the first 512 bytes of the
* file starting at offset zero. If the sector size is greater than 512 bytes, then the
* header is padded to the sector size with zeroes.
*/
typedef struct StructuredStorageHeader {
/**
* File Signature. Shall be {0xd0, 0xcf, 0x11, 0xe0, 0xa1, 0xb1, 0x1a, 0xe1}.
*
* The file signature should be `uint8_t _abSig[8]`, but we define
* it as uint64_t for quick comparison.
*/
uint64_t _abSig;
/**
* CFB spec says this should be set to zero, however AAF gets the file kind from
* this CLSID. Thus, this CLSID should match one of the AAFFileKind_* from
* AAFDefs/AAFFileKinds.h
*/
cfbCLSID_t _clsid;
/**
* Minor version of the format. 33 is written by reference implementation.
*
* This field is unused by this library.
*/
uint16_t _uMinorVersion;
/**
* Major version of the dll/format. 3 for 512-byte sectors, 4 for 4kB sectors.
*
* This field is unused by this library.
*/
uint16_t _uDllVersion;
/**
* File's byte ordering. Should be either CFB_BYTE_ORDER_LE (0xfffe) or
* CFB_BYTE_ORDER_BE (0xfeff).
*
* The spec says this field should always be little-endian byte ordering for
* maximum file portability. This implementation does not support big-endian
* byte ordering.
*/
uint16_t _uByteOrder;
/**
* Size of sectors in power-of-two. Typical values are 9 (512-byte sectors)
* and 12 (4096-byte sectors).
*/
uint16_t _uSectorShift;
/**
* Size of mini-sectors in power-of-two. Typical value is 6 (64-byte mini-sectors)
*/
uint16_t _uMiniSectorShift;
/**
* Reserved, must be zero.
*/
uint16_t _usReserved;
/**
* Reserved, must be zero.
*/
uint32_t _ulReserved1;
/**
* Number of sector IDs in directory chain for 4 KB sectors. Must be zero for
* 512-byte sectors.
*/
cfbSectorID_t _csectDir;
/**
* Number of sector IDs in the FAT chain.
*/
cfbSectorID_t _csectFat;
/**
* First sector ID in the directory chain.
*/
cfbSectorID_t _sectDirStart;
/**
* Signature used for transactions, must be zero. The reference implementation
* does not support transactions.
*
* This field is unused by this library.
*
* TODO What is a transaction ???
*/
uint32_t _signature;
/**
* Maximum size for a mini-stream, typically 4096 bytes. If a streamNode
* size is below this treshold, then it is stored in the mini-stream and
* will be retrieved from the MiniFAT. Otherwise the stream is a regular
* stream, that will be retrieved from the FAT.
*/
uint32_t _ulMiniSectorCutoff;
/**
* First sector ID in the MiniFAT chain.
*/
cfbSectorID_t _sectMiniFatStart;
/**
* Number of sector IDs in the MiniFAT chain.
*/
cfbSectorID_t _csectMiniFat;
/**
* First sector ID in the DiFAT chain.
*/
cfbSectorID_t _sectDifStart;
/**
* Number of sector IDs in the DiFAT chain.
*/
cfbSectorID_t _csectDif;
/**
* Array of the first 109 FAT sector IDs.
*
* These are the first entries in the DiFAT. If the _csectDif is zero, then this
* is the entire DiFAT.
*/
cfbSectorID_t _sectFat[109];
} cfbHeader; // __attribute__((packed)) cfbHeader;
/**
* This structure represents a Node in the Directory stream and thus a node in the
* Directory Tree. The Compound File Directory spec calls a "Node" a "Directory".
*
* The Directory stream starts at sector ID cfbHeader._sectDirStart in the FAT and
* ends at sector ID CFB_NO_STREAM. Each directory sector is an array of directory
* entries (cfbNode), so the entire directory stream forms the array of nodes.
* An index into that array is called a stream identifier (SID).
*
* A cfbNode structure always being 128-byte long, there are `sectorSize / 128`
* cfbNode per directory sector, that is 4 cfbNode per 512-byte sector, and 32
* cfbNode per 4-kB sector.
*
* The Directory Tree forms a red/black Tree composed of each cfbNode, in which the
* root node is the first cfbNode entry (SID 0).
*/
/* An index used in that sector chain is called a stream identifier (SID). */
typedef struct StructuredStorageDirectoryEntry {
/**
* The node's name, as a Unicode string.
*
* A 64-byte array, for a maximum of 32 Unicode characters including a terminating
* Unicode NULL character. The string shall be padded with zeros to fill the array.
*
* Should be wchar_t, but on linux wchar_t is 32 bits wide as opposed to windows
* (and thus CFB) defining wchar_t to 16 bits. Conversion is done by cfb_w16towchar()
*/
uint16_t _ab[CFB_NODE_NAME_SZ];
/**
* Length of the node's name in bytes, including the Unicode NULL terminating byte.
*/
uint16_t _cb;
/**
* Type of the node. TODO
*
* Value taken from the cfbStorageType_e enumeration.
*/
uint8_t _mse;
/**
* "Color" of the node. Shall be either CFB_RED or CFB_BLACK.
*/
uint8_t _bflags;
/**
* SID of the left-sibling of this node in the directory tree.
*/
cfbSID_t _sidLeftSib;
/**
* SID of the right-sibling of this node in the directory tree.
*/
cfbSID_t _sidRightSib;
/**
* SID of the child acting as the root node of all the children of this node.
*
* Only if _mse is STGTY_STORAGE or STGTY_ROOT.
*/
cfbSID_t _sidChild;
/**
* CLSID of this node.
*
* Only if _mse is STGTY_STORAGE or STGTY_ROOT.
*/
cfbCLSID_t _clsId;
/**
* User flags of this node.
*
* Don't know what that is, maybe some custom user flags. Looks like it
* is left unused by the AAF anyway.
*
* Only if _mse is STGTY_STORAGE or STGTY_ROOT.\n
* This field is unused by this library.
*/
uint32_t _dwUserFlags;
/**
* Array of two cfbFiletime_t struct. The first one holds the creation date/time,
* the second the modification date/time.
*
* Only if _mse is STGTY_STORAGE.
*/
cfbFiletime_t _time[2];
/**
* First sector ID of the stream.
*
* Only if _mse is STGTY_STREAM.
*/
cfbSectorID_t _sectStart;
/**
* Low part of the 64-bit stream size in bytes.
*
* Only if _mse is STGTY_STREAM.
*/
uint32_t _ulSizeLow;
/**
* High part of 64-bit stream size.
*
* Only if _mse is STGTY_STREAM and when sector size is 4kB. Shall be zero for
* 512-byte sectors.
*/
uint32_t _ulSizeHigh;
} cfbNode; // __attribute__((packed)) cfbNode;
/* Node size matching CFB file */
#define CFB_NODE_SIZE 128
/**
* This structure is the main structure when using LibCFB.
*/
typedef struct CFB_Data {
/**
* CFB file path.
*/
char file[PATH_MAX + 1];
/**
* CFB file size.
*/
size_t file_sz;
/**
* CFB file pointer.
*/
FILE* fp;
/**
* Pointer to the cfbHeader structure.
*/
cfbHeader* hdr;
/**
* Number of (FAT) sector entries in the DiFAT.
*/
uint32_t DiFAT_sz;
/**
* Array of FAT sector IDs, that is sectors holding the FAT.
*/
cfbSectorID_t* DiFAT;
/**
* Number of sector entries in the FAT.
*/
uint32_t fat_sz;
/**
* Array of sector IDs.
*/
cfbSectorID_t* fat;
/**
* Number of mini-sector entries in the MiniFAT.
*/
uint32_t miniFat_sz;
/**
* Array of mini-sector IDs.
*/
cfbSectorID_t* miniFat;
/**
* Number of cfbNode pointers in the CFB_Data.nodes array.
*/
uint32_t nodes_cnt;
/**
* Array of pointers to cfbNodes.
*/
cfbNode* nodes;
struct dbg* dbg;
} CFB_Data;
/**
* @name Function macros
* @{
*/
/**
* Loops through each sector from a given Chain in the FAT,
* starting at sector index id.
*
* @param cfbd Pointer to the CFB_Data structure.
* @param buf Pointer to the buffer that will hold each sector data bytes.
* @param id Index of the first sector in the Chain.
*/
#define cfb_foreachSectorInChain(cfbd, buf, id) \
for (buf = cfb_getSector (cfbd, id); \
id < CFB_MAX_REG_SECT && \
buf != NULL; \
id = cfbd->fat[id], \
buf = cfb_getSector (cfbd, id))
/**
* Loops through each sector from a given Chain in the MiniFAT,
* starting at mini-sector index id.
*
* @param cfbd Pointer to the CFB_Data structure.
* @param buf Pointer to the buffer that will hold each mini-sector data bytes.
* @param id Index of the first mini-sector in the Chain.
*/
#define cfb_foreachMiniSectorInChain(cfbd, buf, id) \
for (buf = cfb_getMiniSector (cfbd, id); \
id < CFB_MAX_REG_SECT; \
id = cfbd->miniFat[id], \
buf = cfb_getMiniSector (cfbd, id))
/**
* Loops through each DiFAT sector.
*
* @param cfbd Pointer to the CFB_Data structure.
* @param buf Pointer to the buffer that will hold each DiFAT sector data bytes.
* @param id Index of each DiFAT sector. The first index is retrieved from the Compound
* File Binary Header, so user can pass any value (usualy 0). Then, the ID of
* the next DiFAT sector is retrieved from the last 4 bytes of each DiFAT
* sector data.
*/
#define cfb_foreachSectorInDiFATChain(cfbd, buf, id) \
for (id = cfbd->hdr->_sectDifStart, \
buf = cfb_getSector (cfbd, id); \
id < CFB_MAX_REG_SECT; \
memcpy (&id, (buf + (1 << cfbd->hdr->_uSectorShift) - 4), sizeof (uint32_t)), \
free (buf), \
buf = cfb_getSector (cfbd, id))
/**
* Loops through each FAT sector ID in the DiFAT.
*
* @param cfbd Pointer to the CFB_Data structure.
* @param id Index of each FAT sector.
*/
#define cfb_foreachFATSectorIDInDiFAT(cfbd, id) \
for (id = 0; \
id < cfbd->DiFAT_sz && \
id < cfbd->hdr->_csectFat; \
id++)
/**
* Retrieves the full stream length of a streamNode.
* When 512 bytes sectors we don't care about _ulSizeHigh.
*/
#define cfb_getNodeStreamLen(cfbd, node) \
((cfbd->hdr->_uSectorShift > 9) ? (uint64_t) (((uint64_t) (node->_ulSizeHigh) << 32) | (node->_ulSizeLow)) : node->_ulSizeLow)
#define cfb_getStreamSectorShift(cfbd, node) \
((cfb_getNodeStreamLen (cfbd, node) < cfbd->hdr->_ulMiniSectorCutoff) ? cfbd->hdr->_uMiniSectorShift : cfbd->hdr->_uSectorShift)
/*
* @}
*/
const wchar_t*
cfb_CLSIDToText (const cfbCLSID_t* clsid);
wchar_t*
cfb_w16towchar (wchar_t* buf, uint16_t* w16buf, size_t w16blen);
/**
* @name Constructor function
* The first function to be called when using LibCFB.
* @{
*/
CFB_Data*
cfb_alloc (struct dbg* dbg);
/**
* @}
*
* @name Destructor function
* The last function to be called when using LibCFB.
* @{
*/
void
cfb_release (CFB_Data** cfbd);
/**
* @}
*
* @name Initialization function
* One of these function shall be called after cfb_alloc().
* @{
*/
int
cfb_load_file (CFB_Data** cfbd, const char* file);
int
cfb_new_file (CFB_Data* cfbd, const char* file, int sectSize);
/**
* @name File parsing functions
* @{
*/
unsigned char*
cfb_getSector (CFB_Data* cfbd, cfbSectorID_t id);
unsigned char*
cfb_getMiniSector (CFB_Data* cfbd, cfbSectorID_t id);
uint64_t
cfb_getStream (CFB_Data* cfbd, cfbNode* node, unsigned char** stream, uint64_t* stream_sz);
int
cfb__foreachSectorInStream (CFB_Data* cfbd, cfbNode* node, unsigned char** buf, size_t* bytesRead, cfbSectorID_t* sectID);
#define cfb_foreachSectorInStream(cfbd, node, buf, bytesRead, sectID) \
while (cfb__foreachSectorInStream (cfbd, node, buf, bytesRead, sectID))
/**
* @}
*
* @name Nodes access functions
* @{
*/
cfbNode*
cfb_getNodeByPath (CFB_Data* cfbd, const wchar_t* name, cfbSID_t id);
cfbNode*
cfb_getChildNode (CFB_Data* cfbd, const wchar_t* name, cfbNode* startNode);
/**
* @}
*
* @name Misc functions
* @{
*/
/**
* @}
*/
/**
* @}
*/
#endif // ! __LibCFB_h__

40
libs/aaf/aaf/ProTools.h Normal file
View File

@ -0,0 +1,40 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __ProTools_h__
#define __ProTools_h__
#include "aaf/AAFIParser.h"
#include "aaf/AAFIface.h"
enum protools_options {
PROTOOLS_REMOVE_SAMPLE_ACCURATE_EDIT = 1 << 0,
PROTOOLS_REPLACE_CLIP_FADES = 1 << 1,
};
#define PROTOOLS_ALL (PROTOOLS_REMOVE_SAMPLE_ACCURATE_EDIT | PROTOOLS_REPLACE_CLIP_FADES)
int
protools_AAF (struct AAF_Iface* aafi);
int
protools_post_processing (AAF_Iface* aafi);
#endif // ! __ProTools_h__

131
libs/aaf/aaf/RIFFParser.h Normal file
View File

@ -0,0 +1,131 @@
/*
* Copyright (C) 2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __RIFFParser__
#define __RIFFParser__
#include "aaf/debug.h"
#ifdef __GNUC__
#define PACK(__Declaration__) __Declaration__ __attribute__ ((__packed__))
#endif
#ifdef _MSC_VER
#define PACK(__Declaration__) __pragma (pack (push, 1)) __Declaration__ __pragma (pack (pop))
#endif
enum RIFF_PARSER_FLAGS {
RIFF_PARSE_ONLY_HEADER = (1 << 0),
};
struct RIFFAudioFile {
/* common to wave/aiff */
uint32_t sampleRate;
uint16_t sampleSize;
uint16_t channels;
uint64_t duration; /* total samples for 1 channel (no matter channel count). (duration / sampleRate) = duration in seconds */
};
PACK (struct riffHeaderChunk {
char ckid[4];
uint32_t cksz;
char format[4];
unsigned char data[];
});
PACK (struct riffChunk {
char ckid[4];
uint32_t cksz;
unsigned char data[];
});
PACK (struct wavFmtChunk {
char ckid[4]; //'fmt '
uint32_t cksz;
uint16_t format_tag;
uint16_t channels;
uint32_t samples_per_sec;
uint32_t avg_bytes_per_sec;
uint16_t block_align;
uint16_t bits_per_sample;
});
PACK (struct wavBextChunk {
char ckid[4]; //'bext'
uint32_t cksz;
char description[256];
char originator[32];
char originator_reference[32];
char origination_date[10];
char origination_time[8];
uint64_t time_reference;
uint16_t version;
/* since bext v1 (2001) */
unsigned char umid[64];
/* since bext v2 (2011)
*
* If any loudness parameter is not
* being used, its value shall be
* set to 0x7fff. Any value outside
* valid ranges shall be ignored.
*/
int16_t loudness_value; // 0xd8f1 - 0xffff (-99.99 -0.1) and 0x000 0x270f (0.00 99.99)
int16_t loudness_range; // 0x0000 - 0x270f (0.00 99.99)
int16_t max_true_peak_level; // 0xd8f1 - 0xffff (-99.99 -0.1) and 0x000 0x270f (0.00 99.99)
int16_t max_momentary_loudness; // 0xd8f1 - 0xffff (-99.99 -0.1) and 0x000 0x270f (0.00 99.99)
int16_t max_short_term_loudness; // 0xd8f1 - 0xffff (-99.99 -0.1) and 0x000 0x270f (0.00 99.99)
char reserved[180];
/*
Because it is variable size, we
do not include coding history
in the bext structure. However,
we know it starts at the end
of bext structure when parsing.
*/
});
PACK (struct aiffCOMMChunk {
char ckid[4]; //'COMM'
uint32_t cksz;
uint16_t numChannels;
uint32_t numSampleFrames;
uint16_t sampleSize;
unsigned char sampleRate[10]; // 80 bit IEEE Standard 754 floating point number
});
int
riff_parseAudioFile (struct RIFFAudioFile* RIFFAudioFile, enum RIFF_PARSER_FLAGS flags, size_t (*readerCallback) (unsigned char*, size_t, size_t, void*, void*, void*), void* user1, void* user2, void* user3, struct dbg* dbg);
int
riff_writeWavFileHeader (FILE* fp, struct wavFmtChunk* wavFmt, struct wavBextChunk* wavBext, uint32_t audioDataSize, struct dbg* dbg);
#endif // ! __RIFFParser__

42
libs/aaf/aaf/Resolve.h Normal file
View File

@ -0,0 +1,42 @@
/*
* Copyright (C) 2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __Resolve_h__
#define __Resolve_h__
#include "aaf/AAFIParser.h"
#include "aaf/AAFIface.h"
enum resolve_options {
RESOLVE_INCLUDE_DISABLED_CLIPS = 1 << 0,
};
#define RESOLVE_ALL (RESOLVE_INCLUDE_DISABLED_CLIPS)
int
resolve_AAF (struct AAF_Iface* aafi);
int
resolve_parse_aafObject_Selector (struct AAF_Iface* aafi, aafObject* Selector, td* __ptd);
int
resolve_parse_aafObject_DescriptiveMarker (struct AAF_Iface* aafi, aafObject* DescriptiveMarker, td* __ptd);
#endif // !__Resolve_h__

142
libs/aaf/aaf/URIParser.h Normal file
View File

@ -0,0 +1,142 @@
/*
* Copyright (C) 2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef URI_PARSER_H
#define URI_PARSER_H
#include "aaf/debug.h"
#define MAX_URI_LENGTH 64000
enum uri_option {
URI_OPT_NONE = 0,
URI_OPT_IGNORE_USERPASS = (1 << 0),
URI_OPT_IGNORE_QUERY = (1 << 1),
URI_OPT_IGNORE_FRAGMENT = (1 << 2),
URI_OPT_DECODE_HOSTNAME = (1 << 3),
URI_OPT_DECODE_USERINFO = (1 << 4),
URI_OPT_DECODE_USERPASS = (1 << 5),
URI_OPT_DECODE_PATH = (1 << 6),
URI_OPT_DECODE_QUERY = (1 << 7),
URI_OPT_DECODE_FRAGMENT = (1 << 8)
};
#define URI_OPT_DECODE_ALL ( \
URI_OPT_DECODE_HOSTNAME | \
URI_OPT_DECODE_USERINFO | \
URI_OPT_DECODE_USERPASS | \
URI_OPT_DECODE_PATH | \
URI_OPT_DECODE_QUERY | \
URI_OPT_DECODE_FRAGMENT)
enum uri_type {
URI_T_GUESSED_OS_LINUX = (1 << 0),
URI_T_GUESSED_OS_APPLE = (1 << 1),
URI_T_GUESSED_OS_WINDOWS = (1 << 2),
URI_T_HOST_EMPTY = (1 << 3),
URI_T_HOST_IPV4 = (1 << 4),
URI_T_HOST_IPV6 = (1 << 5),
URI_T_HOST_REGNAME = (1 << 6),
URI_T_LOCALHOST = (1 << 7),
};
#define URI_T_GUESSED_OS_MASK ( \
URI_T_GUESSED_OS_LINUX | \
URI_T_GUESSED_OS_APPLE | \
URI_T_GUESSED_OS_WINDOWS)
#define URI_T_HOST_MASK ( \
URI_T_HOST_EMPTY | \
URI_T_HOST_IPV4 | \
URI_T_HOST_IPV6 | \
URI_T_HOST_REGNAME)
enum uri_scheme_type {
URI_SCHEME_T_UNKNOWN = 0,
URI_SCHEME_T_AFP,
URI_SCHEME_T_CIFS,
URI_SCHEME_T_DATA,
URI_SCHEME_T_DNS,
URI_SCHEME_T_FILE,
URI_SCHEME_T_FTP,
URI_SCHEME_T_HTTP,
URI_SCHEME_T_HTTPS,
URI_SCHEME_T_IMAP,
URI_SCHEME_T_IRC,
URI_SCHEME_T_MAILTO,
URI_SCHEME_T_NFS,
URI_SCHEME_T_POP,
URI_SCHEME_T_RTSP,
URI_SCHEME_T_SFTP,
URI_SCHEME_T_SIP,
URI_SCHEME_T_SMB,
URI_SCHEME_T_SSH,
URI_SCHEME_T_TEL,
URI_SCHEME_T_TELNET,
};
struct uri {
char* scheme;
char* authority;
char* userinfo;
char* user;
char* pass;
char* host;
int port;
char* path;
char* query;
char* fragment;
enum uri_scheme_type scheme_t;
enum uri_option opts;
enum uri_type flags;
};
struct uri*
uriParse (const char*, enum uri_option, struct dbg* dbg);
void
uriFree (struct uri*);
/*
* if dst is NULL of equals src, then encoded source string will be overwritten
* by decoded string.
*/
char*
uriDecodeString (char* src, char* dst);
char*
uriDecodeWString (wchar_t* src, wchar_t* dst);
int
uriIsIPv4 (const char* s, int size, char** err);
int
uriIsIPv6 (const char* s, int size, char** err);
#endif // ! URI_PARSER_H

92
libs/aaf/aaf/debug.h Normal file
View File

@ -0,0 +1,92 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __debug_h__
#define __debug_h__
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define __FILENAME__ (strrchr (__FILE__, '/') ? strrchr (__FILE__, '/') + 1 : __FILE__)
enum debug_source_id {
DEBUG_SRC_ID_LIB_CFB,
DEBUG_SRC_ID_AAF_CORE,
DEBUG_SRC_ID_AAF_IFACE,
DEBUG_SRC_ID_TRACE,
DEBUG_SRC_ID_DUMP
};
typedef enum verbosityLevel_e {
VERB_QUIET = 0,
VERB_ERROR,
VERB_WARNING,
VERB_DEBUG,
MAX_VERB
} verbosityLevel_e;
struct dbg {
void (*debug_callback) (struct dbg* dbg, void* ctxdata, int lib, int type, const char* srcfile, const char* srcfunc, int lineno, const char* msg, void* user);
FILE* fp;
verbosityLevel_e verb;
char* _dbg_msg;
int _dbg_msg_size;
void* user;
};
#define _dbg(dbg, ctxdata, lib, type, ...) \
{ \
const char* dbgfile = __FILENAME__; \
const char* dbgfunc = __func__; \
int dbgline = __LINE__; \
if (dbg && dbg->verb >= type && dbg->debug_callback) { \
int msgsize = snprintf (NULL, 0, __VA_ARGS__) + 1; \
if (msgsize >= dbg->_dbg_msg_size) { \
char* msgtmp = realloc (dbg->_dbg_msg, msgsize); \
if (msgtmp) { \
dbg->_dbg_msg = msgtmp; \
dbg->_dbg_msg_size = msgsize; \
snprintf (dbg->_dbg_msg, dbg->_dbg_msg_size, __VA_ARGS__); \
dbg->debug_callback (dbg, (void*)ctxdata, lib, type, dbgfile, dbgfunc, dbgline, dbg->_dbg_msg, dbg->user); \
} else { \
/* Should we print error to stderr ? */ \
} \
} else { \
snprintf (dbg->_dbg_msg, dbg->_dbg_msg_size, __VA_ARGS__); \
dbg->debug_callback (dbg, (void*)ctxdata, lib, type, dbgfile, dbgfunc, dbgline, dbg->_dbg_msg, dbg->user); \
} \
} \
}
struct dbg*
laaf_new_debug (void);
void
laaf_free_debug (struct dbg* dbg);
void
laaf_debug_callback (struct dbg* dbg, void* ctxdata, int lib, int type, const char* srcfile, const char* srcfunc, int lineno, const char* msg, void* user);
#endif // !__debug_h__

45
libs/aaf/aaf/libaaf.h Normal file
View File

@ -0,0 +1,45 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef libaaf_h
#define libaaf_h
#ifdef __cplusplus
extern "C" {
#endif
#include "aaf/version.h"
#include "aaf/AAFCore.h"
#include "aaf/AAFIAudioFiles.h"
#include "aaf/AAFIface.h"
#include "aaf/LibCFB.h"
#include "aaf/AAFDump.h"
#include "aaf/CFBDump.h"
#include "aaf/ProTools.h"
#include "aaf/Resolve.h"
#ifdef __cplusplus
}
#endif
#endif // ! libaaf_h

93
libs/aaf/aaf/utils.h Normal file
View File

@ -0,0 +1,93 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#ifndef __utils_h__
#define __utils_h__
#include <stdarg.h>
#include <stdint.h>
#ifdef __cplusplus
extern "C" {
#endif
#ifdef _WIN32
#define DIR_SEP '\\'
#define DIR_SEP_STR "\\"
/*
* swprintf() specific string format identifiers
* https://learn.microsoft.com/en-us/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions?view=msvc-170#type
*/
#define WPRIs L"S" // char*
#define WPRIws L"s" // wchar_t*
#else
#define DIR_SEP '/'
#define DIR_SEP_STR "/"
/*
* swprintf() specific string format identifiers
* https://learn.microsoft.com/en-us/cpp/c-runtime-library/format-specification-syntax-printf-and-wprintf-functions?view=msvc-170#type
*/
#define WPRIs L"s" // char*
#define WPRIws L"ls" // wchar_t*
#endif
#define IS_DIR_SEP(c) \
((((c) == DIR_SEP) || ((c) == '/')))
#define ANSI_COLOR_RED "\033[38;5;124m" //"\x1b[31m"
#define ANSI_COLOR_GREEN "\x1b[92m"
#define ANSI_COLOR_YELLOW "\x1b[33m" //"\x1b[93m"
#define ANSI_COLOR_ORANGE "\033[38;5;130m"
#define ANSI_COLOR_BLUE "\x1b[34m"
#define ANSI_COLOR_MAGENTA "\x1b[35m"
#define ANSI_COLOR_CYAN "\033[38;5;81m" //"\x1b[36m"
#define ANSI_COLOR_DARKGREY "\x1b[38;5;242m"
#define ANSI_COLOR_BOLD "\x1b[1m"
#define ANSI_COLOR_RESET "\x1b[0m"
int
laaf_util_wstr_contains_nonlatin (const wchar_t* str);
char*
laaf_util_clean_filename (char* filename);
const char*
laaf_util_fop_get_file (const char* filepath);
char*
laaf_util_build_path (const char* sep, const char* first, ...);
int
laaf_util_snprintf_realloc (char** str, int* size, size_t offset, const char* format, ...);
int
laaf_util_vsnprintf_realloc (char** str, int* size, int offset, const char* fmt, va_list* args);
char*
laaf_util_c99strdup (const char* src);
int
laaf_util_dump_hex (const unsigned char* stream, size_t stream_sz, char** buf, int* bufsz, int offset);
#ifdef __cplusplus
}
#endif
#endif // ! __utils_h__

2
libs/aaf/aaf/version.h Normal file
View File

@ -0,0 +1,2 @@
#pragma once
#define LIBAAF_VERSION "v0.1-85-g3e4c2cd"

98
libs/aaf/debug.c Normal file
View File

@ -0,0 +1,98 @@
#include <stdio.h>
#include "aaf/debug.h"
#include "aaf/AAFCore.h"
#include "aaf/AAFIParser.h"
#include "aaf/AAFIface.h"
#include "aaf/LibCFB.h"
#include "aaf/utils.h"
struct dbg*
laaf_new_debug (void)
{
struct dbg* dbg = calloc (sizeof (struct dbg), sizeof (char));
dbg->debug_callback = &laaf_debug_callback;
dbg->fp = stdout;
return dbg;
}
void
laaf_free_debug (struct dbg* dbg)
{
if (dbg->_dbg_msg) {
free (dbg->_dbg_msg);
}
free (dbg);
}
void
laaf_debug_callback (struct dbg* dbg, void* ctxdata, int libid, int type, const char* srcfile, const char* srcfunc, int lineno, const char* msg, void* user)
{
AAF_Iface* aafi = NULL;
AAF_Data* aafd = NULL;
CFB_Data* cfbd = NULL;
const char* lib = "";
const char* typestr = "";
const char* color = "";
if (dbg->fp == NULL) {
return;
}
switch (libid) {
case DEBUG_SRC_ID_LIB_CFB:
lib = "libCFB";
aafi = (AAF_Iface*)ctxdata;
break;
case DEBUG_SRC_ID_AAF_CORE:
lib = "AAFCore";
aafd = (AAF_Data*)ctxdata;
break;
case DEBUG_SRC_ID_AAF_IFACE:
lib = "AAFIface";
cfbd = (CFB_Data*)ctxdata;
break;
case DEBUG_SRC_ID_TRACE:
lib = "trace";
aafi = (AAF_Iface*)ctxdata;
break;
case DEBUG_SRC_ID_DUMP:
lib = "dump";
break;
}
switch (type) {
case VERB_ERROR:
typestr = " error ";
color = ANSI_COLOR_RED;
break;
case VERB_WARNING:
typestr = "warning";
color = ANSI_COLOR_YELLOW;
break;
case VERB_DEBUG:
typestr = " debug ";
color = ANSI_COLOR_DARKGREY;
break;
}
if (libid != DEBUG_SRC_ID_TRACE && libid != DEBUG_SRC_ID_DUMP) {
fprintf (dbg->fp, "[%s%s%s] ", color, typestr, ANSI_COLOR_RESET);
fprintf (dbg->fp, "%s%s:%i in %s()%s : ", ANSI_COLOR_DARKGREY, srcfile, lineno, srcfunc, ANSI_COLOR_RESET);
}
fprintf (dbg->fp, "%s\n", msg);
/* avoids -Wunused-parameter -Wunused-but-set-variable */
(void)aafi;
(void)aafd;
(void)cfbd;
(void)lib;
(void)user;
}

357
libs/aaf/utils.c Normal file
View File

@ -0,0 +1,357 @@
/*
* Copyright (C) 2017-2023 Adrien Gesta-Fline
*
* This file is part of libAAF.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
#include <ctype.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <wchar.h>
#include "aaf/utils.h"
#define BUILD_PATH_DEFAULT_BUF_SIZE 1024
int
laaf_util_wstr_contains_nonlatin (const wchar_t* str)
{
for (size_t i = 0; str[i] != 0x0000; i++) {
/* if char is out of the Basic Latin range */
if (str[i] > 0xff) {
return 1;
}
}
return 0;
}
char*
laaf_util_clean_filename (char* fname)
{
/*
* sanitize file/dir name
* https://stackoverflow.com/a/31976060
*/
size_t len = strlen (fname);
for (size_t i = 0; i < len; i++) {
unsigned char c = fname[i];
if (c == '/' ||
c == '<' ||
c == '>' ||
c == ':' ||
c == '"' ||
c == '|' ||
c == '?' ||
c == '*' ||
c == '\\' ||
(c > 0 && c < 0x20)) {
fname[i] = '_';
}
}
/* windows filenames can't end with ' ' or '.' */
for (int i = len - 1; i > 0; i--) {
char c = fname[i];
if (c != ' ' && c != '.') {
break;
}
fname[i] = '_';
}
return fname;
}
const char*
laaf_util_fop_get_file (const char* filepath)
{
if (filepath == NULL) {
return NULL;
}
const char* end = filepath + strlen (filepath);
while (end > filepath && !IS_DIR_SEP (*end)) {
--end;
}
return (IS_DIR_SEP (*end)) ? end + 1 : end;
}
char*
laaf_util_build_path (const char* sep, const char* first, ...)
{
char* str = malloc (BUILD_PATH_DEFAULT_BUF_SIZE);
if (str == NULL) {
return NULL;
}
size_t len = BUILD_PATH_DEFAULT_BUF_SIZE;
size_t offset = 0;
va_list args;
if (!sep) {
sep = DIR_SEP_STR;
}
int element_count = 0;
va_start (args, first);
const char* arg = first;
do {
int arglen = strlen (arg);
int argstart = 0;
int has_leading_sep = 0;
/* trim leading DIR_SEP */
for (int i = 0; arg[i] != 0x00; i++) {
if (IS_DIR_SEP (arg[i])) {
has_leading_sep = 1;
argstart++;
} else {
break;
}
}
/* trim trailing DIR_SEP */
for (int i = arglen - 1; i >= argstart; i--) {
if (IS_DIR_SEP (arg[i])) {
arglen--;
} else {
break;
}
}
/* TODO ? */
if (element_count == 0 && has_leading_sep) {
} else {
}
size_t reqlen = snprintf (NULL, 0, "%.*s", arglen - argstart, arg + argstart) + 1;
if (offset + reqlen >= len) {
reqlen = ((offset + reqlen) > (len + BUILD_PATH_DEFAULT_BUF_SIZE)) ? (offset + reqlen) : (len + BUILD_PATH_DEFAULT_BUF_SIZE);
char* tmp = realloc (str, (offset + reqlen));
if (tmp) {
str = tmp;
len = (offset + reqlen);
} else {
free (str);
return NULL;
}
}
offset += snprintf (str + offset, len - offset, "%s%.*s",
((element_count == 0 && has_leading_sep) || (element_count > 0)) ? sep : "",
arglen - argstart,
arg + argstart);
element_count++;
} while ((arg = va_arg (args, char*)) != NULL);
va_end (args);
return str;
}
int
laaf_util_snprintf_realloc (char** str, int* size, size_t offset, const char* format, ...)
{
int tmpsize = 0;
if (!size) {
size = &tmpsize;
}
int retval, needed;
va_list ap;
va_start (ap, format);
while (0 <= (retval = vsnprintf ((*str) + offset, (*size) - offset, format, ap)) && (int64_t) ((*size) - offset) < (needed = retval + 1)) {
va_end (ap);
*size *= 2;
if ((int64_t) ((*size) - offset) < needed)
*size = needed + offset;
char* p = realloc (*str, *size);
if (p) {
*str = p;
} else {
free (*str);
*str = NULL;
*size = 0;
return -1;
}
va_start (ap, format);
}
va_end (ap);
return retval;
}
int
laaf_util_vsnprintf_realloc (char** str, int* size, int offset, const char* fmt, va_list* args)
{
va_list args2, args3;
va_copy (args2, *args);
va_copy (args3, *args);
int needed = vsnprintf (NULL, 0, fmt, args2) + 1;
if (needed >= (*size) - offset) {
char* p = realloc (*str, offset + needed);
if (p) {
*str = p;
*size = offset + needed;
} else {
/* If realloc() fails, the original block is left untouched; it is not freed or moved. */
va_end (args2);
va_end (args3);
return -1;
}
}
va_end (args2);
int written = vsnprintf ((*str) + offset, (*size) - offset, fmt, args3);
va_end (args3);
return written;
}
char*
laaf_util_c99strdup (const char* src)
{
if (!src) {
return NULL;
}
int len = 0;
while (src[len]) {
len++;
}
char* str = malloc (len + 1);
if (!str)
return NULL;
char* p = str;
while (*src) {
*(p++) = *(src++);
}
*p = '\0';
return str;
}
int
laaf_util_dump_hex (const unsigned char* stream, size_t stream_sz, char** buf, int* bufsz, int offset)
{
if (stream == NULL) {
return -1;
}
int initialOffset = offset;
uint32_t i = 0;
char hex[49];
char ascii[19];
uint32_t count = 0;
offset += laaf_util_snprintf_realloc (buf, bufsz, offset, " ______________________________ Hex Dump ______________________________\n\n");
while (count < stream_sz) {
uint32_t lineLen = (stream_sz - count) / 16;
if (lineLen <= 0)
lineLen = (stream_sz) % 16;
else
lineLen = 16;
memset (&hex, 0x20, sizeof (hex));
memset (&ascii, 0x00, sizeof (ascii));
uint32_t linepos = 0;
for (i = 0; i < lineLen; i++) {
linepos += snprintf (&hex[linepos], sizeof (hex) - (linepos), "%02x%s", *(const unsigned char*)(stream + count + i), (i == 7) ? " " : " ");
if (i < 8) {
if (isalnum (*(stream + count + i)))
ascii[i] = *(const unsigned char*)(stream + count + i);
else
ascii[i] = '.';
} else if (i > 8) {
if (isalnum (*(stream + count + i)))
ascii[i + 1] = *(const unsigned char*)(stream + count + i);
else
ascii[i + 1] = '.';
} else {
if (isalnum (*(stream + count + i))) {
ascii[i] = ' ';
ascii[i + 1] = *(const unsigned char*)(stream + count + i);
} else {
ascii[i] = ' ';
ascii[i + 1] = '.';
}
}
}
/* Fill with blank the rest of the line */
if (lineLen < 16) {
for (i = linepos; i < 48; i++) {
hex[linepos++] = 0x20;
}
}
/* terminate the line */
hex[48] = 0x00;
count += lineLen;
offset += laaf_util_snprintf_realloc (buf, bufsz, offset, " %s | %s\n", hex, ascii);
}
offset += laaf_util_snprintf_realloc (buf, bufsz, offset, " ______________________________________________________________________\n\n");
return offset - initialOffset; /* bytes written */
}