Update libaaf to v1.0-10-g13f0b0a

This commit is contained in:
Robin Gareus 2024-03-19 20:59:04 +01:00
parent da4218c2db
commit 4883867f2b
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
20 changed files with 116 additions and 262 deletions

View file

@ -23,6 +23,15 @@
#include "aaf/AAFIface.h"
#include "aaf/ProTools.h"
#define debug(...) \
AAF_LOG (aafi->log, aafi, LOG_SRC_ID_AAF_IFACE, VERB_DEBUG, __VA_ARGS__)
#define warning(...) \
AAF_LOG (aafi->log, aafi, LOG_SRC_ID_AAF_IFACE, VERB_WARNING, __VA_ARGS__)
#define error(...) \
AAF_LOG (aafi->log, aafi, LOG_SRC_ID_AAF_IFACE, VERB_ERROR, __VA_ARGS__)
/* English : "Fade " (Same as JA and DE) */
static const char PROTOOLS_CLIP_NAME_FADE_EN[] = "\x46\x61\x64\x65\x20";
/* French : "Fondu " */
@ -53,15 +62,6 @@ static const char PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_ZH_CN[] = "\xe7\xb2\xb
/* Chinese (T) : "精確取樣編輯" */
static const char PROTOOLS_CLIP_NAME_SAMPLE_ACCURATE_EDIT_ZH_TW[] = "\xe7\xb2\xbe\xe7\xa2\xba\xe5\x8f\x96\xe6\xa8\xa3\xe7\xb7\xa8\xe8\xbc\xaf";
#define debug(...) \
AAF_LOG (aafi->log, aafi, DEBUG_SRC_ID_AAF_IFACE, VERB_DEBUG, __VA_ARGS__)
#define warning(...) \
AAF_LOG (aafi->log, aafi, DEBUG_SRC_ID_AAF_IFACE, VERB_WARNING, __VA_ARGS__)
#define error(...) \
AAF_LOG (aafi->log, aafi, DEBUG_SRC_ID_AAF_IFACE, VERB_ERROR, __VA_ARGS__)
static int
is_rendered_fade (const char* clipName);
static int
@ -76,7 +76,7 @@ protools_AAF (struct AAF_Iface* aafi)
{
int probe = 0;
/* NOTE: CompanyName is "Digidesign, Inc." at least since ProTools 10.3.10.613, and still today */
/* NOTE: CompanyName is "Digidesign, Inc." at least since ProTools 10.3.10.613, and still today (2024) */
if (aafi->aafd->Identification.CompanyName && strcmp (aafi->aafd->Identification.CompanyName, "Digidesign, Inc.") == 0) {
probe++;
@ -149,7 +149,7 @@ remove_sampleAccurateEditClip (AAF_Iface* aafi, aafiAudioTrack* audioTrack, aafi
return 1;
}
// else {
// warning( L"Can't remove SAE \"%s\" : left clip \"%s\" has not enough right handle : %lu but %lu is required",
// debug( L"SAE \"%s\" : left clip \"%s\" has not enough right handle : %lu but %lu is required",
// saeClip->essencePointerList->essenceFile->unique_name,
// leftClip->essencePointerList->essenceFile->unique_name,
// (essenceLength - leftClip->essence_offset - leftClip->len),
@ -185,7 +185,7 @@ remove_sampleAccurateEditClip (AAF_Iface* aafi, aafiAudioTrack* audioTrack, aafi
return 1;
}
// else {
// warning( L"Can't remove SAE \"%s\" : right clip \"%s\" has not enough left handle : %lu but %lu is required",
// debug( L"SAE \"%s\" : right clip \"%s\" has not enough left handle : %lu but %lu is required",
// saeClip->essencePointerList->essenceFile->unique_name,
// rightClip->essencePointerList->essenceFile->unique_name,
// rightClip->essence_offset,
@ -404,7 +404,7 @@ protools_post_processing (AAF_Iface* aafi)
aafiTimelineItem* audioItemNext = audioItem->next;
if (audioItem->type != AAFI_AUDIO_CLIP) {
audioItem = audioItem->next;
audioItem = audioItemNext;
continue;
}
@ -412,15 +412,21 @@ protools_post_processing (AAF_Iface* aafi)
char* clipName = audioClip->essencePointerList->essenceFile->name;
int previousClipCount = audioTrack->clipCount;
if ((aafi->ctx.options.protools & AAFI_PROTOOLS_OPT_REPLACE_CLIP_FADES) &&
is_rendered_fade (clipName)) {
if (replace_clipFade (aafi, audioTrack, audioItem) > 0) {
replace_clipFade (aafi, audioTrack, audioItem);
if (previousClipCount != audioTrack->clipCount) {
audioItem = audioTrack->timelineItems;
continue;
}
} else if ((aafi->ctx.options.protools & AAFI_PROTOOLS_OPT_REMOVE_SAMPLE_ACCURATE_EDIT) &&
is_sample_accurate_edit (clipName)) {
if (remove_sampleAccurateEditClip (aafi, audioTrack, audioItem)) {
remove_sampleAccurateEditClip (aafi, audioTrack, audioItem);
if (previousClipCount != audioTrack->clipCount) {
audioItem = audioTrack->timelineItems;
continue;
}