diff --git a/include/libaaf/AAFIAudioFiles.h b/include/libaaf/AAFIAudioFiles.h index e896ded..63c5405 100644 --- a/include/libaaf/AAFIAudioFiles.h +++ b/include/libaaf/AAFIAudioFiles.h @@ -25,11 +25,11 @@ #include -char * locate_external_essence_file( AAF_Iface *aafi, const wchar_t *original_file_path, const char *search_location ); +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 parse_audio_summary( AAF_Iface *aafi, aafiAudioEssence *audioEssence ); +int aafi_parse_audio_summary( AAF_Iface *aafi, aafiAudioEssence *audioEssence ); #endif // !__AAFIAudioFiles_h__ diff --git a/include/libaaf/AAFIParser.h b/include/libaaf/AAFIParser.h index 01c1222..eb35c9c 100644 --- a/include/libaaf/AAFIParser.h +++ b/include/libaaf/AAFIParser.h @@ -73,21 +73,21 @@ typedef struct trace_dump { #define DUMP_OBJ( aafi, Obj, __td ) \ - _DUMP_OBJ( aafi, Obj, __td, TD_OK, __LINE__, "" ); + aafi_dump_obj( aafi, Obj, __td, TD_OK, __LINE__, "" ); #define DUMP_OBJ_INFO( aafi, Obj, __td, ... ) \ - _DUMP_OBJ( aafi, Obj, __td, TD_OK, __LINE__, __VA_ARGS__ ); + aafi_dump_obj( aafi, Obj, __td, TD_OK, __LINE__, __VA_ARGS__ ); #define DUMP_OBJ_WARNING( aafi, Obj, __td, ... ) \ - _DUMP_OBJ( aafi, Obj, __td, TD_WARNING, __LINE__, __VA_ARGS__ ); + aafi_dump_obj( aafi, Obj, __td, TD_WARNING, __LINE__, __VA_ARGS__ ); #define DUMP_OBJ_ERROR( aafi, Obj, __td, ... ) \ (__td)->eob = 1; \ - _DUMP_OBJ( aafi, Obj, __td, TD_ERROR, __LINE__, __VA_ARGS__ ); + aafi_dump_obj( aafi, Obj, __td, TD_ERROR, __LINE__, __VA_ARGS__ ); #define DUMP_OBJ_NO_SUPPORT( aafi, Obj, __td ) \ (__td)->eob = 1; \ - _DUMP_OBJ_NO_SUPPORT( aafi, Obj, __td, __LINE__ ); + aafi_dump_obj_no_support( aafi, Obj, __td, __LINE__ ); @@ -99,14 +99,14 @@ int aafi_retrieveData( AAF_Iface *aafi ); * so they are accessible to vendor-specific files (Resolve.c, ProTools.c, etc.) */ -void _DUMP_OBJ( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int state, int line, const char *fmt, ... ); +void aafi_dump_obj( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int state, int line, const char *fmt, ... ); -void _DUMP_OBJ_NO_SUPPORT( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int line ); +void aafi_dump_obj_no_support( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int line ); -void trace_obj( AAF_Iface *aafi, aafObject *Obj, const char *color ); +void aafi_trace_obj( AAF_Iface *aafi, aafObject *Obj, const char *color ); -int parse_Segment( AAF_Iface *aafi, aafObject *Segment, td *__ptd ); +int aafi_parse_Segment( AAF_Iface *aafi, aafObject *Segment, td *__ptd ); #endif // !__AAFIParser_h__ diff --git a/include/libaaf/AAFIface.h b/include/libaaf/AAFIface.h index 1303660..bbaa02a 100644 --- a/include/libaaf/AAFIface.h +++ b/include/libaaf/AAFIface.h @@ -934,11 +934,11 @@ void aafi_release( AAF_Iface **aafi ); int aafi_load_file( AAF_Iface *aafi, const char * file ); -aafiTransition * get_fadein( aafiTimelineItem *audioItem ); +aafiTransition * aafi_get_fadein( aafiTimelineItem *audioItem ); -aafiTransition * get_fadeout( aafiTimelineItem *audioItem ); +aafiTransition * aafi_get_fadeout( aafiTimelineItem *audioItem ); -aafiTransition * get_xfade( 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] ); diff --git a/include/libaaf/AAFToText.h b/include/libaaf/AAFToText.h index f65eedc..4d3a8de 100644 --- a/include/libaaf/AAFToText.h +++ b/include/libaaf/AAFToText.h @@ -31,82 +31,82 @@ #define AUIDToText( auid ) \ - CLSIDToText( (const cfbCLSID_t*)auid ) + cfb_CLSIDToText( (const cfbCLSID_t*)auid ) -const wchar_t * MobIDToText( aafMobID_t *mobid ); +const wchar_t * aaft_MobIDToText( aafMobID_t *mobid ); -const wchar_t * TimestampToText( aafTimeStamp_t *ts ); +const wchar_t * aaft_TimestampToText( aafTimeStamp_t *ts ); -const wchar_t * VersionToText( aafVersionType_t *vers ); +const wchar_t * aaft_VersionToText( aafVersionType_t *vers ); -const wchar_t * ProductVersionToText( aafProductVersion_t *vers ); +const wchar_t * aaft_ProductVersionToText( aafProductVersion_t *vers ); -const wchar_t * FileKindToText( const aafUID_t *auid ); +const wchar_t * aaft_FileKindToText( const aafUID_t *auid ); -const wchar_t * TapeCaseTypeToText( aafTapeCaseType_t t ); +const wchar_t * aaft_TapeCaseTypeToText( aafTapeCaseType_t t ); -const wchar_t * VideoSignalTypeToText( aafVideoSignalType_t v ); +const wchar_t * aaft_VideoSignalTypeToText( aafVideoSignalType_t v ); -const wchar_t * TapeFormatTypeToText( aafTapeFormatType_t t ); +const wchar_t * aaft_TapeFormatTypeToText( aafTapeFormatType_t t ); -const wchar_t * FilmTypeToText( aafFilmType_t f ); +const wchar_t * aaft_FilmTypeToText( aafFilmType_t f ); -const wchar_t * SignalStandardToText( aafSignalStandard_t s ); +const wchar_t * aaft_SignalStandardToText( aafSignalStandard_t s ); -const wchar_t * FieldNumberToText( aafFieldNumber_t f ); +const wchar_t * aaft_FieldNumberToText( aafFieldNumber_t f ); -const wchar_t * AlphaTransparencyToText( aafAlphaTransparency_t a ); +const wchar_t * aaft_AlphaTransparencyToText( aafAlphaTransparency_t a ); -const wchar_t * FrameLayoutToText( aafFrameLayout_t f ); +const wchar_t * aaft_FrameLayoutToText( aafFrameLayout_t f ); -const wchar_t * ColorSitingToText( aafColorSiting_t c ); +const wchar_t * aaft_ColorSitingToText( aafColorSiting_t c ); -const wchar_t * ProductReleaseTypeToText( aafProductReleaseType_t t ); +const wchar_t * aaft_ProductReleaseTypeToText( aafProductReleaseType_t t ); -const wchar_t * FadeTypeToText( aafFadeType_t f ); +const wchar_t * aaft_FadeTypeToText( aafFadeType_t f ); -const wchar_t * BoolToText( aafBoolean_t b ); +const wchar_t * aaft_BoolToText( aafBoolean_t b ); -const wchar_t * OperationCategoryToText( const aafUID_t *auid ); +const wchar_t * aaft_OperationCategoryToText( const aafUID_t *auid ); -const wchar_t * PluginCategoryToText( const aafUID_t *auid ); +const wchar_t * aaft_PluginCategoryToText( const aafUID_t *auid ); -const wchar_t * ScanningDirectionToText( aafScanningDirection_t s ); +const wchar_t * aaft_ScanningDirectionToText( aafScanningDirection_t s ); -const wchar_t * ByteOrderToText( int16_t e ); +const wchar_t * aaft_ByteOrderToText( int16_t e ); -const wchar_t * ElectroSpatialToText( aafElectroSpatialFormulation_t e ); +const wchar_t * aaft_ElectroSpatialToText( aafElectroSpatialFormulation_t e ); -const wchar_t * TypeIDToText( const aafUID_t *auid ); +const wchar_t * aaft_TypeIDToText( const aafUID_t *auid ); -const wchar_t * StoredFormToText( enum aafStoredForm_e sf ); +const wchar_t * aaft_StoredFormToText( enum aafStoredForm_e sf ); -const wchar_t * OPDefToText( const aafUID_t *auid ); +const wchar_t * aaft_OPDefToText( const aafUID_t *auid ); -const wchar_t * DataDefToText( AAF_Data *aafd, const aafUID_t *auid ); +const wchar_t * aaft_DataDefToText( AAF_Data *aafd, const aafUID_t *auid ); -const wchar_t * OperationDefToText( AAF_Data *aafd, const aafUID_t *auid ); +const wchar_t * aaft_OperationDefToText( AAF_Data *aafd, const aafUID_t *auid ); -const wchar_t * InterpolationToText( const aafUID_t *auid ); +const wchar_t * aaft_InterpolationToText( const aafUID_t *auid ); -const wchar_t * ParameterToText( AAF_Data *aafd, const aafUID_t *auid ); +const wchar_t * aaft_ParameterToText( AAF_Data *aafd, const aafUID_t *auid ); -const wchar_t * TransferCharacteristicToText( const aafUID_t *auid ); +const wchar_t * aaft_TransferCharacteristicToText( const aafUID_t *auid ); -const wchar_t * CodingEquationsToText( const aafUID_t *auid ); +const wchar_t * aaft_CodingEquationsToText( const aafUID_t *auid ); -const wchar_t * ColorPrimariesToText( const aafUID_t *auid ); +const wchar_t * aaft_ColorPrimariesToText( const aafUID_t *auid ); -const wchar_t * UsageCodeToText( const aafUID_t *auid ); +const wchar_t * aaft_UsageCodeToText( const aafUID_t *auid ); -const wchar_t * PIDToText( AAF_Data *aafd, aafPID_t pid ); +const wchar_t * aaft_PIDToText( AAF_Data *aafd, aafPID_t pid ); -const wchar_t * ClassIDToText( AAF_Data *aafd, const aafUID_t *auid ); +const wchar_t * aaft_ClassIDToText( AAF_Data *aafd, const aafUID_t *auid ); -const wchar_t * ContainerToText( const aafUID_t *auid ); +const wchar_t * aaft_ContainerToText( const aafUID_t *auid ); -const wchar_t * CompressionToText( const aafUID_t *auid ); +const wchar_t * aaft_CompressionToText( const aafUID_t *auid ); #endif // !__AAFToText_h__ diff --git a/include/libaaf/LibCFB.h b/include/libaaf/LibCFB.h index a8bdbe6..a77e085 100644 --- a/include/libaaf/LibCFB.h +++ b/include/libaaf/LibCFB.h @@ -842,7 +842,7 @@ typedef struct CFB_Data */ -const wchar_t * CLSIDToText( const cfbCLSID_t *clsid ); +const wchar_t * cfb_CLSIDToText( const cfbCLSID_t *clsid ); wchar_t * cfb_w16towchar( wchar_t *buf, uint16_t *w16buf, size_t w16blen ); diff --git a/include/libaaf/debug.h b/include/libaaf/debug.h index d09ad70..2b99f19 100644 --- a/include/libaaf/debug.h +++ b/include/libaaf/debug.h @@ -89,11 +89,11 @@ struct dbg { -struct dbg * new_debug( void ); +struct dbg * laaf_new_debug( void ); -void free_debug( struct dbg *dbg ); +void laaf_free_debug( struct dbg *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 ); +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__ diff --git a/src/AAFCore/AAFClass.c b/src/AAFCore/AAFClass.c index 64b1371..9fb5454 100644 --- a/src/AAFCore/AAFClass.c +++ b/src/AAFCore/AAFClass.c @@ -71,7 +71,7 @@ -int classExists( AAF_Data *aafd, aafUID_t *ClassID ) +int aafclass_classExists( AAF_Data *aafd, aafUID_t *ClassID ) { aafClass *Class = NULL; @@ -99,7 +99,7 @@ int classExists( AAF_Data *aafd, aafUID_t *ClassID ) * @return pointer to the newly allocated aafClass. */ -aafClass * defineNewClass( AAF_Data *aafd, const aafUID_t *id, uint8_t isConcrete, aafClass *parent ) +aafClass * aafclass_defineNewClass( AAF_Data *aafd, const aafUID_t *id, uint8_t isConcrete, aafClass *parent ) { aafClass *Class = malloc( sizeof(aafClass) ); @@ -132,7 +132,7 @@ aafClass * defineNewClass( AAF_Data *aafd, const aafUID_t *id, uint8_t isConcret * @return pointer to the retrieved aafClass structure, or NULL if not found. */ -aafClass * getClassByID( AAF_Data *aafd, const aafUID_t *id ) +aafClass * aafclass_getClassByID( AAF_Data *aafd, const aafUID_t *id ) { aafClass *Class = NULL; @@ -145,7 +145,7 @@ aafClass * getClassByID( AAF_Data *aafd, const aafUID_t *id ) -aafPropertyDef * getPropertyDefinitionByID( aafClass *Classes, aafPID_t pid ) +aafPropertyDef * aafclass_getPropertyDefinitionByID( aafClass *Classes, aafPID_t pid ) { aafClass *Class = NULL; aafPropertyDef *PDef = NULL; @@ -171,14 +171,14 @@ aafPropertyDef * getPropertyDefinitionByID( aafClass *Classes, aafPID_t pid ) * * @param aafd The AAF_Data struct pointer. */ -int setDefaultClasses( AAF_Data *aafd ) +int aafclass_setDefaultClasses( AAF_Data *aafd ) { aafPropertyDef *prop = NULL; /* TODO test ENOMEM after each class alloc */ - aafClass *IOC = defineNewClass( aafd, &AAFClassID_InterchangeObject, ABSTRACT, NULL ); + aafClass *IOC = aafclass_defineNewClass( aafd, &AAFClassID_InterchangeObject, ABSTRACT, NULL ); if ( IOC == NULL ) { return -1; } @@ -186,7 +186,7 @@ int setDefaultClasses( AAF_Data *aafd ) attachNewProperty( aafd, IOC, prop, PID_InterchangeObject_Generation, PROP_OPT ); - aafClass *Root = defineNewClass( aafd, &AAFClassID_Root, CONCRETE, IOC ); + aafClass *Root = aafclass_defineNewClass( aafd, &AAFClassID_Root, CONCRETE, IOC ); if ( Root == NULL ) { return -1; } @@ -194,7 +194,7 @@ int setDefaultClasses( AAF_Data *aafd ) attachNewProperty( aafd, Root, prop, PID_Root_Header, PROP_REQ ); - aafClass *Header = defineNewClass( aafd, &AAFClassID_Header, CONCRETE, IOC ); + aafClass *Header = aafclass_defineNewClass( aafd, &AAFClassID_Header, CONCRETE, IOC ); if ( Header == NULL ) { return -1; } @@ -211,7 +211,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass *Identif = defineNewClass( aafd, &AAFClassID_Identification, CONCRETE, IOC ); + aafClass *Identif = aafclass_defineNewClass( aafd, &AAFClassID_Identification, CONCRETE, IOC ); if ( Identif == NULL ) { return -1; } @@ -226,7 +226,7 @@ int setDefaultClasses( AAF_Data *aafd ) attachNewProperty( aafd, Identif, prop, PID_Identification_GenerationAUID, PROP_REQ ); - aafClass * Dictionary = defineNewClass( aafd, &AAFClassID_Dictionary, CONCRETE, IOC ); + aafClass * Dictionary = aafclass_defineNewClass( aafd, &AAFClassID_Dictionary, CONCRETE, IOC ); if ( Dictionary == NULL ) { return -1; } @@ -241,7 +241,7 @@ int setDefaultClasses( AAF_Data *aafd ) attachNewProperty( aafd, Dictionary, prop, PID_Dictionary_TaggedValueDefinitions, PROP_OPT ); - aafClass *Content = defineNewClass( aafd, &AAFClassID_ContentStorage, CONCRETE, IOC ); + aafClass *Content = aafclass_defineNewClass( aafd, &AAFClassID_ContentStorage, CONCRETE, IOC ); if ( Content == NULL ) { return -1; } @@ -250,7 +250,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass *Mob = defineNewClass( aafd, &AAFClassID_Mob, ABSTRACT, IOC ); + aafClass *Mob = aafclass_defineNewClass( aafd, &AAFClassID_Mob, ABSTRACT, IOC ); if ( Mob == NULL ) { return -1; } @@ -266,7 +266,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass *CompoMob = defineNewClass( aafd, &AAFClassID_CompositionMob, CONCRETE, Mob ); + aafClass *CompoMob = aafclass_defineNewClass( aafd, &AAFClassID_CompositionMob, CONCRETE, Mob ); if ( CompoMob == NULL ) { return -1; } @@ -277,7 +277,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass *MasterMob = defineNewClass( aafd, &AAFClassID_MasterMob, CONCRETE, Mob ); + aafClass *MasterMob = aafclass_defineNewClass( aafd, &AAFClassID_MasterMob, CONCRETE, Mob ); if ( MasterMob == NULL ) { return -1; } @@ -285,7 +285,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass *SourceMob = defineNewClass( aafd, &AAFClassID_SourceMob, CONCRETE, Mob ); + aafClass *SourceMob = aafclass_defineNewClass( aafd, &AAFClassID_SourceMob, CONCRETE, Mob ); if ( SourceMob == NULL ) { return -1; } @@ -293,7 +293,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass *MobSlot = defineNewClass( aafd, &AAFClassID_MobSlot, ABSTRACT, IOC ); + aafClass *MobSlot = aafclass_defineNewClass( aafd, &AAFClassID_MobSlot, ABSTRACT, IOC ); if ( MobSlot == NULL ) { return -1; } @@ -304,7 +304,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass *TimelineMobSlot = defineNewClass( aafd, &AAFClassID_TimelineMobSlot, CONCRETE, MobSlot ); + aafClass *TimelineMobSlot = aafclass_defineNewClass( aafd, &AAFClassID_TimelineMobSlot, CONCRETE, MobSlot ); if ( TimelineMobSlot == NULL ) { return -1; } @@ -316,7 +316,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass *EventMobSlot = defineNewClass( aafd, &AAFClassID_EventMobSlot, CONCRETE, MobSlot ); + aafClass *EventMobSlot = aafclass_defineNewClass( aafd, &AAFClassID_EventMobSlot, CONCRETE, MobSlot ); if ( EventMobSlot == NULL ) { return -1; } @@ -325,7 +325,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass *StaticMobSlot = defineNewClass( aafd, &AAFClassID_StaticMobSlot, CONCRETE, MobSlot ); + aafClass *StaticMobSlot = aafclass_defineNewClass( aafd, &AAFClassID_StaticMobSlot, CONCRETE, MobSlot ); if ( StaticMobSlot == NULL ) { return -1; } @@ -333,7 +333,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * KLVData = defineNewClass( aafd, &AAFClassID_KLVData, CONCRETE, IOC ); + aafClass * KLVData = aafclass_defineNewClass( aafd, &AAFClassID_KLVData, CONCRETE, IOC ); if ( KLVData == NULL ) { return -1; } @@ -341,7 +341,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TaggedValue = defineNewClass( aafd, &AAFClassID_TaggedValue, CONCRETE, IOC ); + aafClass * TaggedValue = aafclass_defineNewClass( aafd, &AAFClassID_TaggedValue, CONCRETE, IOC ); if ( TaggedValue == NULL ) { return -1; } @@ -350,7 +350,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * Parameter = defineNewClass( aafd, &AAFClassID_Parameter, ABSTRACT, IOC ); + aafClass * Parameter = aafclass_defineNewClass( aafd, &AAFClassID_Parameter, ABSTRACT, IOC ); if ( Parameter == NULL ) { return -1; } @@ -358,7 +358,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * ConstantValue = defineNewClass( aafd, &AAFClassID_ConstantValue, CONCRETE, Parameter ); + aafClass * ConstantValue = aafclass_defineNewClass( aafd, &AAFClassID_ConstantValue, CONCRETE, Parameter ); if ( ConstantValue == NULL ) { return -1; } @@ -366,7 +366,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * VaryingValue = defineNewClass( aafd, &AAFClassID_VaryingValue, CONCRETE, Parameter ); + aafClass * VaryingValue = aafclass_defineNewClass( aafd, &AAFClassID_VaryingValue, CONCRETE, Parameter ); if ( VaryingValue == NULL ) { return -1; } @@ -375,7 +375,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * ControlPoint = defineNewClass( aafd, &AAFClassID_ControlPoint, CONCRETE, IOC ); + aafClass * ControlPoint = aafclass_defineNewClass( aafd, &AAFClassID_ControlPoint, CONCRETE, IOC ); if ( ControlPoint == NULL ) { return -1; } @@ -385,7 +385,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * Locator = defineNewClass( aafd, &AAFClassID_Locator, ABSTRACT, IOC ); + aafClass * Locator = aafclass_defineNewClass( aafd, &AAFClassID_Locator, ABSTRACT, IOC ); if ( Locator == NULL ) { return -1; } @@ -393,7 +393,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * NetworkLocator = defineNewClass( aafd, &AAFClassID_NetworkLocator, CONCRETE, Locator ); + aafClass * NetworkLocator = aafclass_defineNewClass( aafd, &AAFClassID_NetworkLocator, CONCRETE, Locator ); if ( NetworkLocator == NULL ) { return -1; } @@ -401,7 +401,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TextLocator = defineNewClass( aafd, &AAFClassID_TextLocator, CONCRETE, Locator ); + aafClass * TextLocator = aafclass_defineNewClass( aafd, &AAFClassID_TextLocator, CONCRETE, Locator ); if ( TextLocator == NULL ) { return -1; } @@ -421,7 +421,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * Component = defineNewClass( aafd, &AAFClassID_Component, ABSTRACT, IOC ); + aafClass * Component = aafclass_defineNewClass( aafd, &AAFClassID_Component, ABSTRACT, IOC ); if ( Component == NULL ) { return -1; } @@ -433,7 +433,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * Transition = defineNewClass( aafd, &AAFClassID_Transition, CONCRETE, Component ); + aafClass * Transition = aafclass_defineNewClass( aafd, &AAFClassID_Transition, CONCRETE, Component ); if ( Transition == NULL ) { return -1; } @@ -442,7 +442,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * Segment = defineNewClass( aafd, &AAFClassID_Segment, ABSTRACT, Component ); + aafClass * Segment = aafclass_defineNewClass( aafd, &AAFClassID_Segment, ABSTRACT, Component ); if ( Segment == NULL ) { return -1; } @@ -450,7 +450,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * Sequence = defineNewClass( aafd, &AAFClassID_Sequence, CONCRETE, Segment ); + aafClass * Sequence = aafclass_defineNewClass( aafd, &AAFClassID_Sequence, CONCRETE, Segment ); if ( Sequence == NULL ) { return -1; } @@ -458,7 +458,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * Filler = defineNewClass( aafd, &AAFClassID_Filler, CONCRETE, Segment ); + aafClass * Filler = aafclass_defineNewClass( aafd, &AAFClassID_Filler, CONCRETE, Segment ); if ( Filler == NULL ) { return -1; } @@ -466,7 +466,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * SourceRef = defineNewClass( aafd, &AAFClassID_SourceReference, ABSTRACT, Segment ); + aafClass * SourceRef = aafclass_defineNewClass( aafd, &AAFClassID_SourceReference, ABSTRACT, Segment ); if ( SourceRef == NULL ) { return -1; } @@ -477,7 +477,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * SourceClip = defineNewClass( aafd, &AAFClassID_SourceClip, CONCRETE, SourceRef ); + aafClass * SourceClip = aafclass_defineNewClass( aafd, &AAFClassID_SourceClip, CONCRETE, SourceRef ); if ( SourceClip == NULL ) { return -1; } @@ -489,7 +489,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * Event = defineNewClass( aafd, &AAFClassID_Event, ABSTRACT, Segment ); + aafClass * Event = aafclass_defineNewClass( aafd, &AAFClassID_Event, ABSTRACT, Segment ); if ( Event == NULL ) { return -1; } @@ -498,7 +498,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * CommentMarker = defineNewClass( aafd, &AAFClassID_CommentMarker, CONCRETE, Event ); + aafClass * CommentMarker = aafclass_defineNewClass( aafd, &AAFClassID_CommentMarker, CONCRETE, Event ); if ( CommentMarker == NULL ) { return -1; } @@ -506,7 +506,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * DescriptiveMarker = defineNewClass( aafd, &AAFClassID_DescriptiveMarker, CONCRETE, CommentMarker ); + aafClass * DescriptiveMarker = aafclass_defineNewClass( aafd, &AAFClassID_DescriptiveMarker, CONCRETE, CommentMarker ); if ( DescriptiveMarker == NULL ) { return -1; } @@ -515,7 +515,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * GPITrigger = defineNewClass( aafd, &AAFClassID_GPITrigger, CONCRETE, Event ); + aafClass * GPITrigger = aafclass_defineNewClass( aafd, &AAFClassID_GPITrigger, CONCRETE, Event ); if ( GPITrigger == NULL ) { return -1; } @@ -523,7 +523,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * Timecode = defineNewClass( aafd, &AAFClassID_Timecode, CONCRETE, Segment ); + aafClass * Timecode = aafclass_defineNewClass( aafd, &AAFClassID_Timecode, CONCRETE, Segment ); if ( Timecode == NULL ) { return -1; } @@ -533,7 +533,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TCStream = defineNewClass( aafd, &AAFClassID_TimecodeStream, ABSTRACT, Segment ); + aafClass * TCStream = aafclass_defineNewClass( aafd, &AAFClassID_TimecodeStream, ABSTRACT, Segment ); if ( TCStream == NULL ) { return -1; } @@ -543,7 +543,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TCStream12M = defineNewClass( aafd, &AAFClassID_TimecodeStream12M, CONCRETE, TCStream ); + aafClass * TCStream12M = aafclass_defineNewClass( aafd, &AAFClassID_TimecodeStream12M, CONCRETE, TCStream ); if ( TCStream12M == NULL ) { return -1; } @@ -551,7 +551,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * Edgecode = defineNewClass( aafd, &AAFClassID_Edgecode, CONCRETE, Segment ); + aafClass * Edgecode = aafclass_defineNewClass( aafd, &AAFClassID_Edgecode, CONCRETE, Segment ); if ( Edgecode == NULL ) { return -1; } @@ -562,7 +562,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * Pulldown = defineNewClass( aafd, &AAFClassID_Pulldown, CONCRETE, Segment ); + aafClass * Pulldown = aafclass_defineNewClass( aafd, &AAFClassID_Pulldown, CONCRETE, Segment ); if ( Pulldown == NULL ) { return -1; } @@ -573,7 +573,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * OperationGroup = defineNewClass( aafd, &AAFClassID_OperationGroup, CONCRETE, Segment ); + aafClass * OperationGroup = aafclass_defineNewClass( aafd, &AAFClassID_OperationGroup, CONCRETE, Segment ); if ( OperationGroup == NULL ) { return -1; } @@ -585,7 +585,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * NestedScope = defineNewClass( aafd, &AAFClassID_NestedScope, CONCRETE, Segment ); + aafClass * NestedScope = aafclass_defineNewClass( aafd, &AAFClassID_NestedScope, CONCRETE, Segment ); if ( NestedScope == NULL ) { return -1; } @@ -593,7 +593,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * ScopeReference = defineNewClass( aafd, &AAFClassID_ScopeReference, CONCRETE, Segment ); + aafClass * ScopeReference = aafclass_defineNewClass( aafd, &AAFClassID_ScopeReference, CONCRETE, Segment ); if ( ScopeReference == NULL ) { return -1; } @@ -602,7 +602,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * Selector = defineNewClass( aafd, &AAFClassID_Selector, CONCRETE, Segment ); + aafClass * Selector = aafclass_defineNewClass( aafd, &AAFClassID_Selector, CONCRETE, Segment ); if ( Selector == NULL ) { return -1; } @@ -611,7 +611,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * EssenceGroup = defineNewClass( aafd, &AAFClassID_EssenceGroup, CONCRETE, Segment ); + aafClass * EssenceGroup = aafclass_defineNewClass( aafd, &AAFClassID_EssenceGroup, CONCRETE, Segment ); if ( EssenceGroup == NULL ) { return -1; } @@ -631,13 +631,13 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * DescriptiveFramework = defineNewClass( aafd, &AAFClassID_DescriptiveFramework, ABSTRACT, IOC ); + aafClass * DescriptiveFramework = aafclass_defineNewClass( aafd, &AAFClassID_DescriptiveFramework, ABSTRACT, IOC ); if ( DescriptiveFramework == NULL ) { return -1; } - aafClass *EssenceDesc = defineNewClass( aafd, &AAFClassID_EssenceDescriptor, ABSTRACT, IOC ); + aafClass *EssenceDesc = aafclass_defineNewClass( aafd, &AAFClassID_EssenceDescriptor, ABSTRACT, IOC ); if ( EssenceDesc == NULL ) { return -1; } @@ -645,7 +645,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass *FileDesc = defineNewClass( aafd, &AAFClassID_FileDescriptor, ABSTRACT, EssenceDesc ); + aafClass *FileDesc = aafclass_defineNewClass( aafd, &AAFClassID_FileDescriptor, ABSTRACT, EssenceDesc ); if ( FileDesc == NULL ) { return -1; } @@ -657,7 +657,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass *DigitalImageDesc = defineNewClass( aafd, &AAFClassID_DigitalImageDescriptor, ABSTRACT, FileDesc ); + aafClass *DigitalImageDesc = aafclass_defineNewClass( aafd, &AAFClassID_DigitalImageDescriptor, ABSTRACT, FileDesc ); if ( DigitalImageDesc == NULL ) { return -1; } @@ -690,7 +690,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * CDCIDesc = defineNewClass( aafd, &AAFClassID_CDCIDescriptor, CONCRETE, DigitalImageDesc ); + aafClass * CDCIDesc = aafclass_defineNewClass( aafd, &AAFClassID_CDCIDescriptor, CONCRETE, DigitalImageDesc ); if ( CDCIDesc == NULL ) { return -1; } @@ -707,7 +707,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * RGBADesc = defineNewClass( aafd, &AAFClassID_RGBADescriptor, CONCRETE, DigitalImageDesc ); + aafClass * RGBADesc = aafclass_defineNewClass( aafd, &AAFClassID_RGBADescriptor, CONCRETE, DigitalImageDesc ); if ( RGBADesc == NULL ) { return -1; } @@ -722,7 +722,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TapeDesc = defineNewClass( aafd, &AAFClassID_TapeDescriptor, CONCRETE, EssenceDesc ); + aafClass * TapeDesc = aafclass_defineNewClass( aafd, &AAFClassID_TapeDescriptor, CONCRETE, EssenceDesc ); if ( TapeDesc == NULL ) { return -1; } @@ -737,7 +737,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * FilmDesc = defineNewClass( aafd, &AAFClassID_FilmDescriptor, CONCRETE, EssenceDesc ); + aafClass * FilmDesc = aafclass_defineNewClass( aafd, &AAFClassID_FilmDescriptor, CONCRETE, EssenceDesc ); if ( FilmDesc == NULL ) { return -1; } @@ -752,7 +752,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * WAVEDesc = defineNewClass( aafd, &AAFClassID_WAVEDescriptor, CONCRETE, FileDesc ); + aafClass * WAVEDesc = aafclass_defineNewClass( aafd, &AAFClassID_WAVEDescriptor, CONCRETE, FileDesc ); if ( WAVEDesc == NULL ) { return -1; } @@ -760,7 +760,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * AIFCDesc = defineNewClass( aafd, &AAFClassID_AIFCDescriptor, CONCRETE, FileDesc ); + aafClass * AIFCDesc = aafclass_defineNewClass( aafd, &AAFClassID_AIFCDescriptor, CONCRETE, FileDesc ); if ( AIFCDesc == NULL ) { return -1; } @@ -768,7 +768,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TIFFDesc = defineNewClass( aafd, &AAFClassID_TIFFDescriptor, CONCRETE, FileDesc ); + aafClass * TIFFDesc = aafclass_defineNewClass( aafd, &AAFClassID_TIFFDescriptor, CONCRETE, FileDesc ); if ( TIFFDesc == NULL ) { return -1; } @@ -781,7 +781,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * SoundDesc = defineNewClass( aafd, &AAFClassID_SoundDescriptor, CONCRETE, FileDesc ); + aafClass * SoundDesc = aafclass_defineNewClass( aafd, &AAFClassID_SoundDescriptor, CONCRETE, FileDesc ); if ( SoundDesc == NULL ) { return -1; } @@ -796,7 +796,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * PCMDesc = defineNewClass( aafd, &AAFClassID_PCMDescriptor, CONCRETE, SoundDesc ); + aafClass * PCMDesc = aafclass_defineNewClass( aafd, &AAFClassID_PCMDescriptor, CONCRETE, SoundDesc ); if ( PCMDesc == NULL ) { return -1; } @@ -816,7 +816,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * PhysicalDesc = defineNewClass( aafd, &AAFClassID_PhysicalDescriptor, ABSTRACT, EssenceDesc ); + aafClass * PhysicalDesc = aafclass_defineNewClass( aafd, &AAFClassID_PhysicalDescriptor, ABSTRACT, EssenceDesc ); if ( PhysicalDesc == NULL ) { return -1; } @@ -824,7 +824,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * ImportDesc = defineNewClass( aafd, &AAFClassID_ImportDescriptor, CONCRETE, PhysicalDesc ); + aafClass * ImportDesc = aafclass_defineNewClass( aafd, &AAFClassID_ImportDescriptor, CONCRETE, PhysicalDesc ); if ( ImportDesc == NULL ) { return -1; } @@ -832,7 +832,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * RecordingDesc = defineNewClass( aafd, &AAFClassID_RecordingDescriptor, CONCRETE, PhysicalDesc ); + aafClass * RecordingDesc = aafclass_defineNewClass( aafd, &AAFClassID_RecordingDescriptor, CONCRETE, PhysicalDesc ); if ( RecordingDesc == NULL ) { return -1; } @@ -840,7 +840,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * AuxiliaryDesc = defineNewClass( aafd, &AAFClassID_AuxiliaryDescriptor, CONCRETE, PhysicalDesc ); + aafClass * AuxiliaryDesc = aafclass_defineNewClass( aafd, &AAFClassID_AuxiliaryDescriptor, CONCRETE, PhysicalDesc ); if ( AuxiliaryDesc == NULL ) { return -1; } @@ -861,7 +861,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * DefObject = defineNewClass( aafd, &AAFClassID_DefinitionObject, ABSTRACT, IOC ); + aafClass * DefObject = aafclass_defineNewClass( aafd, &AAFClassID_DefinitionObject, ABSTRACT, IOC ); if ( DefObject == NULL ) { return -1; } @@ -871,7 +871,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * DataDef = defineNewClass( aafd, &AAFClassID_DataDefinition, CONCRETE, DefObject ); + aafClass * DataDef = aafclass_defineNewClass( aafd, &AAFClassID_DataDefinition, CONCRETE, DefObject ); if ( DataDef == NULL ) { return -1; } @@ -879,7 +879,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * ContainerDef = defineNewClass( aafd, &AAFClassID_ContainerDefinition, CONCRETE, DefObject ); + aafClass * ContainerDef = aafclass_defineNewClass( aafd, &AAFClassID_ContainerDefinition, CONCRETE, DefObject ); if ( ContainerDef == NULL ) { return -1; } @@ -887,7 +887,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * OperationDef = defineNewClass( aafd, &AAFClassID_OperationDefinition, CONCRETE, DefObject ); + aafClass * OperationDef = aafclass_defineNewClass( aafd, &AAFClassID_OperationDefinition, CONCRETE, DefObject ); if ( OperationDef == NULL ) { return -1; } @@ -901,7 +901,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * ParameterDef = defineNewClass( aafd, &AAFClassID_ParameterDefinition, CONCRETE, DefObject ); + aafClass * ParameterDef = aafclass_defineNewClass( aafd, &AAFClassID_ParameterDefinition, CONCRETE, DefObject ); if ( ParameterDef == NULL ) { return -1; } @@ -910,7 +910,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * InterpolationDef = defineNewClass( aafd, &AAFClassID_InterpolationDefinition, CONCRETE, DefObject ); + aafClass * InterpolationDef = aafclass_defineNewClass( aafd, &AAFClassID_InterpolationDefinition, CONCRETE, DefObject ); if ( InterpolationDef == NULL ) { return -1; } @@ -918,7 +918,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * CodecDef = defineNewClass( aafd, &AAFClassID_CodecDefinition, CONCRETE, DefObject ); + aafClass * CodecDef = aafclass_defineNewClass( aafd, &AAFClassID_CodecDefinition, CONCRETE, DefObject ); if ( CodecDef == NULL ) { return -1; } @@ -927,7 +927,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * PluginDef = defineNewClass( aafd, &AAFClassID_PluginDefinition, CONCRETE, DefObject ); + aafClass * PluginDef = aafclass_defineNewClass( aafd, &AAFClassID_PluginDefinition, CONCRETE, DefObject ); if ( PluginDef == NULL ) { return -1; } @@ -953,7 +953,7 @@ int setDefaultClasses( AAF_Data *aafd ) attachNewProperty( aafd, PluginDef, prop, PID_PluginDefinition_DefinitionObject, PROP_OPT ); - aafClass * TaggedValueDef = defineNewClass( aafd, &AAFClassID_TaggedValueDefinition, CONCRETE, DefObject ); + aafClass * TaggedValueDef = aafclass_defineNewClass( aafd, &AAFClassID_TaggedValueDefinition, CONCRETE, DefObject ); if ( TaggedValueDef == NULL ) { return -1; } @@ -961,7 +961,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * KLVDataDef = defineNewClass( aafd, &AAFClassID_KLVDataDefinition, CONCRETE, DefObject ); + aafClass * KLVDataDef = aafclass_defineNewClass( aafd, &AAFClassID_KLVDataDefinition, CONCRETE, DefObject ); if ( KLVDataDef == NULL ) { return -1; } @@ -969,7 +969,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * EssenceData = defineNewClass( aafd, &AAFClassID_EssenceData, CONCRETE, IOC ); + aafClass * EssenceData = aafclass_defineNewClass( aafd, &AAFClassID_EssenceData, CONCRETE, IOC ); if ( EssenceData == NULL ) { return -1; } @@ -989,7 +989,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * MetaDefinition = defineNewClass( aafd, &AAFClassID_MetaDefinition, ABSTRACT, NULL ); + aafClass * MetaDefinition = aafclass_defineNewClass( aafd, &AAFClassID_MetaDefinition, ABSTRACT, NULL ); if ( MetaDefinition == NULL ) { return -1; } @@ -999,7 +999,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * ClassDefinition = defineNewClass( aafd, &AAFClassID_ClassDefinition, CONCRETE, MetaDefinition ); + aafClass * ClassDefinition = aafclass_defineNewClass( aafd, &AAFClassID_ClassDefinition, CONCRETE, MetaDefinition ); if ( ClassDefinition == NULL ) { return -1; } @@ -1009,7 +1009,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * PropertyDefinition = defineNewClass( aafd, &AAFClassID_PropertyDefinition, CONCRETE, MetaDefinition ); + aafClass * PropertyDefinition = aafclass_defineNewClass( aafd, &AAFClassID_PropertyDefinition, CONCRETE, MetaDefinition ); if ( PropertyDefinition == NULL ) { return -1; } @@ -1020,7 +1020,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDef = defineNewClass( aafd, &AAFClassID_TypeDefinition, ABSTRACT, MetaDefinition ); + aafClass * TypeDef = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinition, ABSTRACT, MetaDefinition ); if ( TypeDef == NULL ) { return -1; } @@ -1028,7 +1028,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefCharacter = defineNewClass( aafd, &AAFClassID_TypeDefinitionCharacter, CONCRETE, TypeDef ); + aafClass * TypeDefCharacter = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionCharacter, CONCRETE, TypeDef ); if ( TypeDefCharacter == NULL ) { return -1; } @@ -1036,7 +1036,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefEnum = defineNewClass( aafd, &AAFClassID_TypeDefinitionEnumeration, CONCRETE, TypeDef ); + aafClass * TypeDefEnum = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionEnumeration, CONCRETE, TypeDef ); if ( TypeDefEnum == NULL ) { return -1; } @@ -1046,7 +1046,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefExtEnum = defineNewClass( aafd, &AAFClassID_TypeDefinitionExtendibleEnumeration, CONCRETE, TypeDef ); + aafClass * TypeDefExtEnum = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionExtendibleEnumeration, CONCRETE, TypeDef ); if ( TypeDefExtEnum == NULL ) { return -1; } @@ -1055,7 +1055,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefFixedArray = defineNewClass( aafd, &AAFClassID_TypeDefinitionFixedArray, CONCRETE, TypeDef ); + aafClass * TypeDefFixedArray = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionFixedArray, CONCRETE, TypeDef ); if ( TypeDefFixedArray == NULL ) { return -1; } @@ -1064,7 +1064,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefIndirect = defineNewClass( aafd, &AAFClassID_TypeDefinitionIndirect, CONCRETE, TypeDef ); + aafClass * TypeDefIndirect = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionIndirect, CONCRETE, TypeDef ); if ( TypeDefIndirect == NULL ) { return -1; } @@ -1072,7 +1072,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefInt = defineNewClass( aafd, &AAFClassID_TypeDefinitionInteger, CONCRETE, TypeDef ); + aafClass * TypeDefInt = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionInteger, CONCRETE, TypeDef ); if ( TypeDefInt == NULL ) { return -1; } @@ -1081,7 +1081,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefOpaque = defineNewClass( aafd, &AAFClassID_TypeDefinitionOpaque, CONCRETE, TypeDef ); + aafClass * TypeDefOpaque = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionOpaque, CONCRETE, TypeDef ); if ( TypeDefOpaque == NULL ) { return -1; } @@ -1089,7 +1089,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefRecord = defineNewClass( aafd, &AAFClassID_TypeDefinitionRecord, CONCRETE, TypeDef ); + aafClass * TypeDefRecord = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionRecord, CONCRETE, TypeDef ); if ( TypeDefRecord == NULL ) { return -1; } @@ -1098,7 +1098,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefRename = defineNewClass( aafd, &AAFClassID_TypeDefinitionRename, CONCRETE, TypeDef ); + aafClass * TypeDefRename = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionRename, CONCRETE, TypeDef ); if ( TypeDefRename == NULL ) { return -1; } @@ -1106,7 +1106,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefSet = defineNewClass( aafd, &AAFClassID_TypeDefinitionSet, CONCRETE, TypeDef ); + aafClass * TypeDefSet = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionSet, CONCRETE, TypeDef ); if ( TypeDefSet == NULL ) { return -1; } @@ -1114,7 +1114,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefStream = defineNewClass( aafd, &AAFClassID_TypeDefinitionStream, CONCRETE, TypeDef ); + aafClass * TypeDefStream = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionStream, CONCRETE, TypeDef ); if ( TypeDefStream == NULL ) { return -1; } @@ -1122,7 +1122,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefString = defineNewClass( aafd, &AAFClassID_TypeDefinitionString, CONCRETE, TypeDef ); + aafClass * TypeDefString = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionString, CONCRETE, TypeDef ); if ( TypeDefString == NULL ) { return -1; } @@ -1130,7 +1130,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefStrongObjRef = defineNewClass( aafd, &AAFClassID_TypeDefinitionStrongObjectReference, CONCRETE, TypeDef ); + aafClass * TypeDefStrongObjRef = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionStrongObjectReference, CONCRETE, TypeDef ); if ( TypeDefStrongObjRef == NULL ) { return -1; } @@ -1138,7 +1138,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefVariableArray = defineNewClass( aafd, &AAFClassID_TypeDefinitionVariableArray, CONCRETE, TypeDef ); + aafClass * TypeDefVariableArray = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionVariableArray, CONCRETE, TypeDef ); if ( TypeDefVariableArray == NULL ) { return -1; } @@ -1146,7 +1146,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * TypeDefWeakObjRef = defineNewClass( aafd, &AAFClassID_TypeDefinitionWeakObjectReference, CONCRETE, TypeDef ); + aafClass * TypeDefWeakObjRef = aafclass_defineNewClass( aafd, &AAFClassID_TypeDefinitionWeakObjectReference, CONCRETE, TypeDef ); if ( TypeDefWeakObjRef == NULL ) { return -1; } @@ -1155,7 +1155,7 @@ int setDefaultClasses( AAF_Data *aafd ) - aafClass * MetaDictionary = defineNewClass( aafd, &AAFClassID_MetaDictionary, CONCRETE, NULL ); + aafClass * MetaDictionary = aafclass_defineNewClass( aafd, &AAFClassID_MetaDictionary, CONCRETE, NULL ); if ( MetaDictionary == NULL ) { return -1; } diff --git a/src/AAFCore/AAFClass.h b/src/AAFCore/AAFClass.h index 83abe9b..3eec0b7 100644 --- a/src/AAFCore/AAFClass.h +++ b/src/AAFCore/AAFClass.h @@ -48,17 +48,17 @@ -int classExists( AAF_Data *aafd, aafUID_t *ClassID ); +int aafclass_classExists( AAF_Data *aafd, aafUID_t *ClassID ); -aafClass * defineNewClass( AAF_Data *aafd, const aafUID_t *id, uint8_t isConcrete, aafClass *parent ); +aafClass * aafclass_defineNewClass( AAF_Data *aafd, const aafUID_t *id, uint8_t isConcrete, aafClass *parent ); -aafClass * getClassByID( AAF_Data *aafd, const aafUID_t *id ); +aafClass * aafclass_getClassByID( AAF_Data *aafd, const aafUID_t *id ); -aafPropertyDef * getPropertyDefinitionByID( aafClass *Classes, aafPID_t PID ); +aafPropertyDef * aafclass_getPropertyDefinitionByID( aafClass *Classes, aafPID_t PID ); -void printClasses( aafClass *Class, int depth ); // TODO move to AAFDump ? +void aafclass_printClasses( aafClass *Class, int depth ); // TODO move to AAFDump ? -int setDefaultClasses( AAF_Data *aafd ); +int aafclass_setDefaultClasses( AAF_Data *aafd ); #endif // ! __AAFClass_h__ diff --git a/src/AAFCore/AAFCore.c b/src/AAFCore/AAFCore.c index 524bcd8..7fd9ee8 100644 --- a/src/AAFCore/AAFCore.c +++ b/src/AAFCore/AAFCore.c @@ -186,7 +186,7 @@ static void setObjectShortcuts( AAF_Data *aafd ); * and then parses the rest of the Tree starting at Root::Header. * * This function should be called after the AAF Classes has been defined by - * #setDefaultClasses(). This function is called by aaf_load_file(). + * #aafclass_setDefaultClasses(). This function is called by aaf_load_file(). * * @param aafd Pointer to the AAF_Data structure. */ @@ -455,7 +455,7 @@ AAF_Data *aaf_alloc( struct dbg *dbg ) aafd->Classes = NULL; aafd->Objects = NULL; - // aafd->debug_callback = &debug_callback; + // aafd->debug_callback = &laaf_debug_callback; aafd->dbg = dbg; @@ -495,7 +495,7 @@ int aaf_load_file( AAF_Data *aafd, const char *file ) // return 1; // } - if ( setDefaultClasses( aafd ) < 0 ) { + if ( aafclass_setDefaultClasses( aafd ) < 0 ) { return -1; } @@ -613,7 +613,7 @@ void aaf_release( AAF_Data **aafd ) /* free once in AAFIface */ // if ( (*aafd)->dbg ) { - // free_debug( (*aafd)->dbg ); + // laaf_free_debug( (*aafd)->dbg ); // } free( *aafd ); @@ -791,17 +791,17 @@ aafProperty * aaf_get_property( aafObject *Obj, aafPID_t pid ) if ( Prop == NULL ) { - aafPropertyDef *PDef = getPropertyDefinitionByID( Obj->Class, pid ); + aafPropertyDef *PDef = aafclass_getPropertyDefinitionByID( Obj->Class, pid ); if ( PDef == NULL ) { - warning( "Unknown property 0x%04x (%ls) of Class %ls", pid, PIDToText( aafd, pid ), ClassIDToText(aafd, Obj->Class->ID) ); + warning( "Unknown property 0x%04x (%ls) of Class %ls", pid, aaft_PIDToText( aafd, pid ), aaft_ClassIDToText(aafd, Obj->Class->ID) ); return NULL; } if ( PDef->isReq ) { - error( "Could not retrieve %ls required property 0x%04x (%ls)", ClassIDToText(aafd, Obj->Class->ID), pid, PIDToText(aafd, pid) ); + error( "Could not retrieve %ls required property 0x%04x (%ls)", aaft_ClassIDToText(aafd, Obj->Class->ID), pid, aaft_PIDToText(aafd, pid) ); } else { - debug( "Could not retrieve %ls optional property 0x%04x (%ls)", ClassIDToText(aafd, Obj->Class->ID), pid, PIDToText(aafd, pid) ); + debug( "Could not retrieve %ls optional property 0x%04x (%ls)", aaft_ClassIDToText(aafd, Obj->Class->ID), pid, aaft_PIDToText(aafd, pid) ); } } @@ -838,7 +838,7 @@ void * aaf_get_propertyValue( aafObject *Obj, aafPID_t pid, const aafUID_t *type if ( aafUIDCmp( typeID, &AAFTypeID_String ) ) { if ( ((uint16_t*)value)[(len/2)-1] != 0x0000 ) { - error( "Object %ls string property 0x%04x (%ls) does not end with NULL", ClassIDToText(aafd, Obj->Class->ID), pid, PIDToText(aafd, pid) ); + error( "Object %ls string property 0x%04x (%ls) does not end with NULL", aaft_ClassIDToText(aafd, Obj->Class->ID), pid, aaft_PIDToText(aafd, pid) ); return NULL; } @@ -856,7 +856,7 @@ void * aaf_get_propertyValue( aafObject *Obj, aafPID_t pid, const aafUID_t *type aafIndirect_t *Indirect = value; if ( aafUIDCmp( &Indirect->TypeDef, &AAFTypeID_String ) && ((uint16_t*)value)[(len/2)-1] != 0x0000 ) { - error( "Object %ls Indirect::string property 0x%04x (%ls) does not end with NULL", ClassIDToText(aafd, Obj->Class->ID), pid, PIDToText(aafd, pid) ); + error( "Object %ls Indirect::string property 0x%04x (%ls) does not end with NULL", aaft_ClassIDToText(aafd, Obj->Class->ID), pid, aaft_PIDToText(aafd, pid) ); return NULL; } } @@ -880,7 +880,7 @@ void * aaf_get_propertyValue( aafObject *Obj, aafPID_t pid, const aafUID_t *type ( aafUIDCmp( typeID, &AAFTypeID_AUID ) && len != sizeof(aafUID_t) ) || ( aafUIDCmp( typeID, &AAFTypeID_MobIDType ) && len != sizeof(aafMobID_t) ) ) { - error( "Object %ls property 0x%04x (%ls) size (%u) does not match type %ls", ClassIDToText(aafd, Obj->Class->ID), pid, PIDToText(aafd, pid), len, TypeIDToText(typeID) ); + error( "Object %ls property 0x%04x (%ls) size (%u) does not match type %ls", aaft_ClassIDToText(aafd, Obj->Class->ID), pid, aaft_PIDToText(aafd, pid), len, aaft_TypeIDToText(typeID) ); return NULL; } @@ -897,7 +897,7 @@ void * aaf_get_indirectValue( AAF_Data *aafd, aafIndirect_t *Indirect, const aaf } if ( typeDef && aafUIDCmp( &Indirect->TypeDef, typeDef ) == 0 ) { - error( "Requested Indirect value of type %ls but has type %ls", TypeIDToText(typeDef), TypeIDToText(&Indirect->TypeDef) ); + error( "Requested Indirect value of type %ls but has type %ls", aaft_TypeIDToText(typeDef), aaft_TypeIDToText(&Indirect->TypeDef) ); return NULL; } @@ -1102,7 +1102,7 @@ static int parse_Identification( AAF_Data *aafd ) // aafUIDCmp( hdrClsID, &AAFFileKind_Aaf4KBinary ) ) // return 1; // -// // warning( "Unsuported AAF encoding (%ls).", FileKindToText( hdrClsID ) ); +// // warning( "Unsuported AAF encoding (%ls).", aaft_FileKindToText( hdrClsID ) ); // // return 0; // } @@ -1147,11 +1147,11 @@ static int retrieveObjectTree( AAF_Data *aafd ) cfbNode *Node = &aafd->cfbd->nodes[0]; - aafClass *Class = getClassByID( aafd, (aafUID_t*)&Node->_clsId ); + aafClass *Class = aafclass_getClassByID( aafd, (aafUID_t*)&Node->_clsId ); if ( Class == NULL && aafUIDCmp( Class->ID, (aafUID_t*)&Node->_clsId ) != 0 ) { - error( "Looks like the fist Object is not the Root Class : %ls.", ClassIDToText( aafd, Class->ID ) ); + error( "Looks like the fist Object is not the Root Class : %ls.", aaft_ClassIDToText( aafd, Class->ID ) ); goto err; } @@ -1206,14 +1206,14 @@ static int retrieveObjectTree( AAF_Data *aafd ) } } - PDef = getPropertyDefinitionByID( aafd->Root->Class, PID_Root_MetaDictionary ); + PDef = aafclass_getPropertyDefinitionByID( aafd->Root->Class, PID_Root_MetaDictionary ); /* Start recursive parsing of /Root/Header/{*} */ rc = retrieveProperty( aafd, aafd->Root, PDef, &AAFMetaDcProp, AAFMetaDcVal, Header._byteOrder ); if ( rc < 0 ) { - error( "Could not retrieve property %ls.", PIDToText( aafd, PDef->pid ) ); + error( "Could not retrieve property %ls.", aaft_PIDToText( aafd, PDef->pid ) ); goto err; } @@ -1245,14 +1245,14 @@ static int retrieveObjectTree( AAF_Data *aafd ) } - PDef = getPropertyDefinitionByID( aafd->Root->Class, PID_Root_Header ); + PDef = aafclass_getPropertyDefinitionByID( aafd->Root->Class, PID_Root_Header ); /* Starts recursive parsing of /Root/Header/{*} */ rc = retrieveProperty( aafd, aafd->Root, PDef, &AAFHeaderProp, AAFHeaderVal, Header._byteOrder ); if ( rc < 0 ) { - error( "Could not retrieve property %ls.", PIDToText( aafd, PDef->pid ) ); + error( "Could not retrieve property %ls.", aaft_PIDToText( aafd, PDef->pid ) ); goto err; } @@ -1317,12 +1317,12 @@ static aafClass * retrieveMetaDictionaryClass( AAF_Data *aafd, aafObject *Target /* * TODO: what is this ? when does it happen ? */ - error( "Parent's Class equals Child's : %ls.", ClassIDToText( aafd, ClassID ) ); + error( "Parent's Class equals Child's : %ls.", aaft_ClassIDToText( aafd, ClassID ) ); return NULL; } - aafClass *Class = getClassByID( aafd, ClassID ); + aafClass *Class = aafclass_getClassByID( aafd, ClassID ); if ( Class == NULL ) { @@ -1333,7 +1333,7 @@ static aafClass * retrieveMetaDictionaryClass( AAF_Data *aafd, aafObject *Target return NULL; } - Class = defineNewClass( aafd, ClassID, *isCon, ParentClass ); + Class = aafclass_defineNewClass( aafd, ClassID, *isCon, ParentClass ); Class->name = aaf_get_propertyValue( ClassDef, PID_MetaDefinition_Name, &AAFTypeID_String ); Class->meta = 1; @@ -1366,7 +1366,7 @@ static aafClass * retrieveMetaDictionaryClass( AAF_Data *aafd, aafObject *Target } /* - * We skip all the properties that were already defined in setDefaultClasses(). + * We skip all the properties that were already defined in aafclass_setDefaultClasses(). */ aafPropertyDef *PDef = NULL; @@ -1427,7 +1427,7 @@ static aafClass * retrieveMetaDictionaryClass( AAF_Data *aafd, aafObject *Target // debug( "TypeName : %ls (%ls) | name : %ls.", // // AUIDToText(typeUID), // typeName, - // TypeIDToText( typeUID ), + // aaft_TypeIDToText( typeUID ), // PDef->name ); // // free( typeName ); @@ -1587,10 +1587,10 @@ static int retrieveStrongReference( AAF_Data *aafd, aafProperty *Prop, aafObject } - aafClass *Class = getClassByID( aafd, (aafUID_t*)&Node->_clsId ); + aafClass *Class = aafclass_getClassByID( aafd, (aafUID_t*)&Node->_clsId ); if ( Class == NULL ) { - error( "Could not retrieve Class %ls @ \"%ls\".", ClassIDToText( aafd, (aafUID_t*)&Node->_clsId ), aaf_get_ObjectPath( Parent ) ); + error( "Could not retrieve Class %ls @ \"%ls\".", aaft_ClassIDToText( aafd, (aafUID_t*)&Node->_clsId ), aaf_get_ObjectPath( Parent ) ); return -1; } @@ -1662,10 +1662,10 @@ static int retrieveStrongReferenceSet( AAF_Data *aafd, aafProperty *Prop, aafObj continue; } - aafClass *Class = getClassByID( aafd, (aafUID_t*)&Node->_clsId ); + aafClass *Class = aafclass_getClassByID( aafd, (aafUID_t*)&Node->_clsId ); if ( Class == NULL ) { - error( "Could not retrieve Class %ls.", ClassIDToText( aafd, (aafUID_t*)&Node->_clsId ) ); + error( "Could not retrieve Class %ls.", aaft_ClassIDToText( aafd, (aafUID_t*)&Node->_clsId ) ); continue; } @@ -1752,10 +1752,10 @@ static int retrieveStrongReferenceVector( AAF_Data *aafd, aafProperty *Prop, aaf continue; } - aafClass * Class = getClassByID( aafd, (aafUID_t*)&Node->_clsId ); + aafClass * Class = aafclass_getClassByID( aafd, (aafUID_t*)&Node->_clsId ); if ( Class == NULL ) { - warning( "Could not retrieve Class ID %ls.", ClassIDToText( aafd, (aafUID_t*)&Node->_clsId ) ); + warning( "Could not retrieve Class ID %ls.", aaft_ClassIDToText( aafd, (aafUID_t*)&Node->_clsId ) ); continue; } @@ -1873,7 +1873,7 @@ static int retrieveObjectProperties( AAF_Data *aafd, aafObject *Obj ) aafByte_t *propStream = getNodeProperties( aafd, Obj->Node ); if ( propStream == NULL ) { - error( "Could not retrieve object %ls properties : %ls", ClassIDToText(aafd, Obj->Class->ID), aaf_get_ObjectPath( Obj ) ); + error( "Could not retrieve object %ls properties : %ls", aaft_ClassIDToText(aafd, Obj->Class->ID), aaf_get_ObjectPath( Obj ) ); goto err; } @@ -1892,17 +1892,17 @@ static int retrieveObjectProperties( AAF_Data *aafd, aafObject *Obj ) foreachPropertyEntry( propStream, Header, Prop, value, valueOffset, i ) { - PDef = getPropertyDefinitionByID( Obj->Class, Prop._pid ); + PDef = aafclass_getPropertyDefinitionByID( Obj->Class, Prop._pid ); if ( PDef == NULL ) { - warning( "Unknown property 0x%04x (%ls) of object %ls", Prop._pid, PIDToText( aafd, Prop._pid ), ClassIDToText(aafd, Obj->Class->ID) ); + warning( "Unknown property 0x%04x (%ls) of object %ls", Prop._pid, aaft_PIDToText( aafd, Prop._pid ), aaft_ClassIDToText(aafd, Obj->Class->ID) ); continue; } rc = retrieveProperty( aafd, Obj, PDef, &Prop, value, Header._byteOrder ); if ( rc < 0 ) { - error( "Could not retrieve property %ls of object %ls", PIDToText( aafd, PDef->pid ), ClassIDToText(aafd, Obj->Class->ID) ); + error( "Could not retrieve property %ls of object %ls", aaft_PIDToText( aafd, PDef->pid ), aaft_ClassIDToText(aafd, Obj->Class->ID) ); goto err; } } diff --git a/src/AAFCore/AAFDump.c b/src/AAFCore/AAFDump.c index feb9b11..09439d7 100644 --- a/src/AAFCore/AAFDump.c +++ b/src/AAFCore/AAFDump.c @@ -35,13 +35,13 @@ void aaf_dump_Header( AAF_Data *aafd ) int offset = 0; struct dbg *dbg = aafd->dbg; - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ByteOrder : %ls (0x%04x)\n", ByteOrderToText( aafd->Header.ByteOrder ), aafd->Header.ByteOrder ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " LastModified : %ls\n", TimestampToText( aafd->Header.LastModified ) ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " AAF ObjSpec Version : %ls\n", VersionToText( aafd->Header.Version ) ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ObjectModel Version : %u\n", aafd->Header.ObjectModelVersion ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Operational Pattern : %ls\n", OPDefToText( aafd->Header.OperationalPattern ) ); + 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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\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 ); } @@ -53,17 +53,17 @@ void aaf_dump_Identification( AAF_Data *aafd ) int offset = 0; struct dbg *dbg = aafd->dbg; - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " CompanyName : %ls\n", ( aafd->Identification.CompanyName ) ? aafd->Identification.CompanyName : L"n/a" ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ProductName : %ls\n", ( aafd->Identification.ProductName ) ? aafd->Identification.ProductName : L"n/a" ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ProductVersion : %ls\n", ProductVersionToText( aafd->Identification.ProductVersion ) ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ProductVersionString : %ls\n", ( aafd->Identification.ProductVersionString ) ? aafd->Identification.ProductVersionString : L"n/a" ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ProductID : %ls\n", AUIDToText( aafd->Identification.ProductID ) ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Date : %ls\n", TimestampToText( aafd->Identification.Date ) ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ToolkitVersion : %ls\n", ProductVersionToText( aafd->Identification.ToolkitVersion ) ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Platform : %ls\n", ( aafd->Identification.Platform ) ? aafd->Identification.Platform : L"n/a" ); - offset += 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, " 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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\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 ); } @@ -75,10 +75,10 @@ void aaf_dump_ObjectProperty( AAF_Data *aafd, aafProperty *Prop ) int offset = 0; struct dbg *dbg = aafd->dbg; - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " :.: (0x%04x) %ls (%ls)\n", Prop->pid, PIDToText( aafd, Prop->pid ), StoredFormToText( Prop->sf ) /*AUIDToText( &Prop->def->type ),*/ /*TypeIDToText( &(Prop->def->type) )*/ ); + 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 += dump_hex( Prop->val, Prop->len, &aafd->dbg->_dbg_msg, &aafd->dbg->_dbg_msg_size, offset ); + 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 ); } @@ -99,10 +99,10 @@ void aaf_dump_ObjectProperties( AAF_Data *aafd, aafObject *Obj ) for ( Prop = Obj->Properties; Prop != NULL; Prop = Prop->next ) { aaf_dump_ObjectProperty( aafd, Prop ); - // offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " :.: (0x%04x) %ls (%ls)\n", Prop->pid, PIDToText( aafd, Prop->pid ), StoredFormToText( Prop->sf ) /*AUIDToText( &Prop->def->type ),*/ /*TypeIDToText( &(Prop->def->type) )*/ ); + // 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. - // dump_hex( Prop->val, Prop->len ); + // laaf_util_dump_hex( Prop->val, Prop->len ); } } @@ -114,7 +114,7 @@ void aaf_dump_rawProperties( AAF_Data *aafd, aafByte_t *propStream ) struct dbg *dbg = aafd->dbg; if ( propStream == NULL ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " ## Property_Header____________________________________________________\n\n" " aafPropertyIndexHeader_t is NULL\n" " ======================================================================\n\n" @@ -132,7 +132,7 @@ void aaf_dump_rawProperties( AAF_Data *aafd, aafByte_t *propStream ) uint32_t valueOffset = 0; - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, + 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" @@ -143,7 +143,7 @@ void aaf_dump_rawProperties( AAF_Data *aafd, aafByte_t *propStream ) Header._entryCount ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n" ); + 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 @@ -160,20 +160,20 @@ void aaf_dump_rawProperties( AAF_Data *aafd, aafByte_t *propStream ) i++ ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, + 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, PIDToText( aafd, Prop._pid ), - StoredFormToText( Prop._storedForm ), + Prop._pid, aaft_PIDToText( aafd, Prop._pid ), + aaft_StoredFormToText( Prop._storedForm ), Prop._length ); - offset += dump_hex( value, Prop._length, &aafd->dbg->_dbg_msg, &aafd->dbg->_dbg_msg_size, offset ); + offset += laaf_util_dump_hex( value, Prop._length, &aafd->dbg->_dbg_msg, &aafd->dbg->_dbg_msg_size, offset ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\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 ); @@ -222,7 +222,7 @@ void aaf_dump_MetaDictionary( AAF_Data *aafd ) foreachPropertyDefinition( PDef, Class->Properties ) { if ( Class->meta ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, ANSI_COLOR_YELLOW "%ls::%ls (0x%04x)\n" ANSI_COLOR_RESET, + 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 ); @@ -230,8 +230,8 @@ void aaf_dump_MetaDictionary( AAF_Data *aafd ) print++; } else if ( PDef->meta ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%ls::" ANSI_COLOR_YELLOW "%ls (0x%04x)\n" ANSI_COLOR_RESET, - ClassIDToText( aafd, Class->ID ), + 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 ); @@ -240,12 +240,12 @@ void aaf_dump_MetaDictionary( AAF_Data *aafd ) } if ( print ) - offset += 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" ); print = 1; } - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\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 ); } @@ -264,21 +264,21 @@ void aaf_dump_Classes( AAF_Data *aafd ) { foreachClassInheritance( Class, ConcreteClass ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s%ls%s", + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s%ls%s", (Class->meta) ? ANSI_COLOR_YELLOW : "", - ClassIDToText( aafd, Class->ID ), + aaft_ClassIDToText( aafd, Class->ID ), (Class->meta) ? ANSI_COLOR_RESET : "" ); if ( Class->Parent != NULL ) - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " > " ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " > " ); } - offset += 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" ); } - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\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 ); } diff --git a/src/AAFCore/AAFToText.c b/src/AAFCore/AAFToText.c index 607754f..1dde460 100644 --- a/src/AAFCore/AAFToText.c +++ b/src/AAFCore/AAFToText.c @@ -42,7 +42,7 @@ -const wchar_t * MobIDToText( aafMobID_t *mobid ) +const wchar_t * aaft_MobIDToText( aafMobID_t *mobid ) { static wchar_t str[127]; @@ -75,7 +75,7 @@ const wchar_t * MobIDToText( aafMobID_t *mobid ) -const wchar_t * TimestampToText( aafTimeStamp_t *ts ) +const wchar_t * aaft_TimestampToText( aafTimeStamp_t *ts ) { static wchar_t str[24]; @@ -101,7 +101,7 @@ const wchar_t * TimestampToText( aafTimeStamp_t *ts ) -const wchar_t * VersionToText( aafVersionType_t *vers ) +const wchar_t * aaft_VersionToText( aafVersionType_t *vers ) { static wchar_t str[16]; @@ -122,7 +122,7 @@ const wchar_t * VersionToText( aafVersionType_t *vers ) -const wchar_t * ProductVersionToText( aafProductVersion_t *vers ) +const wchar_t * aaft_ProductVersionToText( aafProductVersion_t *vers ) { static wchar_t str[64]; @@ -138,7 +138,7 @@ const wchar_t * ProductVersionToText( aafProductVersion_t *vers ) vers->minor, vers->tertiary, vers->patchLevel, - ProductReleaseTypeToText( vers->type ), + aaft_ProductReleaseTypeToText( vers->type ), vers->type ); } @@ -147,7 +147,7 @@ const wchar_t * ProductVersionToText( aafProductVersion_t *vers ) -const wchar_t * FileKindToText( const aafUID_t *auid ) +const wchar_t * aaft_FileKindToText( const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -171,7 +171,7 @@ const wchar_t * FileKindToText( const aafUID_t *auid ) -const wchar_t * TapeCaseTypeToText( aafTapeCaseType_t t ) +const wchar_t * aaft_TapeCaseTypeToText( aafTapeCaseType_t t ) { switch ( t ) { case AAFTapeCaseNull: return L"AAFTapeCaseNull"; @@ -189,7 +189,7 @@ const wchar_t * TapeCaseTypeToText( aafTapeCaseType_t t ) -const wchar_t * VideoSignalTypeToText( aafVideoSignalType_t v ) +const wchar_t * aaft_VideoSignalTypeToText( aafVideoSignalType_t v ) { switch ( v ) { case AAFVideoSignalNull: return L"AAFVideoSignalNull"; @@ -203,7 +203,7 @@ const wchar_t * VideoSignalTypeToText( aafVideoSignalType_t v ) -const wchar_t * TapeFormatTypeToText( aafTapeFormatType_t t ) +const wchar_t * aaft_TapeFormatTypeToText( aafTapeFormatType_t t ) { switch ( t ) { case AAFTapeFormatNull: return L"AAFTapeFormatNull"; @@ -220,7 +220,7 @@ const wchar_t * TapeFormatTypeToText( aafTapeFormatType_t t ) -const wchar_t * FilmTypeToText( aafFilmType_t f ) +const wchar_t * aaft_FilmTypeToText( aafFilmType_t f ) { switch ( f ) { case AAFFtNull: return L"AAFFtNull"; @@ -235,7 +235,7 @@ const wchar_t * FilmTypeToText( aafFilmType_t f ) -const wchar_t * SignalStandardToText( aafSignalStandard_t s ) +const wchar_t * aaft_SignalStandardToText( aafSignalStandard_t s ) { switch ( s ) { case AAFSignalStandard_None: return L"AAFSignalStandard_None"; @@ -252,7 +252,7 @@ const wchar_t * SignalStandardToText( aafSignalStandard_t s ) -const wchar_t * FieldNumberToText( aafFieldNumber_t f ) +const wchar_t * aaft_FieldNumberToText( aafFieldNumber_t f ) { switch ( f ) { case AAFUnspecifiedField: return L"AAFUnspecifiedField"; @@ -265,7 +265,7 @@ const wchar_t * FieldNumberToText( aafFieldNumber_t f ) -const wchar_t * AlphaTransparencyToText( aafAlphaTransparency_t a ) +const wchar_t * aaft_AlphaTransparencyToText( aafAlphaTransparency_t a ) { switch ( a ) { case AAFMinValueTransparent: return L"AAFMinValueTransparent"; @@ -277,7 +277,7 @@ const wchar_t * AlphaTransparencyToText( aafAlphaTransparency_t a ) -const wchar_t * FrameLayoutToText( aafFrameLayout_t f ) +const wchar_t * aaft_FrameLayoutToText( aafFrameLayout_t f ) { switch ( f ) { case AAFFullFrame: return L"AAFFullFrame"; @@ -292,7 +292,7 @@ const wchar_t * FrameLayoutToText( aafFrameLayout_t f ) -const wchar_t * ColorSitingToText( aafColorSiting_t c ) +const wchar_t * aaft_ColorSitingToText( aafColorSiting_t c ) { switch ( c ) { case AAFCoSiting: return L"AAFCoSiting"; @@ -308,7 +308,7 @@ const wchar_t * ColorSitingToText( aafColorSiting_t c ) -const wchar_t * ProductReleaseTypeToText( aafProductReleaseType_t t ) +const wchar_t * aaft_ProductReleaseTypeToText( aafProductReleaseType_t t ) { switch ( t ) { case AAFVersionUnknown: return L"AAFVersionUnknown"; @@ -324,7 +324,7 @@ const wchar_t * ProductReleaseTypeToText( aafProductReleaseType_t t ) -const wchar_t * FadeTypeToText( aafFadeType_t f ) +const wchar_t * aaft_FadeTypeToText( aafFadeType_t f ) { switch ( f ) { case AAFFadeNone: return L"AAFFadeNone"; @@ -337,7 +337,7 @@ const wchar_t * FadeTypeToText( aafFadeType_t f ) -const wchar_t * BoolToText( aafBoolean_t b ) +const wchar_t * aaft_BoolToText( aafBoolean_t b ) { switch ( b ) { case 1: return L"True"; @@ -349,7 +349,7 @@ const wchar_t * BoolToText( aafBoolean_t b ) -const wchar_t * OperationCategoryToText( const aafUID_t *auid ) +const wchar_t * aaft_OperationCategoryToText( const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -362,7 +362,7 @@ const wchar_t * OperationCategoryToText( const aafUID_t *auid ) -const wchar_t * PluginCategoryToText( const aafUID_t *auid ) +const wchar_t * aaft_PluginCategoryToText( const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -377,7 +377,7 @@ const wchar_t * PluginCategoryToText( const aafUID_t *auid ) -const wchar_t * ScanningDirectionToText( aafScanningDirection_t s ) +const wchar_t * aaft_ScanningDirectionToText( aafScanningDirection_t s ) { switch ( s ) { case AAFScanningDirection_LeftToRightTopToBottom: return L"AAFScanningDirection_LeftToRightTopToBottom"; @@ -395,7 +395,7 @@ const wchar_t * ScanningDirectionToText( aafScanningDirection_t s ) -const wchar_t * ByteOrderToText( int16_t bo ) +const wchar_t * aaft_ByteOrderToText( int16_t bo ) { switch ( bo ) { @@ -413,7 +413,7 @@ const wchar_t * ByteOrderToText( int16_t bo ) -const wchar_t * ElectroSpatialToText( aafElectroSpatialFormulation_t e ) +const wchar_t * aaft_ElectroSpatialToText( aafElectroSpatialFormulation_t e ) { switch ( e ) { case AAFElectroSpatialFormulation_Default: return L"AAFElectroSpatialFormulation_Default"; @@ -432,7 +432,7 @@ const wchar_t * ElectroSpatialToText( aafElectroSpatialFormulation_t e ) -const wchar_t * StoredFormToText( enum aafStoredForm_e sf ) +const wchar_t * aaft_StoredFormToText( enum aafStoredForm_e sf ) { switch ( sf ) { case SF_DATA: return L"SF_DATA"; @@ -453,7 +453,7 @@ const wchar_t * StoredFormToText( enum aafStoredForm_e sf ) -const wchar_t * OPDefToText( const aafUID_t *auid ) +const wchar_t * aaft_OPDefToText( const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -467,7 +467,7 @@ const wchar_t * OPDefToText( const aafUID_t *auid ) -const wchar_t * TypeIDToText( const aafUID_t *auid ) +const wchar_t * aaft_TypeIDToText( const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -633,7 +633,7 @@ const wchar_t * TypeIDToText( const aafUID_t *auid ) -const wchar_t * DataDefToText( AAF_Data *aafd, const aafUID_t *auid ) +const wchar_t * aaft_DataDefToText( AAF_Data *aafd, const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -677,7 +677,7 @@ const wchar_t * DataDefToText( AAF_Data *aafd, const aafUID_t *auid ) -const wchar_t * OperationDefToText( AAF_Data *aafd, const aafUID_t *auid ) +const wchar_t * aaft_OperationDefToText( AAF_Data *aafd, const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -740,7 +740,7 @@ const wchar_t * OperationDefToText( AAF_Data *aafd, const aafUID_t *auid ) -const wchar_t * InterpolationToText( const aafUID_t *auid ) +const wchar_t * aaft_InterpolationToText( const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -758,7 +758,7 @@ const wchar_t * InterpolationToText( const aafUID_t *auid ) -const wchar_t * ParameterToText( AAF_Data *aafd, const aafUID_t *auid ) +const wchar_t * aaft_ParameterToText( AAF_Data *aafd, const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -856,7 +856,7 @@ const wchar_t * ParameterToText( AAF_Data *aafd, const aafUID_t *auid ) -const wchar_t * TransferCharacteristicToText( const aafUID_t *auid ) +const wchar_t * aaft_TransferCharacteristicToText( const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -874,7 +874,7 @@ const wchar_t * TransferCharacteristicToText( const aafUID_t *auid ) -const wchar_t * CodingEquationsToText( const aafUID_t *auid ) +const wchar_t * aaft_CodingEquationsToText( const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -889,7 +889,7 @@ const wchar_t * CodingEquationsToText( const aafUID_t *auid ) -const wchar_t * ColorPrimariesToText( const aafUID_t *auid ) +const wchar_t * aaft_ColorPrimariesToText( const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -904,7 +904,7 @@ const wchar_t * ColorPrimariesToText( const aafUID_t *auid ) -const wchar_t * UsageCodeToText( const aafUID_t *auid ) +const wchar_t * aaft_UsageCodeToText( const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -921,7 +921,7 @@ const wchar_t * UsageCodeToText( const aafUID_t *auid ) -const wchar_t * PIDToText( AAF_Data *aafd, aafPID_t pid ) +const wchar_t * aaft_PIDToText( AAF_Data *aafd, aafPID_t pid ) { switch ( pid ) { case PID_Root_MetaDictionary: return L"PID_Root_MetaDictionary"; @@ -1282,7 +1282,7 @@ const wchar_t * PIDToText( AAF_Data *aafd, aafPID_t pid ) -const wchar_t * ClassIDToText( AAF_Data *aafd, const aafUID_t *auid ) +const wchar_t * aaft_ClassIDToText( AAF_Data *aafd, const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -1416,7 +1416,7 @@ const wchar_t * ClassIDToText( AAF_Data *aafd, const aafUID_t *auid ) -const wchar_t * ContainerToText( const aafUID_t *auid ) +const wchar_t * aaft_ContainerToText( const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; @@ -1521,7 +1521,7 @@ const wchar_t * ContainerToText( const aafUID_t *auid ) -const wchar_t * CompressionToText( const aafUID_t *auid ) +const wchar_t * aaft_CompressionToText( const aafUID_t *auid ) { if ( auid == NULL ) return L"n/a"; diff --git a/src/AAFIface/AAFIAudioFiles.c b/src/AAFIface/AAFIAudioFiles.c index 536839b..07221d5 100644 --- a/src/AAFIface/AAFIAudioFiles.c +++ b/src/AAFIface/AAFIAudioFiles.c @@ -77,7 +77,7 @@ static size_t externalAudioDataReaderCallback( unsigned char *buf, size_t offset -char * locate_external_essence_file( AAF_Iface *aafi, const wchar_t *original_uri_filepath, const char *search_location ) +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 @@ -123,7 +123,7 @@ char * locate_external_essence_file( AAF_Iface *aafi, const wchar_t *original_ur if ( search_location ) { - local_filepath = build_path( DIR_SEP_STR, search_location, fop_get_file(uri_filepath), NULL ); + 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" ); @@ -220,7 +220,7 @@ char * locate_external_essence_file( AAF_Iface *aafi, const wchar_t *original_ur /* extract path to AAF file */ - aaf_path = c99strdup( aafi->aafd->cfbd->file ); + aaf_path = laaf_util_c99strdup( aafi->aafd->cfbd->file ); if ( aaf_path == NULL ) { error( "Could not duplicate AAF filepath" ); @@ -238,7 +238,7 @@ char * locate_external_essence_file( AAF_Iface *aafi, const wchar_t *original_ur } - local_filepath = build_path( DIR_SEP_STR, aaf_path, relativeEssencePath, NULL ); + local_filepath = laaf_util_build_path( DIR_SEP_STR, aaf_path, relativeEssencePath, NULL ); if ( local_filepath == NULL ) { error( "Could not build filepath" ); @@ -256,7 +256,7 @@ char * locate_external_essence_file( AAF_Iface *aafi, const wchar_t *original_ur // debug("File not found"); found: - retpath = c99strdup( retpath ); + retpath = laaf_util_c99strdup( retpath ); goto end; err: @@ -357,7 +357,7 @@ int aafi_extract_audio_essence( AAF_Iface *aafi, aafiAudioEssence *audioEssence, } - filepath = build_path( DIR_SEP_STR, outfilepath, clean_filename(filename), NULL ); + filepath = laaf_util_build_path( DIR_SEP_STR, outfilepath, laaf_util_clean_filename(filename), NULL ); if ( filepath == NULL ) { error( "Could not build filepath" ); @@ -447,9 +447,9 @@ int aafi_extract_audio_essence( AAF_Iface *aafi, aafiAudioEssence *audioEssence, -int parse_audio_summary( AAF_Iface *aafi, aafiAudioEssence *audioEssence ) +int aafi_parse_audio_summary( AAF_Iface *aafi, aafiAudioEssence *audioEssence ) { - // dump_hex( audioEssence->summary->val, audioEssence->summary->len ); + // laaf_util_dump_hex( audioEssence->summary->val, audioEssence->summary->len ); int rc = 0; char *externalFilePath = NULL; @@ -476,7 +476,7 @@ int parse_audio_summary( AAF_Iface *aafi, aafiAudioEssence *audioEssence ) * ______________________________________________________________________ */ - // dump_hex( audioEssence->summary->val, audioEssence->summary->len ); + // 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 ); @@ -490,7 +490,7 @@ int parse_audio_summary( AAF_Iface *aafi, aafiAudioEssence *audioEssence ) /* TODO: can external essence have audioEssence->summary too ? If mp3 (Resolve 18.5.aaf) ? */ - externalFilePath = locate_external_essence_file( aafi, audioEssence->original_file_path, aafi->ctx.options.media_location ); + 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 ); diff --git a/src/AAFIface/AAFIParser.c b/src/AAFIface/AAFIParser.c index 1884474..a8b182b 100644 --- a/src/AAFIface/AAFIParser.c +++ b/src/AAFIface/AAFIParser.c @@ -113,7 +113,7 @@ static aafRational_t AAFI_DEFAULT_TC_EDIT_RATE = { 25, 1 }; -// static void trace_obj( AAF_Iface *aafi, aafObject *Obj, char *color ); +// static void aafi_trace_obj( AAF_Iface *aafi, aafObject *Obj, char *color ); static wchar_t * build_unique_audiofilename( AAF_Iface *aafi, aafiAudioEssence *audioEssence ); @@ -197,16 +197,16 @@ static void xplore_StrongObjectReferenceVector( AAF_Iface *aafi, aafObject *ObjC if ( aafUIDCmp( &indirect->TypeDef, &AAFTypeID_Int32 ) ) { int32_t *indirectValue = aaf_get_indirectValue( aafi->aafd, indirect, &AAFTypeID_Int32 ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "Tagged | Name: %ls%*s Value (%ls) : %i\n", name, 56-(int)wcslen(name), " ", TypeIDToText(&indirect->TypeDef), *indirectValue ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "Tagged | Name: %ls%*s Value (%ls) : %i\n", name, 56-(int)wcslen(name), " ", aaft_TypeIDToText(&indirect->TypeDef), *indirectValue ); } else if ( aafUIDCmp( &indirect->TypeDef, &AAFTypeID_String ) ) { wchar_t *indirectValue = aaf_get_indirectValue( aafi->aafd, indirect, &AAFTypeID_String ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "Tagged | Name: %ls%*s Value (%ls) : %ls\n", name, 56-(int)wcslen(name), " ", TypeIDToText(&indirect->TypeDef), indirectValue ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "Tagged | Name: %ls%*s Value (%ls) : %ls\n", name, 56-(int)wcslen(name), " ", aaft_TypeIDToText(&indirect->TypeDef), indirectValue ); free( indirectValue ); } else { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "Tagged | Name: %ls%*s Value (%s%ls%s) : %sUNKNOWN_TYPE%s\n", name, 56-(int)wcslen(name), " ", ANSI_COLOR_RED, TypeIDToText(&indirect->TypeDef), ANSI_COLOR_RESET, ANSI_COLOR_RED, ANSI_COLOR_RESET ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "Tagged | Name: %ls%*s Value (%s%ls%s) : %sUNKNOWN_TYPE%s\n", name, 56-(int)wcslen(name), " ", ANSI_COLOR_RED, aaft_TypeIDToText(&indirect->TypeDef), ANSI_COLOR_RESET, ANSI_COLOR_RED, ANSI_COLOR_RESET ); } dbg->debug_callback( dbg, (void*)aafi, DEBUG_SRC_ID_DUMP, 0, "", "", 0, dbg->_dbg_msg, dbg->user ); @@ -224,7 +224,7 @@ static void xplore_StrongObjectReferenceVector( AAF_Iface *aafi, aafObject *ObjC -void _DUMP_OBJ( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int state, int line, const char *fmt, ... ) +void aafi_dump_obj( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int state, int line, const char *fmt, ... ) { if ( aafi->ctx.options.trace == 0 ) return; @@ -236,18 +236,18 @@ void _DUMP_OBJ( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int st if ( Obj ) { switch ( state ) { - case TD_ERROR: offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_RED ); break; - case TD_WARNING: offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_YELLOW ); break; - case TD_NOT_SUPPORTED: offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_ORANGE ); break; - default: offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_DARKGREY ); break; + case TD_ERROR: offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_RED ); break; + case TD_WARNING: offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_YELLOW ); break; + case TD_NOT_SUPPORTED: offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_ORANGE ); break; + default: offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_DARKGREY ); break; } - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%05i", line ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%05i", line ); } else { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " " ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " " ); } - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s%ls%s", ANSI_COLOR_DARKGREY, L"\u2502", ANSI_COLOR_RESET ); // │ + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s%ls%s", ANSI_COLOR_DARKGREY, L"\u2502", ANSI_COLOR_RESET ); // │ /* Print padding and vertical lines */ @@ -263,21 +263,21 @@ void _DUMP_OBJ( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int st if ( i+1 == __td->lv ) { if ( Obj ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%ls", L"\u251c\u2500\u2500\u25fb " ); // ├──◻ + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%ls", L"\u251c\u2500\u2500\u25fb " ); // ├──◻ } else { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%ls", L"\u2502 " ); // │ + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%ls", L"\u2502 " ); // │ } } else { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%ls", L"\u2502 " ); // │ + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%ls", L"\u2502 " ); // │ } } else if ( i+1 == __td->lv && Obj ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%ls", L"\u2514\u2500\u2500\u25fb " ); // └──◻ + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%ls", L"\u2514\u2500\u2500\u25fb " ); // └──◻ } else { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " " ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " " ); } } } @@ -286,23 +286,23 @@ void _DUMP_OBJ( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int st if ( Obj ) { switch ( state ) { - case TD_ERROR: offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_RED ); break; - case TD_WARNING: offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_YELLOW ); break; - case TD_NOT_SUPPORTED: offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_ORANGE ); break; + case TD_ERROR: offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_RED ); break; + case TD_WARNING: offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_YELLOW ); break; + case TD_NOT_SUPPORTED: offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_ORANGE ); break; case TD_INFO: case TD_OK: if ( __td->sub ) - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_DARKGREY ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_DARKGREY ); else - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_CYAN ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_CYAN ); break; } - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%ls ", ClassIDToText(aafi->aafd, Obj->Class->ID) ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%ls ", aaft_ClassIDToText(aafi->aafd, Obj->Class->ID) ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_RESET ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_RESET ); if ( aafUIDCmp( Obj->Class->ID, &AAFClassID_TimelineMobSlot ) && @@ -315,7 +315,7 @@ void _DUMP_OBJ( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int st uint32_t *slotID = aaf_get_propertyValue( Obj, PID_MobSlot_SlotID, &AAFTypeID_UInt32 ); uint32_t *trackNo = aaf_get_propertyValue( Obj, PID_MobSlot_PhysicalTrackNumber, &AAFTypeID_UInt32 ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "[slot:%s%i%s track:%s%i%s] (DataDef : %s%ls%s) %s%ls ", + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "[slot:%s%i%s track:%s%i%s] (DataDef : %s%ls%s) %s%ls ", ANSI_COLOR_BOLD, (slotID) ? (int)(*slotID) : -1, ANSI_COLOR_RESET, @@ -323,7 +323,7 @@ void _DUMP_OBJ( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int st (trackNo) ? (int)(*trackNo) : -1, ANSI_COLOR_RESET, ANSI_COLOR_DARKGREY, - DataDefToText( aafi->aafd, DataDefinition ), + aaft_DataDefToText( aafi->aafd, DataDefinition ), ANSI_COLOR_RESET, (name[0] != 0x00) ? ": " : "", (name) ? name : L"" ); @@ -338,9 +338,9 @@ void _DUMP_OBJ( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int st aafUID_t *usageCode = aaf_get_propertyValue( Obj, PID_Mob_UsageCode, &AAFTypeID_UsageType ); wchar_t *name = aaf_get_propertyValue( Obj, PID_Mob_Name, &AAFTypeID_String ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "(UsageCode: %s%ls%s) %s%ls", + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "(UsageCode: %s%ls%s) %s%ls", ANSI_COLOR_DARKGREY, - UsageCodeToText( usageCode ), + aaft_UsageCodeToText( usageCode ), ANSI_COLOR_RESET, (name && name[0] != 0x00) ? ": " : "", (name) ? name : L"" ); @@ -351,9 +351,9 @@ void _DUMP_OBJ( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int st aafUID_t *OperationIdentification = get_OperationGroup_OperationIdentification( aafi, Obj ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "(OpIdent: %s%ls%s) ", + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "(OpIdent: %s%ls%s) ", ANSI_COLOR_DARKGREY, - OperationDefToText( aafi->aafd, OperationIdentification ), + aaft_OperationDefToText( aafi->aafd, OperationIdentification ), ANSI_COLOR_RESET ); } @@ -369,21 +369,21 @@ void _DUMP_OBJ( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int st // aafUIDCmp( Obj->Class->ID, &AAFClassID_AIFCDescriptor ) ) // { // aafUID_t *ContainerFormat = get_FileDescriptor_ContainerFormat( aafi, Obj ); - // offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "(ContainerIdent : \x1b[38;5;242m%ls\x1b[0m)", ContainerToText(ContainerFormat) ); + // offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "(ContainerIdent : \x1b[38;5;242m%ls\x1b[0m)", aaft_ContainerToText(ContainerFormat) ); // } if ( state == TD_ERROR ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, ": %s", ANSI_COLOR_RED ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, ": %s", ANSI_COLOR_RED ); } else if ( state == TD_INFO ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, ": %s", ANSI_COLOR_CYAN ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, ": %s", ANSI_COLOR_CYAN ); } va_list args; va_start( args, fmt ); - offset += vsnprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, fmt, &args ); + offset += laaf_util_vsnprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, fmt, &args ); va_end( args ); // va_list args; @@ -392,7 +392,7 @@ void _DUMP_OBJ( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int st // // va_start( args2, fmt ); // // vprintf(fmt, args); - // // offset += vsnprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, fmt, args ); + // // offset += laaf_util_vsnprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, fmt, args ); // int needed = vsnprintf( NULL, 0, fmt, args2 ) + 1; // if ( needed >= dbg->_dbg_msg_size + offset ) { // char *p = realloc( dbg->_dbg_msg, offset+needed ); @@ -414,19 +414,19 @@ void _DUMP_OBJ( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int st // va_end( args ); if ( state == TD_ERROR || state == TD_INFO ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "." ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "." ); } - if ( state == TD_NOT_SUPPORTED || ( aafi->ctx.options.trace_class && wcscmp( ClassIDToText(aafi->aafd, Obj->Class->ID), aafi->ctx.options.trace_class ) == 0) ) { + if ( state == TD_NOT_SUPPORTED || ( aafi->ctx.options.trace_class && wcscmp( aaft_ClassIDToText(aafi->aafd, Obj->Class->ID), aafi->ctx.options.trace_class ) == 0) ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n%s", ( state == TD_NOT_SUPPORTED ) ? ANSI_COLOR_ORANGE : "" ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n%s", ( state == TD_NOT_SUPPORTED ) ? ANSI_COLOR_ORANGE : "" ); - // offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "CFB Object Dump : %ls\n", aaf_get_ObjectPath( Obj ) ); - // offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "=================\n" ); + // offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "CFB Object Dump : %ls\n", aaf_get_ObjectPath( Obj ) ); + // offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "=================\n" ); // cfb_dump_node( aafi->aafd->cfbd, Obj->Node, 1 ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "Properties Dump (%ls)\n", aaf_get_ObjectPath( Obj ) ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "===============\n\n" ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "Properties Dump (%ls)\n", aaf_get_ObjectPath( Obj ) ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "===============\n\n" ); // aaf_dump_nodeStreamProperties( aafi->aafd, Obj->Node ); // dbg->debug_callback( dbg, (void*)aafi, DEBUG_SRC_ID_TRACE, 0, "", "", 0, dbg->_dbg_msg, dbg->user ); @@ -443,54 +443,54 @@ void _DUMP_OBJ( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int st if ( Prop->def->meta ) { - // offset += 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"); if ( aafi->ctx.options.trace_meta ) { // aaf_dump_ObjectProperties( aafi->aafd, Obj ); // if ( Prop->pid == 0xffca ) { if ( Prop->sf == SF_STRONG_OBJECT_REFERENCE_VECTOR ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n" ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " >>> (0x%04x) %ls (%ls)\n", Prop->pid, PIDToText( aafi->aafd, Prop->pid ), StoredFormToText( Prop->sf ) /*AUIDToText( &Prop->def->type ),*/ /*TypeIDToText( &(Prop->def->type) )*/ ); + 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, " >>> (0x%04x) %ls (%ls)\n", Prop->pid, aaft_PIDToText( aafi->aafd, Prop->pid ), aaft_StoredFormToText( Prop->sf ) /*AUIDToText( &Prop->def->type ),*/ /*aaft_TypeIDToText( &(Prop->def->type) )*/ ); void *propValue = aaf_get_propertyValue( Obj, Prop->pid, &AAFUID_NULL ); xplore_StrongObjectReferenceVector( aafi, propValue, __td ); // DUMP_OBJ_NO_SUPPORT( aafi, propValue, __td ); } else { - offset += 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" ); aaf_dump_ObjectProperty( aafi->aafd, Prop ); } } else { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s%s %ls[0x%04x]", ANSI_COLOR_RESET, (!hasUnknownProps) ? " (MetaProps:" : "", PIDToText( aafi->aafd, Prop->pid ), Prop->pid ); - // dump_hex( Prop->val, Prop->len ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s%s %ls[0x%04x]", ANSI_COLOR_RESET, (!hasUnknownProps) ? " (MetaProps:" : "", aaft_PIDToText( aafi->aafd, Prop->pid ), Prop->pid ); + // laaf_util_dump_hex( Prop->val, Prop->len ); hasUnknownProps++; } } } if ( aafi->ctx.options.trace_meta == 0 && hasUnknownProps ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, ")" ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, ")" ); } } - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_RESET ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%s", ANSI_COLOR_RESET ); } - // offset += 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" ); dbg->debug_callback( dbg, (void*)aafi, DEBUG_SRC_ID_TRACE, 0, "", "", 0, dbg->_dbg_msg, dbg->user ); /* if end of branch, print one line padding */ if ( Obj && ( __td->eob || state == TD_ERROR ) ) - _DUMP_OBJ( aafi, NULL, __td, 0, -1, "" ); + aafi_dump_obj( aafi, NULL, __td, 0, -1, "" ); } -void _DUMP_OBJ_NO_SUPPORT( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int line ) +void aafi_dump_obj_no_support( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *__td, int line ) { // aafUID_t *DataDefinition = NULL; @@ -498,8 +498,8 @@ void _DUMP_OBJ_NO_SUPPORT( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *_ if ( aafUIDCmp( Obj->Class->ID, &AAFClassID_TimelineMobSlot ) && aafUIDCmp( Obj->Parent->Class->ID, &AAFClassID_CompositionMob ) ) { - /* this part is handled by _DUMP_OBJ() already. */ - _DUMP_OBJ( aafi, Obj, __td, TD_NOT_SUPPORTED, line, "" ); + /* this part is handled by aafi_dump_obj() already. */ + aafi_dump_obj( aafi, Obj, __td, TD_NOT_SUPPORTED, line, "" ); return; // aafObject *Segment = aaf_get_propertyValue( Obj, PID_MobSlot_Segment, &AAFTypeID_SegmentStrongReference ); // @@ -514,12 +514,12 @@ void _DUMP_OBJ_NO_SUPPORT( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *_ // DataDefinition = get_Component_DataDefinition( aafi, Obj ); - _DUMP_OBJ( aafi, Obj, __td, TD_NOT_SUPPORTED, line, "" ); + aafi_dump_obj( aafi, Obj, __td, TD_NOT_SUPPORTED, line, "" ); - // _DUMP_OBJ( aafi, Obj, __td, WARNING, line, "%s%ls%s", - // // ClassIDToText( aafi->aafd, Obj->Class->ID ), + // aafi_dump_obj( aafi, Obj, __td, WARNING, line, "%s%ls%s", + // // aaft_ClassIDToText( aafi->aafd, Obj->Class->ID ), // ((DataDefinition) ? "(Segment DataDefinition: \x1b[38;5;242m" : ""), - // ((DataDefinition) ? DataDefToText( aafi->aafd, DataDefinition ) : L""), + // ((DataDefinition) ? aaft_DataDefToText( aafi->aafd, DataDefinition ) : L""), // ((DataDefinition) ? ") \x1b[0m" : "") ); } @@ -527,21 +527,21 @@ void _DUMP_OBJ_NO_SUPPORT( AAF_Iface *aafi, aafObject *Obj, struct trace_dump *_ /* #define DUMP_OBJ( aafi, Obj, __td ) \ - _DUMP_OBJ( aafi, Obj, __td, OK, __LINE__, "" ); + aafi_dump_obj( aafi, Obj, __td, OK, __LINE__, "" ); #define DUMP_OBJ_ERROR( aafi, Obj, __td, ... ) \ (__td)->eob = 1; \ - _DUMP_OBJ( aafi, Obj, __td, ERROR, __LINE__, __VA_ARGS__ ); + aafi_dump_obj( aafi, Obj, __td, ERROR, __LINE__, __VA_ARGS__ ); #define DUMP_OBJ_WARNING( aafi, Obj, __td, ... ) \ - _DUMP_OBJ( aafi, Obj, __td, WARNING, __LINE__, __VA_ARGS__ ); + aafi_dump_obj( aafi, Obj, __td, WARNING, __LINE__, __VA_ARGS__ ); #define DUMP_OBJ_INFO( aafi, Obj, __td, ... ) \ - _DUMP_OBJ( aafi, Obj, __td, OK, __LINE__, __VA_ARGS__ ); + aafi_dump_obj( aafi, Obj, __td, OK, __LINE__, __VA_ARGS__ ); #define DUMP_OBJ_NO_SUPPORT( aafi, Obj, __td ) \ (__td)->eob = 1; \ - _DUMP_OBJ_NO_SUPPORT( aafi, Obj, __td, __LINE__ ); \ + aafi_dump_obj_no_support( aafi, Obj, __td, __LINE__ ); \ // aaf_dump_ObjectProperties( aafi->aafd, Obj ); */ @@ -597,7 +597,7 @@ static wchar_t * build_unique_audiofilename( AAF_Iface *aafi, aafiAudioEssence * aafiAudioEssence *ae = NULL; - if ( aafi->ctx.options.forbid_nonlatin_filenames && wstr_contains_nonlatin( unique ) ) { + if ( aafi->ctx.options.forbid_nonlatin_filenames && laaf_util_wstr_contains_nonlatin( unique ) ) { aafUID_t *uuid = &(audioEssence->sourceMobID->material); @@ -678,7 +678,7 @@ static wchar_t * build_unique_videofilename( AAF_Iface *aafi, aafiVideoEssence * if ( unique[i] > 0xff ) { - // debug( "MobID : %ls", MobIDToText( videoEssence->sourceMobID ) ); + // debug( "MobID : %ls", aaft_MobIDToText( videoEssence->sourceMobID ) ); aafUID_t *uuid = &(videoEssence->sourceMobID->material); swprintf( unique, 1024, L"%08x-%04x-%04x-%02x%02x%02x%02x%02x%02x%02x%02x", uuid->Data1, @@ -916,7 +916,7 @@ static aafObject * get_EssenceData_By_MobID( AAF_Iface *aafi, aafMobID_t *MobID // // // debug( "%p", aafi->Video->tc ); // debug( "%p", aafi->Video->Essences ); -// debug( "%ls", MobIDToText( sourceMobID ) ); +// debug( "%ls", aaft_MobIDToText( sourceMobID ) ); // // // for ( videoEssence = aafi->Video->Essences; videoEssence != NULL; videoEssence = videoEssence->next ) { @@ -1525,7 +1525,7 @@ static int parse_EssenceData( AAF_Iface *aafi, aafObject *EssenceData, td *__ptd // DUMP_OBJ( aafi, EssenceData, &__td ); // } // - // /* NOTE Might be tweaked by parse_audio_summary() */ + // /* NOTE Might be tweaked by aafi_parse_audio_summary() */ // audioEssence->length = dataLen; @@ -1575,7 +1575,7 @@ static int parse_Component( AAF_Iface *aafi, aafObject *Component, td *__ptd ) parse_Transition( aafi, Component, &__td ); } else { - parse_Segment( aafi, Component, &__td ); + aafi_parse_Segment( aafi, Component, &__td ); } @@ -1752,17 +1752,17 @@ static int parse_NestedScope( AAF_Iface *aafi, aafObject *NestedScope, td *__ptd aaf_foreach_ObjectInSet( &Slot, Slots, NULL ) { __td.ll[__td.lv] = (Slots->Header->_entryCount > 1) ? (Slots->Header->_entryCount - i++) : 0;//(MobSlot->next) ? 1 : 0; - parse_Segment( aafi, Slot, &__td ); + aafi_parse_Segment( aafi, Slot, &__td ); } - /* TODO should we take parse_Segment() return code into account ? */ + /* TODO should we take aafi_parse_Segment() return code into account ? */ return 0; } -int parse_Segment( AAF_Iface *aafi, aafObject *Segment, td *__ptd ) +int aafi_parse_Segment( AAF_Iface *aafi, aafObject *Segment, td *__ptd ) { struct trace_dump __td; @@ -2053,7 +2053,7 @@ static int parse_OperationGroup( AAF_Iface *aafi, aafObject *OpGroup, td *__ptd // // aaf_foreach_ObjectInSet( &Param, Parameters, NULL ) { // aafUID_t *ParamDef = aaf_get_propertyValue( Param, PID_Parameter_Definition, &AAFTypeID_AUID ); - // debug( " OpDef %ls (%ls) | %ls", OperationDefToText(aafi->aafd, OperationIdentification), AUIDToText( ParamDef ), ParameterToText( aafi->aafd, ParamDef ) ); + // debug( " OpDef %ls (%ls) | %ls", aaft_OperationDefToText(aafi->aafd, OperationIdentification), AUIDToText( ParamDef ), aaft_ParameterToText( aafi->aafd, ParamDef ) ); // } // } @@ -2067,7 +2067,7 @@ static int parse_OperationGroup( AAF_Iface *aafi, aafObject *OpGroup, td *__ptd // * TODO: This was seen in the spec, but never encountered in real world. // */ // - // trace_obj( aafi, Segment, ANSI_COLOR_RED ); + // aafi_trace_obj( aafi, Segment, ANSI_COLOR_RED ); // error( "MobSlot::Segment > OperationGroup Not implemented yet." ); // return -1; // @@ -2221,7 +2221,7 @@ static int parse_OperationGroup( AAF_Iface *aafi, aafObject *OpGroup, td *__ptd aaf_foreach_ObjectInSet( &InputSegment, InputSegments, NULL ) { - parse_Segment( aafi, InputSegment, &__td ); + aafi_parse_Segment( aafi, InputSegment, &__td ); aafi->ctx.current_combined_clip_channel_num++; __td.ll[__td.lv]--; @@ -2412,7 +2412,7 @@ static int parse_OperationGroup( AAF_Iface *aafi, aafObject *OpGroup, td *__ptd aaf_foreach_ObjectInSet( &InputSegment, InputSegments, NULL ) { __td.ll[__td.lv] = __td.ll[__td.lv] - i++; - parse_Segment( aafi, InputSegment, &__td ); + aafi_parse_Segment( aafi, InputSegment, &__td ); } } @@ -2530,7 +2530,7 @@ static int parse_SourceClip( AAF_Iface *aafi, aafObject *SourceClip, td *__ptd ) refMob = aaf_get_MobByID( aafi->aafd->Mobs, sourceID ); if ( refMob == NULL ) { - DUMP_OBJ_ERROR( aafi, SourceClip, &__td, "Could not retrieve target Mob by ID : %ls", MobIDToText(sourceID) ); + DUMP_OBJ_ERROR( aafi, SourceClip, &__td, "Could not retrieve target Mob by ID : %ls", aaft_MobIDToText(sourceID) ); return -1; } @@ -2596,10 +2596,10 @@ static int parse_SourceClip( AAF_Iface *aafi, aafObject *SourceClip, td *__ptd ) { // if ( (CurrentUsageCode && aafUIDCmp( CurrentUsageCode, &AAFUsage_SubClip )) || CurrentUsageCode == NULL ) { - // trace_obj( aafi, SourceClip, ANSI_COLOR_YELLOW ); + // aafi_trace_obj( aafi, SourceClip, ANSI_COLOR_YELLOW ); // } // else { - // trace_obj( aafi, SourceClip, ANSI_COLOR_MAGENTA ); + // aafi_trace_obj( aafi, SourceClip, ANSI_COLOR_MAGENTA ); // } @@ -2613,10 +2613,10 @@ static int parse_SourceClip( AAF_Iface *aafi, aafObject *SourceClip, td *__ptd ) // debug( "REF TO SUBCLIP" ); // - // debug( "SourceClip::SourceID : %ls", MobIDToText( sourceID ) ); - // debug( "CurrentMob::MobID : %ls", MobIDToText( parentMobID ) ); + // debug( "SourceClip::SourceID : %ls", aaft_MobIDToText( sourceID ) ); + // debug( "CurrentMob::MobID : %ls", aaft_MobIDToText( parentMobID ) ); // debug( "SourceClip::SourceMobSlotID : %i", *SourceMobSlotID ); - // debug( "UsageCode : %ls", UsageCodeToText( UsageCode ) ); + // debug( "UsageCode : %ls", aaft_UsageCodeToText( UsageCode ) ); if ( refMobSlot == NULL ) { /* TODO isn't it already checked above ? */ @@ -2912,7 +2912,7 @@ POS NOT UPDATED HERE ------------------> └──◻ AAFClassID_SourceClip } else { - DUMP_OBJ_ERROR( aafi, SourceClip, &__td, "RefMob isn't MasterMob : %ls", ClassIDToText( aafi->aafd, refMob->Class->ID ) ); + DUMP_OBJ_ERROR( aafi, SourceClip, &__td, "RefMob isn't MasterMob : %ls", aaft_ClassIDToText( aafi->aafd, refMob->Class->ID ) ); // parse_CompositionMob( ) return -1; } @@ -3046,8 +3046,8 @@ POS NOT UPDATED HERE ------------------> └──◻ AAFClassID_SourceClip // aafObject *Obj = aaf_get_MobByID( aafi->aafd, SourceID ); - // debug( "SourceMobID : %ls", MobIDToText(SourceID) ); - // debug( "MasterMobID : %ls", MobIDToText(mobID) ); + // debug( "SourceMobID : %ls", aaft_MobIDToText(SourceID) ); + // debug( "MasterMobID : %ls", aaft_MobIDToText(mobID) ); if ( !aafi->ctx.current_clip ) { DUMP_OBJ_ERROR( aafi, SourceClip, &__td, "aafi->ctx.current_clip not set" ); @@ -3107,7 +3107,7 @@ POS NOT UPDATED HERE ------------------> └──◻ AAFClassID_SourceClip aafObject *SourceMob = aaf_get_MobByID( aafi->aafd->Mobs, audioEssence->sourceMobID ); if ( SourceMob == NULL ) { - DUMP_OBJ_ERROR( aafi, SourceClip, &__td, "Could not retrieve SourceMob by ID : %ls", MobIDToText(audioEssence->sourceMobID) ); + DUMP_OBJ_ERROR( aafi, SourceClip, &__td, "Could not retrieve SourceMob by ID : %ls", aaft_MobIDToText(audioEssence->sourceMobID) ); return -1; } @@ -3142,7 +3142,7 @@ POS NOT UPDATED HERE ------------------> └──◻ AAFClassID_SourceClip aafi->ctx.current_clip->Essence = audioEssence; - // trace_obj( aafi, SourceClip, ANSI_COLOR_MAGENTA ); + // aafi_trace_obj( aafi, SourceClip, ANSI_COLOR_MAGENTA ); } else if ( aafUIDCmp( DataDefinition, &AAFDataDef_Picture ) || @@ -3154,8 +3154,8 @@ POS NOT UPDATED HERE ------------------> └──◻ AAFClassID_SourceClip // aafObject *Obj = aaf_get_MobByID( aafi->aafd, sourceID ); - // debug( "SourceMobID : %ls", MobIDToText(sourceID) ); - // debug( "MasterMobID : %ls", MobIDToText(mobID) ); + // debug( "SourceMobID : %ls", aaft_MobIDToText(sourceID) ); + // debug( "MasterMobID : %ls", aaft_MobIDToText(mobID) ); if ( !aafi->ctx.current_video_clip ) { @@ -3213,7 +3213,7 @@ POS NOT UPDATED HERE ------------------> └──◻ AAFClassID_SourceClip aafObject *SourceMob = aaf_get_MobByID( aafi->aafd->Mobs, videoEssence->sourceMobID ); if ( SourceMob == NULL ) { - DUMP_OBJ_ERROR( aafi, SourceClip, &__td, "Could not retrieve SourceMob by ID : %ls", MobIDToText(videoEssence->sourceMobID) ); + DUMP_OBJ_ERROR( aafi, SourceClip, &__td, "Could not retrieve SourceMob by ID : %ls", aaft_MobIDToText(videoEssence->sourceMobID) ); return -1; } @@ -3240,7 +3240,7 @@ POS NOT UPDATED HERE ------------------> └──◻ AAFClassID_SourceClip - // trace_obj( aafi, SourceClip, ANSI_COLOR_MAGENTA ); + // aafi_trace_obj( aafi, SourceClip, ANSI_COLOR_MAGENTA ); @@ -3257,7 +3257,7 @@ POS NOT UPDATED HERE ------------------> └──◻ AAFClassID_SourceClip // videoEssence->masterMobID = aaf_get_propertyValue( /*aafi->ctx.*/ParentMob, PID_Mob_MobID, &AAFTypeID_MobIDType ); // // if ( videoEssence->masterMobID == NULL ) { - // trace_obj( aafi, SourceClip, ANSI_COLOR_RED ); + // aafi_trace_obj( aafi, SourceClip, ANSI_COLOR_RED ); // error( "Could not retrieve Mob::MobID." ); // return -1; // } @@ -3287,7 +3287,7 @@ POS NOT UPDATED HERE ------------------> └──◻ AAFClassID_SourceClip // aafObject *SourceMob = aaf_get_MobByID( aafi->aafd->Mobs, videoEssence->sourceMobID ); // // if ( SourceMob == NULL ) { - // trace_obj( aafi, SourceClip, ANSI_COLOR_RED ); + // aafi_trace_obj( aafi, SourceClip, ANSI_COLOR_RED ); // error( "Could not retrieve SourceMob." ); // return -1; // } @@ -3304,7 +3304,7 @@ POS NOT UPDATED HERE ------------------> └──◻ AAFClassID_SourceClip // aafObject *EssenceDesc = aaf_get_propertyValue( SourceMob, PID_SourceMob_EssenceDescription, &AAFTypeID_EssenceDescriptorStrongReference ); // // if ( EssenceDesc == NULL ) { - // trace_obj( aafi, SourceClip, ANSI_COLOR_RED ); + // aafi_trace_obj( aafi, SourceClip, ANSI_COLOR_RED ); // error( "Could not retrieve EssenceDesc." ); // return -1; // } @@ -3339,7 +3339,7 @@ POS NOT UPDATED HERE ------------------> └──◻ AAFClassID_SourceClip // } // } // - // trace_obj( aafi, SourceClip, ANSI_COLOR_MAGENTA ); + // aafi_trace_obj( aafi, SourceClip, ANSI_COLOR_MAGENTA ); // } } @@ -3390,7 +3390,7 @@ static int parse_Selector( AAF_Iface *aafi, aafObject *Selector, td *__ptd ) DUMP_OBJ( aafi, Selector, &__td ); /* without specific software implementation we stick to Selected and forget about Alternates */ - return parse_Segment( aafi, Selected, &__td ); + return aafi_parse_Segment( aafi, Selected, &__td ); } @@ -3848,7 +3848,7 @@ static int retrieve_ControlPoints( AAF_Iface *aafi, aafObject *Points, aafRation aafRational_t *time = aaf_get_propertyValue( Point, PID_ControlPoint_Time, &AAFTypeID_Rational ); if ( time == NULL ) { - // trace_obj( aafi, Points, ANSI_COLOR_RED ); + // aafi_trace_obj( aafi, Points, ANSI_COLOR_RED ); error( "Missing ControlPoint::Time." ); free( *times ); *times = NULL; @@ -3875,7 +3875,7 @@ static int retrieve_ControlPoints( AAF_Iface *aafi, aafObject *Points, aafRation aafRational_t *value = aaf_get_indirectValue( aafi->aafd, Indirect, &AAFTypeID_Rational ); if ( value == NULL ) { - // trace_obj( aafi, Points, ANSI_COLOR_RED ); + // aafi_trace_obj( aafi, Points, ANSI_COLOR_RED ); error( "Could not retrieve Indirect value for PID_ControlPoint_Value" ); free( *times ); *times = NULL; @@ -3893,13 +3893,13 @@ static int retrieve_ControlPoints( AAF_Iface *aafi, aafObject *Points, aafRation } if ( Points->Header->_entryCount != i ) { - // trace_obj( aafi, Points, ANSI_COLOR_YELLOW ); + // aafi_trace_obj( aafi, Points, ANSI_COLOR_YELLOW ); warning( "Points _entryCount (%i) does not match iteration (%i).", Points->Header->_entryCount, i ); return i; } - // trace_obj( aafi, Points, ANSI_COLOR_MAGENTA ); + // aafi_trace_obj( aafi, Points, ANSI_COLOR_MAGENTA ); return Points->Header->_entryCount; } @@ -4288,7 +4288,7 @@ static int parse_MobSlot( AAF_Iface *aafi, aafObject *MobSlot, td *__ptd ) /* Reset timeline position */ // aafi->ctx.current_track->current_pos = 0; - parse_Segment( aafi, Segment, &__td ); + aafi_parse_Segment( aafi, Segment, &__td ); /* update session_end if needed */ @@ -4303,13 +4303,13 @@ static int parse_MobSlot( AAF_Iface *aafi, aafObject *MobSlot, td *__ptd ) aafUIDCmp( DataDefinition, &AAFDataDef_LegacyTimecode ) ) { DUMP_OBJ( aafi, MobSlot, &__td ); - parse_Segment( aafi, Segment, &__td ); + aafi_parse_Segment( aafi, Segment, &__td ); } else if ( aafUIDCmp( DataDefinition, &AAFDataDef_Picture ) || aafUIDCmp( DataDefinition, &AAFDataDef_LegacyPicture ) ) { - // debug( "%ls", ClassIDToText(aafi->aafd, Segment->Class->ID) ); + // debug( "%ls", aaft_ClassIDToText(aafi->aafd, Segment->Class->ID) ); /* ADP NESTED SCOPE */ @@ -4357,7 +4357,7 @@ static int parse_MobSlot( AAF_Iface *aafi, aafObject *MobSlot, td *__ptd ) DUMP_OBJ( aafi, MobSlot, &__td ); - parse_Segment( aafi, Segment, &__td ); + aafi_parse_Segment( aafi, Segment, &__td ); /* update session_end if needed */ @@ -4375,19 +4375,19 @@ static int parse_MobSlot( AAF_Iface *aafi, aafObject *MobSlot, td *__ptd ) // aafUIDCmp( DataDefinition, &AAFDataDef_LegacySound ) ) // { DUMP_OBJ( aafi, MobSlot, &__td ); - parse_Segment( aafi, Segment, &__td ); + aafi_parse_Segment( aafi, Segment, &__td ); // } // else if ( aafUIDCmp( DataDefinition, &AAFDataDef_Picture ) || // aafUIDCmp( DataDefinition, &AAFDataDef_LegacyPicture ) ) // { - // parse_Segment( aafi, Segment ); + // aafi_parse_Segment( aafi, Segment ); // // retrieve_EssenceData( aafi ); // } // else { - // trace_obj( aafi, MobSlot, ANSI_COLOR_YELLOW ); - // debug( "%ls", DataDefToText( aafi->aafd, DataDefinition ) ); + // aafi_trace_obj( aafi, MobSlot, ANSI_COLOR_YELLOW ); + // debug( "%ls", aaft_DataDefToText( aafi->aafd, DataDefinition ) ); // } } else if ( aafUIDCmp( MobSlot->Parent->Class->ID, &AAFClassID_SourceMob ) ) { @@ -4430,7 +4430,7 @@ static int parse_MobSlot( AAF_Iface *aafi, aafObject *MobSlot, td *__ptd ) DUMP_OBJ( aafi, MobSlot, &__td ); - return parse_Segment( aafi, Segment, &__td ); + return aafi_parse_Segment( aafi, Segment, &__td ); } else { /* Not AAFClassID_TimelineMobSlot */ @@ -4474,7 +4474,7 @@ int aafi_retrieveData( AAF_Iface *aafi ) */ - // trace_obj( aafi, Mob, ANSI_COLOR_RED ); + // aafi_trace_obj( aafi, Mob, ANSI_COLOR_RED ); @@ -4529,10 +4529,10 @@ int aafi_retrieveData( AAF_Iface *aafi ) // } // // // aaf_dump_ObjectProperties( aafi->aafd, Mob ); - // debug( "Clip SourceID : %ls", MobIDToText(MobID) ); + // debug( "Clip SourceID : %ls", aaft_MobIDToText(MobID) ); // - // debug( "PointedMob ClassID : %ls", ClassIDToText(aafi->aafd, Mob->Class->ID) ); - // debug( "PointedMob UsageCd : %ls", UsageCodeToText(UsageCode) ); + // debug( "PointedMob ClassID : %ls", aaft_ClassIDToText(aafi->aafd, Mob->Class->ID) ); + // debug( "PointedMob UsageCd : %ls", aaft_UsageCodeToText(UsageCode) ); // debug( "PointedMob Name : %ls", aaf_get_propertyValue(Mob, PID_Mob_Name, &AAFTypeID_String) ); // // @@ -4560,8 +4560,8 @@ int aafi_retrieveData( AAF_Iface *aafi ) // // // CURRENTPOINTER // - // debug( " Segment : %ls", ClassIDToText( aafi->aafd, Segment->Class->ID ) ); - // debug( " DataDefinition : %ls", DataDefToText(aafi->aafd, DataDefinition) ); + // debug( " Segment : %ls", aaft_ClassIDToText( aafi->aafd, Segment->Class->ID ) ); + // debug( " DataDefinition : %ls", aaft_DataDefToText(aafi->aafd, DataDefinition) ); // // // @@ -4570,7 +4570,7 @@ int aafi_retrieveData( AAF_Iface *aafi ) // // if ( aafUIDCmp( Segment->Class->ID, &AAFClassID_SourceClip ) ) { // aafMobID_t *SourceID = aaf_get_propertyValue( Segment, PID_SourceReference_SourceID, &AAFTypeID_MobIDType ); - // debug( " SourceID : %ls", MobIDToText(sourceID) ); + // debug( " SourceID : %ls", aaft_MobIDToText(sourceID) ); // } // // SlotID++; @@ -4614,8 +4614,8 @@ int aafi_retrieveData( AAF_Iface *aafi ) // } // // if ( audioEssence == NULL ) { - // trace_obj( aafi, aafi->ctx.MobSlot, ANSI_COLOR_YELLOW ); - // debug( "%ls", DataDefToText( aafi->aafd, DataDefinition ) ); + // aafi_trace_obj( aafi, aafi->ctx.MobSlot, ANSI_COLOR_YELLOW ); + // debug( "%ls", aaft_DataDefToText( aafi->aafd, DataDefinition ) ); // } // // } @@ -4657,7 +4657,7 @@ int aafi_retrieveData( AAF_Iface *aafi ) foreachEssence( audioEssence, aafi->Audio->Essences ) { /* TODO: rename (not only summary, can be external file too) */ - parse_audio_summary( aafi, audioEssence ); + aafi_parse_audio_summary( aafi, audioEssence ); /* TODO : check samplerate / samplesize proportions accross essences, and choose the most used values as composition values */ if ( aafi->Audio->samplerate == 0 || aafi->Audio->samplerate == audioEssence->samplerate ) { diff --git a/src/AAFIface/AAFIface.c b/src/AAFIface/AAFIface.c index c7893b5..e022c03 100644 --- a/src/AAFIface/AAFIface.c +++ b/src/AAFIface/AAFIface.c @@ -77,7 +77,7 @@ AAF_Iface * aafi_alloc( AAF_Data *aafd ) } - aafi->dbg = new_debug(); + aafi->dbg = laaf_new_debug(); if ( aafi->dbg == NULL ) { return NULL; @@ -164,7 +164,7 @@ int aafi_set_media_location( AAF_Iface *aafi, const char *path ) { free( aafi->ctx.options.media_location ); } - aafi->ctx.options.media_location = (path) ? c99strdup( path ) : NULL; + aafi->ctx.options.media_location = (path) ? laaf_util_c99strdup( path ) : NULL; return 0; } @@ -256,7 +256,7 @@ void aafi_release( AAF_Iface **aafi ) } if ( (*aafi)->dbg ) { - free_debug( (*aafi)->dbg ); + laaf_free_debug( (*aafi)->dbg ); } free( *aafi ); @@ -280,7 +280,7 @@ int aafi_load_file( AAF_Iface *aafi, const char * file ) -aafiTransition * get_fadein( aafiTimelineItem *audioItem ) +aafiTransition * aafi_get_fadein( aafiTimelineItem *audioItem ) { if ( audioItem->prev != NULL && @@ -297,7 +297,7 @@ aafiTransition * get_fadein( aafiTimelineItem *audioItem ) -aafiTransition * get_fadeout( aafiTimelineItem *audioItem ) +aafiTransition * aafi_get_fadeout( aafiTimelineItem *audioItem ) { if ( audioItem->next != NULL && @@ -314,7 +314,7 @@ aafiTransition * get_fadeout( aafiTimelineItem *audioItem ) -aafiTransition * get_xfade( aafiTimelineItem *audioItem ) +aafiTransition * aafi_get_xfade( aafiTimelineItem *audioItem ) { if ( audioItem->prev != NULL && audioItem->prev->type == AAFI_TRANS ) diff --git a/src/AAFIface/Resolve.c b/src/AAFIface/Resolve.c index 5bfdbbb..6290c38 100644 --- a/src/AAFIface/Resolve.c +++ b/src/AAFIface/Resolve.c @@ -163,7 +163,7 @@ int resolve_parse_aafObject_Selector( struct AAF_Iface *aafi, aafObject *Selecto 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 */ - parse_Segment( aafi, Alternate, &__td ); + aafi_parse_Segment( aafi, Alternate, &__td ); } else { DUMP_OBJ_ERROR( aafi, Alternate, &__td, "Multiple Alternates in Davinci Resolve selector" ); @@ -178,7 +178,7 @@ int resolve_parse_aafObject_Selector( struct AAF_Iface *aafi, aafObject *Selecto /* aafi->ctx.current_clip_is_muted was already reset at this point */ if ( ismuted == 0 ) { - return parse_Segment( aafi, Selected, &__td ); + return aafi_parse_Segment( aafi, Selected, &__td ); } return 0; diff --git a/src/AAFIface/URIParser.c b/src/AAFIface/URIParser.c index ce7cbae..40bfefd 100644 --- a/src/AAFIface/URIParser.c +++ b/src/AAFIface/URIParser.c @@ -116,7 +116,7 @@ static int _uri_parse_query( struct uri *uri, const char **pos, const char *end, static int _uri_parse_fragment( struct uri *uri, const char **pos, const char *end, struct dbg *dbg ); static void _uri_scheme2schemeType( struct uri *uri ); -static int _snprintf_realloc( char **str, size_t *size, size_t offset, const char *format, ... ); +static int _laaf_util_snprintf_realloc( char **str, size_t *size, size_t offset, const char *format, ... ); #ifdef BUILD_URI_TEST // gcc -g -W -Wall ./URIParser.c -D BUILD_URI_TEST static int _uri_cmp( const struct uri *a, const struct uri *b ); @@ -741,7 +741,7 @@ int uriIsIPv4( const char *s, int size, char **err ) { if ( *(s+i) == '.' ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "IPV4 parser error : can't start with a single '.'" ); + _laaf_util_snprintf_realloc( err, NULL, 0, "IPV4 parser error : can't start with a single '.'" ); } return 0; } @@ -757,7 +757,7 @@ int uriIsIPv4( const char *s, int size, char **err ) { if ( *(s+i) == '.' ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "IPV4 parser error : can't have successive '.'" ); + _laaf_util_snprintf_realloc( err, NULL, 0, "IPV4 parser error : can't have successive '.'" ); } return 0; } @@ -775,14 +775,14 @@ int uriIsIPv4( const char *s, int size, char **err ) { int octet = atoi(currentOctetStart); if ( octet > 255 ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "IPV4 parser error : octet %i is too high : %.*s", (octets), (int)((s+i) - currentOctetStart), currentOctetStart ); + _laaf_util_snprintf_realloc( err, NULL, 0, "IPV4 parser error : octet %i is too high : %.*s", (octets), (int)((s+i) - currentOctetStart), currentOctetStart ); } return 0; } if ( i+1 == size ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "IPV4 parser error : can't end with a single '.'" ); + _laaf_util_snprintf_realloc( err, NULL, 0, "IPV4 parser error : can't end with a single '.'" ); } return 0; } @@ -798,7 +798,7 @@ int uriIsIPv4( const char *s, int size, char **err ) { } if ( err ) { - _snprintf_realloc( err, NULL, 0, "IPV4 parser error : illegal char '%c' (0x%02x)", *(s+i), *(s+i) ); + _laaf_util_snprintf_realloc( err, NULL, 0, "IPV4 parser error : illegal char '%c' (0x%02x)", *(s+i), *(s+i) ); } return 0; } @@ -806,13 +806,13 @@ int uriIsIPv4( const char *s, int size, char **err ) { if ( octets > 4 ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "IPV4 parser error : too many octets" ); + _laaf_util_snprintf_realloc( err, NULL, 0, "IPV4 parser error : too many octets" ); } return 0; } if ( octets < 4 ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "IPV4 parser error : not enough octets" ); + _laaf_util_snprintf_realloc( err, NULL, 0, "IPV4 parser error : not enough octets" ); } return 0; } @@ -867,7 +867,7 @@ int uriIsIPv6( const char *s, int size, char **err ) { if ( *(s+i) == ':' ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "can't start with a single ':'" ); + _laaf_util_snprintf_realloc( err, NULL, 0, "can't start with a single ':'" ); } return 0; } @@ -895,7 +895,7 @@ int uriIsIPv6( const char *s, int size, char **err ) { int octet = atoi(curSegmentStart); if ( octet > 255 ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "ipv4 portion octet %i is too high : %.*s", (ipv4portion), curSegmentLength, curSegmentStart ); + _laaf_util_snprintf_realloc( err, NULL, 0, "ipv4 portion octet %i is too high : %.*s", (ipv4portion), curSegmentLength, curSegmentStart ); } return 0; } @@ -908,7 +908,7 @@ int uriIsIPv6( const char *s, int size, char **err ) { if ( i == size || *(s+i) == ':' ) { if ( curSegmentLength > 4 ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "segment %i is too long : %.*s", (segmentCount-1), curSegmentLength, curSegmentStart ); + _laaf_util_snprintf_realloc( err, NULL, 0, "segment %i is too long : %.*s", (segmentCount-1), curSegmentLength, curSegmentStart ); } return 0; } @@ -924,7 +924,7 @@ int uriIsIPv6( const char *s, int size, char **err ) { else if ( i+1 == size ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "can't end with a single ':'" ); + _laaf_util_snprintf_realloc( err, NULL, 0, "can't end with a single ':'" ); } return 0; } @@ -957,7 +957,7 @@ int uriIsIPv6( const char *s, int size, char **err ) { if ( *(s+i) == ':' ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "can't have more than two successive ':'" ); + _laaf_util_snprintf_realloc( err, NULL, 0, "can't have more than two successive ':'" ); } return 0; } @@ -974,7 +974,7 @@ int uriIsIPv6( const char *s, int size, char **err ) { if ( *(s+i) == '.' ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "can't have successive '.'" ); + _laaf_util_snprintf_realloc( err, NULL, 0, "can't have successive '.'" ); } return 0; } @@ -992,7 +992,7 @@ int uriIsIPv6( const char *s, int size, char **err ) { int octet = atoi(curSegmentStart); if ( octet > 255 ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "ipv4 portion octet %i is too high : %.*s", (ipv4portion), curSegmentLength, curSegmentStart ); + _laaf_util_snprintf_realloc( err, NULL, 0, "ipv4 portion octet %i is too high : %.*s", (ipv4portion), curSegmentLength, curSegmentStart ); } return 0; } @@ -1001,7 +1001,7 @@ int uriIsIPv6( const char *s, int size, char **err ) { if ( i+1 == size ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "can't end with a single '.'" ); + _laaf_util_snprintf_realloc( err, NULL, 0, "can't end with a single '.'" ); } return 0; } @@ -1017,7 +1017,7 @@ int uriIsIPv6( const char *s, int size, char **err ) { } if ( err ) { - _snprintf_realloc( err, NULL, 0, "illegal char '%c' (0x%02x)", *(s+i), *(s+i) ); + _laaf_util_snprintf_realloc( err, NULL, 0, "illegal char '%c' (0x%02x)", *(s+i), *(s+i) ); } return 0; @@ -1031,26 +1031,26 @@ int uriIsIPv6( const char *s, int size, char **err ) { if ( ipv4portion > 4 ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "too many octets in ipv4 portion" ); + _laaf_util_snprintf_realloc( err, NULL, 0, "too many octets in ipv4 portion" ); } return 0; } if ( ipv4portion > 0 && ipv4portion < 4 ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "not enough octets in ipv4 portion" ); + _laaf_util_snprintf_realloc( err, NULL, 0, "not enough octets in ipv4 portion" ); } return 0; } if ( emptySegmentCount + (segmentCount/2) + ipv4portion > 8 ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "too many segments" ); + _laaf_util_snprintf_realloc( err, NULL, 0, "too many segments" ); } return 0; } if ( emptySegmentCount == 0 && (((ipv4portion/2) + segmentCount) < 8) ) { if ( err ) { - _snprintf_realloc( err, NULL, 0, "not enough segments" ); + _laaf_util_snprintf_realloc( err, NULL, 0, "not enough segments" ); } return 0; } @@ -1093,7 +1093,7 @@ static void _uri_scheme2schemeType( struct uri *uri ) { -static int _snprintf_realloc( char **str, size_t *size, size_t offset, const char *format, ... ) +static int _laaf_util_snprintf_realloc( char **str, size_t *size, size_t offset, const char *format, ... ) { size_t tmpsize = 0; diff --git a/src/LibCFB/CFBDump.c b/src/LibCFB/CFBDump.c index 9752007..e96ef1c 100644 --- a/src/LibCFB/CFBDump.c +++ b/src/LibCFB/CFBDump.c @@ -57,10 +57,10 @@ void cfb_dump_node( CFB_Data *cfbd, cfbNode *node, int print_stream ) int offset = 0; struct dbg *dbg = cfbd->dbg; - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n" ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _ab : %ls\n", nodeName ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _cb : %u\n", node->_cb ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _mse : %s\n", + 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" : @@ -68,24 +68,24 @@ void cfb_dump_node( CFB_Data *cfbd, cfbNode *node, int print_stream ) node->_mse == 4 ? "STGTY_PROPERTY" : node->_mse == 5 ? "STGTY_ROOT" : "" ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _bflags : %s\n", node->_bflags == 1 ? "BLACK" : "RED" ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _sidLeftSib : 0x%08x\n", node->_sidLeftSib ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _sidRightSib : 0x%08x\n", node->_sidRightSib ); + 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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _sidChild : 0x%08x\n", node->_sidChild ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _clsid : %ls\n", CLSIDToText( &(node->_clsId) ) ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _dwUserFlags : 0x%08x (%d)\n", node->_dwUserFlags, node->_dwUserFlags ); + 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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _time (cre) : 0x%08x%08x\n", + 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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _ (mod) : 0x%08x%08x\n", + 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 ); } @@ -93,12 +93,12 @@ void cfb_dump_node( CFB_Data *cfbd, cfbNode *node, int print_stream ) if ( node->_mse == STGTY_STREAM || node->_mse == STGTY_ROOT ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _sectStart : 0x%08x (%d)\n", node->_sectStart, node->_sectStart ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " _ulSizeLow : 0x%08x (%d)\n", node->_ulSizeLow, node->_ulSizeLow ); - offset += 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, " _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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n" ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n" ); if ( print_stream == 1 ) { @@ -122,7 +122,7 @@ void cfb_dump_nodePath( CFB_Data *cfbd, const wchar_t *path, int print_stream ) cfb_dump_node( cfbd, node, print_stream ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n" ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n" ); } @@ -138,7 +138,7 @@ void cfb_dump_nodeStream( CFB_Data *cfbd, cfbNode *node ) return; } - dump_hex( stream, stream_sz, &cfbd->dbg->_dbg_msg, &cfbd->dbg->_dbg_msg_size, 0 ); + laaf_util_dump_hex( stream, stream_sz, &cfbd->dbg->_dbg_msg, &cfbd->dbg->_dbg_msg_size, 0 ); free( stream ); } @@ -159,7 +159,7 @@ void cfb_dump_nodePathStream( CFB_Data *cfbd, const wchar_t *path ) cfb_getStream( cfbd, node, &stream, &stream_sz ); - dump_hex( stream, stream_sz, &cfbd->dbg->_dbg_msg, &cfbd->dbg->_dbg_msg_size, 0 ); + laaf_util_dump_hex( stream, stream_sz, &cfbd->dbg->_dbg_msg, &cfbd->dbg->_dbg_msg_size, 0 ); free( stream ); } @@ -216,13 +216,13 @@ void cfb_dump_nodePaths( CFB_Data *cfbd, uint32_t prevPath, char *strArray[], ui // qsort( strArray, *str_i, sizeof(char*), compareStrings ); for ( uint32_t i = 0; i < cfbd->nodes_cnt && strArray[i] != NULL; i++ ) { - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "%05i : %s\n", i, strArray[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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n" ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n" ); } } @@ -235,34 +235,34 @@ void cfb_dump_header( CFB_Data *cfbd ) int offset = 0; struct dbg *dbg = cfbd->dbg; - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_abSig : 0x%08"PRIx64"\n", cfbh->_abSig ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_clsId : %ls\n", CLSIDToText( &(cfbh->_clsid) ) ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " version : %u.%u ( 0x%04x 0x%04x )\n", + 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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_uByteOrder : %s ( 0x%04x )\n", + 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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_uSectorShift : %u (%u bytes sectors)\n", + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_uSectorShift : %u (%u bytes sectors)\n", cfbh->_uSectorShift, 1<_uSectorShift ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_uMiniSectorShift : %u (%u bytes mini-sectors)\n", + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_uMiniSectorShift : %u (%u bytes mini-sectors)\n", cfbh->_uMiniSectorShift, 1<_uMiniSectorShift ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_usReserved0 : 0x%02x\n", cfbh->_usReserved ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_ulReserved1 : 0x%04x\n", cfbh->_ulReserved1 ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_csectDir : %u\n", cfbh->_csectDir ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_csectFat : %u\n", cfbh->_csectFat ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_sectDirStart : %u\n", cfbh->_sectDirStart ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_signature : %u\n", cfbh->_signature ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_ulMiniSectorCutoff : %u\n", cfbh->_ulMiniSectorCutoff ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_sectMiniFatStart : %u\n", cfbh->_sectMiniFatStart ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_csectMiniFat : %u\n", cfbh->_csectMiniFat ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_sectDifStart : %u\n", cfbh->_sectDifStart ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_csectDif : %u\n", cfbh->_csectDif ); - - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n" ); + 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" ); } @@ -272,12 +272,12 @@ void cfb_dump_FAT( CFB_Data *cfbd ) int offset = 0; struct dbg *dbg = cfbd->dbg; - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_CFB_FAT_______________________________________________________________________________________\n\n" ); + 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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " SECT[%u] : 0x%08x %s\n", + 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)" : @@ -288,14 +288,14 @@ void cfb_dump_FAT( CFB_Data *cfbd ) "" ); } - offset += 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" ); - offset += 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, " End of FAT.\n\n" ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Total FAT entries : %u\n", cfbd->fat_sz ); - offset += 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, " 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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n" ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n" ); } @@ -305,12 +305,12 @@ void cfb_dump_MiniFAT( CFB_Data *cfbd ) int offset = 0; struct dbg *dbg = cfbd->dbg; - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_CFB_MiniFAT___________________________________________________________________________________\n\n" ); + 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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " SECT[%u] : 0x%08x %s\n", + 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)" : @@ -321,15 +321,15 @@ void cfb_dump_MiniFAT( CFB_Data *cfbd ) "" ); } - offset += 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" ); - offset += 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, " End of MiniFAT.\n\n" ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Total MiniFAT entries : %u\n", cfbd->miniFat_sz ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " First MiniFAT sector ID : %u\n", cfbd->hdr->_sectMiniFatStart ); - offset += 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, " 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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n" ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n" ); } @@ -339,12 +339,12 @@ void cfb_dump_DiFAT( CFB_Data *cfbd ) int offset = 0; struct dbg *dbg = cfbd->dbg; - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "_CFB_DiFAT_____________________________________________________________________________________\n\n" ); + 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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " SECT[%u] : 0x%08x %s\n", + 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)" : @@ -355,13 +355,13 @@ void cfb_dump_DiFAT( CFB_Data *cfbd ) "" ); } - offset += 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" ); - offset += 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, " End of DiFAT.\n\n" ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " Total DiFAT entries : %u\n", cfbd->DiFAT_sz ); - offset += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, " First DiFAT sector ID : %u\n", cfbd->hdr->_sectDifStart ); - offset += 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, " 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 += snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n" ); + offset += laaf_util_snprintf_realloc( &dbg->_dbg_msg, &dbg->_dbg_msg_size, offset, "\n\n" ); } diff --git a/src/LibCFB/LibCFB.c b/src/LibCFB/LibCFB.c index ccb26e0..3cc6915 100644 --- a/src/LibCFB/LibCFB.c +++ b/src/LibCFB/LibCFB.c @@ -149,7 +149,7 @@ static cfbSID_t cfb_getIDByNode( CFB_Data *cfbd, cfbNode *node ); -const wchar_t * CLSIDToText( const cfbCLSID_t *clsid ) +const wchar_t * cfb_CLSIDToText( const cfbCLSID_t *clsid ) { static wchar_t str[96]; @@ -1256,7 +1256,7 @@ cfbNode * cfb_getNodeByPath( CFB_Data *cfbd, const wchar_t *path, cfbSID_t id ) return NULL; } - // dump_hex( cfbd->nodes[id]->_ab, cfbd->nodes[id]->_cb ); + // laaf_util_dump_hex( cfbd->nodes[id]->_ab, cfbd->nodes[id]->_cb ); cfb_w16towchar( ab, cfbd->nodes[id]._ab, cfbd->nodes[id]._cb ); diff --git a/src/common/utils.c b/src/common/utils.c index f34f05c..9ec4e80 100644 --- a/src/common/utils.c +++ b/src/common/utils.c @@ -32,7 +32,7 @@ -int wstr_contains_nonlatin( const wchar_t *str ) +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 */ @@ -46,7 +46,7 @@ int wstr_contains_nonlatin( const wchar_t *str ) -char * clean_filename( char *fname ) +char * laaf_util_clean_filename( char *fname ) { /* * sanitize file/dir name @@ -87,7 +87,7 @@ char * clean_filename( char *fname ) -const char * fop_get_file( const char *filepath ) +const char * laaf_util_fop_get_file( const char *filepath ) { if ( filepath == NULL ) { return NULL; @@ -104,7 +104,7 @@ const char * fop_get_file( const char *filepath ) -char * build_path( const char *sep, const char *first, ... ) +char * laaf_util_build_path( const char *sep, const char *first, ... ) { char *str = malloc( BUILD_PATH_DEFAULT_BUF_SIZE ); @@ -192,7 +192,7 @@ char * build_path( const char *sep, const char *first, ... ) -int snprintf_realloc( char **str, int *size, size_t offset, const char *format, ... ) +int laaf_util_snprintf_realloc( char **str, int *size, size_t offset, const char *format, ... ) { int tmpsize = 0; @@ -237,7 +237,7 @@ int snprintf_realloc( char **str, int *size, size_t offset, const char *format, -int vsnprintf_realloc( char **str, int *size, int offset, const char *fmt, va_list *args ) +int laaf_util_vsnprintf_realloc( char **str, int *size, int offset, const char *fmt, va_list *args ) { va_list args2, args3; @@ -273,7 +273,7 @@ int vsnprintf_realloc( char **str, int *size, int offset, const char *fmt, va_li -char * c99strdup( const char *src ) +char * laaf_util_c99strdup( const char *src ) { if ( !src ) { return NULL; @@ -303,7 +303,7 @@ char * c99strdup( const char *src ) -int dump_hex( const unsigned char *stream, size_t stream_sz, char **buf, int *bufsz, int offset ) +int laaf_util_dump_hex( const unsigned char *stream, size_t stream_sz, char **buf, int *bufsz, int offset ) { if ( stream == NULL ) { return -1; @@ -317,7 +317,7 @@ int dump_hex( const unsigned char *stream, size_t stream_sz, char **buf, int *bu uint32_t count = 0; - offset += snprintf_realloc( buf, bufsz, offset, " ______________________________ Hex Dump ______________________________\n\n" ); + offset += laaf_util_snprintf_realloc( buf, bufsz, offset, " ______________________________ Hex Dump ______________________________\n\n" ); while ( count < stream_sz ) { @@ -371,10 +371,10 @@ int dump_hex( const unsigned char *stream, size_t stream_sz, char **buf, int *bu count += lineLen; - offset += snprintf_realloc( buf, bufsz, offset, " %s | %s\n", hex, ascii ); + offset += laaf_util_snprintf_realloc( buf, bufsz, offset, " %s | %s\n", hex, ascii ); } - offset += snprintf_realloc( buf, bufsz, offset, " ______________________________________________________________________\n\n" ); + offset += laaf_util_snprintf_realloc( buf, bufsz, offset, " ______________________________________________________________________\n\n" ); return offset - initialOffset; /* bytes written */ } diff --git a/src/common/utils.h b/src/common/utils.h index 3489bd1..3f90a53 100644 --- a/src/common/utils.h +++ b/src/common/utils.h @@ -66,21 +66,21 @@ extern "C" { -int wstr_contains_nonlatin( const wchar_t *str ); +int laaf_util_wstr_contains_nonlatin( const wchar_t *str ); -char * clean_filename( char *filename ); +char * laaf_util_clean_filename( char *filename ); -const char * fop_get_file( const char *filepath ); +const char * laaf_util_fop_get_file( const char *filepath ); -char * build_path( const char *sep, const char *first, ... ); +char * laaf_util_build_path( const char *sep, const char *first, ... ); -int snprintf_realloc( char **str, int *size, size_t offset, const char *format, ... ); +int laaf_util_snprintf_realloc( char **str, int *size, size_t offset, const char *format, ... ); -int vsnprintf_realloc( char **str, int *size, int offset, const char *fmt, va_list *args ); +int laaf_util_vsnprintf_realloc( char **str, int *size, int offset, const char *fmt, va_list *args ); -char * c99strdup( const char *src ); +char * laaf_util_c99strdup( const char *src ); -int dump_hex( const unsigned char *stream, size_t stream_sz, char **buf, int *bufsz, int offset ); +int laaf_util_dump_hex( const unsigned char *stream, size_t stream_sz, char **buf, int *bufsz, int offset ); #ifdef __cplusplus diff --git a/src/debug.c b/src/debug.c index 3ea480a..9c76492 100644 --- a/src/debug.c +++ b/src/debug.c @@ -11,11 +11,11 @@ -struct dbg * new_debug( void ) +struct dbg * laaf_new_debug( void ) { struct dbg *dbg = calloc( sizeof(struct dbg), sizeof(char) ); - dbg->debug_callback = &debug_callback; + dbg->debug_callback = &laaf_debug_callback; dbg->fp = stdout; return dbg; @@ -23,7 +23,7 @@ struct dbg * new_debug( void ) -void free_debug( struct dbg *dbg ) +void laaf_free_debug( struct dbg *dbg ) { if ( dbg->_dbg_msg ) { free( dbg->_dbg_msg ); @@ -34,7 +34,7 @@ void free_debug( struct dbg *dbg ) -void debug_callback( struct dbg *dbg, void *ctxdata, int libid, int type, const char *srcfile, const char *srcfunc, int lineno, const char *msg, void *user ) +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; diff --git a/tools/AAFExtract.c b/tools/AAFExtract.c index b5668ab..ab72ea9 100644 --- a/tools/AAFExtract.c +++ b/tools/AAFExtract.c @@ -29,7 +29,7 @@ #include -#include "../src/common/utils.h" // ANSI colors, c99strdup() +#include "../src/common/utils.h" // ANSI colors, laaf_util_c99strdup() static void showHelp( void ) { @@ -106,7 +106,7 @@ int main( int argc, char *argv[] ) break; case 'p': - output_path = c99strdup(optarg); + output_path = laaf_util_c99strdup(optarg); break; case 'n': @@ -114,7 +114,7 @@ int main( int argc, char *argv[] ) break; case 'f': - aaf_file = c99strdup(optarg); + aaf_file = laaf_util_c99strdup(optarg); break; default: diff --git a/tools/AAFInfo.c b/tools/AAFInfo.c index f5b550b..83962d7 100644 --- a/tools/AAFInfo.c +++ b/tools/AAFInfo.c @@ -34,7 +34,7 @@ #include #include "./thirdparty/libTC.h" -#include "../src/common/utils.h" // ANSI colors, c99strdup() +#include "../src/common/utils.h" // ANSI colors, laaf_util_c99strdup() @@ -604,7 +604,7 @@ int main( int argc, char *argv[] ) ( audioEssence->file_name && wcslen(audioEssence->file_name) == wcslen(audioEssence->unique_file_name) ) ? "" : ")" ); - // printf( "MOBID %s\n", MobIDToText( audioEssence->sourceMobID ) ); + // printf( "MOBID %s\n", aaft_MobIDToText( audioEssence->sourceMobID ) ); i++; } @@ -640,7 +640,7 @@ int main( int argc, char *argv[] ) videoItem = videoTrack->Items; videoClip = (aafiVideoClip*)videoItem->data; - // locate_external_essence_file( aafi, videoClip->Essence->original_file_path ); + // aafi_locate_external_essence_file( aafi, videoClip->Essence->original_file_path ); struct timecode tc_in; struct timecode tc_out; @@ -742,8 +742,8 @@ int main( int argc, char *argv[] ) // aafPosition_t sessionStart = convertEditUnit( audioClip->track->Audio->tc->start, aafi->Audio->tc->edit_rate, audioClip->track->edit_rate ); - aafiTransition *fadein = get_fadein( audioItem ); - aafiTransition *fadeout = get_fadeout( audioItem ); + aafiTransition *fadein = aafi_get_fadein( audioItem ); + aafiTransition *fadeout = aafi_get_fadeout( audioItem ); char posFormatBuf1[POS_FORMAT_BUFFER_LEN]; char posFormatBuf2[POS_FORMAT_BUFFER_LEN];