summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHubert Figuière <hub@figuiere.net>2015-03-06 11:11:01 +0100
committerHubert Figuière <hub@figuiere.net>2015-03-06 11:11:01 +0100
commit606a7df73750084a36fe69651e7b672333a76412 (patch)
treee337e53680715d69be570ccfcf8757ca898ea124
parent4652015fe779e12fb06ff8fa56bf70e373cd3894 (diff)
Update to XMP SDK CC 2014.12adobe-sdk
-rw-r--r--BSD-License.txt2
-rw-r--r--XMP-Toolkit-SDK-Overview.pdfbin105907 -> 126009 bytes
-rw-r--r--XMPCore/build/CMakeLists.txt182
-rw-r--r--XMPCore/build/CMakeListsCommon.txt240
-rw-r--r--XMPCore/resource/mac/XMPCore.unexp16
-rw-r--r--XMPCore/source/ExpatAdapter.cpp39
-rw-r--r--XMPCore/source/ParseRDF.cpp8
-rw-r--r--XMPCore/source/XMPMeta-GetSet.cpp39
-rw-r--r--XMPCore/source/XMPMeta-Serialize.cpp67
-rw-r--r--XMPCore/source/XMPMeta.cpp11
-rw-r--r--XMPCore/source/XMPUtils-FileInfo.cpp5
-rw-r--r--XMPCore/source/XMPUtils.cpp26
-rw-r--r--XMPCore/source/XMPUtils.hpp6
-rw-r--r--XMPFiles/build/CMakeLists.txt315
-rw-r--r--XMPFiles/build/CMakeListsCommon.txt318
-rw-r--r--XMPFiles/source/FileHandlers/AVCHD_Handler.cpp4
-rw-r--r--XMPFiles/source/FileHandlers/JPEG_Handler.cpp44
-rw-r--r--XMPFiles/source/FileHandlers/MP3_Handler.cpp49
-rw-r--r--XMPFiles/source/FileHandlers/MPEG4_Handler.cpp446
-rw-r--r--XMPFiles/source/FileHandlers/MPEG4_Handler.hpp2
-rw-r--r--XMPFiles/source/FileHandlers/P2_Handler.cpp691
-rw-r--r--XMPFiles/source/FileHandlers/P2_Handler.hpp17
-rw-r--r--XMPFiles/source/FileHandlers/PSD_Handler.cpp6
-rw-r--r--XMPFiles/source/FileHandlers/SonyHDV_Handler.cpp2
-rw-r--r--XMPFiles/source/FileHandlers/UCF_Handler.cpp30
-rw-r--r--XMPFiles/source/FileHandlers/UCF_Handler.hpp4
-rw-r--r--XMPFiles/source/FileHandlers/WAVE_Handler.cpp26
-rw-r--r--XMPFiles/source/FileHandlers/WAVE_Handler.hpp10
-rw-r--r--XMPFiles/source/FileHandlers/XDCAMEX_Handler.cpp2
-rw-r--r--XMPFiles/source/FileHandlers/XDCAM_Handler.cpp25
-rw-r--r--XMPFiles/source/FormatSupport/IFF/ChunkController.cpp10
-rw-r--r--XMPFiles/source/FormatSupport/IFF/ChunkPath.h1
-rw-r--r--XMPFiles/source/FormatSupport/IPTC_Support.cpp4
-rw-r--r--XMPFiles/source/FormatSupport/ISOBaseMedia_Support.cpp19
-rw-r--r--XMPFiles/source/FormatSupport/ISOBaseMedia_Support.hpp137
-rw-r--r--XMPFiles/source/FormatSupport/MOOV_Support.hpp4
-rw-r--r--XMPFiles/source/FormatSupport/P2_Support.cpp566
-rw-r--r--XMPFiles/source/FormatSupport/P2_Support.hpp135
-rw-r--r--XMPFiles/source/FormatSupport/PostScript_Support.cpp9
-rw-r--r--XMPFiles/source/FormatSupport/QuickTime_Support.cpp194
-rw-r--r--XMPFiles/source/FormatSupport/RIFF.cpp1
-rw-r--r--XMPFiles/source/FormatSupport/ReconcileTIFF.cpp13
-rw-r--r--XMPFiles/source/FormatSupport/Reconcile_Impl.cpp40
-rw-r--r--XMPFiles/source/FormatSupport/Reconcile_Impl.hpp2
-rw-r--r--XMPFiles/source/FormatSupport/TIFF_MemoryReader.cpp4
-rw-r--r--XMPFiles/source/FormatSupport/TIFF_Support.hpp4
-rw-r--r--XMPFiles/source/FormatSupport/TimeConversionUtils.cpp599
-rw-r--r--XMPFiles/source/FormatSupport/TimeConversionUtils.hpp35
-rw-r--r--XMPFiles/source/FormatSupport/WAVE/Cr8rMetadata.cpp2
-rw-r--r--XMPFiles/source/FormatSupport/WAVE/INFOMetadata.cpp2
-rw-r--r--XMPFiles/source/FormatSupport/WAVE/PrmLMetadata.cpp2
-rw-r--r--XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.cpp5
-rw-r--r--XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp515
-rw-r--r--XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.h6
-rw-r--r--XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.cpp815
-rw-r--r--XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.h157
-rw-r--r--XMPFiles/source/NativeMetadataSupport/IMetadata.cpp25
-rw-r--r--XMPFiles/source/NativeMetadataSupport/IMetadata.h36
-rw-r--r--XMPFiles/source/NativeMetadataSupport/IReconcile.cpp52
-rw-r--r--XMPFiles/source/NativeMetadataSupport/IReconcile.h7
-rw-r--r--XMPFiles/source/PluginHandler/FileHandler.h2
-rw-r--r--XMPFiles/source/PluginHandler/Module.cpp4
-rw-r--r--XMPFiles/source/PluginHandler/PluginManager.cpp6
-rw-r--r--XMPFiles/source/XMPFiles.cpp146
-rw-r--r--XMPFiles/source/XMPFiles.hpp2
-rw-r--r--XMPFiles/source/XMPFiles_Impl.cpp15
-rw-r--r--XMPFiles/source/XMPFiles_Impl.hpp2
-rwxr-xr-xXMPFilesPlugins/PDF_Handler/resource/linux/PDF_Handler.exp11
-rwxr-xr-xXMPFilesPlugins/PDF_Handler/resource/mac/PDF_Handler.exp2
-rwxr-xr-xXMPFilesPlugins/PDF_Handler/resource/mac/PDF_Handler.plist28
-rwxr-xr-xXMPFilesPlugins/PDF_Handler/resource/mac/PDF_HandlerPList.h12
-rwxr-xr-xXMPFilesPlugins/PDF_Handler/resource/win/CopyPDFL.bat14
-rw-r--r--XMPFilesPlugins/PDF_Handler/resource/win/PDF_Handler-32.rc8
-rw-r--r--XMPFilesPlugins/PDF_Handler/resource/win/PDF_Handler-64.rc8
-rwxr-xr-xXMPFilesPlugins/PDF_Handler/resource/win/PDF_Handler.def9
-rw-r--r--XMPFilesPlugins/PDF_Handler/windows/windows/MiniPDFL.libbin0 -> 16096 bytes
-rw-r--r--XMPFilesPlugins/PDF_Handler/windows/windows_x64/MiniPDFL.libbin0 -> 16240 bytes
-rwxr-xr-xXMPFilesPlugins/PluginTemplate/build/GeneratePluginTemplate_win.bat10
-rw-r--r--XMPFilesPlugins/PluginTemplate/build/README.txt6
-rw-r--r--XMPFilesPlugins/api/source/PluginRegistry.cpp1
-rw-r--r--build/CMakeLists.txt3
-rwxr-xr-xbuild/GenerateXMPToolkitSDK_win.bat14
-rw-r--r--build/ProductConfig.cmake170
-rw-r--r--build/README.txt32
-rw-r--r--build/XMP_Config.cmake501
-rw-r--r--build/XMP_ConfigCommon.cmake481
-rw-r--r--build/XMP_Ios.cmake109
-rw-r--r--build/XMP_Linux.cmake143
-rw-r--r--build/XMP_Mac.cmake129
-rw-r--r--build/XMP_Win.cmake127
-rwxr-xr-x[-rw-r--r--]build/cmake.bat0
-rwxr-xr-x[-rw-r--r--]build/cmake.command0
-rwxr-xr-x[-rw-r--r--]build/cmake_all.bat0
-rwxr-xr-xbuild/shared/CMakeUtils.bat12
-rw-r--r--build/shared/SharedConfig_Common.cmake71
-rw-r--r--build/shared/ToolchainLLVM.cmake4
-rw-r--r--docs/API/TXMPFiles_8hpp.html4
-rw-r--r--docs/API/TXMPFiles_8hpp_source.html226
-rw-r--r--docs/API/TXMPFiles_8incl__cpp.html4
-rw-r--r--docs/API/TXMPIterator_8hpp.html4
-rw-r--r--docs/API/TXMPIterator_8hpp_source.html4
-rw-r--r--docs/API/TXMPIterator_8incl__cpp.html4
-rw-r--r--docs/API/TXMPMeta_8hpp.html4
-rw-r--r--docs/API/TXMPMeta_8hpp_source.html4
-rw-r--r--docs/API/TXMPMeta_8incl__cpp.html4
-rw-r--r--docs/API/TXMPUtils_8hpp.html4
-rw-r--r--docs/API/TXMPUtils_8hpp_source.html4
-rw-r--r--docs/API/TXMPUtils_8incl__cpp.html4
-rw-r--r--docs/API/XMP_8incl__cpp.html4
-rw-r--r--docs/API/XMP__Const_8h.html18
-rw-r--r--docs/API/XMP__Const_8h_source.html1413
-rw-r--r--docs/API/annotated.html4
-rw-r--r--docs/API/classTXMPFiles-members.html4
-rw-r--r--docs/API/classTXMPFiles.html7
-rw-r--r--docs/API/classTXMPIterator-members.html4
-rw-r--r--docs/API/classTXMPIterator.html4
-rw-r--r--docs/API/classTXMPMeta-members.html4
-rw-r--r--docs/API/classTXMPMeta.html4
-rw-r--r--docs/API/classTXMPUtils-members.html4
-rw-r--r--docs/API/classTXMPUtils.html4
-rw-r--r--docs/API/classXMP__Error-members.html4
-rw-r--r--docs/API/classXMP__Error.html6
-rw-r--r--docs/API/classes.html4
-rw-r--r--docs/API/files.html4
-rw-r--r--docs/API/functions.html4
-rw-r--r--docs/API/functions_func.html4
-rw-r--r--docs/API/functions_vars.html4
-rw-r--r--docs/API/globals.html10
-rw-r--r--docs/API/globals_0x73.html4
-rw-r--r--docs/API/globals_0x78.html4
-rw-r--r--docs/API/globals_defs.html4
-rw-r--r--docs/API/globals_enum.html4
-rw-r--r--docs/API/globals_eval.html10
-rw-r--r--docs/API/globals_type.html4
-rw-r--r--docs/API/graph_legend.html4
-rw-r--r--docs/API/index.html4
-rw-r--r--docs/API/structXMP__DateTime-members.html4
-rw-r--r--docs/API/structXMP__DateTime.html4
-rw-r--r--docs/API/structXMP__PacketInfo-members.html4
-rw-r--r--docs/API/structXMP__PacketInfo.html4
-rw-r--r--docs/API/structXMP__VersionInfo-members.html4
-rw-r--r--docs/API/structXMP__VersionInfo.html4
-rwxr-xr-x[-rw-r--r--]docs/API/xmp_tagline_small.jpgbin27209 -> 27209 bytes
-rw-r--r--docs/XMPProgrammersGuide.pdfbin582109 -> 646081 bytes
-rw-r--r--docs/XMPSpecificationPart2.pdfbin240389 -> 479816 bytes
-rw-r--r--docs/XMPSpecificationPart3.pdfbin497375 -> 804495 bytes
-rw-r--r--public/include/TXMPFiles.hpp2
-rw-r--r--public/include/XMP_Const.h33
-rw-r--r--public/include/XMP_Environment.h41
-rw-r--r--public/include/client-glue/TXMPMeta.incl_cpp16
-rw-r--r--public/include/client-glue/WXMPIterator.hpp12
-rw-r--r--public/include/client-glue/WXMPMeta.hpp114
-rw-r--r--public/include/client-glue/WXMPUtils.hpp58
-rw-r--r--public/include/client-glue/WXMP_Common.hpp2
-rwxr-xr-xsamples/build/GenerateSamples_win.bat26
-rw-r--r--samples/build/cmake/CMakeLists.txt58
-rw-r--r--samples/build/cmake/CMakeListsCommon.txt64
-rw-r--r--samples/build/cmake/CustomSchema/CMakeLists.txt16
-rw-r--r--samples/build/cmake/DumpFile/CMakeLists.txt32
-rw-r--r--samples/build/cmake/DumpFile/CMakeListsCommon.txt48
-rw-r--r--samples/build/cmake/DumpMainXMP/CMakeLists.txt18
-rw-r--r--samples/build/cmake/DumpScannedXMP/CMakeLists.txt22
-rw-r--r--samples/build/cmake/ModifyingXMP/CMakeLists.txt20
-rw-r--r--samples/build/cmake/ReadingXMP/CMakeLists.txt18
-rw-r--r--samples/build/cmake/SharedConfig.cmake19
-rw-r--r--samples/build/cmake/XMPCommand/CMakeLists.txt39
-rw-r--r--samples/build/cmake/XMPCommand/CMakeListsCommon.txt54
-rw-r--r--samples/build/cmake/XMPCoreCoverage/CMakeLists.txt16
-rw-r--r--samples/build/cmake/XMPFilesCoverage/CMakeLists.txt16
-rw-r--r--samples/build/cmake/XMPIterations/CMakeLists.txt16
-rw-r--r--samples/build/readme.txt2
-rw-r--r--samples/source/common/DumpFile.cpp247
-rw-r--r--samples/source/common/TagTree.cpp16
-rw-r--r--samples/source/common/globals.h2
-rwxr-xr-x[-rw-r--r--]samples/testfiles/BlueSquare.aibin1186535 -> 1186535 bytes
-rwxr-xr-x[-rw-r--r--]samples/testfiles/BlueSquare.avibin132262 -> 132262 bytes
-rwxr-xr-x[-rw-r--r--]samples/testfiles/BlueSquare.eps0
-rwxr-xr-x[-rw-r--r--]samples/testfiles/BlueSquare.inddbin757760 -> 757760 bytes
-rwxr-xr-x[-rw-r--r--]samples/testfiles/BlueSquare.jpgbin24205 -> 24205 bytes
-rwxr-xr-x[-rw-r--r--]samples/testfiles/BlueSquare.movbin47641 -> 47641 bytes
-rwxr-xr-x[-rw-r--r--]samples/testfiles/BlueSquare.mp3bin130244 -> 130244 bytes
-rwxr-xr-x[-rw-r--r--]samples/testfiles/BlueSquare.pdfbin10806 -> 10806 bytes
-rwxr-xr-x[-rw-r--r--]samples/testfiles/BlueSquare.pngbin5998 -> 5998 bytes
-rwxr-xr-x[-rw-r--r--]samples/testfiles/BlueSquare.psdbin36014 -> 36014 bytes
-rwxr-xr-x[-rw-r--r--]samples/testfiles/BlueSquare.tifbin259384 -> 259384 bytes
-rwxr-xr-x[-rw-r--r--]samples/testfiles/BlueSquare.wavbin683118 -> 683118 bytes
-rwxr-xr-x[-rw-r--r--]samples/testfiles/Image1.jpgbin2114908 -> 2114908 bytes
-rwxr-xr-x[-rw-r--r--]samples/testfiles/Image2.jpgbin2954252 -> 2954252 bytes
-rw-r--r--source/EndianUtils.hpp8
-rw-r--r--source/ExpatAdapter.hpp3
-rw-r--r--source/Host_IO-POSIX.cpp25
-rw-r--r--source/Host_IO-Win.cpp256
-rw-r--r--source/Host_IO.hpp2
-rw-r--r--source/SafeStringAPIs.cpp633
-rw-r--r--source/SafeStringAPIs.h650
-rw-r--r--source/SafeTypes.h187
-rw-r--r--source/SuppressSAL.h614
-rw-r--r--source/UnicodeConversions.cpp7
-rw-r--r--source/XIO.cpp4
-rw-r--r--source/XIO.hpp2
-rw-r--r--source/XMLParserAdapter.hpp1
-rw-r--r--source/XML_Node.cpp12
-rw-r--r--source/XMP_LibUtils.cpp36
-rw-r--r--source/XMP_LibUtils.hpp2
-rw-r--r--tools/cmake/ReadMe.txt8
205 files changed, 9764 insertions, 3674 deletions
diff --git a/BSD-License.txt b/BSD-License.txt
index 0e6675f..07b967c 100644
--- a/BSD-License.txt
+++ b/BSD-License.txt
@@ -1,6 +1,6 @@
The BSD License
-Copyright (c) 1999 - 2013, Adobe Systems Incorporated
+Copyright (c) 1999 - 2014, Adobe Systems Incorporated
All rights reserved.
Redistribution and use in source and binary forms, with or
diff --git a/XMP-Toolkit-SDK-Overview.pdf b/XMP-Toolkit-SDK-Overview.pdf
index 9ea53c9..f82c662 100644
--- a/XMP-Toolkit-SDK-Overview.pdf
+++ b/XMP-Toolkit-SDK-Overview.pdf
Binary files differ
diff --git a/XMPCore/build/CMakeLists.txt b/XMPCore/build/CMakeLists.txt
index 45dce9c..9196c4b 100644
--- a/XMPCore/build/CMakeLists.txt
+++ b/XMPCore/build/CMakeLists.txt
@@ -39,6 +39,9 @@ set(XMP_THIS_PROJECT_RELATIVEPATH "../..")
include(${CMAKE_CURRENT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/build/XMP_Config.cmake)
+set(TP_ZUID_PATH "${XMPROOT_DIR}/third-party/zuid/interfaces")
+set(TP_EXPAT_PATH "${PROJECT_ROOT}/../../third-party/expat/lib/")
+
# ==============================================================================
# Project specific config starts here
# ==============================================================================
@@ -69,184 +72,7 @@ else(UNIX)
endif(WIN32)
endif(UNIX)
-# ==============================================================================
-# For convenience we define the sources as a variable. You can add
-# header files and cpp/c files and CMake will sort them out
-# ==============================================================================
-
-list (APPEND INTERNAL_HEADER_FILES
- ${XMPROOT_DIR}/source/ExpatAdapter.hpp
- ${XMPROOT_DIR}/source/UnicodeConversions.hpp
- ${XMPROOT_DIR}/source/UnicodeInlines.incl_cpp
- ${XMPROOT_DIR}/source/XMLParserAdapter.hpp
- ${XMPROOT_DIR}/build/XMP_BuildInfo.h
- ${SOURCE_ROOT}/XMPCore_Impl.hpp
- ${SOURCE_ROOT}/XMPIterator.hpp
- ${SOURCE_ROOT}/XMPMeta.hpp
- ${SOURCE_ROOT}/XMPUtils.hpp
- )
-source_group("Header Files\\Internal Headers" FILES ${INTERNAL_HEADER_FILES})
-
-file (GLOB PUBLIC_CLIENTGLUE_HEADER_FILES ${XMPROOT_DIR}/public/include/client-glue/*.*)
-list (REMOVE_ITEM PUBLIC_CLIENTGLUE_HEADER_FILES
- ${XMPROOT_DIR}/public/include/client-glue/TXMPFiles.incl_cpp
- ${XMPROOT_DIR}/public/include/client-glue/WXMPFiles.hpp
- )
-source_group("Header Files\\Public Headers\\Client Glue" FILES ${PUBLIC_CLIENTGLUE_HEADER_FILES})
-
-file (GLOB PUBLIC_HEADER_FILES ${XMPROOT_DIR}/public/include/*.*)
-list (REMOVE_ITEM PUBLIC_HEADER_FILES
- ${XMPROOT_DIR}/public/include/TXMPFiles.hpp
- ${XMPROOT_DIR}/public/include/XMP_IO.hpp
- )
-source_group("Header Files\\Public Headers" FILES ${PUBLIC_HEADER_FILES})
-
-file (GLOB ABIWRAPPER_SOURCE_FILES ${SOURCE_ROOT}/WXMP*.cpp)
-source_group("Source Files\\ABI Wrappers" FILES ${ABIWRAPPER_SOURCE_FILES})
-
-#XMP Core classes
-file (GLOB CORECLASS_SOURCE_FILES ${SOURCE_ROOT}/XMP*.cpp)
-list (REMOVE_ITEM CORECLASS_SOURCE_FILES ${SOURCE_ROOT}/XMPCore_Impl.cpp)
-source_group("Source Files\\Core Classes" FILES ${CORECLASS_SOURCE_FILES})
-
-file (GLOB THIRDPARTY_SOURCE_FILES ${XMPROOT_DIR}/third-party/zuid/interfaces/*.cpp)
-list (APPEND THIRDPARTY_SOURCE_FILES
- ${PROJECT_ROOT}/../../third-party/expat/lib/xmlparse.c
- ${PROJECT_ROOT}/../../third-party/expat/lib/xmlrole.c
- ${PROJECT_ROOT}/../../third-party/expat/lib/xmltok.c
- )
-list (APPEND THIRDPARTY_SOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/expat_config.h)
-source_group("Source Files\\Third Party" FILES ${THIRDPARTY_SOURCE_FILES})
-
-list (APPEND UTILITY_SOURCE_FILES
- ${SOURCE_ROOT}/ExpatAdapter.cpp
- ${SOURCE_ROOT}/ParseRDF.cpp
- ${SOURCE_ROOT}/XMPCore_Impl.cpp
- ${XMPROOT_DIR}/source/UnicodeConversions.cpp
- ${XMPROOT_DIR}/source/XML_Node.cpp
- ${XMPROOT_DIR}/source/XMP_LibUtils.cpp
- )
-source_group("Source Files\\Utilities" FILES ${UTILITY_SOURCE_FILES})
-
-#resource files
-file (GLOB RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/*.*)
-if(WIN32 AND ${XMP_BUILD_STATIC})
- list(REMOVE_ITEM RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.rc)
-endif()
-source_group("Resource Files" FILES ${RESOURCE_FILES})
-
-list(APPEND SOURCE_FILES
- ${PUBLIC_CLIENTGLUE_HEADER_FILES}
- ${PUBLIC_HEADER_FILES}
- ${INTERNAL_HEADER_FILES}
- ${ABIWRAPPER_SOURCE_FILES}
- ${ABIWRAPPER_SOURCE_FILES}
- ${CORECLASS_SOURCE_FILES}
- ${THIRDPARTY_SOURCE_FILES}
- ${UTILITY_SOURCE_FILES}
- ${RESOURCE_FILES}
- )
-# include directories
-include_directories(${XMPROOT_DIR})
-include_directories(${XMPROOT_DIR}/public/include)
-include_directories(${XMPROOT_DIR}/third-party/expat/public/lib)
-include_directories(${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT})
-
-
-
-# ==============================================================================
-# Define what to do, lib, exe, etc
-if (UNIX AND APPLE AND NOT ${XMP_BUILD_STATIC})
- # preprocess Info.plist
- #if (${CMAKE_BUILD_TYPE} strequal "Debug")
- if((${CMAKE_BUILD_TYPE} MATCHES "Debug") OR (${CMAKE_BUILD_TYPE} MATCHES "debug"))
- set (INFO_PLIST_FLAGS "-DDEBUG=1")
- else()
- set (INFO_PLIST_FLAGS "-DNDEBUG=1")
- endif()
-
- add_custom_target(${TARGET_NAME}InfoPlist
- COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
- COMMAND if [ $(CONFIGURATION) != Debug ]; then
- ${GCCTOOL} -E -P -x c ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.plist
- -F${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
- -DPRODUCT_NAME=${TARGET_NAME} -DMAC_ENV=1 -DNDEBUG=1
- -include ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}PList.h
- -o ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist
- \; else
- ${GCCTOOL} -E -P -x c ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.plist
- -F${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
- -DPRODUCT_NAME=${TARGET_NAME} -DMAC_ENV=1 -DDEBUG=1
- -include ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}PList.h
- -o ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist
- \; fi
- COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../CMakeFiles/${TARGET_NAME}.dir/Info.plist
- COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../CMakeFiles/${TARGET_NAME}.dir/Info.plist
- COMMENT "Preprocessing Info-plist"
- )
- set(DEPENDENCY_LIST "ALL:${TARGET_NAME}InfoPlist")
-else ()
- set(DEPENDENCY_LIST "")
-endif()
-
-AddLibraryAndDependencies(${TARGET_NAME} ${XMP_BUILD_STATIC} YES "SHARED" SOURCE_FILES DEPENDENCY_LIST)
-
-#set the output name
-set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${XMPCORE_LIB})
-
-# ==============================================================================
-# Link dependencies
-set(FRAMEWORK_LIST "Mac:CoreFoundation" "Mac:CoreServices")
-AddMacFramework(${TARGET_NAME} FRAMEWORK_LIST)
-
-if(WIN32)
- SetWinLinkFlags(${TARGET_NAME} "rpcrt4.lib" "${XMPCORE_LIB}")
-else(WIN32)
- if(UNIX AND NOT APPLE)
- SetWinLinkFlags(${TARGET_NAME} "-Xlinker --version-script -Xlinker \"${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.exp\"" "")
- else()
- set_target_properties(${TARGET_NAME} PROPERTIES BUILD_WITH_INSTALL_RPATH ON INSTALL_NAME_DIR "@executable_path/../Frameworks")
- SetWinLinkFlags(${TARGET_NAME} "-exported_symbols_list \"${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/XMPCore.exp\"" "${XMPCORE_LIB}")
- endif()
-endif()
-
-# ==============================================================================
-# Define output
-SetOutputPath(${OUTPUT_DIR} 0)
-
-# ==============================================================================
-# Post build
-# ==============================================================================
-if(UNIX)
- if (NOT APPLE)
- if (${XMP_BUILD_STATIC})
- add_custom_command (TARGET ${TARGET_NAME}
- POST_BUILD
- COMMAND mv ${OUTPUT_DIR}/lib${XMPCORE_LIB}.a ${OUTPUT_DIR}/${XMPCORE_LIB}.ar
- )
- else()
- if((${CMAKE_BUILD_TYPE} MATCHES "Debug") OR (${CMAKE_BUILD_TYPE} MATCHES "debug") )
- add_custom_command (TARGET ${TARGET_NAME}
- POST_BUILD
- COMMAND ls -l ${OUTPUT_DIR}/lib${XMPCORE_LIB}.so
- )
- else()
- add_custom_command (TARGET ${TARGET_NAME}
- POST_BUILD
- COMMAND strip ${OUTPUT_DIR}/lib${XMPCORE_LIB}.so
- COMMAND ls -l ${OUTPUT_DIR}/lib${XMPCORE_LIB}.so
- )
- endif()
- endif()
- endif()
-
-else()
- set_target_properties(${TARGET_NAME} PROPERTIES PROJECT_LABEL ${PROJECT_LABEL_STR})
-endif()
+include(${CMAKE_CURRENT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/XMPCore/build/CMakeListsCommon.txt)
-message (STATUS "===========================================================================")
-message (STATUS " ${PROJECT_NAME} ")
-message (STATUS "===========================================================================")
-message (STATUS " OUTPUT_DIR = ${OUTPUT_DIR}")
diff --git a/XMPCore/build/CMakeListsCommon.txt b/XMPCore/build/CMakeListsCommon.txt
new file mode 100644
index 0000000..b757273
--- /dev/null
+++ b/XMPCore/build/CMakeListsCommon.txt
@@ -0,0 +1,240 @@
+# ==============================================================================
+cmake_minimum_required(VERSION 2.8.6)
+
+# Enable folder grouping of projects in IDEs
+set_property(GLOBAL PROPERTY USE_FOLDERS ON)
+
+
+
+# ==============================================================================
+# For convenience we define the sources as a variable. You can add
+# header files and cpp/c files and CMake will sort them out
+# ==============================================================================
+
+list (APPEND INTERNAL_HEADER_FILES
+ ${XMPROOT_DIR}/source/ExpatAdapter.hpp
+ ${XMPROOT_DIR}/source/UnicodeConversions.hpp
+ ${XMPROOT_DIR}/source/UnicodeInlines.incl_cpp
+ ${XMPROOT_DIR}/source/XMLParserAdapter.hpp
+ ${XMPROOT_DIR}/build/XMP_BuildInfo.h
+ ${SOURCE_ROOT}/XMPCore_Impl.hpp
+ ${SOURCE_ROOT}/XMPIterator.hpp
+ ${SOURCE_ROOT}/XMPMeta.hpp
+ ${SOURCE_ROOT}/XMPUtils.hpp
+ )
+source_group("Header Files\\Private\\XMPCore" FILES ${INTERNAL_HEADER_FILES})
+
+file (GLOB PRIVATE_XMPCOMMON_HEADERS ${XMPROOT_DIR}/XMPCommon/ImplHeaders/*.h)
+source_group("Header Files\\Private\\XMPCommon" FILES ${PRIVATE_XMPCOMMON_HEADERS})
+
+file (GLOB PRIVATE_XMPCORE_HEADERS ${XMPROOT_DIR}/XMPCore/headers/*.h ${XMPROOT_DIR}/XMPCore/Interfaces/*.h)
+source_group("Header Files\\Private\\XMPCore" FILES ${PRIVATE_XMPCORE_HEADERS})
+
+file (GLOB_RECURSE PUBLIC_CLIENTGLUE_HEADER_FILES ${XMPROOT_DIR}/public/include/client-glue/*.*)
+list (REMOVE_ITEM PUBLIC_CLIENTGLUE_HEADER_FILES
+ ${XMPROOT_DIR}/public/include/client-glue/TXMPFiles.incl_cpp
+ ${XMPROOT_DIR}/public/include/client-glue/WXMPFiles.hpp
+ )
+source_group("Header Files\\Public\\Client Glue" FILES ${PUBLIC_CLIENTGLUE_HEADER_FILES})
+
+file (GLOB PUBLIC_HEADER_FILES ${XMPROOT_DIR}/public/include/*.*)
+list (REMOVE_ITEM PUBLIC_HEADER_FILES
+ ${XMPROOT_DIR}/public/include/TXMPFiles.hpp
+ ${XMPROOT_DIR}/public/include/XMP_IO.hpp
+ )
+source_group("Header Files\\Public" FILES ${PUBLIC_HEADER_FILES})
+
+file (GLOB_RECURSE PUBLIC_XMPCOMMON_HEADERS ${XMPROOT_DIR}/public/include/XMPCommon/*.h ${XMPROOT_DIR}/XMPCommon/*.h)
+source_group("Header Files\\Public\\XMPCommon" FILES ${PUBLIC_XMPCOMMON_HEADERS})
+
+file (GLOB_RECURSE PUBLIC_XMPCORE_HEADERS ${XMPROOT_DIR}/public/include/XMPCore/*.h)
+source_group("Header Files\\Public\\XMPCore" FILES ${PUBLIC_XMPCORE_HEADERS})
+
+file (GLOB ABIWRAPPER_SOURCE_FILES ${SOURCE_ROOT}/WXMP*.cpp)
+source_group("Source Files\\ABI Wrappers" FILES ${ABIWRAPPER_SOURCE_FILES})
+
+#XMP Core classes
+file (GLOB CORECLASS_SOURCE_FILES ${SOURCE_ROOT}/XMP*.cpp)
+list (REMOVE_ITEM CORECLASS_SOURCE_FILES ${SOURCE_ROOT}/XMPCore_Impl.cpp)
+source_group("Source Files\\Core Classes" FILES ${CORECLASS_SOURCE_FILES})
+
+file (GLOB THIRDPARTY_SOURCE_FILES ${TP_ZUID_PATH}/*.cpp)
+list (APPEND THIRDPARTY_SOURCE_FILES
+ ${TP_EXPAT_PATH}/xmlparse.c
+ ${TP_EXPAT_PATH}/xmlrole.c
+ ${TP_EXPAT_PATH}/xmltok.c
+ )
+list (APPEND THIRDPARTY_SOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/expat_config.h)
+source_group("Source Files\\Third Party" FILES ${THIRDPARTY_SOURCE_FILES})
+
+file (GLOB XMPCOMMON_SOURCES ${XMPROOT_DIR}/XMPCommon/source/*.cpp)
+source_group("Source Files\\Private\\XMPCommon" FILES ${XMPCOMMON_SOURCES})
+
+list (APPEND UTILITY_SOURCE_FILES
+ ${SOURCE_ROOT}/ExpatAdapter.cpp
+ ${SOURCE_ROOT}/ParseRDF.cpp
+ ${SOURCE_ROOT}/XMPCore_Impl.cpp
+ ${XMPROOT_DIR}/source/UnicodeConversions.cpp
+ ${XMPROOT_DIR}/source/XML_Node.cpp
+ ${XMPROOT_DIR}/source/XMP_LibUtils.cpp
+ )
+source_group("Source Files\\Utilities" FILES ${UTILITY_SOURCE_FILES})
+
+#resource files
+file (GLOB RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/*.*)
+if(WIN32 AND ${XMP_BUILD_STATIC})
+ list(REMOVE_ITEM RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.rc)
+endif()
+source_group("Resource Files" FILES ${RESOURCE_FILES})
+
+if (WIN32 OR (UNIX AND APPLE))
+ list(APPEND SOURCE_FILES
+ ${PUBLIC_CLIENTGLUE_HEADER_FILES}
+ ${PUBLIC_HEADER_FILES}
+ ${INTERNAL_HEADER_FILES}
+ ${ABIWRAPPER_SOURCE_FILES}
+ ${ABIWRAPPER_SOURCE_FILES}
+ ${CORECLASS_SOURCE_FILES}
+ ${THIRDPARTY_SOURCE_FILES}
+ ${UTILITY_SOURCE_FILES}
+ ${PRIVATE_XMPCOMMON_HEADERS}
+ ${PRIVATE_XMPCORE_HEADERS}
+ ${PUBLIC_XMPCOMMON_HEADERS}
+ ${PUBLIC_XMPCORE_HEADERS}
+ ${XMPCOMMON_SOURCES}
+ ${RESOURCE_FILES}
+ )
+else()
+ list (REMOVE_ITEM CORECLASS_SOURCE_FILES
+ ${SOURCE_ROOT}/XMPArrayNode_v1_Impl.cpp
+ ${SOURCE_ROOT}/XMPArrayNodeIterator_v1_Impl.cpp
+ ${SOURCE_ROOT}/XMPCoreObjectFactory_Impl.cpp
+ ${SOURCE_ROOT}/XMPMetadata_v1_Impl.cpp
+ ${SOURCE_ROOT}/XMPNode_v1_Impl.cpp
+ ${SOURCE_ROOT}/XMPPathSegment_v1_Impl.cpp
+ ${SOURCE_ROOT}/XMPPath_v1_Impl.cpp
+ ${SOURCE_ROOT}/XMPQName_v1_Impl.cpp
+ ${SOURCE_ROOT}/XMPQualifiers_v1_Impl.cpp
+ ${SOURCE_ROOT}/XMPSimpleNode_v1_Impl.cpp
+ ${SOURCE_ROOT}/XMPStructNode_v1_Impl.cpp
+ ${SOURCE_ROOT}/XMPStructNodeIterator_v1_Impl.cpp
+ )
+
+ list(APPEND SOURCE_FILES
+ ${PUBLIC_CLIENTGLUE_HEADER_FILES}
+ ${PUBLIC_HEADER_FILES}
+ ${INTERNAL_HEADER_FILES}
+ ${ABIWRAPPER_SOURCE_FILES}
+ ${ABIWRAPPER_SOURCE_FILES}
+ ${CORECLASS_SOURCE_FILES}
+ ${THIRDPARTY_SOURCE_FILES}
+ ${UTILITY_SOURCE_FILES}
+ ${RESOURCE_FILES}
+ )
+
+endif()
+# include directories
+include_directories(${XMPROOT_DIR})
+include_directories(${XMPROOT_DIR}/public/include)
+include_directories(${XMPROOT_DIR}/third-party/expat/public/lib)
+include_directories(${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT})
+
+
+
+# ==============================================================================
+# Define what to do, lib, exe, etc
+if (UNIX AND APPLE AND NOT ${XMP_BUILD_STATIC})
+ # preprocess Info.plist
+ #if (${CMAKE_BUILD_TYPE} strequal "Debug")
+ if((${CMAKE_BUILD_TYPE} MATCHES "Debug") OR (${CMAKE_BUILD_TYPE} MATCHES "debug"))
+ set (INFO_PLIST_FLAGS "-DDEBUG=1")
+ else()
+ set (INFO_PLIST_FLAGS "-DNDEBUG=1")
+ endif()
+
+ add_custom_target(${TARGET_NAME}InfoPlist
+ COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+ COMMAND if [ $(CONFIGURATION) != Debug ]; then
+ ${GCCTOOL} -E -P -x c ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.plist
+ -F${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
+ -DPRODUCT_NAME=${TARGET_NAME} -DMAC_ENV=1 -DNDEBUG=1
+ -include ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}PList.h
+ -o ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist
+ \; else
+ ${GCCTOOL} -E -P -x c ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.plist
+ -F${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
+ -DPRODUCT_NAME=${TARGET_NAME} -DMAC_ENV=1 -DDEBUG=1
+ -include ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}PList.h
+ -o ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist
+ \; fi
+ COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../CMakeFiles/${TARGET_NAME}.dir/Info.plist
+ COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../CMakeFiles/${TARGET_NAME}.dir/Info.plist
+ COMMENT "Preprocessing Info-plist"
+ )
+ set(DEPENDENCY_LIST "ALL:${TARGET_NAME}InfoPlist")
+else ()
+ set(DEPENDENCY_LIST "")
+endif()
+
+AddLibraryAndDependencies(${TARGET_NAME} ${XMP_BUILD_STATIC} YES "SHARED" SOURCE_FILES DEPENDENCY_LIST)
+
+#set the output name
+set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${XMPCORE_LIB})
+
+# ==============================================================================
+# Link dependencies
+set(FRAMEWORK_LIST "Mac:CoreFoundation" "Mac:CoreServices")
+AddMacFramework(${TARGET_NAME} FRAMEWORK_LIST)
+
+
+if(WIN32)
+ SetWinLinkFlags(${TARGET_NAME} "rpcrt4.lib" "${XMPCORE_LIB}")
+else(WIN32)
+ if(UNIX AND NOT APPLE)
+ SetWinLinkFlags(${TARGET_NAME} "-Xlinker --version-script -Xlinker \"${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.exp\"" "")
+ else()
+ set_target_properties(${TARGET_NAME} PROPERTIES BUILD_WITH_INSTALL_RPATH ON INSTALL_NAME_DIR "@executable_path/../Frameworks")
+ SetWinLinkFlags(${TARGET_NAME} "-unexported_symbols_list \"${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/XMPCore.unexp\"" "${XMPCORE_LIB}")
+ set_target_properties(${TARGET_NAME} PROPERTIES XCODE_ATTRIBUTE_GCC_SYMBOLS_PRIVATE_EXTERN "YES")
+ endif()
+endif()
+
+# ==============================================================================
+# Define output
+SetOutputPath(${OUTPUT_DIR} 0)
+
+# ==============================================================================
+# Post build
+# ==============================================================================
+if(UNIX)
+ if (NOT APPLE)
+ if (${XMP_BUILD_STATIC})
+ add_custom_command (TARGET ${TARGET_NAME}
+ POST_BUILD
+ COMMAND mv ${OUTPUT_DIR}/lib${XMPCORE_LIB}.a ${OUTPUT_DIR}/${XMPCORE_LIB}.ar
+ )
+ else()
+ if((${CMAKE_BUILD_TYPE} MATCHES "Debug") OR (${CMAKE_BUILD_TYPE} MATCHES "debug") )
+ add_custom_command (TARGET ${TARGET_NAME}
+ POST_BUILD
+ COMMAND ls -l ${OUTPUT_DIR}/lib${XMPCORE_LIB}.so
+ )
+ else()
+ add_custom_command (TARGET ${TARGET_NAME}
+ POST_BUILD
+ COMMAND strip ${OUTPUT_DIR}/lib${XMPCORE_LIB}.so
+ COMMAND ls -l ${OUTPUT_DIR}/lib${XMPCORE_LIB}.so
+ )
+ endif()
+ endif()
+ endif()
+else()
+ set_target_properties(${TARGET_NAME} PROPERTIES PROJECT_LABEL ${PROJECT_LABEL_STR})
+endif()
+
+message (STATUS "===========================================================================")
+message (STATUS " ${PROJECT_NAME} ")
+message (STATUS "===========================================================================")
+message (STATUS " OUTPUT_DIR = ${OUTPUT_DIR}")
+
+
diff --git a/XMPCore/resource/mac/XMPCore.unexp b/XMPCore/resource/mac/XMPCore.unexp
new file mode 100644
index 0000000..322e7e4
--- /dev/null
+++ b/XMPCore/resource/mac/XMPCore.unexp
@@ -0,0 +1,16 @@
+__Znwm
+__Znwm.eh
+__ZnwmRKSt9nothrow_t
+__ZnwmRKSt9nothrow_t.eh
+__ZdlPv
+__ZdlPv.eh
+__ZdlPvRKSt9nothrow_t
+__ZdlPvRKSt9nothrow_t.eh
+__Znam
+__Znam.eh
+__ZnamRKSt9nothrow_t
+__ZnamRKSt9nothrow_t.eh
+__ZdaPv
+__ZdaPv.eh
+__ZdaPvRKSt9nothrow_t
+__ZdaPvRKSt9nothrow_t.eh
diff --git a/XMPCore/source/ExpatAdapter.cpp b/XMPCore/source/ExpatAdapter.cpp
index 6f20157..0d7813b 100644
--- a/XMPCore/source/ExpatAdapter.cpp
+++ b/XMPCore/source/ExpatAdapter.cpp
@@ -84,32 +84,31 @@ ExpatAdapter::ExpatAdapter ( bool useGlobalNamespaces ) : parser(0), registeredN
if ( this->parser == 0 ) {
XMP_Error error(kXMPErr_NoMemory, "Failure creating Expat parser" );
this->NotifyClient ( kXMPErrSev_ProcessFatal, error );
- }
-
- if ( useGlobalNamespaces ) {
- this->registeredNamespaces = sRegisteredNamespaces;
- } else {
- this->registeredNamespaces = new XMP_NamespaceTable ( *sRegisteredNamespaces );
- }
+ }else{
+ if ( useGlobalNamespaces ) {
+ this->registeredNamespaces = sRegisteredNamespaces;
+ } else {
+ this->registeredNamespaces = new XMP_NamespaceTable ( *sRegisteredNamespaces );
+ }
- XML_SetUserData ( this->parser, this );
+ XML_SetUserData ( this->parser, this );
- XML_SetNamespaceDeclHandler ( this->parser, StartNamespaceDeclHandler, EndNamespaceDeclHandler );
- XML_SetElementHandler ( this->parser, StartElementHandler, EndElementHandler );
+ XML_SetNamespaceDeclHandler ( this->parser, StartNamespaceDeclHandler, EndNamespaceDeclHandler );
+ XML_SetElementHandler ( this->parser, StartElementHandler, EndElementHandler );
- XML_SetCharacterDataHandler ( this->parser, CharacterDataHandler );
- XML_SetCdataSectionHandler ( this->parser, StartCdataSectionHandler, EndCdataSectionHandler );
+ XML_SetCharacterDataHandler ( this->parser, CharacterDataHandler );
+ XML_SetCdataSectionHandler ( this->parser, StartCdataSectionHandler, EndCdataSectionHandler );
- XML_SetProcessingInstructionHandler ( this->parser, ProcessingInstructionHandler );
- XML_SetCommentHandler ( this->parser, CommentHandler );
+ XML_SetProcessingInstructionHandler ( this->parser, ProcessingInstructionHandler );
+ XML_SetCommentHandler ( this->parser, CommentHandler );
- #if BanAllEntityUsage
- XML_SetStartDoctypeDeclHandler ( this->parser, StartDoctypeDeclHandler );
- isAborted = false;
- #endif
-
- this->parseStack.push_back ( &this->tree ); // Push the XML root node.
+ #if BanAllEntityUsage
+ XML_SetStartDoctypeDeclHandler ( this->parser, StartDoctypeDeclHandler );
+ isAborted = false;
+ #endif
+ this->parseStack.push_back ( &this->tree ); // Push the XML root node.
+ }
} // ExpatAdapter::ExpatAdapter
// =================================================================================================
diff --git a/XMPCore/source/ParseRDF.cpp b/XMPCore/source/ParseRDF.cpp
index 7eeecb3..b163867 100644
--- a/XMPCore/source/ParseRDF.cpp
+++ b/XMPCore/source/ParseRDF.cpp
@@ -198,7 +198,11 @@ public:
private:
- RDF_Parser() {}; // Hidden on purpose.
+ RDF_Parser() {
+
+ errorCallback = NULL;
+
+ }; // Hidden on purpose.
XMPMeta::ErrorCallbackInfo * errorCallback;
@@ -455,7 +459,7 @@ XMP_Node * RDF_Parser::AddChildNode ( XMP_Node * xmpParent, const XML_Node & xml
return 0;
}
- bool isArrayParent = (xmpParent->options & kXMP_PropValueIsArray);
+ bool isArrayParent = (xmpParent->options & kXMP_PropValueIsArray) !=0;
bool isArrayItem = (xmlNode.name == "rdf:li");
bool isValueNode = (xmlNode.name == "rdf:value");
XMP_OptionBits childOptions = 0;
diff --git a/XMPCore/source/XMPMeta-GetSet.cpp b/XMPCore/source/XMPMeta-GetSet.cpp
index ed982de..112298a 100644
--- a/XMPCore/source/XMPMeta-GetSet.cpp
+++ b/XMPCore/source/XMPMeta-GetSet.cpp
@@ -916,13 +916,13 @@ XMPMeta::SetLocalizedText ( XMP_StringPtr schemaNS,
if ( ! specificXDefault ) {
// Update the specific item, update x-default if it matches the old value.
- if ( haveXDefault && (xdItem != itemNode) && (xdItem->value == itemNode->value) ) {
+ if ( xdItem != NULL && haveXDefault && (xdItem != itemNode) && (xdItem->value == itemNode->value) ) {
SetNodeValue ( xdItem, itemValue );
}
SetNodeValue ( itemNode, itemValue ); // ! Do this after the x-default check!
} else {
// Update all items whose values match the old x-default value.
- XMP_Assert ( haveXDefault && (xdItem == itemNode) );
+ XMP_Assert ( xdItem != NULL && haveXDefault && (xdItem == itemNode) );
for ( itemNum = 0, itemLim = arrayNode->children.size(); itemNum < itemLim; ++itemNum ) {
XMP_Node * currItem = arrayNode->children[itemNum];
if ( (currItem == xdItem) || (currItem->value != xdItem->value) ) continue;
@@ -935,7 +935,7 @@ XMPMeta::SetLocalizedText ( XMP_StringPtr schemaNS,
case kXMP_CLT_SingleGeneric :
// Update the generic item, update x-default if it matches the old value.
- if ( haveXDefault && (xdItem != itemNode) && (xdItem->value == itemNode->value) ) {
+ if ( xdItem != NULL && haveXDefault && (xdItem != itemNode) && (xdItem->value == itemNode->value) ) {
SetNodeValue ( xdItem, itemValue );
}
SetNodeValue ( itemNode, itemValue ); // ! Do this after the x-default check!
@@ -1112,19 +1112,18 @@ XMPMeta::GetProperty_Int ( XMP_StringPtr schemaNS,
XMP_Int32 * propValue,
XMP_OptionBits * options ) const
{
- XMP_Assert ( (schemaNS != 0) && (propName != 0) ); // Enforced by wrapper.
- XMP_Assert ( (propValue != 0) && (options != 0) ); // Enforced by wrapper.
-
- XMP_StringPtr valueStr;
- XMP_StringLen valueLen;
-
- bool found = GetProperty ( schemaNS, propName, &valueStr, &valueLen, options );
- if ( found ) {
- if ( ! XMP_PropIsSimple ( *options ) ) XMP_Throw ( "Property must be simple", kXMPErr_BadXPath );
- *propValue = XMPUtils::ConvertToInt ( valueStr );
+ XMP_Int64 tempValue64 = 0;
+ if ( GetProperty_Int64( schemaNS, propName, &tempValue64, options ) ) {
+ if ( tempValue64 < (XMP_Int64) Min_XMP_Int32 || tempValue64 > (XMP_Int64) Max_XMP_Int32 ) {
+ // overflow condition
+ XMP_Throw ( "Overflow condition", kXMPErr_BadValue );
+ } else {
+ *propValue = (XMP_Int32) tempValue64;
+ return true;
+ }
}
- return found;
-
+ return false;
+
} // GetProperty_Int
@@ -1147,7 +1146,10 @@ XMPMeta::GetProperty_Int64 ( XMP_StringPtr schemaNS,
bool found = GetProperty ( schemaNS, propName, &valueStr, &valueLen, options );
if ( found ) {
if ( ! XMP_PropIsSimple ( *options ) ) XMP_Throw ( "Property must be simple", kXMPErr_BadXPath );
- *propValue = XMPUtils::ConvertToInt64 ( valueStr );
+ std::string propValueStr;
+ propValueStr.append( valueStr, valueLen );
+ XMPUtils::Trim( propValueStr );
+ *propValue = XMPUtils::ConvertToInt64 ( propValueStr.c_str() );
}
return found;
@@ -1173,7 +1175,10 @@ XMPMeta::GetProperty_Float ( XMP_StringPtr schemaNS,
bool found = GetProperty ( schemaNS, propName, &valueStr, &valueLen, options );
if ( found ) {
if ( ! XMP_PropIsSimple ( *options ) ) XMP_Throw ( "Property must be simple", kXMPErr_BadXPath );
- *propValue = XMPUtils::ConvertToFloat ( valueStr );
+ std::string propValueStr;
+ propValueStr.append( valueStr, valueLen );
+ XMPUtils::Trim( propValueStr );
+ *propValue = XMPUtils::ConvertToFloat ( propValueStr.c_str() );
}
return found;
diff --git a/XMPCore/source/XMPMeta-Serialize.cpp b/XMPCore/source/XMPMeta-Serialize.cpp
index b7373c9..9ac13fc 100644
--- a/XMPCore/source/XMPMeta-Serialize.cpp
+++ b/XMPCore/source/XMPMeta-Serialize.cpp
@@ -17,6 +17,7 @@
#include "public/include/XMP_Version.h"
#include "source/UnicodeInlines.incl_cpp"
#include "source/UnicodeConversions.hpp"
+#include "third-party/zuid/interfaces/MD5.h"
#if XMP_DebugBuild
#include <iostream>
@@ -1058,7 +1059,6 @@ SerializeCompactRDFSchemas ( const XMP_Node & xmpTree,
} // SerializeCompactRDFSchemas
-
// -------------------------------------------------------------------------------------------------
// SerializeAsRDF
// --------------
@@ -1100,7 +1100,7 @@ SerializeAsRDF ( const XMPMeta & xmpObj,
// *** Need to include estimate for alias comments.
size_t outputLen = 2 * (strlen(kPacketHeader) + strlen(kRDF_XMPMetaStart) + strlen(kRDF_RDFStart) + 3*baseIndent*indentLen);
-
+
for ( size_t schemaNum = 0, schemaLim = xmpObj.tree.children.size(); schemaNum < schemaLim; ++schemaNum ) {
const XMP_Node * currSchema = xmpObj.tree.children[schemaNum];
outputLen += 2*(baseIndent+2)*indentLen + strlen(kRDF_SchemaStart) + treeNameLen + strlen(kRDF_SchemaEnd) + 2;
@@ -1113,9 +1113,25 @@ SerializeAsRDF ( const XMPMeta & xmpObj,
XMP_Index level;
+ std::string rdfstring;
headStr.erase();
- headStr.reserve ( outputLen );
+ rdfstring.reserve ( outputLen );
+
+ // Write the rdf:RDF start tag.
+ rdfstring += kRDF_RDFStart;
+ rdfstring += newline;
+ // Write all of the properties.
+ if ( options & kXMP_UseCompactFormat ) {
+ SerializeCompactRDFSchemas ( xmpObj.tree, rdfstring, newline, indentStr, baseIndent );
+ } else {
+ bool useCanonicalRDF = XMP_OptionIsSet ( options, kXMP_UseCanonicalFormat );
+ SerializeCanonicalRDFSchemas ( xmpObj.tree, rdfstring, newline, indentStr, baseIndent, useCanonicalRDF );
+ }
+
+ // Write the rdf:RDF end tag.
+ for ( level = baseIndent+1; level > 0; --level ) rdfstring += indentStr;
+ rdfstring += kRDF_RDFEnd;
// Write the packet header PI.
if ( ! (options & kXMP_OmitPacketWrapper) ) {
for ( level = baseIndent; level > 0; --level ) headStr += indentStr;
@@ -1127,26 +1143,34 @@ SerializeAsRDF ( const XMPMeta & xmpObj,
if ( ! (options & kXMP_OmitXMPMetaElement) ) {
for ( level = baseIndent; level > 0; --level ) headStr += indentStr;
headStr += kRDF_XMPMetaStart;
- headStr += kXMPCore_VersionMessage "\">";
+ headStr += kXMPCore_VersionMessage "\"";
+ std::string digestStr;
+ unsigned char digestBin [16];
+ if (options & kXMP_IncludeRDFHash)
+ {
+ std::string hashrdf;
+ MD5_CTX context;
+ MD5Init ( &context );
+ MD5Update ( &context, (XMP_Uns8*)rdfstring.c_str(), (unsigned int)rdfstring.size() );
+ MD5Final ( digestBin, &context );
+ char buffer [40];
+ for ( int in = 0, out = 0; in < 16; in += 1, out += 2 ) {
+ XMP_Uns8 byte = digestBin[in];
+ buffer[out] = kHexDigits [ byte >> 4 ];
+ buffer[out+1] = kHexDigits [ byte & 0xF ];
+ }
+ buffer[32] = 0;
+ digestStr.append ( buffer );
+ headStr += " rdfhash=\"";
+ headStr += digestStr + "\"";
+ headStr += " merged=\"0\"";
+ }
+ headStr += ">";
headStr += newline;
}
- // Write the rdf:RDF start tag.
for ( level = baseIndent+1; level > 0; --level ) headStr += indentStr;
- headStr += kRDF_RDFStart;
- headStr += newline;
-
- // Write all of the properties.
- if ( options & kXMP_UseCompactFormat ) {
- SerializeCompactRDFSchemas ( xmpObj.tree, headStr, newline, indentStr, baseIndent );
- } else {
- bool useCanonicalRDF = XMP_OptionIsSet ( options, kXMP_UseCanonicalFormat );
- SerializeCanonicalRDFSchemas ( xmpObj.tree, headStr, newline, indentStr, baseIndent, useCanonicalRDF );
- }
-
- // Write the rdf:RDF end tag.
- for ( level = baseIndent+1; level > 0; --level ) headStr += indentStr;
- headStr += kRDF_RDFEnd;
+ headStr+= rdfstring ;
headStr += newline;
// Write the xmpmeta end tag.
@@ -1229,6 +1253,11 @@ XMPMeta::SerializeToBuffer ( XMP_VarString * rdfString,
XMP_Throw ( "Inconsistent options for non-packet serialize", kXMPErr_BadOptions );
}
padding = 0;
+ } else if ( options & kXMP_OmitXMPMetaElement ) {
+ if ( options & kXMP_IncludeRDFHash ) {
+ XMP_Throw ( "Inconsistent options for x:xmpmeta serialize", kXMPErr_BadOptions );
+ }
+ padding = 0;
} else {
if ( padding == 0 ) {
padding = kDefaultPad * unicodeUnitSize;
diff --git a/XMPCore/source/XMPMeta.cpp b/XMPCore/source/XMPMeta.cpp
index e1b51d6..fd8e8ac 100644
--- a/XMPCore/source/XMPMeta.cpp
+++ b/XMPCore/source/XMPMeta.cpp
@@ -725,7 +725,6 @@ XMPMeta::Initialize()
#endif
if ( ! Initialize_LibUtils() ) return false;
-
xdefaultName = new XMP_VarString ( "x-default" );
sRegisteredNamespaces = new XMP_NamespaceTable;
@@ -733,6 +732,7 @@ XMPMeta::Initialize()
InitializeUnicodeConversions();
+
// Register standard namespaces and aliases.
XMP_StringPtr voidPtr;
@@ -892,10 +892,15 @@ XMPMeta::Terminate() RELEASE_NO_THROW
XMPIterator::Terminate();
XMPUtils::Terminate();
+#if ENABLE_NEW_DOM_MODEL
+ NS_XMPCOMMON::ITSingleton< NS_INT_XMPCORE::IXMPCoreObjectFactory >::DestroyInstance();
+ NS_INT_XMPCOMMON::TerminateXMPCommonFramework();
+#endif
+
EliminateGlobal ( sRegisteredNamespaces );
EliminateGlobal ( sRegisteredAliasMap );
- EliminateGlobal ( xdefaultName );
+ EliminateGlobal ( xdefaultName );
Terminate_LibUtils();
@@ -908,6 +913,8 @@ XMPMeta::Terminate() RELEASE_NO_THROW
xmpCoreLog = stderr;
#endif
+ // reset static variables
+ sDefaultErrorCallback.Clear();
} // Terminate
diff --git a/XMPCore/source/XMPUtils-FileInfo.cpp b/XMPCore/source/XMPUtils-FileInfo.cpp
index 795a927..107fa58 100644
--- a/XMPCore/source/XMPUtils-FileInfo.cpp
+++ b/XMPCore/source/XMPUtils-FileInfo.cpp
@@ -764,7 +764,7 @@ AppendSubtree ( const XMP_Node * sourceNode, XMP_Node * destParent,
// To merge a struct process the fields recursively. E.g. add simple missing fields. The
// recursive call to AppendSubtree will handle deletion for fields with empty values.
- for ( size_t sourceNum = 0, sourceLim = sourceNode->children.size(); sourceNum != sourceLim; ++sourceNum ) {
+ for ( size_t sourceNum = 0, sourceLim = sourceNode->children.size(); sourceNum != sourceLim && destNode!= NULL; ++sourceNum ) {
const XMP_Node * sourceField = sourceNode->children[sourceNum];
AppendSubtree ( sourceField, destNode, mergeCompound, replaceOld, deleteEmpty );
if ( deleteEmpty && destNode->children.empty() ) {
@@ -781,7 +781,7 @@ AppendSubtree ( const XMP_Node * sourceNode, XMP_Node * destParent,
XMP_Assert ( mergeCompound );
- for ( size_t sourceNum = 0, sourceLim = sourceNode->children.size(); sourceNum != sourceLim; ++sourceNum ) {
+ for ( size_t sourceNum = 0, sourceLim = sourceNode->children.size(); sourceNum != sourceLim && destNode!= NULL; ++sourceNum ) {
const XMP_Node * sourceItem = sourceNode->children[sourceNum];
if ( sourceItem->qualifiers.empty() || (sourceItem->qualifiers[0]->name != "xml:lang") ) continue;
@@ -1437,6 +1437,7 @@ XMPUtils::DuplicateSubtree ( const XMPMeta & source,
const XMP_Node * currField = sourceNode->children[fieldNum];
size_t colonPos = currField->name.find ( ':' );
+ if ( colonPos == std::string::npos ) continue;
nsPrefix.assign ( currField->name.c_str(), colonPos );
bool nsOK = XMPMeta::GetNamespaceURI ( nsPrefix.c_str(), &nsURI, &nsLen );
if ( ! nsOK ) XMP_Throw ( "Source field namespace is not global", kXMPErr_BadSchema );
diff --git a/XMPCore/source/XMPUtils.cpp b/XMPCore/source/XMPUtils.cpp
index 8d7e043..b39a908 100644
--- a/XMPCore/source/XMPUtils.cpp
+++ b/XMPCore/source/XMPUtils.cpp
@@ -557,7 +557,10 @@ static size_t MoveLargestProperty ( XMPMeta & stdXMP, XMPMeta * extXMP, PropSize
XMPUtils::Initialize()
{
- // Nothing at present.
+ if ( WhiteSpaceStrPtr == NULL ) {
+ WhiteSpaceStrPtr = new std::string();
+ WhiteSpaceStrPtr->append( " \t\n\r" );
+ }
return true;
} // Initialize
@@ -570,7 +573,8 @@ XMPUtils::Initialize()
XMPUtils::Terminate() RELEASE_NO_THROW
{
- // Nothing at present.
+ delete WhiteSpaceStrPtr;
+ WhiteSpaceStrPtr = NULL;
return;
} // Terminate
@@ -1973,3 +1977,21 @@ XMPUtils::CompareDateTime ( const XMP_DateTime & _in_left,
} // CompareDateTime
// =================================================================================================
+
+std::string& XMPUtils::Trim( std::string& string )
+{
+ size_t pos = string.find_last_not_of( *WhiteSpaceStrPtr );
+
+ if ( pos != std::string::npos ) {
+ string.erase( pos + 1 );
+ pos = string.find_first_not_of( *WhiteSpaceStrPtr );
+ if(pos != std::string::npos) string.erase(0, pos);
+ } else {
+ string.erase( string.begin(), string.end() );
+ }
+ return string;
+}
+
+std::string * XMPUtils::WhiteSpaceStrPtr = NULL;
+
+// =================================================================================================
diff --git a/XMPCore/source/XMPUtils.hpp b/XMPCore/source/XMPUtils.hpp
index 1863242..f9cfce1 100644
--- a/XMPCore/source/XMPUtils.hpp
+++ b/XMPCore/source/XMPUtils.hpp
@@ -185,6 +185,12 @@ public:
XMP_StringPtr destRoot,
XMP_OptionBits options );
+ // ---------------------------------------------------------------------------------------------
+
+ static std::string& Trim(std::string& string);
+
+ static std::string * WhiteSpaceStrPtr;
+
}; // XMPUtils
// =================================================================================================
diff --git a/XMPFiles/build/CMakeLists.txt b/XMPFiles/build/CMakeLists.txt
index 28dc36a..76bdae0 100644
--- a/XMPFiles/build/CMakeLists.txt
+++ b/XMPFiles/build/CMakeLists.txt
@@ -39,6 +39,10 @@ set(XMP_THIS_PROJECT_RELATIVEPATH "../..")
include(${CMAKE_CURRENT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/build/XMP_Config.cmake)
+
+set(TP_ZUID_PATH "${XMPROOT_DIR}/third-party/zuid/interfaces")
+set(LIB_ADOBEXMP XMPCore)
+
# ==============================================================================
# platform specific config
# ==============================================================================
@@ -69,314 +73,5 @@ else(UNIX)
endif(WIN32)
endif(UNIX)
-# ==============================================================================
-# For convenience we define the sources as a variable. You can add
-# header files and cpp/c files and CMake will sort them out
-# ==============================================================================
-
-#file (GLOB INTERNAL_HEADER_FILES ${PRODUCT_ROOT}/source/*.hpp ${PRODUCT_ROOT}/source/*.incl_cpp ${PRODUCT_ROOT}/build/*.h)
-file (GLOB INTERNAL_HEADER_COMMONCODE_NMDS ${PRODUCT_ROOT}/XMPFiles/source/NativeMetadataSupport/*.h)
-source_group("Header Files\\Internal Headers\\Common Code\\NativeMetadataSupport" FILES ${INTERNAL_HEADER_COMMONCODE_NMDS})
-
-list (APPEND INTERNAL_HEADER_COMMONCODE
- ${XMPROOT_DIR}/source/Endian.h
- ${XMPROOT_DIR}/build/XMP_BuildInfo.h
- ${SOURCE_ROOT}/XMPFiles.hpp
- ${SOURCE_ROOT}/XMPFiles_Impl.hpp
- )
-source_group("Header Files\\Internal Headers\\Common Code" FILES ${INTERNAL_HEADER_COMMONCODE})
-
-file (GLOB INTERNAL_HEADER_FILEHANDLERS ${SOURCE_ROOT}/FileHandlers/*.hpp)
-list (REMOVE_ITEM INTERNAL_HEADER_FILEHANDLERS
- ${SOURCE_ROOT}/FileHandlers/AIFF_Handler.hpp
- ${SOURCE_ROOT}/FileHandlers/GIF_Handler.hpp
- )
-source_group("Header Files\\Internal Headers\\File Handlers" FILES ${INTERNAL_HEADER_FILEHANDLERS})
-
-file (GLOB INTERNAL_HEADER_FORMATSUPPORT_AIFF ${SOURCE_ROOT}/FormatSupport/AIFF/*.h)
-source_group("Header Files\\Internal Headers\\Format Support\\AIFF" FILES ${INTERNAL_HEADER_FORMATSUPPORT_AIFF})
-
-file (GLOB INTERNAL_HEADER_FORMATSUPPORT_IFF ${SOURCE_ROOT}/FormatSupport/IFF/*.h)
-source_group("Header Files\\Internal Headers\\Format Support\\IFF" FILES ${INTERNAL_HEADER_FORMATSUPPORT_IFF})
-
-file (GLOB INTERNAL_HEADER_FORMATSUPPORT_WAVE ${SOURCE_ROOT}/FormatSupport/WAVE/*.h)
-source_group("Header Files\\Internal Headers\\Format Support\\WAVE" FILES ${INTERNAL_HEADER_FORMATSUPPORT_WAVE})
-
-file (GLOB INTERNAL_HEADER_FORMATSUPPORT ${SOURCE_ROOT}/FormatSupport/*.hpp)
-list (REMOVE_ITEM INTERNAL_HEADER_FORMATSUPPORT
- ${SOURCE_ROOT}/FormatSupport/GIF_Support.hpp
- )
-list (REMOVE_ITEM INTERNAL_HEADER_FORMATSUPPORT
-# ${SOURCE_ROOT}/source/MD5.cpp
- ${XMPROOT_DIR}/source/UnicodeConversions.cpp
- )
-source_group("Header Files\\Internal Headers\\Format Support" FILES ${INTERNAL_HEADER_FORMATSUPPORT})
-
-file (GLOB INTERNAL_HEADER_PLUGINHANDLER ${SOURCE_ROOT}/PluginHandler/*.h)
-source_group("Header Files\\Internal Headers\\PluginHandler" FILES ${INTERNAL_HEADER_PLUGINHANDLER})
-
-list (APPEND PUBLIC_HEADER_CLIENTGLUE
- ${XMPROOT_DIR}/public/include/client-glue/TXMPFiles.incl_cpp
- ${XMPROOT_DIR}/public/include/client-glue/WXMP_Common.hpp
- ${XMPROOT_DIR}/public/include/client-glue/WXMPFiles.hpp
- )
-source_group("Header Files\\Public Headers\\Client Glue" FILES ${PUBLIC_HEADER_CLIENTGLUE})
-list (APPEND PUBLIC_HEADER
- ${XMPROOT_DIR}/public/include/TXMPFiles.hpp
- ${XMPROOT_DIR}/public/include/TXMPIterator.hpp
- ${XMPROOT_DIR}/public/include/TXMPMeta.hpp
- ${XMPROOT_DIR}/public/include/TXMPUtils.hpp
- ${XMPROOT_DIR}/public/include/XMP.hpp
- ${XMPROOT_DIR}/public/include/XMP.incl_cpp
- ${XMPROOT_DIR}/public/include/XMP_Const.h
- ${XMPROOT_DIR}/public/include/XMP_Environment.h
- ${XMPROOT_DIR}/public/include/XMP_IO.hpp
- ${XMPROOT_DIR}/public/include/XMP_Version.h
- )
-source_group("Header Files\\Public Headers" FILES ${PUBLIC_HEADER})
-
-file (GLOB HEADERFILES_THIRDPARTY_ZLIB ${XMPROOT_DIR}/third-party/zlib/*.h)
-list (REMOVE_ITEM HEADERFILES_THIRDPARTY_ZLIB
- ${CMAKE_CURRENT_SOURCE_DIR}/${XMPROOT_DIR}/third-party/zlib/gzguts.h
- )
-source_group("Header Files\\ThirdParty\\zlib" FILES ${HEADERFILES_THIRDPARTY_ZLIB})
-
-list (APPEND HEADERFILES
- ${XMPROOT_DIR}/source/Host_IO.hpp
- ${XMPROOT_DIR}/source/XIO.hpp
- ${XMPROOT_DIR}/source/IOUtils.hpp
- ${XMPROOT_DIR}/source/XMPFiles_IO.hpp
- )
-source_group("Header Files" FILES ${HEADERFILES})
-
-#resource files
-file (GLOB RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.*)
-if(WIN32 AND ${XMP_BUILD_STATIC})
- list (REMOVE_ITEM RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.rc)
-endif()
-source_group("Resource Files" FILES ${RESOURCE_FILES})
-
-#source files
-file (GLOB SOURCEFILES_COMMONCODE_NMDS ${SOURCE_ROOT}/NativeMetadataSupport/*.cpp)
-source_group("Source Files\\Common Code\\NativeMetadataSupport" FILES ${SOURCEFILES_COMMONCODE_NMDS})
-
-list (APPEND SOURCEFILES_COMMONCODE
- ${XMPROOT_DIR}/third-party/zuid/interfaces/MD5.cpp
- ${XMPROOT_DIR}/source/UnicodeConversions.cpp
- ${SOURCE_ROOT}/HandlerRegistry.cpp
- ${XMPROOT_DIR}/source/PerfUtils.cpp
- ${SOURCE_ROOT}/WXMPFiles.cpp
- ${XMPROOT_DIR}/source/XIO.cpp
- ${XMPROOT_DIR}/source/IOUtils.cpp
- ${XMPROOT_DIR}/source/XML_Node.cpp
- ${XMPROOT_DIR}/source/XMP_LibUtils.cpp
- ${XMPROOT_DIR}/source/XMP_ProgressTracker.cpp
- ${SOURCE_ROOT}/XMPFiles.cpp
- ${SOURCE_ROOT}/XMPFiles_Impl.cpp
- ${XMPROOT_DIR}/source/XMPFiles_IO.cpp
- )
-if(UNIX)
- list(APPEND SOURCEFILES_COMMONCODE ${XMPROOT_DIR}/source/Host_IO-POSIX.cpp)
-else()
- list(APPEND SOURCEFILES_COMMONCODE ${XMPROOT_DIR}/source/Host_IO-Win.cpp)
-endif()
-source_group("Source Files\\Common Code" FILES ${SOURCEFILES_COMMONCODE})
-
-file (GLOB SOURCEFILES_FILEHANDLERS ${SOURCE_ROOT}/FileHandlers/*.cpp)
-list (APPEND SOURCEFILES_FILEHANDLERS
- ${SOURCE_ROOT}/FileHandlers/AIFF_Handler.hpp
- )
-list (REMOVE_ITEM SOURCEFILES_FILEHANDLERS
- ${SOURCE_ROOT}/FileHandlers/GIF_Handler.cpp
- )
-source_group("Source Files\\File Handlers" FILES ${SOURCEFILES_FILEHANDLERS})
-
-file (GLOB SOURCEFILES_FORMATSUPPORT_AIFF ${SOURCE_ROOT}/FormatSupport/AIFF/*.cpp)
-source_group("Source Files\\Format Support\\AIFF" FILES ${SOURCEFILES_FORMATSUPPORT_AIFF})
-
-file (GLOB SOURCEFILES_FORMATSUPPORT_IFF ${SOURCE_ROOT}/FormatSupport/IFF/*.cpp)
-source_group("Source Files\\Format Support\\IFF" FILES ${SOURCEFILES_FORMATSUPPORT_IFF})
-
-file (GLOB SOURCEFILES_FORMATSUPPORT_WAVE ${SOURCE_ROOT}/FormatSupport/WAVE/*.cpp)
-source_group("Source Files\\Format Support\\WAVE" FILES ${SOURCEFILES_FORMATSUPPORT_WAVE})
-
-file (GLOB SOURCEFILES_FORMATSUPPORT ${SOURCE_ROOT}/FormatSupport/*.cpp)
-list (REMOVE_ITEM SOURCEFILES_FORMATSUPPORT
- ${SOURCE_ROOT}/FormatSupport/GIF_Support.cpp
- )
-source_group("Source Files\\Format Support" FILES ${SOURCEFILES_FORMATSUPPORT})
-
-file (GLOB SOURCEFILES_PLUGINHANDLER ${SOURCE_ROOT}/PluginHandler/*.cpp)
-list (REMOVE_ITEM SOURCEFILES_PLUGINHANDLER
- ${SOURCE_ROOT}/PluginHandler/OS_Utils_Linux.cpp
- ${SOURCE_ROOT}/PluginHandler/OS_Utils_WIN.cpp
- ${SOURCE_ROOT}/PluginHandler/OS_Utils_Mac.cpp
- )
-if (UNIX)
- if (APPLE)
- list (APPEND SOURCEFILES_PLUGINHANDLER ${SOURCE_ROOT}/PluginHandler/OS_Utils_Mac.cpp)
- else()
- list (APPEND SOURCEFILES_PLUGINHANDLER ${SOURCE_ROOT}/PluginHandler/OS_Utils_Linux.cpp)
- endif()
-else()
- list (APPEND SOURCEFILES_PLUGINHANDLER ${SOURCE_ROOT}/PluginHandler/OS_Utils_WIN.cpp)
-endif()
-
-source_group("Source Files\\PluginHandler" FILES ${SOURCEFILES_PLUGINHANDLER})
-
-list (APPEND HEADERFILES_THIRDPARTY_ZLIB
- ${XMPROOT_DIR}/third-party/zlib/adler32.c
- ${XMPROOT_DIR}/third-party/zlib/compress.c
- ${XMPROOT_DIR}/third-party/zlib/crc32.c
- ${XMPROOT_DIR}/third-party/zlib/deflate.c
- ${XMPROOT_DIR}/third-party/zlib/infback.c
- ${XMPROOT_DIR}/third-party/zlib/inffast.c
- ${XMPROOT_DIR}/third-party/zlib/inflate.c
- ${XMPROOT_DIR}/third-party/zlib/inftrees.c
- ${XMPROOT_DIR}/third-party/zlib/trees.c
- ${XMPROOT_DIR}/third-party/zlib/uncompr.c
- ${XMPROOT_DIR}/third-party/zlib/zutil.c
- )
-source_group("Source Files\\ThirdParty\\zlib" FILES ${HEADERFILES_THIRDPARTY_ZLIB})
-
-list(APPEND SOURCE_FILES
- ${INTERNAL_HEADER_COMMONCODE_NMDS}
- ${INTERNAL_HEADER_COMMONCODE}
- ${INTERNAL_HEADER_FILEHANDLERS}
- ${INTERNAL_HEADER_FORMATSUPPORT_AIFF}
- ${INTERNAL_HEADER_FORMATSUPPORT_IFF}
- ${INTERNAL_HEADER_FORMATSUPPORT_WAVE}
- ${INTERNAL_HEADER_FORMATSUPPORT}
- ${INTERNAL_HEADER_PLUGINHANDLER}
- ${PUBLIC_HEADER_CLIENTGLUE}
- ${PUBLIC_HEADER}
- ${HEADERFILES_THIRDPARTY_ZLIB}
- ${HEADERFILES}
- ${RESOURCE_FILES}
- ${SOURCEFILES_COMMONCODE_NMDS}
- ${SOURCEFILES_COMMONCODE}
- ${SOURCEFILES_FILEHANDLERS}
- ${SOURCEFILES_FORMATSUPPORT_AIFF}
- ${SOURCEFILES_FORMATSUPPORT_IFF}
- ${SOURCEFILES_FORMATSUPPORT_WAVE}
- ${SOURCEFILES_FORMATSUPPORT}
- ${SOURCEFILES_PLUGINHANDLER}
- ${HEADERFILES_THIRDPARTY_ZLIB}
- )
-
-# include directories
-include_directories(${XMPROOT_DIR})
-include_directories(${XMPROOT_DIR}/public/include)
-include_directories(${XMPROOT_DIR}/third-party/expat/zlib)
-include_directories(${XMPROOT_DIR}/XMPFilesPlugins/api/source)
-include_directories(${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT})
-
-#additional link directory
-set(LIB_ADOBEXMP XMPCore)
-link_directories(${OUTPUT_DIR})
-
-# ==============================================================================
-# Define what to do, lib, exe, etc
-if (UNIX AND APPLE AND NOT ${XMP_BUILD_STATIC})
- # preprocess Info.plist
- add_custom_target(${TARGET_NAME}InfoPlist
- COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
- COMMAND if [ $(CONFIGURATION) != Debug ]; then
- ${GCCTOOL} -E -P -x c ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.plist
- -F${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
- -DPRODUCT_NAME=${TARGET_NAME} -DMAC_ENV=1 -DNDEBUG=1
- -include ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}PList.h
- -o ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist
- \; else
- ${GCCTOOL} -E -P -x c ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.plist
- -F${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
- -DPRODUCT_NAME=${TARGET_NAME} -DMAC_ENV=1 -DDEBUG=1
- -include ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}PList.h
- -o ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist
- \; fi
- COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../CMakeFiles/${TARGET_NAME}.dir/Info.plist
- COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../CMakeFiles/${TARGET_NAME}.dir/Info.plist
- COMMENT "Preprocessing Info-plist"
- )
- set(DEPENDENCY_LIST "ALL:${TARGET_NAME}InfoPlist" "DLL:XMPCore")
-else ()
- set(DEPENDENCY_LIST "DLL:XMPCore")
-endif()
-
-AddLibraryAndDependencies(${TARGET_NAME} ${XMP_BUILD_STATIC} YES "SHARED" SOURCE_FILES DEPENDENCY_LIST)
-
-# ==============================================================================
-# Link dependencies
-
-if(WIN32)
- target_link_libraries(
- ${TARGET_NAME}
- ${LIB_ADOBEXMP}
- ${XMP_PLATFORM_LINK}
- )
-else(WIN32)
- if(UNIX AND NOT APPLE)
- target_link_libraries(
- ${TARGET_NAME}
- ${LIB_ADOBEXMP}
- )
- endif()
-endif()
-
-set(FRAMEWORK_LIST "Mac:CoreFoundation" "Mac:CoreServices" "Mac:${LIB_ADOBEXMP}" "Mac:${XMP_PLATFORM_LINK}")
-AddMacFramework(${TARGET_NAME} FRAMEWORK_LIST)
-
-if(UNIX)
- if (NOT APPLE)
- SetWinLinkFlags(${TARGET_NAME} "-Xlinker --version-script -Xlinker \"${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.exp\"" "")
- else()
- set_target_properties(${TARGET_NAME} PROPERTIES BUILD_WITH_INSTALL_RPATH ON INSTALL_NAME_DIR "@executable_path/../Frameworks")
- SetWinLinkFlags(${TARGET_NAME} "-exported_symbols_list \"${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.exp\"" "${XMPFILES_LIB}")
- endif()
-else()
- SetWinLinkFlags(${TARGET_NAME} "" "${XMPFILES_LIB}")
-endif()
-
-set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${XMPFILES_LIB})
-
-# ==============================================================================
-# Define output for this project
-SetOutputPath(${OUTPUT_DIR} 0)
-
-# ==============================================================================
-# Post build
-# ==============================================================================
-
-if(UNIX)
- #hack for unix to rename the output static library. cmake add lib and extenstion as .a, rename it
- if (NOT APPLE)
- if (${XMP_BUILD_STATIC})
- add_custom_command (TARGET ${TARGET_NAME}
- POST_BUILD
- COMMAND mv ${OUTPUT_DIR}/lib${XMPFILES_LIB}.a ${OUTPUT_DIR}/${XMPFILES_LIB}.ar
- )
- else()
- if((${CMAKE_BUILD_TYPE} MATCHES "Debug") OR (${CMAKE_BUILD_TYPE} MATCHES "debug") )
- add_custom_command (TARGET ${TARGET_NAME}
- POST_BUILD
- COMMAND ls -l ${OUTPUT_DIR}/lib${XMPFILES_LIB}.so
- )
- else()
- add_custom_command (TARGET ${TARGET_NAME}
- POST_BUILD
- COMMAND strip ${OUTPUT_DIR}/lib${XMPFILES_LIB}.so
- COMMAND ls -l ${OUTPUT_DIR}/lib${XMPFILES_LIB}.so
- )
- endif()
- endif()
- endif()
-
-else()
- set_target_properties(${TARGET_NAME} PROPERTIES PROJECT_LABEL ${PROJECT_LABEL_STR})
-
-endif()
-message (STATUS "===========================================================================")
-message (STATUS " ${PROJECT_NAME} ")
-message (STATUS "===========================================================================")
-message (STATUS " OUTPUT_DIR = ${OUTPUT_DIR}")
+include(${CMAKE_CURRENT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/XMPFiles/build/CMakeListsCommon.txt) \ No newline at end of file
diff --git a/XMPFiles/build/CMakeListsCommon.txt b/XMPFiles/build/CMakeListsCommon.txt
new file mode 100644
index 0000000..2f116d0
--- /dev/null
+++ b/XMPFiles/build/CMakeListsCommon.txt
@@ -0,0 +1,318 @@
+
+# ==============================================================================
+# For convenience we define the sources as a variable. You can add
+# header files and cpp/c files and CMake will sort them out
+# ==============================================================================
+
+#file (GLOB INTERNAL_HEADER_FILES ${PRODUCT_ROOT}/source/*.hpp ${PRODUCT_ROOT}/source/*.incl_cpp ${PRODUCT_ROOT}/build/*.h)
+file (GLOB INTERNAL_HEADER_COMMONCODE_NMDS ${PRODUCT_ROOT}/XMPFiles/source/NativeMetadataSupport/*.h)
+source_group("Header Files\\Internal Headers\\Common Code\\NativeMetadataSupport" FILES ${INTERNAL_HEADER_COMMONCODE_NMDS})
+
+list (APPEND INTERNAL_HEADER_COMMONCODE
+ ${XMPROOT_DIR}/source/Endian.h
+ ${XMPROOT_DIR}/source/SafeStringAPIs.h
+ ${XMPROOT_DIR}/source/SafeTypes.h
+ ${XMPROOT_DIR}/source/SuppressSAL.h
+ ${XMPROOT_DIR}/build/XMP_BuildInfo.h
+ ${SOURCE_ROOT}/XMPFiles.hpp
+ ${SOURCE_ROOT}/XMPFiles_Impl.hpp
+ )
+source_group("Header Files\\Internal Headers\\Common Code" FILES ${INTERNAL_HEADER_COMMONCODE})
+
+file (GLOB INTERNAL_HEADER_FILEHANDLERS ${SOURCE_ROOT}/FileHandlers/*.hpp)
+list (REMOVE_ITEM INTERNAL_HEADER_FILEHANDLERS
+ ${SOURCE_ROOT}/FileHandlers/AIFF_Handler.hpp
+ ${SOURCE_ROOT}/FileHandlers/GIF_Handler.hpp
+ )
+source_group("Header Files\\Internal Headers\\File Handlers" FILES ${INTERNAL_HEADER_FILEHANDLERS})
+
+file (GLOB INTERNAL_HEADER_FORMATSUPPORT_AIFF ${SOURCE_ROOT}/FormatSupport/AIFF/*.h)
+source_group("Header Files\\Internal Headers\\Format Support\\AIFF" FILES ${INTERNAL_HEADER_FORMATSUPPORT_AIFF})
+
+file (GLOB INTERNAL_HEADER_FORMATSUPPORT_IFF ${SOURCE_ROOT}/FormatSupport/IFF/*.h)
+source_group("Header Files\\Internal Headers\\Format Support\\IFF" FILES ${INTERNAL_HEADER_FORMATSUPPORT_IFF})
+
+file (GLOB INTERNAL_HEADER_FORMATSUPPORT_WAVE ${SOURCE_ROOT}/FormatSupport/WAVE/*.h)
+source_group("Header Files\\Internal Headers\\Format Support\\WAVE" FILES ${INTERNAL_HEADER_FORMATSUPPORT_WAVE})
+
+file (GLOB INTERNAL_HEADER_FORMATSUPPORT ${SOURCE_ROOT}/FormatSupport/*.hpp)
+list (REMOVE_ITEM INTERNAL_HEADER_FORMATSUPPORT
+ ${SOURCE_ROOT}/FormatSupport/GIF_Support.hpp
+ )
+list (REMOVE_ITEM INTERNAL_HEADER_FORMATSUPPORT
+# ${SOURCE_ROOT}/source/MD5.cpp
+ ${XMPROOT_DIR}/source/UnicodeConversions.cpp
+ )
+source_group("Header Files\\Internal Headers\\Format Support" FILES ${INTERNAL_HEADER_FORMATSUPPORT})
+
+file (GLOB INTERNAL_HEADER_PLUGINHANDLER ${SOURCE_ROOT}/PluginHandler/*.h)
+source_group("Header Files\\Internal Headers\\PluginHandler" FILES ${INTERNAL_HEADER_PLUGINHANDLER})
+
+list (APPEND PUBLIC_HEADER_CLIENTGLUE
+ ${XMPROOT_DIR}/public/include/client-glue/TXMPFiles.incl_cpp
+ ${XMPROOT_DIR}/public/include/client-glue/WXMP_Common.hpp
+ ${XMPROOT_DIR}/public/include/client-glue/WXMPFiles.hpp
+ )
+source_group("Header Files\\Public Headers\\Client Glue" FILES ${PUBLIC_HEADER_CLIENTGLUE})
+list (APPEND PUBLIC_HEADER
+ ${XMPROOT_DIR}/public/include/TXMPFiles.hpp
+ ${XMPROOT_DIR}/public/include/TXMPIterator.hpp
+ ${XMPROOT_DIR}/public/include/TXMPMeta.hpp
+ ${XMPROOT_DIR}/public/include/TXMPUtils.hpp
+ ${XMPROOT_DIR}/public/include/XMP.hpp
+ ${XMPROOT_DIR}/public/include/XMP.incl_cpp
+ ${XMPROOT_DIR}/public/include/XMP_Const.h
+ ${XMPROOT_DIR}/public/include/XMP_Environment.h
+ ${XMPROOT_DIR}/public/include/XMP_IO.hpp
+ ${XMPROOT_DIR}/public/include/XMP_Version.h
+ )
+source_group("Header Files\\Public Headers" FILES ${PUBLIC_HEADER})
+
+file (GLOB HEADERFILES_THIRDPARTY_ZLIB ${XMPROOT_DIR}/third-party/zlib/*.h)
+list (REMOVE_ITEM HEADERFILES_THIRDPARTY_ZLIB
+ ${CMAKE_CURRENT_SOURCE_DIR}/${XMPROOT_DIR}/third-party/zlib/gzguts.h
+ )
+source_group("Header Files\\ThirdParty\\zlib" FILES ${HEADERFILES_THIRDPARTY_ZLIB})
+
+list (APPEND HEADERFILES
+ ${XMPROOT_DIR}/source/Host_IO.hpp
+ ${XMPROOT_DIR}/source/XIO.hpp
+ ${XMPROOT_DIR}/source/IOUtils.hpp
+ ${XMPROOT_DIR}/source/XMPFiles_IO.hpp
+ )
+source_group("Header Files" FILES ${HEADERFILES})
+
+#resource files
+file (GLOB RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.*)
+if(WIN32 AND ${XMP_BUILD_STATIC})
+ list (REMOVE_ITEM RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.rc)
+endif()
+source_group("Resource Files" FILES ${RESOURCE_FILES})
+
+#source files
+file (GLOB SOURCEFILES_COMMONCODE_NMDS ${SOURCE_ROOT}/NativeMetadataSupport/*.cpp)
+source_group("Source Files\\Common Code\\NativeMetadataSupport" FILES ${SOURCEFILES_COMMONCODE_NMDS})
+
+list (APPEND SOURCEFILES_COMMONCODE
+ ${TP_ZUID_PATH}/MD5.cpp
+ ${XMPROOT_DIR}/source/UnicodeConversions.cpp
+ ${SOURCE_ROOT}/HandlerRegistry.cpp
+ ${XMPROOT_DIR}/source/SafeStringAPIs.cpp
+ ${XMPROOT_DIR}/source/PerfUtils.cpp
+ ${SOURCE_ROOT}/WXMPFiles.cpp
+ ${XMPROOT_DIR}/source/XIO.cpp
+ ${XMPROOT_DIR}/source/IOUtils.cpp
+ ${XMPROOT_DIR}/source/XML_Node.cpp
+ ${XMPROOT_DIR}/source/XMP_LibUtils.cpp
+ ${XMPROOT_DIR}/source/XMP_ProgressTracker.cpp
+ ${SOURCE_ROOT}/XMPFiles.cpp
+ ${SOURCE_ROOT}/XMPFiles_Impl.cpp
+ ${XMPROOT_DIR}/source/XMPFiles_IO.cpp
+ )
+if(UNIX)
+ list(APPEND SOURCEFILES_COMMONCODE ${XMPROOT_DIR}/source/Host_IO-POSIX.cpp)
+else()
+ list(APPEND SOURCEFILES_COMMONCODE ${XMPROOT_DIR}/source/Host_IO-Win.cpp)
+endif()
+source_group("Source Files\\Common Code" FILES ${SOURCEFILES_COMMONCODE})
+
+file (GLOB SOURCEFILES_FILEHANDLERS ${SOURCE_ROOT}/FileHandlers/*.cpp)
+list (APPEND SOURCEFILES_FILEHANDLERS
+ ${SOURCE_ROOT}/FileHandlers/AIFF_Handler.hpp
+ )
+list (REMOVE_ITEM SOURCEFILES_FILEHANDLERS
+ ${SOURCE_ROOT}/FileHandlers/GIF_Handler.cpp
+ )
+source_group("Source Files\\File Handlers" FILES ${SOURCEFILES_FILEHANDLERS})
+
+file (GLOB SOURCEFILES_FORMATSUPPORT_AIFF ${SOURCE_ROOT}/FormatSupport/AIFF/*.cpp)
+source_group("Source Files\\Format Support\\AIFF" FILES ${SOURCEFILES_FORMATSUPPORT_AIFF})
+
+file (GLOB SOURCEFILES_FORMATSUPPORT_IFF ${SOURCE_ROOT}/FormatSupport/IFF/*.cpp)
+source_group("Source Files\\Format Support\\IFF" FILES ${SOURCEFILES_FORMATSUPPORT_IFF})
+
+file (GLOB SOURCEFILES_FORMATSUPPORT_WAVE ${SOURCE_ROOT}/FormatSupport/WAVE/*.cpp)
+source_group("Source Files\\Format Support\\WAVE" FILES ${SOURCEFILES_FORMATSUPPORT_WAVE})
+
+file (GLOB SOURCEFILES_FORMATSUPPORT ${SOURCE_ROOT}/FormatSupport/*.cpp)
+list (REMOVE_ITEM SOURCEFILES_FORMATSUPPORT
+ ${SOURCE_ROOT}/FormatSupport/GIF_Support.cpp
+ )
+source_group("Source Files\\Format Support" FILES ${SOURCEFILES_FORMATSUPPORT})
+
+if (NOT APPLE_IOS)
+ file (GLOB SOURCEFILES_PLUGINHANDLER ${SOURCE_ROOT}/PluginHandler/*.cpp)
+ list (REMOVE_ITEM SOURCEFILES_PLUGINHANDLER
+ ${SOURCE_ROOT}/PluginHandler/OS_Utils_Linux.cpp
+ ${SOURCE_ROOT}/PluginHandler/OS_Utils_WIN.cpp
+ ${SOURCE_ROOT}/PluginHandler/OS_Utils_Mac.cpp
+ )
+ if (UNIX)
+ if (APPLE)
+ list (APPEND SOURCEFILES_PLUGINHANDLER ${SOURCE_ROOT}/PluginHandler/OS_Utils_Mac.cpp)
+ else()
+ list (APPEND SOURCEFILES_PLUGINHANDLER ${SOURCE_ROOT}/PluginHandler/OS_Utils_Linux.cpp)
+ endif()
+ else()
+ list (APPEND SOURCEFILES_PLUGINHANDLER ${SOURCE_ROOT}/PluginHandler/OS_Utils_WIN.cpp)
+ endif()
+
+ source_group("Source Files\\PluginHandler" FILES ${SOURCEFILES_PLUGINHANDLER})
+endif()
+
+list (APPEND HEADERFILES_THIRDPARTY_ZLIB
+ ${XMPROOT_DIR}/third-party/zlib/adler32.c
+ ${XMPROOT_DIR}/third-party/zlib/compress.c
+ ${XMPROOT_DIR}/third-party/zlib/crc32.c
+ ${XMPROOT_DIR}/third-party/zlib/deflate.c
+ ${XMPROOT_DIR}/third-party/zlib/infback.c
+ ${XMPROOT_DIR}/third-party/zlib/inffast.c
+ ${XMPROOT_DIR}/third-party/zlib/inflate.c
+ ${XMPROOT_DIR}/third-party/zlib/inftrees.c
+ ${XMPROOT_DIR}/third-party/zlib/trees.c
+ ${XMPROOT_DIR}/third-party/zlib/uncompr.c
+ ${XMPROOT_DIR}/third-party/zlib/zutil.c
+ )
+source_group("Source Files\\ThirdParty\\zlib" FILES ${HEADERFILES_THIRDPARTY_ZLIB})
+
+list(APPEND SOURCE_FILES
+ ${INTERNAL_HEADER_COMMONCODE_NMDS}
+ ${INTERNAL_HEADER_COMMONCODE}
+ ${INTERNAL_HEADER_FILEHANDLERS}
+ ${INTERNAL_HEADER_FORMATSUPPORT_AIFF}
+ ${INTERNAL_HEADER_FORMATSUPPORT_IFF}
+ ${INTERNAL_HEADER_FORMATSUPPORT_WAVE}
+ ${INTERNAL_HEADER_FORMATSUPPORT}
+ ${INTERNAL_HEADER_PLUGINHANDLER}
+ ${PUBLIC_HEADER_CLIENTGLUE}
+ ${PUBLIC_HEADER}
+ ${HEADERFILES_THIRDPARTY_ZLIB}
+ ${HEADERFILES}
+ ${RESOURCE_FILES}
+ ${SOURCEFILES_COMMONCODE_NMDS}
+ ${SOURCEFILES_COMMONCODE}
+ ${SOURCEFILES_FILEHANDLERS}
+ ${SOURCEFILES_FORMATSUPPORT_AIFF}
+ ${SOURCEFILES_FORMATSUPPORT_IFF}
+ ${SOURCEFILES_FORMATSUPPORT_WAVE}
+ ${SOURCEFILES_FORMATSUPPORT}
+ ${SOURCEFILES_PLUGINHANDLER}
+ ${HEADERFILES_THIRDPARTY_ZLIB}
+ )
+
+# include directories
+include_directories(${XMPROOT_DIR})
+include_directories(${XMPROOT_DIR}/public/include)
+include_directories(${XMPROOT_DIR}/third-party/expat/zlib)
+include_directories(${XMPROOT_DIR}/XMPFilesPlugins/api/source)
+include_directories(${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT})
+
+#additional link directory
+link_directories(${OUTPUT_DIR})
+
+# ==============================================================================
+# Define what to do, lib, exe, etc
+if (UNIX AND APPLE AND NOT ${XMP_BUILD_STATIC})
+ # preprocess Info.plist
+ add_custom_target(${TARGET_NAME}InfoPlist
+ COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
+ COMMAND if [ $(CONFIGURATION) != Debug ]; then
+ ${GCCTOOL} -E -P -x c ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.plist
+ -F${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
+ -DPRODUCT_NAME=${TARGET_NAME} -DMAC_ENV=1 -DNDEBUG=1
+ -include ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}PList.h
+ -o ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist
+ \; else
+ ${GCCTOOL} -E -P -x c ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.plist
+ -F${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/
+ -DPRODUCT_NAME=${TARGET_NAME} -DMAC_ENV=1 -DDEBUG=1
+ -include ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}PList.h
+ -o ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist
+ \; fi
+ COMMAND rm -f ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../CMakeFiles/${TARGET_NAME}.dir/Info.plist
+ COMMAND cp ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/Info.plist ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/../CMakeFiles/${TARGET_NAME}.dir/Info.plist
+ COMMENT "Preprocessing Info-plist"
+ )
+ set(DEPENDENCY_LIST "ALL:${TARGET_NAME}InfoPlist" "DLL:XMPCore")
+else ()
+ set(DEPENDENCY_LIST "DLL:XMPCore")
+endif()
+
+AddLibraryAndDependencies(${TARGET_NAME} ${XMP_BUILD_STATIC} YES "SHARED" SOURCE_FILES DEPENDENCY_LIST)
+
+# ==============================================================================
+# Link dependencies
+
+if(WIN32)
+ target_link_libraries(
+ ${TARGET_NAME}
+ ${LIB_ADOBEXMP}
+ ${XMP_PLATFORM_LINK}
+ )
+else(WIN32)
+ if(UNIX AND NOT APPLE)
+ target_link_libraries(
+ ${TARGET_NAME}
+ ${LIB_ADOBEXMP}
+ )
+ endif()
+endif()
+
+set(FRAMEWORK_LIST "Mac:CoreFoundation" "Mac:CoreServices" "Mac:${LIB_ADOBEXMP}" "Mac:${XMP_PLATFORM_LINK}")
+AddMacFramework(${TARGET_NAME} FRAMEWORK_LIST)
+
+if(UNIX)
+ if (NOT APPLE)
+ SetPlatformLinkFlags(${TARGET_NAME} "-Xlinker --version-script -Xlinker \"${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.exp\"" "")
+ else()
+ set_target_properties(${TARGET_NAME} PROPERTIES BUILD_WITH_INSTALL_RPATH ON INSTALL_NAME_DIR "@executable_path/../Frameworks")
+ SetPlatformLinkFlags(${TARGET_NAME} "-exported_symbols_list \"${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${TARGET_NAME}.exp\"" "${XMPFILES_LIB}")
+ endif()
+else()
+ SetPlatformLinkFlags(${TARGET_NAME} "" "${XMPFILES_LIB}")
+endif()
+
+set_target_properties(${TARGET_NAME} PROPERTIES OUTPUT_NAME ${XMPFILES_LIB})
+
+# ==============================================================================
+# Define output for this project
+SetOutputPath(${OUTPUT_DIR} 0)
+
+# ==============================================================================
+# Post build
+# ==============================================================================
+
+if(UNIX)
+ #hack for unix to rename the output static library. cmake add lib and extenstion as .a, rename it
+ if (NOT APPLE)
+ if (${XMP_BUILD_STATIC})
+ add_custom_command (TARGET ${TARGET_NAME}
+ POST_BUILD
+ COMMAND mv ${OUTPUT_DIR}/lib${XMPFILES_LIB}.a ${OUTPUT_DIR}/${XMPFILES_LIB}.ar
+ )
+ else()
+ if((${CMAKE_BUILD_TYPE} MATCHES "Debug") OR (${CMAKE_BUILD_TYPE} MATCHES "debug") )
+ add_custom_command (TARGET ${TARGET_NAME}
+ POST_BUILD
+ COMMAND ls -l ${OUTPUT_DIR}/lib${XMPFILES_LIB}.so
+ )
+ else()
+ add_custom_command (TARGET ${TARGET_NAME}
+ POST_BUILD
+ COMMAND strip ${OUTPUT_DIR}/lib${XMPFILES_LIB}.so
+ COMMAND ls -l ${OUTPUT_DIR}/lib${XMPFILES_LIB}.so
+ )
+ endif()
+ endif()
+ endif()
+
+
+else()
+ set_target_properties(${TARGET_NAME} PROPERTIES PROJECT_LABEL ${PROJECT_LABEL_STR})
+
+endif()
+
+message (STATUS "===========================================================================")
+message (STATUS " ${PROJECT_NAME} ")
+message (STATUS "===========================================================================")
+message (STATUS " OUTPUT_DIR = ${OUTPUT_DIR}")
diff --git a/XMPFiles/source/FileHandlers/AVCHD_Handler.cpp b/XMPFiles/source/FileHandlers/AVCHD_Handler.cpp
index a58594f..95d4f1b 100644
--- a/XMPFiles/source/FileHandlers/AVCHD_Handler.cpp
+++ b/XMPFiles/source/FileHandlers/AVCHD_Handler.cpp
@@ -1979,7 +1979,7 @@ bool AVCHD_MetaHandler::GetFileModDate ( XMP_DateTime * modDate )
ok = this->MakeClipInfoPath ( &fullPath, ".clpi", true /* checkFile */ );
if ( ok ) ok = Host_IO::GetModifyDate ( fullPath.c_str(), &oneDate );
if ( ok ) {
- if ( (! haveDate) || (*modDate < oneDate) ) *modDate = oneDate;
+ if ( *modDate < oneDate ) *modDate = oneDate;
haveDate = true;
}
@@ -2270,7 +2270,7 @@ void AVCHD_MetaHandler::ProcessXMP()
if ( has2_2pulldown )
xmpValue = "29.97p";
else
- xmpValue = has3_2pulldown ? "23.98p" : "59.94i";
+ xmpValue = "59.94i";
break;
default: break;
diff --git a/XMPFiles/source/FileHandlers/JPEG_Handler.cpp b/XMPFiles/source/FileHandlers/JPEG_Handler.cpp
index ea025bd..bdc5505 100644
--- a/XMPFiles/source/FileHandlers/JPEG_Handler.cpp
+++ b/XMPFiles/source/FileHandlers/JPEG_Handler.cpp
@@ -276,6 +276,9 @@ void JPEG_MetaHandler::CacheFileData()
static const size_t kBufferSize = 64*1024; // Enough for maximum segment contents.
XMP_Uns8 buffer [kBufferSize];
+ psirContents.clear();
+ exifContents.clear();
+
XMP_AbortProc abortProc = this->parent->abortProc;
void * abortArg = this->parent->abortArg;
const bool checkAbort = (abortProc != 0);
@@ -333,7 +336,7 @@ void JPEG_MetaHandler::CacheFileData()
size_t psirLen = contentLen - kPSIRSignatureLength;
fileRef->Seek ( (contentOrigin + kPSIRSignatureLength), kXMP_SeekFromStart );
fileRef->ReadAll ( buffer, psirLen );
- this->psirContents.assign ( (char*)buffer, psirLen );
+ this->psirContents.append( (char *) buffer, psirLen );
continue; // Move on to the next marker.
}
@@ -354,7 +357,7 @@ void JPEG_MetaHandler::CacheFileData()
size_t exifLen = contentLen - kExifSignatureLength;
fileRef->Seek ( (contentOrigin + kExifSignatureLength), kXMP_SeekFromStart );
fileRef->ReadAll ( buffer, exifLen );
- this->exifContents.assign ( (char*)buffer, exifLen );
+ this->exifContents.append ( (char*)buffer, exifLen );
continue; // Move on to the next marker.
}
@@ -535,8 +538,10 @@ void JPEG_MetaHandler::ProcessXMP()
XMP_Assert ( (this->psirMgr == 0) && (this->iptcMgr == 0) ); // ProcessTNail might create the exifMgr.
- bool readOnly = ((this->parent->openFlags & kXMPFiles_OpenForUpdate) == 0);
-
+ bool readOnly = false;
+ if ( this->parent ){
+ readOnly = ((this->parent->openFlags & kXMPFiles_OpenForUpdate) == 0);
+ }
if ( readOnly ) {
if ( this->exifMgr == 0 ) this->exifMgr = new TIFF_MemoryReader();
this->psirMgr = new PSIR_MemoryReader();
@@ -826,19 +831,16 @@ void JPEG_MetaHandler::WriteTempFile ( XMP_IO* tempRef )
void* exifPtr;
XMP_Uns32 exifLen = this->exifMgr->UpdateMemoryStream ( &exifPtr );
if ( exifLen > kExifMaxDataLength ) exifLen = this->exifMgr->UpdateMemoryStream ( &exifPtr, true /* compact */ );
- if ( exifLen > kExifMaxDataLength ) {
- // XMP_Throw ( "Overflow of Exif APP1 data", kXMPErr_BadJPEG ); ** Used to throw, now rewrite original Exif.
- exifPtr = (void*)this->exifContents.c_str();
- exifLen = this->exifContents.size();
- }
- if ( exifLen > 0 ) {
- first4 = MakeUns32BE ( 0xFFE10000 + 2 + kExifSignatureLength + exifLen );
+ while ( exifLen > 0 ) {
+ XMP_Uns32 count = std::min ( exifLen, (XMP_Uns32) kExifMaxDataLength );
+ first4 = MakeUns32BE ( 0xFFE10000 + 2 + kExifSignatureLength + count );
tempRef->Write ( &first4, 4 );
tempRef->Write ( kExifSignatureString, kExifSignatureLength );
- tempRef->Write ( exifPtr, exifLen );
+ tempRef->Write ( exifPtr, count );
+ exifPtr = (XMP_Uns8 *) exifPtr + count;
+ exifLen -= count;
}
-
}
// Write the new XMP APP1 marker segment, with possible extension marker segments.
@@ -878,25 +880,23 @@ void JPEG_MetaHandler::WriteTempFile ( XMP_IO* tempRef )
}
- // Write the new PSIR APP13 marker segment.
-
+ // Write the new PSIR APP13 marker segments.
if ( this->psirMgr != 0 ) {
void* psirPtr;
XMP_Uns32 psirLen = this->psirMgr->UpdateMemoryResources ( &psirPtr );
- if ( psirLen > kPSIRMaxDataLength ) XMP_Throw ( "Overflow of PSIR APP13 data", kXMPErr_BadJPEG );
-
- if ( psirLen > 0 ) {
- first4 = MakeUns32BE ( 0xFFED0000 + 2 + kPSIRSignatureLength + psirLen );
+ while ( psirLen > 0 ) {
+ XMP_Uns32 count = std::min ( psirLen, (XMP_Uns32) kPSIRMaxDataLength );
+ first4 = MakeUns32BE ( 0xFFED0000 + 2 + kPSIRSignatureLength + count );
tempRef->Write ( &first4, 4 );
tempRef->Write ( kPSIRSignatureString, kPSIRSignatureLength );
- tempRef->Write ( psirPtr, psirLen );
+ tempRef->Write ( psirPtr, count );
+ psirPtr = (XMP_Uns8 *) psirPtr + count;
+ psirLen -= count;
}
-
}
// Copy remaining marker segments, skipping old metadata, to the first SOS marker or to EOI.
-
origRef->Seek ( -2, kXMP_SeekFromCurrent ); // Back up to the marker from the end of the APP0 copy loop.
while ( true ) {
diff --git a/XMPFiles/source/FileHandlers/MP3_Handler.cpp b/XMPFiles/source/FileHandlers/MP3_Handler.cpp
index a568c1a..3215e72 100644
--- a/XMPFiles/source/FileHandlers/MP3_Handler.cpp
+++ b/XMPFiles/source/FileHandlers/MP3_Handler.cpp
@@ -119,6 +119,20 @@ bool MP3_CheckFormat ( XMP_FileFormat format,
MP3_MetaHandler::MP3_MetaHandler ( XMPFiles * _parent )
{
+ this->oldTagSize = 0;
+ this->oldPadding = 0;
+ this->oldFramesSize = 0;
+ this->newTagSize = 0;
+ this->newPadding = 0;
+ this->newFramesSize = 0;
+ this->tagIsDirty = false;
+ this->mustShift = false;
+ this->majorVersion = 2.3;
+ this->minorVersion = 2.3;
+ this->hasID3Tag = false;
+ this->hasFooter = false;
+ this->extHeaderSize = 0;
+ this->hasExtHeader = false;
this->parent = _parent;
this->handlerFlags = kMP3_HandlerFlags;
this->stdCharForm = kXMP_Char8Bit;
@@ -423,23 +437,26 @@ void MP3_MetaHandler::ProcessXMP()
}//for reconProps
// import DateTime
- XMP_DateTime oldDateTime;
- xmpObj.GetProperty_Date ( kXMP_NS_XMP, "CreateDate", &oldDateTime, 0 );
+ XMP_DateTime oldDateTime;
+ bool haveNewDateTime = newDateTime.year != 0 ;
+ if ( xmpObj.GetProperty_Date ( kXMP_NS_XMP, "CreateDate", &oldDateTime, 0 ) )
+ {
+
+ haveNewDateTime = haveNewDateTime &&
+ ( (newDateTime.year != oldDateTime.year) ||
+ ( (newDateTime.month != 0 ) && ( (newDateTime.day != oldDateTime.day) || (newDateTime.month != oldDateTime.month) ) ) ||
+ ( newDateTime.hasTime && ( (newDateTime.hour != oldDateTime.hour) || (newDateTime.minute != oldDateTime.minute) ) ) );
+ }
+ // NOTE: no further validation nessesary the function "SetProperty_Date" will care about validating date and time
+ // any exception will be caught and block import
+ try {
+ if ( haveNewDateTime ) {
+ this->xmpObj.SetProperty_Date ( kXMP_NS_XMP, "CreateDate", newDateTime );
+ }
+ } catch ( ... ) {
+ // Dont import invalid dates from ID3
+ }
- // NOTE: no further validation nessesary the function "SetProperty_Date" will care about validating date and time
- // any exception will be caught and block import
- try {
- bool haveNewDateTime = (newDateTime.year != 0) &&
- ( (newDateTime.year != oldDateTime.year) ||
- ( (newDateTime.month != 0 ) && ( (newDateTime.day != oldDateTime.day) || (newDateTime.month != oldDateTime.month) ) ) ||
- ( newDateTime.hasTime && ( (newDateTime.hour != oldDateTime.minute) || (newDateTime.hour != oldDateTime.minute) ) ) );
- if ( haveNewDateTime ) {
- this->xmpObj.SetProperty_Date ( kXMP_NS_XMP, "CreateDate", newDateTime );
- }
- } catch ( ... ) {
- // Dont import invalid dates from ID3
- }
-
}
// very important to avoid multiple runs! (in which case I'd need to clean certain
diff --git a/XMPFiles/source/FileHandlers/MPEG4_Handler.cpp b/XMPFiles/source/FileHandlers/MPEG4_Handler.cpp
index 2dfe088..905f19f 100644
--- a/XMPFiles/source/FileHandlers/MPEG4_Handler.cpp
+++ b/XMPFiles/source/FileHandlers/MPEG4_Handler.cpp
@@ -24,6 +24,7 @@
#include "source/XMP_ProgressTracker.hpp"
#include "source/UnicodeConversions.hpp"
#include "third-party/zuid/interfaces/MD5.h"
+#include <math.h>
#if XMP_WinBuild
#pragma warning ( disable : 4996 ) // '...' was declared deprecated
@@ -142,6 +143,31 @@ static inline XMP_StringPtr Lookup3LetterLang ( XMP_StringPtr lang2 )
return "";
}
+
+#define IsTolerableBoxChar(ch) ( ((0x20 <= (ch)) && ((ch) <= 0x7E)) || ((ch) == 0xA9) )
+
+static inline bool IsTolerableBox ( XMP_Uns32 boxType )
+{
+ // Make sure the box type is 4 ASCII characters or 0xA9 (MacRoman copyright).
+ XMP_Uns8 b1 = (XMP_Uns8) (boxType >> 24);
+ XMP_Uns8 b2 = (XMP_Uns8) ((boxType >> 16) & 0xFF);
+ XMP_Uns8 b3 = (XMP_Uns8) ((boxType >> 8) & 0xFF);
+ XMP_Uns8 b4 = (XMP_Uns8) (boxType & 0xFF);
+ bool ok = IsTolerableBoxChar(b1) && IsTolerableBoxChar(b2) &&
+ IsTolerableBoxChar(b3) && IsTolerableBoxChar(b4);
+ return ok;
+}
+
+static inline bool IsXMPUUID ( XMP_IO * fileRef,XMP_Uns64 contentSize, bool unmovedFilePtr=false )
+{
+ if ( contentSize < 16 ) return false;
+ XMP_Uns8 uuid [16];
+ fileRef->ReadAll ( uuid, 16 );
+ if (unmovedFilePtr) fileRef->Seek ( -16, kXMP_SeekFromCurrent );
+ if ( memcmp ( uuid, ISOMedia::k_xmpUUID, 16 ) != 0 ) return false; // Check for the XMP GUID.
+ return true;
+}
+
// =================================================================================================
// MPEG4_CheckFormat
// =================
@@ -184,8 +210,6 @@ bool MPEG4_CheckFormat ( XMP_FileFormat format,
XMP_Uns64 fileSize, nextOffset;
ISOMedia::BoxInfo currBox;
- #define IsTolerableBoxChar(ch) ( ((0x20 <= (ch)) && ((ch) <= 0x7E)) || ((ch) == 0xA9) )
-
XMP_AbortProc abortProc = parent->abortProc;
void * abortArg = parent->abortArg;
const bool checkAbort = (abortProc != 0);
@@ -256,14 +280,7 @@ bool MPEG4_CheckFormat ( XMP_FileFormat format,
while ( currBox.boxType != ISOMedia::k_moov ) {
if ( ! IsClassicQuickTimeBox ( currBox.boxType ) ) {
- // Make sure the box type is 4 ASCII characters or 0xA9 (MacRoman copyright).
- XMP_Uns8 b1 = (XMP_Uns8) (currBox.boxType >> 24);
- XMP_Uns8 b2 = (XMP_Uns8) ((currBox.boxType >> 16) & 0xFF);
- XMP_Uns8 b3 = (XMP_Uns8) ((currBox.boxType >> 8) & 0xFF);
- XMP_Uns8 b4 = (XMP_Uns8) (currBox.boxType & 0xFF);
- bool ok = IsTolerableBoxChar(b1) && IsTolerableBoxChar(b2) &&
- IsTolerableBoxChar(b3) && IsTolerableBoxChar(b4);
- if ( ! ok ) return false;
+ if ( ! IsTolerableBox(currBox.boxType) ) return false;
}
if ( nextOffset >= fileSize ) return false;
if ( checkAbort && abortProc(abortArg) ) {
@@ -1721,7 +1738,6 @@ static QTErrorMode CheckAtomList ( XMP_IO* qtFile, XMP_Int64 spanSize, int nesti
if ( spanSize != 0 ) {
qtFile->Seek ( spanSize, kXMP_SeekFromCurrent ); // ! Skip the trailing garbage of this span.
status = kBadQT_SmallInner;
- if ( spanSize >= 8 ) status = kBadQT_LargeInner;
if ( nesting == 0 ) status += 2; // Convert to "outer".
}
@@ -1733,16 +1749,28 @@ static QTErrorMode CheckAtomList ( XMP_IO* qtFile, XMP_Int64 spanSize, int nesti
// AttemptFileRepair
// =================
-static void AttemptFileRepair ( XMP_IO* qtFile, XMP_Int64 fileSpace, QTErrorMode status )
+static void AttemptFileRepair ( XMP_IO* qtFile, XMP_Int64 fileSpace, QTErrorMode status, GenericErrorCallback * ec )
{
switch ( status ) {
case kBadQT_NoError : return; // Sanity check.
case kBadQT_SmallInner : return; // Fixed in normal update code for the 'udta' box.
- case kBadQT_LargeInner : XMP_Throw ( "Can't repair QuickTime file", kXMPErr_BadFileFormat );
- case kBadQT_SmallOuter : break; // Truncate file below.
- case kBadQT_LargeOuter : break; // Truncate file below.
- default : XMP_Throw ( "Invalid QuickTime error mode", kXMPErr_InternalFailure );
+ case kBadQT_LargeInner :
+ {
+ XMP_Error error ( kXMPErr_BadFileFormat,"Can't repair QuickTime file" );
+ XMPFileHandler::NotifyClient(ec, kXMPErrSev_FileFatal, error);
+ break;// will never be here
+ }
+ case kBadQT_SmallOuter : // Truncate file below.
+ case kBadQT_LargeOuter : // Truncate file below.
+ {
+ break;
+ }
+ default :
+ {
+ XMP_Error error ( kXMPErr_InternalFailure, "Invalid QuickTime error mode" );
+ XMPFileHandler::NotifyClient(ec, kXMPErrSev_FileFatal, error);
+ }
}
AtomInfo info;
@@ -1760,19 +1788,37 @@ static void AttemptFileRepair ( XMP_IO* qtFile, XMP_Int64 fileSpace, QTErrorMode
if ( info.hasLargeSize ) headerSize = 16;
if ( atomStatus != kBadQT_NoError ) break;
- if ( (info.atomSize < headerSize) || (info.atomSize > fileSpace) ) break;
+ // If the atom size is less than header -case of kBadQT_SmallOuter
+ // If the atom size is more than left filespace -case of kBadQT_LargeOuter
+ if ( (info.atomSize < headerSize) || (info.atomSize > fileSpace ) ) break;
XMP_Int64 dataSize = info.atomSize - headerSize;
qtFile->Seek ( dataSize, kXMP_SeekFromCurrent );
}
+ // Truncate only if the last box type was XMP boxes
+ // Refrain from truncating a known box as it
+ // might have some useful data which is incomplete
+ if ( fileSpace < 8 ||
+ ! ISOMedia::IsKnownBoxType ( info.atomType ) ||
+ ((info.atomType == ISOMedia::k_uuid) && IsXMPUUID(qtFile,info.atomSize-headerSize,true)) ||
+ (info.atomType == ISOMedia::k_XMP_)
+ ){
+
+ XMP_Error error ( kXMPErr_BadFileFormat,"Truncate outer EOF Garbage" );
+ XMPFileHandler::NotifyClient(ec, kXMPErrSev_Recoverable, error);
+ // Truncate the file. If fileSpace >= 8 then the loop exited early due to a bad atom, seek back
+ // to the atom's start. Otherwise, the loop exited because no more atoms are possible, no seek.
- // Truncate the file. If fileSpace >= 8 then the loop exited early due to a bad atom, seek back
- // to the atom's start. Otherwise, the loop exited because no more atoms are possible, no seek.
+ if ( fileSpace >= 8 ) qtFile->Seek ( -headerSize, kXMP_SeekFromCurrent );
+ XMP_Int64 currPos = qtFile->Offset();
+ qtFile->Truncate ( currPos );
+ }
+ else{
- if ( fileSpace >= 8 ) qtFile->Seek ( -headerSize, kXMP_SeekFromCurrent );
- XMP_Int64 currPos = qtFile->Offset();
- qtFile->Truncate ( currPos );
+ XMP_Error error ( kXMPErr_BadFileFormat,"Missing box Data at EOF" );
+ XMPFileHandler::NotifyClient(ec, kXMPErrSev_FileFatal, error);
+ }
} // AttemptFileRepair
@@ -1780,7 +1826,7 @@ static void AttemptFileRepair ( XMP_IO* qtFile, XMP_Int64 fileSpace, QTErrorMode
// CheckQTFileStructure
// ====================
-static void CheckQTFileStructure ( XMPFileHandler * thiz, bool doRepair )
+static void CheckQTFileStructure ( XMPFileHandler * thiz,bool doRepair, GenericErrorCallback * ec )
{
XMPFiles * parent = thiz->parent;
XMP_IO* fileRef = parent->ioRef;
@@ -1793,13 +1839,13 @@ static void CheckQTFileStructure ( XMPFileHandler * thiz, bool doRepair )
if ( status != kBadQT_NoError ) {
if ( doRepair || (status == kBadQT_SmallInner) || (status == kBadQT_SmallOuter) ) {
- AttemptFileRepair ( fileRef, fileSize, status ); // Will throw if the attempt fails.
+ AttemptFileRepair ( fileRef, fileSize, status,ec ); // Will throw if the attempt fails.
} else if ( status != kBadQT_SmallInner ) {
- XMP_Throw ( "Ill-formed QuickTime file", kXMPErr_BadFileFormat );
- } else {
- return; // ! Ignore these, QT seems to be able to handle them.
- // *** Might want to throw for check-only, ignore when repairing.
- }
+ //don't truncate Large Outer EOF garbage unless the client wants it to
+ // Clients can pass their intent by setting the flag kXMPFiles_OpenRepairFile
+ XMP_Error error ( kXMPErr_BadFileFormat,"Ill-formed QuickTime file" );
+ XMPFileHandler::NotifyClient(ec, kXMPErrSev_FileFatal, error);
+ }
}
} // CheckQTFileStructure;
@@ -1946,7 +1992,7 @@ typedef std::vector<SpaceInfo> FreeSpaceList;
static void CreateFreeSpaceList ( XMP_IO* fileRef, XMP_Uns64 fileSize,
XMP_Uns64 oldOffset, XMP_Uns32 oldSize, FreeSpaceList * spaceList )
{
- XMP_Uns64 boxPos, boxNext, adjacentFree;
+ XMP_Uns64 boxPos=0, boxNext=0, adjacentFree=0;
ISOMedia::BoxInfo currBox;
fileRef->Rewind();
@@ -2002,8 +2048,8 @@ void MPEG4_MetaHandler::CacheFileData()
const bool isUpdate = XMP_OptionIsSet ( openFlags, kXMPFiles_OpenForUpdate );
const bool doRepair = XMP_OptionIsSet ( openFlags, kXMPFiles_OpenRepairFile );
- if ( isUpdate && (parent->format == kXMP_MOVFile) ) {
- CheckQTFileStructure ( this, doRepair ); // Will throw for failure.
+ if ( isUpdate ) {
+ CheckQTFileStructure ( this, doRepair, &parent->errorCallback ); // Will throw for failure.
}
// Cache the top level 'moov' and 'uuid'/XMP boxes.
@@ -2045,13 +2091,7 @@ void MPEG4_MetaHandler::CacheFileData()
moovFound = true;
if ( uuidFound ) break; // Exit the loop when both are found.
- } else if ( (! uuidFound) && (currBox.boxType == ISOMedia::k_uuid) ) {
-
- if ( currBox.contentSize < 16 ) continue;
-
- XMP_Uns8 uuid [16];
- fileRef->ReadAll ( uuid, 16 );
- if ( memcmp ( uuid, ISOMedia::k_xmpUUID, 16 ) != 0 ) continue; // Check for the XMP GUID.
+ } else if ( (! uuidFound) && (currBox.boxType == ISOMedia::k_uuid) && IsXMPUUID(fileRef,currBox.contentSize) ) {
XMP_Uns64 fullUuidSize = currBox.headerSize + currBox.contentSize;
if ( fullUuidSize > moovBoxSizeLimit ) { // From here on we know 32-bit offsets are safe.
@@ -2073,7 +2113,10 @@ void MPEG4_MetaHandler::CacheFileData()
}
- if ( (! moovFound) && (! moovIgnored) ) XMP_Throw ( "No 'moov' box", kXMPErr_BadFileFormat );
+ if ( (! moovFound) && (! moovIgnored) ){
+ XMP_Error error ( kXMPErr_BadFileFormat,"No 'moov' box" );
+ XMPFileHandler::NotifyClient(&parent->errorCallback, kXMPErrSev_FileFatal, error);
+ }
} // MPEG4_MetaHandler::CacheFileData
@@ -2110,7 +2153,10 @@ void MPEG4_MetaHandler::ProcessXMP()
// Parse the cached 'moov' subtree, parse the preferred XMP.
- if ( this->moovMgr.fullSubtree.empty() ) XMP_Throw ( "No 'moov' box", kXMPErr_BadFileFormat );
+ if ( this->moovMgr.fullSubtree.empty() ) {
+ XMP_Error error ( kXMPErr_BadFileFormat,"No 'moov' box" );
+ XMPFileHandler::NotifyClient(&parent->errorCallback, kXMPErrSev_FileFatal, error);
+ }
this->moovMgr.ParseMemoryTree ( this->fileMode );
if ( (this->xmpBoxPos == 0) || (! haveISOFile) ) {
@@ -2168,6 +2214,7 @@ void MPEG4_MetaHandler::ProcessXMP()
if ( mvhdFound ) this->containsXMP |= ImportMVHDItems ( mvhdInfo, &this->xmpObj );
if ( cprtFound ) this->containsXMP |= ImportISOCopyrights ( cprtBoxes, &this->xmpObj );
+ if ( tmcdFound ) this->containsXMP |= ImportTimecodeItems ( this->tmcdInfo, this->tradQTMgr, &this->xmpObj );
} else { // This is a QuickTime file, either traditional or modern.
if ( mvhdFound ) this->containsXMP |= ImportMVHDItems ( mvhdInfo, &this->xmpObj );
@@ -2251,11 +2298,16 @@ bool MPEG4_MetaHandler::ParseTimecodeTrack()
XMP_Uns32 stsdEntryFormat = GetUns32BE ( &stsdRawEntry->format );
if ( stsdEntryFormat != ISOMedia::k_tmcd ) return false;
+ // If frame duration is zero it means tmcd sample is invalid
+ if(GetUns32BE(&stsdRawEntry->frameDuration)==0)
+ return false;
+
this->tmcdInfo.timeScale = GetUns32BE ( &stsdRawEntry->timeScale );
this->tmcdInfo.frameDuration = GetUns32BE ( &stsdRawEntry->frameDuration );
double floatCount = (double)this->tmcdInfo.timeScale / (double)this->tmcdInfo.frameDuration;
XMP_Uns8 expectedCount = (XMP_Uns8) (floatCount + 0.5);
+ if( expectedCount == 0 ) return false;
if ( expectedCount != stsdRawEntry->frameCount ) {
double countRatio = (double)stsdRawEntry->frameCount / (double)expectedCount;
this->tmcdInfo.timeScale = (XMP_Uns32) (((double)this->tmcdInfo.timeScale * countRatio) + 0.5);
@@ -2541,6 +2593,305 @@ void MPEG4_MetaHandler::UpdateTopLevelBox ( XMP_Uns64 oldOffset, XMP_Uns32 oldSi
} // MPEG4_MetaHandler::UpdateTopLevelBox
// =================================================================================================
+// AdjustOffset
+// ============
+//
+// A utility for OptimizeFileLayout, adjusts a 'stco' or 'co64' table entry for the new layout. The
+// map is keyed by the original box's last content offset, so that map.lower_bound does what we want.
+
+struct LayoutInfo {
+ XMP_Uns32 boxType;
+ XMP_Uns64 boxSize; // The full size, including the header.
+ XMP_Uns64 oldOffset, newOffset;
+ LayoutInfo() : boxType(0), boxSize(0), oldOffset(0), newOffset(0) {};
+ LayoutInfo ( XMP_Uns32 type, XMP_Uns64 size, XMP_Uns64 offset )
+ : boxType(type), boxSize(size), oldOffset(offset), newOffset(0) {};
+};
+
+typedef std::vector < LayoutInfo > LayoutVector;
+typedef std::map < XMP_Uns64, LayoutInfo* > LayoutMap;
+
+static XMP_Uns64 AdjustOffset ( XMP_Uns64 oldOffset, const LayoutMap & newMap , GenericErrorCallback * ec)
+{
+
+ LayoutMap::const_iterator mapEntry = newMap.lower_bound ( oldOffset );
+ if ( (mapEntry == newMap.end()) || (oldOffset < mapEntry->second->oldOffset) ) {
+ XMP_Error error ( kXMPErr_BadFileFormat,"Offset from 'stco' or 'co64' is not into kept box" );
+ XMPFileHandler::NotifyClient(ec, kXMPErrSev_FileFatal, error);
+ }
+
+ XMP_Assert ( (mapEntry->second->oldOffset <= oldOffset) &&
+ (oldOffset <= (mapEntry->second->oldOffset + mapEntry->second->boxSize)) );
+
+ return mapEntry->second->newOffset + (oldOffset - mapEntry->second->oldOffset);
+
+} // AdjustOffset
+
+// =================================================================================================
+// MPEG4_MetaHandler::OptimizeFileLayout
+// =====================================
+//
+// Make sure the file is acceptable for streaming use: the 'moov' and XMP 'uuid' boxes must be
+// before any 'mdat' box, other top level boxes after 'mdat' are accepted. If the file needs
+// optimization, it is fully rewritten in this order: 'ftyp' (if ISO), 'moov', XMP 'uuid', other
+// non-'mdat', all 'mdat' boxes. Top level 'free' and 'skip' boxes will be removed. Offsets in the
+// 'stco' and 'co64' boxes will be adjusted.
+
+void MPEG4_MetaHandler::OptimizeFileLayout()
+{
+ XMP_IO* originalFile = this->parent->ioRef;
+ XMP_Uns64 originalSize = originalFile->Length();
+
+ XMP_AbortProc abortProc = parent->abortProc;
+ void * abortArg = parent->abortArg;
+ const bool checkAbort = (abortProc != 0);
+
+ XMP_Uns64 currPos, nextPos;
+ ISOMedia::BoxInfo currBox;
+
+ size_t boxCount = 0;
+ size_t moovIndex = 0, xmpIndex = 0;
+
+ // Go through the top level boxes to see if the file layout needs to be optimized. Look until
+ // we find both the 'moov' and XMP 'uuid' boxes, saving their relative index in the file.
+
+ bool needsOptimization = false;
+ bool moovFound = false, xmpFound = false, mdatFound = false;
+
+ for ( currPos = 0; currPos < originalSize; currPos = nextPos ) {
+
+ nextPos = ISOMedia::GetBoxInfo ( originalFile, currPos, originalSize, &currBox );
+ if ( (currBox.boxType == ISOMedia::k_free) ||
+ (currBox.boxType == ISOMedia::k_skip) ||
+ (currBox.boxType == ISOMedia::k_wide) ) continue;
+
+ ++boxCount; // ! Must be counted for all, continue statements below skip an end of loop increment.
+
+ if ( currBox.boxType == ISOMedia::k_mdat ) {
+
+ mdatFound = true;
+ XMP_Assert ( (! moovFound) | (! xmpFound) ); // The other cases should be exiting.
+
+ } else if ( currBox.boxType == ISOMedia::k_moov ) {
+
+ moovFound = true;
+ moovIndex = boxCount-1; // Need later for optimization.
+ needsOptimization = mdatFound;
+ if ( xmpFound ) break; // Don't need to look further.
+
+ } else if ( currBox.boxType == ISOMedia::k_uuid && IsXMPUUID(originalFile,currBox.contentSize) ) {
+
+ xmpFound = true;
+ xmpIndex = boxCount-1; // Need later for optimization.
+ needsOptimization = mdatFound;
+ if ( moovFound ) break; // Don't need to look further.
+
+ }
+
+ }
+
+ if ( ! needsOptimization ) return;
+
+ // The file needs to be optimized. Make sure that a file over 4 GB has 'co64', not 'stco' boxes.
+ // These are needed to hold 64-bit offsets. We don't go to the effort of changing from 'stco'
+ // to 'co64', the file needs to be OK from the start. (Yes, this eliminates a marginal case of
+ // a file growing beyond 4 GB due to metadata growth.)
+
+ if ( originalSize >= 0xFFFFFFFF ) {
+
+ MOOV_Manager::BoxRef moovRef, trakRef, tempRef, stcoRef;
+ MOOV_Manager::BoxInfo boxInfo;
+
+ moovRef = this->moovMgr.GetBox ( "moov", &boxInfo );
+ XMP_Enforce ( moovRef != 0 );
+
+ for ( size_t i = 0, limit = boxInfo.childCount; i < limit; ++i ) {
+
+ trakRef = this->moovMgr.GetNthChild ( moovRef, i, &boxInfo );
+ if ( boxInfo.boxType != ISOMedia::k_trak ) continue;
+
+ tempRef = this->moovMgr.GetTypeChild ( trakRef, ISOMedia::k_mdia, 0 );
+ if ( tempRef == 0 ) continue;
+ tempRef = this->moovMgr.GetTypeChild ( tempRef, ISOMedia::k_minf, 0 );
+ if ( tempRef == 0 ) continue;
+ tempRef = this->moovMgr.GetTypeChild ( tempRef, ISOMedia::k_stbl, 0 );
+ if ( tempRef == 0 ) continue;
+
+ stcoRef = this->moovMgr.GetTypeChild ( tempRef, ISOMedia::k_stco, 0 );
+ if ( stcoRef != 0 ) {
+ XMP_Error error ( kXMPErr_BadFileFormat,"Large MPEG-4 file must use 'co64' boxes" );
+ XMPFileHandler::NotifyClient(&parent->errorCallback, kXMPErrSev_FileFatal, error);
+ }
+
+ }
+
+ }
+
+ // Build a vector of info for the top level boxes, ignoring 'free', 'skip', and 'wide' boxes.
+ // Then determine the new offsets and create a map keyed by the new offset.
+
+ // ! The box indices saved in the prior loop must match those in the vector built here!
+
+ LayoutVector fileBoxes;
+ LayoutMap optLayout;
+
+ for ( currPos = 0; currPos < originalSize; currPos = nextPos ) {
+ nextPos = ISOMedia::GetBoxInfo ( originalFile, currPos, originalSize, &currBox );
+ if ( (currBox.boxType == ISOMedia::k_free) ||
+ (currBox.boxType == ISOMedia::k_skip) ||
+ (currBox.boxType == ISOMedia::k_wide) ) continue;
+ --boxCount; // For sanity check below.
+ fileBoxes.push_back ( LayoutInfo ( currBox.boxType, (currBox.headerSize + currBox.contentSize), currPos ) );
+ }
+
+ XMP_Assert ( boxCount == 0 ); // Must get the same count in both loops.
+ XMP_Assert ( fileBoxes.size() >= 2 ); // At least 'mdat', and 'moov' or XMP 'uuid'.
+ XMP_Assert ( (!moovFound) || (fileBoxes[moovIndex].boxType == ISOMedia::k_moov) );
+ XMP_Assert ( (!xmpFound) || (fileBoxes[xmpIndex].boxType == ISOMedia::k_uuid) );
+
+ size_t currIndex = 0, limit = fileBoxes.size();
+ XMP_Uns64 newSize = 0;
+
+ if ( fileBoxes[0].boxType == ISOMedia::k_ftyp ) {
+ optLayout.insert ( optLayout.end(), LayoutMap::value_type ( 0, &fileBoxes[0] ) );
+ newSize = fileBoxes[0].boxSize;
+ currIndex = 1; // Keep the 'ftyp' box in front.
+ }
+
+ if ( moovFound ) {
+ optLayout.insert ( optLayout.end(), LayoutMap::value_type ( newSize, &fileBoxes[moovIndex] ) );
+ fileBoxes[moovIndex].newOffset = newSize;
+ newSize += fileBoxes[moovIndex].boxSize;
+ }
+
+ if ( xmpFound ) {
+ optLayout.insert ( optLayout.end(), LayoutMap::value_type ( newSize, &fileBoxes[xmpIndex] ) );
+ fileBoxes[xmpIndex].newOffset = newSize;
+ newSize += fileBoxes[xmpIndex].boxSize;
+ }
+
+ for ( ; currIndex < limit; ++currIndex ) { // Add all of the other non-'mdat' boxes to the map.
+ if ( moovFound && (currIndex == moovIndex) ) continue;
+ if ( xmpFound && (currIndex == xmpIndex) ) continue;
+ if ( fileBoxes[currIndex].boxType == ISOMedia::k_mdat ) continue;
+ optLayout.insert ( optLayout.end(), LayoutMap::value_type ( newSize, &fileBoxes[currIndex] ) );
+ fileBoxes[currIndex].newOffset = newSize;
+ newSize += fileBoxes[currIndex].boxSize;
+ }
+
+ for ( currIndex = 0; currIndex < limit; ++currIndex ) { // Add all of the 'mdat' boxes to the map.
+ if ( fileBoxes[currIndex].boxType != ISOMedia::k_mdat ) continue;
+ optLayout.insert ( optLayout.end(), LayoutMap::value_type ( newSize, &fileBoxes[currIndex] ) );
+ fileBoxes[currIndex].newOffset = newSize;
+ newSize += fileBoxes[currIndex].boxSize;
+ }
+
+ // Adjust the progress tracking if necessary.
+
+ XMP_ProgressTracker * progressTracker = this->parent->progressTracker;
+ if ( progressTracker != 0 ) {
+ XMP_Assert ( progressTracker->WorkInProgress() );
+ progressTracker->AddTotalWork ( (float) newSize );
+ }
+
+ // Create a temp file for the optimized layout, write it, update the offset tables.
+
+ XMP_IO* tempFile = originalFile->DeriveTemp();
+ XMP_Enforce ( tempFile != 0 );
+
+ // Iterate the map and write the new layout.
+
+ LayoutMap::iterator layoutPos = optLayout.begin();
+ LayoutMap::iterator layoutEnd = optLayout.end();
+
+ for ( ; layoutPos != layoutEnd; ++layoutPos ) {
+ LayoutInfo * currBox = layoutPos->second;
+ XMP_Assert ( (XMP_Int64)currBox->newOffset == tempFile->Length() );
+ originalFile->Seek ( currBox->oldOffset, kXMP_SeekFromStart );
+ XIO::Copy ( originalFile, tempFile, currBox->boxSize, abortProc, abortArg );
+ }
+
+ // Update the offset tables in the temp file. Create a layout map ordered by the last actual
+ // offset of the old box's content to enable fast lookup within AdjustOffset.
+
+ LayoutMap oldEndMap;
+ for ( size_t i = 0, limit = fileBoxes.size(); i < limit; ++i ) {
+ XMP_Uns64 oldEnd = fileBoxes[i].oldOffset + fileBoxes[i].boxSize - 1; // ! Want the last actual offset!
+ oldEndMap.insert ( oldEndMap.end(), LayoutMap::value_type ( oldEnd, &fileBoxes[i] ) );
+ }
+
+ MOOV_Manager::BoxRef moovRef, trakRef, tempRef, stcoRef, co64Ref;
+ MOOV_Manager::BoxInfo boxInfo;
+
+ moovRef = this->moovMgr.GetBox ( "moov", &boxInfo );
+ XMP_Enforce ( moovRef != 0 );
+
+ for ( size_t i = 0, limit = boxInfo.childCount; i < limit; ++i ) {
+
+ trakRef = this->moovMgr.GetNthChild ( moovRef, i, &boxInfo );
+ if ( boxInfo.boxType != ISOMedia::k_trak ) continue;
+
+ tempRef = this->moovMgr.GetTypeChild ( trakRef, ISOMedia::k_mdia, 0 );
+ if ( tempRef == 0 ) continue;
+ tempRef = this->moovMgr.GetTypeChild ( tempRef, ISOMedia::k_minf, 0 );
+ if ( tempRef == 0 ) continue;
+ tempRef = this->moovMgr.GetTypeChild ( tempRef, ISOMedia::k_stbl, 0 );
+ if ( tempRef == 0 ) continue;
+
+ co64Ref = 0;
+ XMP_Uns32 entrySize = 4;
+ stcoRef = this->moovMgr.GetTypeChild ( tempRef, ISOMedia::k_stco, &boxInfo );
+ if ( stcoRef == 0 ) {
+ co64Ref = this->moovMgr.GetTypeChild ( tempRef, ISOMedia::k_co64, &boxInfo );
+ if ( co64Ref == 0 ) continue;
+ entrySize = 8;
+ }
+
+ XMP_Uns32 offsetCount = GetUns32BE ( boxInfo.content + 4 );
+ if ( boxInfo.contentSize < (4+4 + entrySize*offsetCount) ) {
+ XMP_Error error ( kXMPErr_BadFileFormat, "Bad 'stco' size or count" );
+ XMPFileHandler::NotifyClient(&parent->errorCallback, kXMPErrSev_FileFatal, error);
+ }
+
+ if ( stcoRef != 0 ) {
+
+ XMP_Uns64 stcoTableOffset = fileBoxes[moovIndex].newOffset +
+ (XMP_Uns64) this->moovMgr.GetParsedOffset ( stcoRef ) +
+ (XMP_Uns64) this->moovMgr.GetHeaderSize ( stcoRef ) + 4+4;
+ tempFile->Seek ( stcoTableOffset, kXMP_SeekFromStart );
+
+ XMP_Uns32 * rawOldU32 = (XMP_Uns32*) (boxInfo.content + 4+4);
+ for ( XMP_Uns32 i = 0; i < offsetCount; ++i, ++rawOldU32 ) {
+ XMP_Uns64 newOffset = AdjustOffset ( (XMP_Uns64)GetUns32BE(rawOldU32), oldEndMap,&parent->errorCallback );
+ XMP_Uns32 u32 = MakeUns32BE ( (XMP_Uns32)newOffset );
+ tempFile->Write ( &u32, 4 );
+ }
+
+ } else {
+
+ XMP_Uns64 co64TableOffset = fileBoxes[moovIndex].newOffset +
+ (XMP_Uns64) this->moovMgr.GetParsedOffset ( co64Ref ) +
+ (XMP_Uns64) this->moovMgr.GetHeaderSize ( co64Ref ) + 4+4;
+ tempFile->Seek ( co64TableOffset, kXMP_SeekFromStart );
+
+ XMP_Uns64 * rawOldU64 = (XMP_Uns64*) (boxInfo.content + 4+4);
+ for ( XMP_Uns32 i = 0; i < offsetCount; ++i, ++rawOldU64 ) {
+ XMP_Uns64 newOffset = AdjustOffset ( GetUns64BE(rawOldU64), oldEndMap,&parent->errorCallback );
+ XMP_Uns64 u64 = MakeUns64BE ( newOffset );
+ tempFile->Write ( &u64, 8 );
+ }
+
+ }
+
+ }
+
+ // Swap the temp and original files.
+
+ originalFile->AbsorbTemp();
+
+} // MPEG4_MetaHandler::OptimizeFileLayout
+
+// =================================================================================================
// MPEG4_MetaHandler::UpdateFile
// =============================
//
@@ -2553,7 +2904,15 @@ void MPEG4_MetaHandler::UpdateTopLevelBox ( XMP_Uns64 oldOffset, XMP_Uns32 oldSi
void MPEG4_MetaHandler::UpdateFile ( bool doSafeUpdate )
{
+
+ bool optimizeFileLayout = false;
+ if ( this->parent)
+ {
+ optimizeFileLayout = XMP_OptionIsSet ( this->parent->openFlags, kXMPFiles_OptimizeFileLayout );
+ }
+
if ( ! this->needsUpdate ) { // If needsUpdate is set then at least the XMP changed.
+ if ( optimizeFileLayout ) this->OptimizeFileLayout();
return;
}
@@ -2660,6 +3019,9 @@ void MPEG4_MetaHandler::UpdateFile ( bool doSafeUpdate )
}
+ // Finally, optimize the file layout if asked.
+ if ( optimizeFileLayout ) this->OptimizeFileLayout();
+
if ( localProgressTracking ) progressTracker->WorkComplete();
} // MPEG4_MetaHandler::UpdateFile
@@ -2698,4 +3060,4 @@ void MPEG4_MetaHandler::WriteTempFile ( XMP_IO* tempRef )
} // MPEG4_MetaHandler::WriteTempFile
-// =================================================================================================
+// ================================================================================================= \ No newline at end of file
diff --git a/XMPFiles/source/FileHandlers/MPEG4_Handler.hpp b/XMPFiles/source/FileHandlers/MPEG4_Handler.hpp
index 49c749f..9ad06bb 100644
--- a/XMPFiles/source/FileHandlers/MPEG4_Handler.hpp
+++ b/XMPFiles/source/FileHandlers/MPEG4_Handler.hpp
@@ -78,6 +78,8 @@ private:
void UpdateTopLevelBox ( XMP_Uns64 oldOffset, XMP_Uns32 oldSize, const XMP_Uns8 * newBox, XMP_Uns32 newSize );
+ void OptimizeFileLayout();
+
XMP_Uns8 fileMode;
bool havePreferredXMP;
XMP_Uns64 xmpBoxPos; // The file offset of the XMP box (the size field, not the content).
diff --git a/XMPFiles/source/FileHandlers/P2_Handler.cpp b/XMPFiles/source/FileHandlers/P2_Handler.cpp
index 8e692e9..4a2e508 100644
--- a/XMPFiles/source/FileHandlers/P2_Handler.cpp
+++ b/XMPFiles/source/FileHandlers/P2_Handler.cpp
@@ -18,10 +18,11 @@
#include "source/IOUtils.hpp"
#include "XMPFiles/source/FileHandlers/P2_Handler.hpp"
+#include "XMPFiles/source/FormatSupport/P2_Support.hpp"
#include "XMPFiles/source/FormatSupport/PackageFormat_Support.hpp"
-#include "third-party/zuid/interfaces/MD5.h"
#include <cmath>
+#include <sstream>
using namespace std;
@@ -263,7 +264,7 @@ XMPFileHandler * P2_MetaHandlerCTor ( XMPFiles * parent )
// P2_MetaHandler::P2_MetaHandler
// ==============================
-P2_MetaHandler::P2_MetaHandler ( XMPFiles * _parent ) : expat(0), clipMetadata(0), clipContent(0)
+P2_MetaHandler::P2_MetaHandler ( XMPFiles * _parent )
{
this->parent = _parent; // Inherited, can't set in the prefix.
@@ -283,6 +284,30 @@ P2_MetaHandler::P2_MetaHandler ( XMPFiles * _parent ) : expat(0), clipMetadata(0
XIO::SplitLeafName ( &this->rootPath, &this->clipName );
+ std::string xmlPath;
+ if ( this->MakeClipFilePath ( &xmlPath, ".XML", true ) )
+ {
+ try
+ {
+
+ p2ClipManager.ProcessClip(xmlPath);
+ std::string* clipnm = p2ClipManager.GetManagedClip()->GetClipName();
+ if ( clipnm !=0 )
+ {
+ std::string newpath,leafname;
+ newpath = p2ClipManager.GetManagedClip()->GetXMPFilePath();
+ XIO::SplitLeafName(&newpath,&leafname);
+ if ( leafname == std::string(*clipnm+ ".XMP") )
+ {
+ this->clipName=*clipnm;
+ }
+ }
+ }
+ catch(...)
+ {
+ }
+ }
+
} // P2_MetaHandler::P2_MetaHandler
// =================================================================================================
@@ -292,7 +317,6 @@ P2_MetaHandler::P2_MetaHandler ( XMPFiles * _parent ) : expat(0), clipMetadata(0
P2_MetaHandler::~P2_MetaHandler()
{
- this->CleanupLegacyXML();
if ( this->parent->tempPtr != 0 ) {
free ( this->parent->tempPtr );
this->parent->tempPtr = 0;
@@ -314,79 +338,36 @@ bool P2_MetaHandler::MakeClipFilePath ( std::string * path, XMP_StringPtr suffix
} // P2_MetaHandler::MakeClipFilePath
-// =================================================================================================
-// P2_MetaHandler::CleanupLegacyXML
-// ================================
-
-void P2_MetaHandler::CleanupLegacyXML()
-{
- if ( this->expat != 0 ) { delete ( this->expat ); this->expat = 0; }
-
- clipMetadata = 0; // ! Was a pointer into the expat tree.
- clipContent = 0; // ! Was a pointer into the expat tree.
-
-} // P2_MetaHandler::CleanupLegacyXML
// =================================================================================================
-// P2_MetaHandler::DigestLegacyItem
-// ================================
-
-void P2_MetaHandler::DigestLegacyItem ( MD5_CTX & md5Context, XML_NodePtr legacyContext, XMP_StringPtr legacyPropName )
-{
- XML_NodePtr legacyProp = legacyContext->GetNamedElement ( this->p2NS.c_str(), legacyPropName );
-
- if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() && (! legacyProp->content.empty()) ) {
- const XML_Node * xmlValue = legacyProp->content[0];
- MD5Update ( &md5Context, (XMP_Uns8*)xmlValue->value.c_str(), (unsigned int)xmlValue->value.size() );
- }
-
-} // P2_MetaHandler::DigestLegacyItem
-
-// =================================================================================================
-// P2_MetaHandler::DigestLegacyRelations
-// =====================================
+// P2_MetaHandler::SetXMPPropertyFromLegacyXML
+// ===========================================
-void P2_MetaHandler::DigestLegacyRelations ( MD5_CTX & md5Context )
+void P2_MetaHandler::SetXMPPropertyFromLegacyXML ( bool digestFound,
+ XMP_VarString* refContext,
+ XMP_StringPtr schemaNS,
+ XMP_StringPtr propName,
+ bool isLocalized )
{
- XMP_StringPtr p2NS = this->p2NS.c_str();
- XML_Node * legacyContext = this->clipContent->GetNamedElement ( p2NS, "Relation" );
- if ( legacyContext != 0 ) {
-
- this->DigestLegacyItem ( md5Context, legacyContext, "GlobalShotID" );
- XML_Node * legacyConnectionContext = legacyContext = this->clipContent->GetNamedElement ( p2NS, "Connection" );
-
- if ( legacyConnectionContext != 0 ) {
-
- legacyContext = legacyConnectionContext->GetNamedElement ( p2NS, "Top" );
-
- if ( legacyContext != 0 ) {
- this->DigestLegacyItem ( md5Context, legacyContext, "GlobalClipID" );
- }
-
- legacyContext = legacyConnectionContext->GetNamedElement ( p2NS, "Previous" );
-
- if ( legacyContext != 0 ) {
- this->DigestLegacyItem ( md5Context, legacyContext, "GlobalClipID" );
- }
-
- legacyContext = legacyConnectionContext->GetNamedElement ( p2NS, "Next" );
+ if ( digestFound || (! this->xmpObj.DoesPropertyExist ( schemaNS, propName )) ) {
- if ( legacyContext != 0 ) {
- this->DigestLegacyItem ( md5Context, legacyContext, "GlobalClipID" );
+ if ( refContext !=0 )
+ {
+ if ( isLocalized ) {
+ this->xmpObj.SetLocalizedText ( schemaNS, propName, "", "x-default", refContext->c_str(), kXMP_DeleteExisting );
+ } else {
+ this->xmpObj.SetProperty ( schemaNS, propName, refContext->c_str(), kXMP_DeleteExisting );
}
-
+ this->containsXMP = true;
}
-
}
-
-} // P2_MetaHandler::DigestLegacyRelations
+} // P2_MetaHandler::SetXMPPropertyFromLegacyXML
// =================================================================================================
// P2_MetaHandler::SetXMPPropertyFromLegacyXML
// ===========================================
-
void P2_MetaHandler::SetXMPPropertyFromLegacyXML ( bool digestFound,
XML_NodePtr legacyContext,
XMP_StringPtr schemaNS,
@@ -394,89 +375,58 @@ void P2_MetaHandler::SetXMPPropertyFromLegacyXML ( bool digestFound,
XMP_StringPtr legacyPropName,
bool isLocalized )
{
+ XMP_StringPtr p2NS = this->p2ClipManager.GetManagedClip()->GetP2RootNode()->ns.c_str();
+ XML_NodePtr legacyProp = legacyContext->GetNamedElement ( p2NS, legacyPropName );
- if ( digestFound || (! this->xmpObj.DoesPropertyExist ( schemaNS, propName )) ) {
-
- XMP_StringPtr p2NS = this->p2NS.c_str();
- XML_NodePtr legacyProp = legacyContext->GetNamedElement ( p2NS, legacyPropName );
+ if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() ) {
+ XMP_StringPtr legacyValue = legacyProp->GetLeafContentValue();
- if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() ) {
+ if ( ( legacyValue != 0 ) &&
+ ( ( *legacyValue != 0 ) || (! this->xmpObj.DoesPropertyExist ( schemaNS, propName )) )) {
if ( isLocalized ) {
- this->xmpObj.SetLocalizedText ( schemaNS, propName, "", "x-default", legacyProp->GetLeafContentValue(), kXMP_DeleteExisting );
+ this->xmpObj.SetLocalizedText ( schemaNS, propName, "", "x-default", legacyValue, kXMP_DeleteExisting );
} else {
- this->xmpObj.SetProperty ( schemaNS, propName, legacyProp->GetLeafContentValue(), kXMP_DeleteExisting );
+ this->xmpObj.SetProperty ( schemaNS, propName, legacyValue, kXMP_DeleteExisting );
}
this->containsXMP = true;
}
-
}
-} // P2_MetaHandler::SetXMPPropertyFromLegacyXML
-
+}
// =================================================================================================
// P2_MetaHandler::SetRelationsFromLegacyXML
// =========================================
void P2_MetaHandler::SetRelationsFromLegacyXML ( bool digestFound )
{
- XMP_StringPtr p2NS = this->p2NS.c_str();
- XML_NodePtr legacyRelationContext = this->clipContent->GetNamedElement ( p2NS, "Relation" );
-
- // P2 Relation blocks are optional -- they're only present when a clip is part of a multi-clip shot.
- if ( legacyRelationContext != 0 ) {
+ P2_Clip* p2Clip=this->p2ClipManager.GetManagedClip();
- if ( digestFound || (! this->xmpObj.DoesPropertyExist ( kXMP_NS_DC, "relation" )) ) {
-
- XML_NodePtr legacyProp = legacyRelationContext->GetNamedElement ( p2NS, "GlobalShotID" );
- std::string relationString;
-
- if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() ) {
+ if ( digestFound || (! this->xmpObj.DoesPropertyExist ( kXMP_NS_DC, "relation" )) ) {
+
+ XMP_VarString* globalShotId = p2Clip->GetShotId() ;
+ std::string relationString ;
+ if ( ( globalShotId != 0 ) ) {
- this->xmpObj.DeleteProperty ( kXMP_NS_DC, "relation" );
- relationString = std::string("globalShotID:") + legacyProp->GetLeafContentValue();
+ this->xmpObj.DeleteProperty ( kXMP_NS_DC, "relation" );
+ relationString = std::string("globalShotID:") + *globalShotId ;
+ this->xmpObj.AppendArrayItem ( kXMP_NS_DC, "relation", kXMP_PropArrayIsUnordered, relationString );
+ this->containsXMP = true;
+
+ XMP_VarString* topId = p2Clip->GetTopClipId() ;
+ if ( topId != 0 ) {
+ relationString = std::string("topGlobalClipID:") + *topId ;
+ this->xmpObj.AppendArrayItem ( kXMP_NS_DC, "relation", kXMP_PropArrayIsUnordered, relationString );
+ }
+ XMP_VarString* prevId = p2Clip->GetPreviousClipId() ;
+ if ( prevId != 0 ) {
+ relationString = std::string("previousGlobalClipID:") + *prevId ;
+ this->xmpObj.AppendArrayItem ( kXMP_NS_DC, "relation", kXMP_PropArrayIsUnordered, relationString );
+ }
+ XMP_VarString* nextId = p2Clip->GetNextClipId() ;
+ if ( nextId != 0 ) {
+ relationString = std::string("nextGlobalClipID:") + *nextId ;
this->xmpObj.AppendArrayItem ( kXMP_NS_DC, "relation", kXMP_PropArrayIsUnordered, relationString );
- this->containsXMP = true;
-
- XML_NodePtr legacyConnectionContext = legacyRelationContext->GetNamedElement ( p2NS, "Connection" );
-
- if ( legacyConnectionContext != 0 ) {
-
- XML_NodePtr legacyContext = legacyConnectionContext->GetNamedElement ( p2NS, "Top" );
-
- if ( legacyContext != 0 ) {
- legacyProp = legacyContext->GetNamedElement ( p2NS, "GlobalClipID" );
-
- if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() ) {
- relationString = std::string("topGlobalClipID:") + legacyProp->GetLeafContentValue();
- this->xmpObj.AppendArrayItem ( kXMP_NS_DC, "relation", kXMP_PropArrayIsUnordered, relationString );
- }
- }
-
- legacyContext = legacyConnectionContext->GetNamedElement ( p2NS, "Previous" );
-
- if ( legacyContext != 0 ) {
- legacyProp = legacyContext->GetNamedElement ( p2NS, "GlobalClipID" );
-
- if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() ) {
- relationString = std::string("previousGlobalClipID:") + legacyProp->GetLeafContentValue();
- this->xmpObj.AppendArrayItem ( kXMP_NS_DC, "relation", kXMP_PropArrayIsUnordered, relationString );
- }
- }
-
- legacyContext = legacyConnectionContext->GetNamedElement ( p2NS, "Next" );
-
- if ( legacyContext != 0 ) {
- legacyProp = legacyContext->GetNamedElement ( p2NS, "GlobalClipID" );
-
- if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() ) {
- relationString = std::string("nextGlobalClipID:") + legacyProp->GetLeafContentValue();
- this->xmpObj.AppendArrayItem ( kXMP_NS_DC, "relation", kXMP_PropArrayIsUnordered, relationString );
- }
- }
-
- }
-
}
}
@@ -491,8 +441,9 @@ void P2_MetaHandler::SetRelationsFromLegacyXML ( bool digestFound )
void P2_MetaHandler::SetAudioInfoFromLegacyXML ( bool digestFound )
{
- XMP_StringPtr p2NS = this->p2NS.c_str();
- XML_NodePtr legacyAudioContext = this->clipContent->GetNamedElement ( p2NS, "EssenceList" );
+ P2_Clip* p2Clip = this->p2ClipManager.GetManagedClip() ;
+ XMP_StringPtr p2NS = p2Clip->GetP2RootNode()->ns.c_str();
+ XML_NodePtr legacyAudioContext = p2Clip->GetEssenceListNode();
if ( legacyAudioContext != 0 ) {
@@ -537,8 +488,9 @@ void P2_MetaHandler::SetAudioInfoFromLegacyXML ( bool digestFound )
void P2_MetaHandler::SetVideoInfoFromLegacyXML ( bool digestFound )
{
- XMP_StringPtr p2NS = this->p2NS.c_str();
- XML_NodePtr legacyVideoContext = this->clipContent->GetNamedElement ( p2NS, "EssenceList" );
+ P2_Clip* p2Clip = this->p2ClipManager.GetManagedClip() ;
+ XMP_StringPtr p2NS = p2Clip->GetP2RootNode()->ns.c_str();
+ XML_NodePtr legacyVideoContext = p2Clip->GetEssenceListNode();
if ( legacyVideoContext != 0 ) {
@@ -562,20 +514,21 @@ void P2_MetaHandler::SetDurationFromLegacyXML ( bool digestFound )
{
if ( digestFound || (! this->xmpObj.DoesPropertyExist ( kXMP_NS_DM, "duration" )) ) {
+
+ P2_SpannedClip* p2Clip=this->p2ClipManager.GetSpannedClip();
+ XMP_Uns32 dur = p2Clip->GetDuration();
+ XMP_VarString* editunit= p2Clip->GetEditUnit();
- XMP_StringPtr p2NS = this->p2NS.c_str();
- XML_NodePtr legacyDurationProp = this->clipContent->GetNamedElement ( p2NS, "Duration" );
- XML_NodePtr legacyEditUnitProp = this->clipContent->GetNamedElement ( p2NS, "EditUnit" );
-
- if ( (legacyDurationProp != 0) && ( legacyEditUnitProp != 0 ) &&
- legacyDurationProp->IsLeafContentNode() && legacyEditUnitProp->IsLeafContentNode() ) {
+ if ( ( dur != 0) && ( editunit != 0 ) ) {
+ ostringstream duration;
+ duration<<dur;
this->xmpObj.DeleteProperty ( kXMP_NS_DM, "duration" );
this->xmpObj.SetStructField ( kXMP_NS_DM, "duration",
- kXMP_NS_DM, "value", legacyDurationProp->GetLeafContentValue() );
+ kXMP_NS_DM, "value", duration.str().c_str() );
this->xmpObj.SetStructField ( kXMP_NS_DM, "duration",
- kXMP_NS_DM, "scale", legacyEditUnitProp->GetLeafContentValue() );
+ kXMP_NS_DM, "scale", editunit->c_str() );
this->containsXMP = true;
}
@@ -593,8 +546,9 @@ void P2_MetaHandler::SetVideoFrameInfoFromLegacyXML ( XML_NodePtr legacyVideoCon
// Map the P2 Codec field to various dynamic media schema fields.
if ( digestFound || (! this->xmpObj.DoesPropertyExist ( kXMP_NS_DM, "videoFrameSize" )) ) {
-
- XMP_StringPtr p2NS = this->p2NS.c_str();
+
+ P2_Clip* p2Clip = this->p2ClipManager.GetManagedClip() ;
+ XMP_StringPtr p2NS = p2Clip->GetP2RootNode()->ns.c_str();
XML_NodePtr legacyProp = legacyVideoContext->GetNamedElement ( p2NS, "Codec" );
if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() ) {
@@ -631,7 +585,8 @@ void P2_MetaHandler::SetVideoFrameInfoFromLegacyXML ( XML_NodePtr legacyVideoCon
// This is AVC-Intra footage. The framerate and PAR depend on the "class" attribute in the P2 XML.
const XMP_StringPtr codecClass = legacyProp->GetAttrValue( "Class" );
-
+ if ( codecClass != 0 )
+ dmVideoCompressor = "AVC-Intra"; // initializing with default value
if ( XMP_LitMatch ( codecClass, "100" ) ) {
dmVideoCompressor = "AVC-Intra 100";
@@ -735,7 +690,8 @@ void P2_MetaHandler::SetStartTimecodeFromLegacyXML ( XML_NodePtr legacyVideoCont
// Translate start timecode to the format specified by the dynamic media schema.
if ( digestFound || (! this->xmpObj.DoesPropertyExist ( kXMP_NS_DM, "startTimecode" )) ) {
- XMP_StringPtr p2NS = this->p2NS.c_str();
+ P2_Clip* p2Clip = this->p2ClipManager.GetManagedClip() ;
+ XMP_StringPtr p2NS = p2Clip->GetP2RootNode()->ns.c_str();
XML_NodePtr legacyProp = legacyVideoContext->GetNamedElement ( p2NS, "StartTimecode" );
if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() ) {
@@ -821,7 +777,8 @@ void P2_MetaHandler::SetGPSPropertyFromLegacyXML ( XML_NodePtr legacyLocationCo
if ( digestFound || (! this->xmpObj.DoesPropertyExist ( kXMP_NS_EXIF, propName )) ) {
- XMP_StringPtr p2NS = this->p2NS.c_str();
+ P2_Clip* p2Clip = this->p2ClipManager.GetManagedClip() ;
+ XMP_StringPtr p2NS = p2Clip->GetP2RootNode()->ns.c_str();
XML_NodePtr legacyGPSProp = legacyLocationContext->GetNamedElement ( p2NS, legacyPropName );
if ( ( legacyGPSProp != 0 ) && legacyGPSProp->IsLeafContentNode() ) {
@@ -866,7 +823,8 @@ void P2_MetaHandler::SetAltitudeFromLegacyXML ( XML_NodePtr legacyLocationConte
if ( digestFound || (! this->xmpObj.DoesPropertyExist ( kXMP_NS_EXIF, "GPSAltitude" )) ) {
- XMP_StringPtr p2NS = this->p2NS.c_str();
+ P2_Clip* p2Clip = this->p2ClipManager.GetManagedClip() ;
+ XMP_StringPtr p2NS = p2Clip->GetP2RootNode()->ns.c_str();
XML_NodePtr legacyAltitudeProp = legacyLocationContext->GetNamedElement ( p2NS, "Altitude" );
if ( ( legacyAltitudeProp != 0 ) && legacyAltitudeProp->IsLeafContentNode() ) {
@@ -913,22 +871,32 @@ void P2_MetaHandler::SetAltitudeFromLegacyXML ( XML_NodePtr legacyLocationConte
XML_Node * P2_MetaHandler::ForceChildElement ( XML_Node * parent, XMP_StringPtr localName, XMP_Int32 indent , XMP_Bool insertAtFront )
{
XML_Node * wsNodeBefore, * wsNodeAfter;
- XML_Node * childNode = parent->GetNamedElement ( this->p2NS.c_str(), localName );
+ P2_Clip* p2Clip = this->p2ClipManager.GetManagedClip() ;
+ XMP_StringPtr p2NS = p2Clip->GetP2RootNode()->ns.c_str();
+ XML_Node * childNode = parent->GetNamedElement ( p2NS, localName );
//
if ( childNode == 0 ) {
// The indenting is a hack, assuming existing 2 spaces per level.
-
- wsNodeBefore = new XML_Node ( parent, "", kCDataNode );
- wsNodeBefore->value = " "; // Add 2 spaces to the existing WS before the parent's close tag.
-
- childNode = new XML_Node ( parent, localName, kElemNode );
- childNode->ns = parent->ns;
- childNode->nsPrefixLen = parent->nsPrefixLen;
- childNode->name.insert ( 0, parent->name, 0, parent->nsPrefixLen );
-
- wsNodeAfter = new XML_Node ( parent, "", kCDataNode );
+ try {
+ wsNodeBefore = new XML_Node ( parent, "", kCDataNode );
+ wsNodeBefore->value = " "; // Add 2 spaces to the existing WS before the parent's close tag.
+
+ childNode = new XML_Node ( parent, localName, kElemNode );
+ childNode->ns = parent->ns;
+ childNode->nsPrefixLen = parent->nsPrefixLen;
+ childNode->name.insert ( 0, parent->name, 0, parent->nsPrefixLen );
+
+ wsNodeAfter = new XML_Node ( parent, "", kCDataNode );
+ } catch (...) {
+ if (wsNodeBefore)
+ delete wsNodeBefore;
+ if (childNode)
+ delete childNode;
+
+ throw;
+ }
wsNodeAfter->value = '\n';
for ( ; indent > 1; --indent ) wsNodeAfter->value += " "; // Indent less 1, to "outdent" the parent's close.
@@ -959,184 +927,22 @@ XML_Node * P2_MetaHandler::ForceChildElement ( XML_Node * parent, XMP_StringPtr
} // P2_MetaHandler::ForceChildElement
// =================================================================================================
-// P2_MetaHandler::MakeLegacyDigest
-// =================================
-
-// *** Early hack version.
-
-#define kHexDigits "0123456789ABCDEF"
-
-void P2_MetaHandler::MakeLegacyDigest ( std::string * digestStr )
-{
- digestStr->erase();
- if ( this->clipMetadata == 0 ) return; // Bail if we don't have any legacy XML.
- XMP_Assert ( this->expat != 0 );
-
- XMP_StringPtr p2NS = this->p2NS.c_str();
- XML_NodePtr legacyContext;
- MD5_CTX md5Context;
- unsigned char digestBin [16];
- MD5Init ( &md5Context );
-
- legacyContext = this->clipContent;
- this->DigestLegacyItem ( md5Context, legacyContext, "ClipName" );
- this->DigestLegacyItem ( md5Context, legacyContext, "GlobalClipID" );
- this->DigestLegacyItem ( md5Context, legacyContext, "Duration" );
- this->DigestLegacyItem ( md5Context, legacyContext, "EditUnit" );
- this->DigestLegacyRelations ( md5Context );
-
- legacyContext = this->clipContent->GetNamedElement ( p2NS, "EssenceList" );
-
- if ( legacyContext != 0 ) {
-
- XML_NodePtr videoContext = legacyContext->GetNamedElement ( p2NS, "Video" );
-
- if ( videoContext != 0 ) {
- this->DigestLegacyItem ( md5Context, videoContext, "AspectRatio" );
- this->DigestLegacyItem ( md5Context, videoContext, "Codec" );
- this->DigestLegacyItem ( md5Context, videoContext, "FrameRate" );
- this->DigestLegacyItem ( md5Context, videoContext, "StartTimecode" );
- }
-
- XML_NodePtr audioContext = legacyContext->GetNamedElement ( p2NS, "Audio" );
-
- if ( audioContext != 0 ) {
- this->DigestLegacyItem ( md5Context, audioContext, "SamplingRate" );
- this->DigestLegacyItem ( md5Context, audioContext, "BitsPerSample" );
- }
-
- }
-
- legacyContext = this->clipMetadata;
- this->DigestLegacyItem ( md5Context, legacyContext, "UserClipName" );
- this->DigestLegacyItem ( md5Context, legacyContext, "ShotMark" );
-
- legacyContext = this->clipMetadata->GetNamedElement ( p2NS, "Access" );
- /* Rather return than create the digest because the "Access" element is listed as "required" in the P2 spec.
- So a P2 file without an "Access" element does not follow the spec and might be corrupt.*/
- if ( legacyContext == 0 ) return;
-
- this->DigestLegacyItem ( md5Context, legacyContext, "Creator" );
- this->DigestLegacyItem ( md5Context, legacyContext, "CreationDate" );
- this->DigestLegacyItem ( md5Context, legacyContext, "LastUpdateDate" );
-
- legacyContext = this->clipMetadata->GetNamedElement ( p2NS, "Shoot" );
-
- if ( legacyContext != 0 ) {
- this->DigestLegacyItem ( md5Context, legacyContext, "Shooter" );
-
- legacyContext = legacyContext->GetNamedElement ( p2NS, "Location" );
-
- if ( legacyContext != 0 ) {
- this->DigestLegacyItem ( md5Context, legacyContext, "PlaceName" );
- this->DigestLegacyItem ( md5Context, legacyContext, "Longitude" );
- this->DigestLegacyItem ( md5Context, legacyContext, "Latitude" );
- this->DigestLegacyItem ( md5Context, legacyContext, "Altitude" );
- }
- }
-
- legacyContext = this->clipMetadata->GetNamedElement ( p2NS, "Scenario" );
-
- if ( legacyContext != 0 ) {
- this->DigestLegacyItem ( md5Context, legacyContext, "SceneNo." );
- this->DigestLegacyItem ( md5Context, legacyContext, "TakeNo." );
- }
-
- legacyContext = this->clipMetadata->GetNamedElement ( p2NS, "Device" );
-
- if ( legacyContext != 0 ) {
- this->DigestLegacyItem ( md5Context, legacyContext, "Manufacturer" );
- this->DigestLegacyItem ( md5Context, legacyContext, "SerialNo." );
- this->DigestLegacyItem ( md5Context, legacyContext, "ModelName" );
- }
-
- MD5Final ( digestBin, &md5Context );
-
- char buffer [40];
- for ( int in = 0, out = 0; in < 16; in += 1, out += 2 ) {
- XMP_Uns8 byte = digestBin[in];
- buffer[out] = kHexDigits [ byte >> 4 ];
- buffer[out+1] = kHexDigits [ byte & 0xF ];
- }
- buffer[32] = 0;
- digestStr->append ( buffer );
-
-} // P2_MetaHandler::MakeLegacyDigest
-
-// =================================================================================================
-// P2_MetaHandler::GetFileModDate
-// ==============================
-
-static inline bool operator< ( const XMP_DateTime & left, const XMP_DateTime & right ) {
- int compare = SXMPUtils::CompareDateTime ( left, right );
- return (compare < 0);
-}
-
-bool P2_MetaHandler::GetFileModDate ( XMP_DateTime * modDate )
-{
-
- // The P2 locations of metadata:
- // CONTENTS/
- // CLIP/
- // 0001AB.XML
- // 0001AB.XMP
-
- bool ok, haveDate = false;
- std::string fullPath;
- XMP_DateTime oneDate, junkDate;
- if ( modDate == 0 ) modDate = &junkDate;
-
- ok = this->MakeClipFilePath ( &fullPath, ".XML", true /* checkFile */ );
- if ( ok ) ok = Host_IO::GetModifyDate ( fullPath.c_str(), &oneDate );
- if ( ok ) {
- if ( (! haveDate) || (*modDate < oneDate) ) *modDate = oneDate;
- haveDate = true;
- }
-
- ok = this->MakeClipFilePath ( &fullPath, ".XMP", true /* checkFile */ );
- if ( ok ) ok = Host_IO::GetModifyDate ( fullPath.c_str(), &oneDate );
- if ( ok ) {
- if ( (! haveDate) || (*modDate < oneDate) ) *modDate = oneDate;
- haveDate = true;
- }
-
- return haveDate;
-
-} // P2_MetaHandler::GetFileModDate
-
-// =================================================================================================
-// P2_MetaHandler::FillMetadataFiles
-// =================================
-void P2_MetaHandler::FillMetadataFiles ( std::vector<std::string>* metadataFiles )
-{
- std::string noExtPath, filePath;
-
- noExtPath = rootPath + kDirChar + "CONTENTS" + kDirChar + "CLIP" + kDirChar + clipName;
-
- filePath = noExtPath + ".XMP";
- metadataFiles->push_back ( filePath );
- filePath = noExtPath + ".XML";
- metadataFiles->push_back ( filePath );
-
-} // FillMetadataFiles_P2
-
-// =================================================================================================
// P2_MetaHandler::IsMetadataWritable
// =======================================
bool P2_MetaHandler::IsMetadataWritable ( )
{
- std::vector<std::string> metadataFiles;
- FillMetadataFiles(&metadataFiles);
- std::vector<std::string>::iterator itr = metadataFiles.begin();
+ std::string noExtPath, filePath;
+ noExtPath = rootPath + kDirChar + "CONTENTS" + kDirChar + "CLIP" + kDirChar + this->clipName ;
+ filePath = noExtPath + ".XMP";
// Check whether sidecar is writable, if not then check if it can be created.
- bool xmpWritable = Host_IO::Writable( itr->c_str(), true );
+ bool writable = Host_IO::Writable( filePath.c_str(), true );
+ filePath = noExtPath + ".XML";
// Check if legacy XML is writable.
- bool xmlWritable = Host_IO::Writable( (++itr)->c_str(), false );
- return (xmlWritable && xmpWritable);
+ writable &= Host_IO::Writable( filePath.c_str(), false );
+ return writable;
}// P2_MetaHandler::IsMetadataWritable
-
// =================================================================================================
// P2_MetaHandler::FillAssociatedResources
// ======================================
@@ -1158,47 +964,54 @@ void P2_MetaHandler::FillAssociatedResources ( std::vector<std::string> * resour
// PROXY/
// XXXXXX.MP4
// XXXXXX.BIN
-
XMP_VarString contentsPath = this->rootPath + kDirChar + "CONTENTS" + kDirChar;
XMP_VarString path;
//Add RootPath
path = this->rootPath + kDirChar;
PackageFormat_Support::AddResourceIfExists(resourceList, path);
-
- std::string clipPathNoExt = contentsPath + "CLIP" + kDirChar + this->clipName;
- // Get the files present inside CLIP folder.
- path = clipPathNoExt + ".XML";
- PackageFormat_Support::AddResourceIfExists(resourceList, path);
- path = clipPathNoExt + ".XMP";
- PackageFormat_Support::AddResourceIfExists(resourceList, path);
-
- // Get the files present inside VIDEO folder.
- path = contentsPath + "VIDEO" + kDirChar + this->clipName + ".MXF";
- PackageFormat_Support::AddResourceIfExists(resourceList, path);
-
- // Get the files present inside AUDIO folder.
- path = contentsPath + "AUDIO" + kDirChar;
- XMP_VarString regExp;
- regExp = "^" + this->clipName + "\\d\\d.MXF$";
- IOUtils::GetMatchingChildren ( *resourceList, path, regExp, false, true, true );
-
- // Get the files present inside ICON folder.
- path = contentsPath + "ICON" + kDirChar + this->clipName + ".BMP";
- PackageFormat_Support::AddResourceIfExists(resourceList, path);
-
- // Get the files present inside VOICE folder.
- path = contentsPath + "VOICE" + kDirChar;
- regExp = "^" + clipName + "\\d\\d.WAV$";
- IOUtils::GetMatchingChildren ( *resourceList, path, regExp, false, true, true );
-
- // Get the files present inside PROXY folder.
- std::string proxyPathNoExt = contentsPath + "PROXY" + kDirChar + this->clipName;
-
- path = proxyPathNoExt + ".MP4";
- PackageFormat_Support::AddResourceIfExists(resourceList, path);
- path = proxyPathNoExt + ".BIN";
- PackageFormat_Support::AddResourceIfExists(resourceList, path);
+ P2_SpannedClip* p2SpanClip=p2ClipManager.GetSpannedClip();
+ if ( ! p2SpanClip ) return ;
+ std::vector<std::string> clipNameList;
+ p2SpanClip->GetAllClipNames ( clipNameList );
+ std::vector<std::string>::iterator iter = clipNameList.begin();
+ for(; iter!=clipNameList.end(); iter++)
+ {
+
+ std::string clipPathNoExt = contentsPath + "CLIP" + kDirChar + *iter;
+ // Get the files present inside CLIP folder.
+ path = clipPathNoExt + ".XML";
+ PackageFormat_Support::AddResourceIfExists(resourceList, path);
+ path = clipPathNoExt + ".XMP";
+ PackageFormat_Support::AddResourceIfExists(resourceList, path);
+
+ // Get the files present inside VIDEO folder.
+ path = contentsPath + "VIDEO" + kDirChar + *iter + ".MXF";
+ PackageFormat_Support::AddResourceIfExists(resourceList, path);
+
+ // Get the files present inside AUDIO folder.
+ path = contentsPath + "AUDIO" + kDirChar;
+ XMP_VarString regExp;
+ regExp = "^" + *iter + "\\d\\d.MXF$";
+ IOUtils::GetMatchingChildren ( *resourceList, path, regExp, false, true, true );
+
+ // Get the files present inside ICON folder.
+ path = contentsPath + "ICON" + kDirChar + *iter + ".BMP";
+ PackageFormat_Support::AddResourceIfExists(resourceList, path);
+
+ // Get the files present inside VOICE folder.
+ path = contentsPath + "VOICE" + kDirChar;
+ regExp = "^" + *iter + "\\d\\d.WAV$";
+ IOUtils::GetMatchingChildren ( *resourceList, path, regExp, false, true, true );
+
+ // Get the files present inside PROXY folder.
+ std::string proxyPathNoExt = contentsPath + "PROXY" + kDirChar + *iter;
+
+ path = proxyPathNoExt + ".MP4";
+ PackageFormat_Support::AddResourceIfExists(resourceList, path);
+ path = proxyPathNoExt + ".BIN";
+ PackageFormat_Support::AddResourceIfExists(resourceList, path);
+ }
} // P2_MetaHandler::FillAssociatedResources
// =================================================================================================
@@ -1216,6 +1029,7 @@ void P2_MetaHandler::CacheFileData()
// Make sure the clip's .XMP file exists.
std::string xmpPath;
+
this->MakeClipFilePath ( &xmpPath, ".XMP" );
if ( ! Host_IO::Exists ( xmpPath.c_str() ) ) return; // No XMP.
@@ -1253,96 +1067,42 @@ void P2_MetaHandler::CacheFileData()
void P2_MetaHandler::ProcessXMP()
{
-
- // Some versions of gcc can't tolerate goto's across declarations.
- // *** Better yet, avoid this cruft with self-cleaning objects.
- #define CleanupAndExit \
- { \
- bool openForUpdate = XMP_OptionIsSet ( this->parent->openFlags, kXMPFiles_OpenForUpdate ); \
- if ( ! openForUpdate ) this->CleanupLegacyXML(); \
- return; \
- }
-
if ( this->processedXMP ) return;
this->processedXMP = true; // Make sure only called once.
if ( this->containsXMP ) {
this->xmpObj.ParseFromBuffer ( this->xmpPacket.c_str(), (XMP_StringLen)this->xmpPacket.size() );
}
-
- std::string xmlPath;
- this->MakeClipFilePath ( &xmlPath, ".XML" );
-
- Host_IO::FileRef hostRef = Host_IO::Open ( xmlPath.c_str(), Host_IO::openReadOnly );
- if ( hostRef == Host_IO::noFileRef ) return; // The open failed.
- XMPFiles_IO xmlFile ( hostRef, xmlPath.c_str(), Host_IO::openReadOnly );
-
- this->expat = XMP_NewExpatAdapter ( ExpatAdapter::kUseLocalNamespaces );
- if ( this->expat == 0 ) XMP_Throw ( "P2_MetaHandler: Can't create Expat adapter", kXMPErr_NoMemory );
-
- XMP_Uns8 buffer [64*1024];
- while ( true ) {
- XMP_Int32 ioCount = xmlFile.Read ( buffer, sizeof(buffer) );
- if ( ioCount == 0 ) break;
- this->expat->ParseBuffer ( buffer, ioCount, false /* not the end */ );
- }
- this->expat->ParseBuffer ( 0, 0, true ); // End the parse.
-
- xmlFile.Close();
-
- // The root element should be P2Main in some namespace. At least 2 different namespaces are in
- // use (ending in "v3.0" and "v3.1"). Take whatever this file uses.
-
- XML_Node & xmlTree = this->expat->tree;
- XML_NodePtr rootElem = 0;
-
- for ( size_t i = 0, limit = xmlTree.content.size(); i < limit; ++i ) {
- if ( xmlTree.content[i]->kind == kElemNode ) {
- rootElem = xmlTree.content[i];
- }
- }
-
- if ( rootElem == 0 ) CleanupAndExit
- XMP_StringPtr rootLocalName = rootElem->name.c_str() + rootElem->nsPrefixLen;
- if ( ! XMP_LitMatch ( rootLocalName, "P2Main" ) ) CleanupAndExit
-
- this->p2NS = rootElem->ns;
-
- // Now find ClipMetadata element and check the legacy digest.
-
- XMP_StringPtr p2NS = this->p2NS.c_str();
- XML_NodePtr legacyContext, legacyProp;
-
- legacyContext = rootElem->GetNamedElement ( p2NS, "ClipContent" );
- if ( legacyContext == 0 ) CleanupAndExit
-
- this->clipContent = legacyContext; // ! Save the ClipContext pointer for other use.
-
- legacyContext = legacyContext->GetNamedElement ( p2NS, "ClipMetadata" );
- if ( legacyContext == 0 ) CleanupAndExit
-
- this->clipMetadata = legacyContext; // ! Save the ClipMetadata pointer for other use.
-
+
+ XML_NodePtr legacyContext, clipMetadata, legacyProp;
+ if ( ! this->p2ClipManager.IsValidP2() ) return;
+ P2_Clip* p2Clip=this->p2ClipManager.GetManagedClip();
+ XMP_StringPtr p2NS = p2Clip->GetP2RootNode()->ns.c_str();
std::string oldDigest, newDigest;
bool digestFound = this->xmpObj.GetStructField ( kXMP_NS_XMP, "NativeDigests", kXMP_NS_XMP, "P2", &oldDigest, 0 );
if ( digestFound ) {
- this->MakeLegacyDigest ( &newDigest );
- if ( oldDigest == newDigest ) CleanupAndExit
+ p2Clip->CreateDigest ( &newDigest );
+ if ( oldDigest == newDigest ) return;
}
// If we get here we need find and import the actual legacy elements using the current namespace.
// Either there is no old digest in the XMP, or the digests differ. In the former case keep any
// existing XMP, in the latter case take new legacy values.
- this->SetXMPPropertyFromLegacyXML ( digestFound, this->clipContent, kXMP_NS_DC, "title", "ClipName", true );
- this->SetXMPPropertyFromLegacyXML ( digestFound, this->clipContent, kXMP_NS_DC, "identifier", "GlobalClipID", false );
+ std::string clipTitle= p2Clip->GetClipTitle();// needed for successful Mac Builds
+ this->SetXMPPropertyFromLegacyXML ( digestFound, &clipTitle , kXMP_NS_DC, "title", true );
+ if ( p2Clip->IsValidClip() )
+ this->SetXMPPropertyFromLegacyXML ( digestFound, p2Clip->GetClipId(), kXMP_NS_DC, "identifier", false );
this->SetDurationFromLegacyXML (digestFound );
this->SetRelationsFromLegacyXML ( digestFound );
- this->SetXMPPropertyFromLegacyXML ( digestFound, this->clipMetadata, kXMP_NS_DM, "shotName", "UserClipName", false );
+ clipMetadata = p2Clip->GetClipMetadataNode();
+ if ( clipMetadata == 0 ) return;
+ this->SetXMPPropertyFromLegacyXML ( digestFound,p2Clip->GetClipMetadataNode(), kXMP_NS_DM, "shotName", "UserClipName", false );
this->SetAudioInfoFromLegacyXML ( digestFound );
this->SetVideoInfoFromLegacyXML ( digestFound );
- legacyContext = this->clipMetadata->GetNamedElement ( p2NS, "Access" );
- if ( legacyContext == 0 ) CleanupAndExit
+
+ legacyContext = clipMetadata->GetNamedElement ( p2NS, "Access" );
+ if ( legacyContext == 0 ) return;
if ( digestFound || (! this->xmpObj.DoesPropertyExist ( kXMP_NS_DC, "creator" )) ) {
legacyProp = legacyContext->GetNamedElement ( p2NS, "Creator" );
@@ -1358,7 +1118,7 @@ void P2_MetaHandler::ProcessXMP()
this->SetXMPPropertyFromLegacyXML ( digestFound, legacyContext, kXMP_NS_XMP, "ModifyDate", "LastUpdateDate", false );
if ( digestFound || (! this->xmpObj.DoesPropertyExist ( kXMP_NS_DM, "good" )) ) {
- legacyProp = this->clipMetadata->GetNamedElement ( p2NS, "ShotMark" );
+ legacyProp = clipMetadata->GetNamedElement ( p2NS, "ShotMark" );
if ( (legacyProp == 0) || (! legacyProp->IsLeafContentNode()) ) {
this->xmpObj.DeleteProperty ( kXMP_NS_DM, "good" );
} else {
@@ -1375,7 +1135,7 @@ void P2_MetaHandler::ProcessXMP()
}
}
- legacyContext = this->clipMetadata->GetNamedElement ( p2NS, "Shoot" );
+ legacyContext = clipMetadata->GetNamedElement ( p2NS, "Shoot" );
if ( legacyContext != 0 ) {
this->SetXMPPropertyFromLegacyXML ( digestFound, legacyContext, kXMP_NS_TIFF, "Artist", "Shooter", false );
legacyContext = legacyContext->GetNamedElement ( p2NS, "Location" );
@@ -1388,21 +1148,20 @@ void P2_MetaHandler::ProcessXMP()
this->SetAltitudeFromLegacyXML ( legacyContext, digestFound );
}
- legacyContext = this->clipMetadata->GetNamedElement ( p2NS, "Device" );
+ legacyContext = clipMetadata->GetNamedElement ( p2NS, "Device" );
if ( legacyContext != 0 ) {
this->SetXMPPropertyFromLegacyXML ( digestFound, legacyContext, kXMP_NS_TIFF, "Make", "Manufacturer", false );
this->SetXMPPropertyFromLegacyXML ( digestFound, legacyContext, kXMP_NS_EXIF_Aux, "SerialNumber", "SerialNo.", false );
this->SetXMPPropertyFromLegacyXML ( digestFound, legacyContext, kXMP_NS_TIFF, "Model", "ModelName", false );
}
- legacyContext = this->clipMetadata->GetNamedElement ( p2NS, "Scenario" );
+ legacyContext = clipMetadata->GetNamedElement ( p2NS, "Scenario" );
if ( legacyContext != 0 ) {
this->SetXMPPropertyFromLegacyXML ( digestFound, legacyContext, kXMP_NS_DM, "scene", "SceneNo.", false );
this->SetXMPPropertyFromLegacyXML ( digestFound, legacyContext, kXMP_NS_DM, "takeNumber", "TakeNo.", false );
}
- CleanupAndExit
- #undef CleanupAndExit
+ return;
} // P2_MetaHandler::ProcessXMP
@@ -1439,47 +1198,51 @@ void P2_MetaHandler::UpdateFile ( bool doSafeUpdate )
// Update the internal legacy XML tree if we have one, and set the digest in the XMP.
bool updateLegacyXML = false;
+ P2_Clip* p2Clip = 0;
+ XML_NodePtr clipMetadata = 0;
+ if ( this->p2ClipManager.IsValidP2() )
+ {
+ p2Clip=this->p2ClipManager.GetManagedClip();
+ clipMetadata = p2Clip->GetClipMetadataNode();
+ if ( clipMetadata != 0 ) {
- if ( this->clipMetadata != 0 ) {
-
- XMP_Assert ( this->expat != 0 );
+ bool xmpFound;
+ std::string xmpValue;
+ XML_Node * xmlNode;
- bool xmpFound;
- std::string xmpValue;
- XML_Node * xmlNode;
+ xmpFound = this->xmpObj.GetLocalizedText ( kXMP_NS_DC, "title", "", "x-default", 0, &xmpValue, 0 );
- xmpFound = this->xmpObj.GetLocalizedText ( kXMP_NS_DC, "title", "", "x-default", 0, &xmpValue, 0 );
+ if ( xmpFound && p2Clip->GetClipContentNode()) {
- if ( xmpFound ) {
+ xmlNode = this->ForceChildElement ( p2Clip->GetClipContentNode(), "ClipName", 3, false );
- xmlNode = this->ForceChildElement ( this->clipContent, "ClipName", 3, false );
+ if ( xmpValue != xmlNode->GetLeafContentValue() ) {
+ xmlNode->SetLeafContentValue ( xmpValue.c_str() );
+ updateLegacyXML = true;
+ }
- if ( xmpValue != xmlNode->GetLeafContentValue() ) {
- xmlNode->SetLeafContentValue ( xmpValue.c_str() );
- updateLegacyXML = true;
}
- }
-
- xmpFound = this->xmpObj.GetArrayItem ( kXMP_NS_DC, "creator", 1, &xmpValue, 0 );
+ xmpFound = this->xmpObj.GetArrayItem ( kXMP_NS_DC, "creator", 1, &xmpValue, 0 );
- if ( xmpFound ) {
- xmlNode = this->ForceChildElement ( this->clipMetadata, "Access", 3, false );
+ if ( xmpFound ) {
+ xmlNode = this->ForceChildElement ( clipMetadata , "Access", 3, false );
- // "Creator" must be first child of "Access" node else Panasonic P2 Viewer gives an error.
- xmlNode = this->ForceChildElement ( xmlNode, "Creator", 4 , true);
- if ( xmpValue != xmlNode->GetLeafContentValue() ) {
- xmlNode->SetLeafContentValue ( xmpValue.c_str() );
- updateLegacyXML = true;
+ // "Creator" must be first child of "Access" node else Panasonic P2 Viewer gives an error.
+ xmlNode = this->ForceChildElement ( xmlNode, "Creator", 4 , true);
+ if ( xmpValue != xmlNode->GetLeafContentValue() ) {
+ xmlNode->SetLeafContentValue ( xmpValue.c_str() );
+ updateLegacyXML = true;
+ }
}
+
}
+ std::string newDigest;
+ this->p2ClipManager.GetManagedClip()->CreateDigest ( &newDigest );
+ this->xmpObj.SetStructField ( kXMP_NS_XMP, "NativeDigests", kXMP_NS_XMP, "P2", newDigest.c_str(), kXMP_DeleteExisting );
}
- std::string newDigest;
- this->MakeLegacyDigest ( &newDigest );
- this->xmpObj.SetStructField ( kXMP_NS_XMP, "NativeDigests", kXMP_NS_XMP, "P2", newDigest.c_str(), kXMP_DeleteExisting );
-
this->xmpObj.SerializeToBuffer ( &this->xmpPacket, this->GetSerializeOptions() );
// -----------------------------------------------------------------------
@@ -1512,8 +1275,8 @@ void P2_MetaHandler::UpdateFile ( bool doSafeUpdate )
dummy attribute with this namespace to clipContent/clipMetadata (whichever is non-null) before
serializing the XML tree. We are also undoing it below after serialization.*/
- XML_Node *parentNode = AddXSINamespace(this->clipContent, this->clipMetadata);
- this->expat->tree.Serialize ( &legacyXML );
+ XML_Node *parentNode = AddXSINamespace(p2Clip->GetClipContentNode(), clipMetadata);
+ p2Clip->SerializeP2ClipContent ( legacyXML );
if(parentNode){
// Remove the dummy attribute added to clipContent/clipMetadata.
delete parentNode->attrs[parentNode->attrs.size()-1];
diff --git a/XMPFiles/source/FileHandlers/P2_Handler.hpp b/XMPFiles/source/FileHandlers/P2_Handler.hpp
index 513e9ea..5e492ee 100644
--- a/XMPFiles/source/FileHandlers/P2_Handler.hpp
+++ b/XMPFiles/source/FileHandlers/P2_Handler.hpp
@@ -17,6 +17,7 @@
#include "source/ExpatAdapter.hpp"
#include "third-party/zuid/interfaces/MD5.h"
+#include "XMPFiles/source/FormatSupport/P2_Support.hpp"
// =================================================================================================
/// \file P2_Handler.hpp
@@ -52,8 +53,6 @@ class P2_MetaHandler : public XMPFileHandler
{
public:
- bool GetFileModDate ( XMP_DateTime * modDate );
- void FillMetadataFiles ( std::vector<std::string> * metadataFiles );
void FillAssociatedResources ( std::vector<std::string> * resourceList );
bool IsMetadataWritable ( );
@@ -71,11 +70,10 @@ public:
private:
- P2_MetaHandler() : expat(0), clipMetadata(0), clipContent(0) {}; // Hidden on purpose.
+ P2_MetaHandler() {}; // Hidden on purpose.
bool MakeClipFilePath ( std::string * path, XMP_StringPtr suffix, bool checkFile = false );
void MakeLegacyDigest ( std::string * digestStr );
- void CleanupLegacyXML();
void DigestLegacyItem ( MD5_CTX & md5Context, XML_NodePtr legacyContext, XMP_StringPtr legacyPropName );
void DigestLegacyRelations ( MD5_CTX & md5Context );
@@ -86,6 +84,11 @@ private:
XMP_StringPtr propName,
XMP_StringPtr legacyPropName,
bool isLocalized );
+ void SetXMPPropertyFromLegacyXML ( bool digestFound,
+ XMP_VarString* refContext,
+ XMP_StringPtr schemaNS,
+ XMP_StringPtr propName,
+ bool isLocalized );
void SetRelationsFromLegacyXML ( bool digestFound );
void SetAudioInfoFromLegacyXML ( bool digestFound );
@@ -99,11 +102,9 @@ private:
XML_Node * ForceChildElement ( XML_Node * parent, XMP_StringPtr localName, XMP_Int32 indent, XMP_Bool insertAtFront );
- std::string rootPath, clipName, p2NS;
+ std::string rootPath , clipName;
- ExpatAdapter * expat;
- XML_Node * clipMetadata; // ! Don't delete, points into the Expat tree.
- XML_Node * clipContent; // ! Don't delete, points into the Expat tree.
+ P2_Manager p2ClipManager;
}; // P2_MetaHandler
diff --git a/XMPFiles/source/FileHandlers/PSD_Handler.cpp b/XMPFiles/source/FileHandlers/PSD_Handler.cpp
index 89e1cc6..1db6ec9 100644
--- a/XMPFiles/source/FileHandlers/PSD_Handler.cpp
+++ b/XMPFiles/source/FileHandlers/PSD_Handler.cpp
@@ -81,7 +81,7 @@ XMPFileHandler * PSD_MetaHandlerCTor ( XMPFiles * parent )
// PSD_MetaHandler::PSD_MetaHandler
// ================================
-PSD_MetaHandler::PSD_MetaHandler ( XMPFiles * _parent ) : iptcMgr(0), exifMgr(0), skipReconcile(false)
+PSD_MetaHandler::PSD_MetaHandler ( XMPFiles * _parent ) : iptcMgr(0), exifMgr(0), skipReconcile(false),imageWidth(0),imageHeight(0)
{
this->parent = _parent;
this->handlerFlags = kPSD_HandlerFlags;
@@ -185,7 +185,9 @@ void PSD_MetaHandler::ProcessXMP()
// Set up everything for the legacy import, but don't do it yet. This lets us do a forced legacy
// import if the XMP packet gets parsing errors.
- bool readOnly = ((this->parent->openFlags & kXMPFiles_OpenForUpdate) == 0);
+ bool readOnly = false;
+ if ( this->parent )
+ readOnly = ((this->parent->openFlags & kXMPFiles_OpenForUpdate) == 0);
if ( readOnly ) {
this->iptcMgr = new IPTC_Reader();
diff --git a/XMPFiles/source/FileHandlers/SonyHDV_Handler.cpp b/XMPFiles/source/FileHandlers/SonyHDV_Handler.cpp
index 9d9a9d4..17e5baf 100644
--- a/XMPFiles/source/FileHandlers/SonyHDV_Handler.cpp
+++ b/XMPFiles/source/FileHandlers/SonyHDV_Handler.cpp
@@ -713,7 +713,7 @@ bool SonyHDV_MetaHandler::GetFileModDate ( XMP_DateTime * modDate )
ok = this->MakeIndexFilePath ( fullPath, this->rootPath, this->clipName );
if ( ok ) ok = Host_IO::GetModifyDate ( fullPath.c_str(), &oneDate );
if ( ok ) {
- if ( (! haveDate) || (*modDate < oneDate) ) *modDate = oneDate;
+ if ( *modDate < oneDate ) *modDate = oneDate;
haveDate = true;
}
diff --git a/XMPFiles/source/FileHandlers/UCF_Handler.cpp b/XMPFiles/source/FileHandlers/UCF_Handler.cpp
index 8e1e1ff..d304bc2 100644
--- a/XMPFiles/source/FileHandlers/UCF_Handler.cpp
+++ b/XMPFiles/source/FileHandlers/UCF_Handler.cpp
@@ -155,6 +155,32 @@ bool UCF_CheckFormat ( XMP_FileFormat format,
UCF_MetaHandler::UCF_MetaHandler ( XMPFiles * _parent )
{
+ this->cdx2 = 0 ;
+ this->z = 0;
+ this->z2 = 0;
+ this->h = 0;
+ this->h2 = 0;
+ this->al = 0;
+ this->bl = 0;
+ this->xl = 0;
+ this->x2l = 0;
+ this->cdl = 0;
+ this->cd2l = 0;
+ this->cdxl = 0;
+ this->cdx2l = 0;
+ this->z2l = 0;
+ this->hl = 0;
+ this->fl = 0;
+ this->f2l = 0;
+ this->numCF = 0;
+ this->numCF2 = 0;
+ this->wasCompressed = false;
+ this->compressXMP = false;
+ this->inPlacePossible = false;
+ this->uncomprPacketLen = 0;
+ this->uncomprPacketStr = NULL;
+ this->finalPacketStr = NULL;
+ this->finalPacketLen = 0;
this->parent = _parent;
this->handlerFlags = kUCF_HandlerFlags;
this->stdCharForm = kXMP_Char8Bit;
@@ -480,10 +506,6 @@ void UCF_MetaHandler::CacheFileData()
XMP_Enforce( file->ReadAll ( (char*)packetStr, sizeUncompressed ) );
break;
}
- default:
- {
- XMP_Throw("illegal zip compression method (not none, not flate)",kXMPErr_BadFileFormat);
- }
}
this->containsXMP = true; // do this last, after all possible failure/execptions
}
diff --git a/XMPFiles/source/FileHandlers/UCF_Handler.hpp b/XMPFiles/source/FileHandlers/UCF_Handler.hpp
index a9b9b55..3140c23 100644
--- a/XMPFiles/source/FileHandlers/UCF_Handler.hpp
+++ b/XMPFiles/source/FileHandlers/UCF_Handler.hpp
@@ -548,7 +548,7 @@ private:
//// WRITE BACK REAL 64 BIT VALUES, CREATE EXTRA FIELD ///////////////
//may only wipe extra field after obtaining all Info from it
if (extraField) delete extraField;
- extraFieldLen=0;
+ extraFieldLen=0;
if ( ( sizeUncompressed > 0xffffffff ) ||
( sizeCompressed > 0xffffffff ) ||
@@ -593,7 +593,7 @@ private:
file ->Write ( fields , FIXED_SIZE );
if (filenameLen) file->Write ( filename , filenameLen );
if (extraFieldLen) file->Write ( extraField , extraFieldLen );
- if (commentLen) file->Write ( extraField , extraFieldLen );
+ if (commentLen) file->Write ( comment , commentLen );
}
void setXMPFilename()
diff --git a/XMPFiles/source/FileHandlers/WAVE_Handler.cpp b/XMPFiles/source/FileHandlers/WAVE_Handler.cpp
index 876234e..1695013 100644
--- a/XMPFiles/source/FileHandlers/WAVE_Handler.cpp
+++ b/XMPFiles/source/FileHandlers/WAVE_Handler.cpp
@@ -118,6 +118,8 @@ const ChunkIdentifier WAVE_MetaHandler::kRIFFCart[2] = { { kChunk_RIFF, kType_WA
// cr8r is not yet required for WAVE
// RIFF:WAVE/Cr8r
// const ChunkIdentifier WAVE_MetaHandler::kWAVECr8r[2] = { { kChunk_RIFF, kType_WAVE }, { kChunk_Cr8r, kType_NONE } };
+// RIFF:WAVE/iXML
+const ChunkIdentifier WAVE_MetaHandler::kRIFFiXML[2] = { { kChunk_RIFF, kType_WAVE }, { kChunk_iXML, kType_NONE } };
// RF64:WAVE/PMX_
const ChunkIdentifier WAVE_MetaHandler::kRF64XMP[2] = { { kChunk_RF64, kType_WAVE }, { kChunk_XMP, kType_NONE} };
// RF64:WAVE/LIST:INFO
@@ -131,6 +133,7 @@ const ChunkIdentifier WAVE_MetaHandler::kRF64Cart[2] = { { kChunk_RF64, kType_WA
// cr8r is not yet required for WAVE
// RF64:WAVE/Cr8r
// const ChunkIdentifier WAVE_MetaHandler::kRF64Cr8r[2] = { { kChunk_RF64, kType_WAVE }, { kChunk_Cr8r, kType_NONE } };
+const ChunkIdentifier WAVE_MetaHandler::kRF64iXML[2] = { { kChunk_RF64, kType_WAVE }, { kChunk_iXML, kType_NONE } };
// =================================================================================================
// WAVE_MetaHandler::WAVE_MetaHandler
@@ -138,9 +141,9 @@ const ChunkIdentifier WAVE_MetaHandler::kRF64Cart[2] = { { kChunk_RF64, kType_WA
WAVE_MetaHandler::WAVE_MetaHandler ( XMPFiles * _parent )
: mChunkBehavior(NULL), mChunkController(NULL),
- mINFOMeta(), mBEXTMeta(), mCartMeta(), mDISPMeta(),
+ mINFOMeta(), mBEXTMeta(), mCartMeta(), mDISPMeta(), miXMLMeta(),
mXMPChunk(NULL), mINFOChunk(NULL),
- mBEXTChunk(NULL), mCartChunk(NULL), mDISPChunk(NULL)
+ mBEXTChunk(NULL), mCartChunk(NULL), mDISPChunk(NULL), miXMLChunk(NULL)
{
this->parent = _parent;
this->handlerFlags = kWAVE_HandlerFlags;
@@ -148,6 +151,7 @@ WAVE_MetaHandler::WAVE_MetaHandler ( XMPFiles * _parent )
this->mChunkBehavior = new WAVEBehavior();
this->mChunkController = new ChunkController( mChunkBehavior, false );
+ miXMLMeta.SetErrorCallback( &parent->errorCallback );
} // WAVE_MetaHandler::WAVE_MetaHandler
@@ -197,6 +201,7 @@ void WAVE_MetaHandler::CacheFileData()
mWAVEXMPChunkPath.append( kRIFFXMP, SizeOfCIArray(kRIFFXMP) );
mWAVEInfoChunkPath.append( kRIFFInfo, SizeOfCIArray(kRIFFInfo) );
mWAVEDispChunkPath.append( kRIFFDisp, SizeOfCIArray(kRIFFDisp) );
+ mWAVEiXMLChunkPath.append( kRIFFiXML, SizeOfCIArray(kRIFFiXML) );
mWAVEBextChunkPath.append( kRIFFBext, SizeOfCIArray(kRIFFBext) );
mWAVECartChunkPath.append( kRIFFCart, SizeOfCIArray(kRIFFCart) );
// cr8r is not yet required for WAVE
@@ -207,6 +212,7 @@ void WAVE_MetaHandler::CacheFileData()
mWAVEXMPChunkPath.append( kRF64XMP, SizeOfCIArray(kRF64XMP) );
mWAVEInfoChunkPath.append( kRF64Info, SizeOfCIArray(kRF64Info) );
mWAVEDispChunkPath.append( kRF64Disp, SizeOfCIArray(kRF64Disp) );
+ mWAVEiXMLChunkPath.append( kRF64iXML, SizeOfCIArray(kRF64iXML) );
mWAVEBextChunkPath.append( kRF64Bext, SizeOfCIArray(kRF64Bext) );
mWAVECartChunkPath.append( kRF64Cart, SizeOfCIArray(kRF64Cart) );
// cr8r is not yet required for WAVE
@@ -216,6 +222,7 @@ void WAVE_MetaHandler::CacheFileData()
mChunkController->addChunkPath( mWAVEXMPChunkPath );
mChunkController->addChunkPath( mWAVEInfoChunkPath );
mChunkController->addChunkPath( mWAVEDispChunkPath );
+ mChunkController->addChunkPath( mWAVEiXMLChunkPath );
mChunkController->addChunkPath( mWAVEBextChunkPath );
mChunkController->addChunkPath( mWAVECartChunkPath );
// cr8r is not yet required for WAVE
@@ -341,8 +348,17 @@ void WAVE_MetaHandler::ProcessXMP()
// mCr8rMeta.parse( buffer, size );
//}
+ // Parse iXML legacy chunk
+ miXMLChunk = mChunkController->getChunk( mWAVEiXMLChunkPath, true );
+ if( miXMLChunk != NULL )
+ {
+ size = miXMLChunk->getData( &buffer );
+ miXMLMeta.parse( buffer, size );
+ }
+
// app legacy to the metadata list
metaSet.append( &mINFOMeta );
+ metaSet.append( &miXMLMeta );
metaSet.append( &mBEXTMeta );
metaSet.append( &mCartMeta );
metaSet.append( &mDISPMeta );
@@ -380,6 +396,7 @@ void WAVE_MetaHandler::UpdateFile ( bool doSafeUpdate )
WAVEReconcile recon;
metaSet.append( &mINFOMeta );
+ metaSet.append( &miXMLMeta );
metaSet.append( &mBEXTMeta );
metaSet.append( &mCartMeta );
metaSet.append( &mDISPMeta );
@@ -415,6 +432,11 @@ void WAVE_MetaHandler::UpdateFile ( bool doSafeUpdate )
//{
// updateLegacyChunk( &mCr8rChunk, kChunk_Cr8r, kType_NONE, mCr8rMeta );
//}
+
+ if ( miXMLMeta.hasChanged( ))
+ {
+ updateLegacyChunk( &miXMLChunk, kChunk_iXML, kType_NONE, miXMLMeta );
+ }
}
//update/create XMP chunk
diff --git a/XMPFiles/source/FileHandlers/WAVE_Handler.hpp b/XMPFiles/source/FileHandlers/WAVE_Handler.hpp
index f8cc31b..29c1c86 100644
--- a/XMPFiles/source/FileHandlers/WAVE_Handler.hpp
+++ b/XMPFiles/source/FileHandlers/WAVE_Handler.hpp
@@ -18,6 +18,7 @@
#include "XMPFiles/source/FormatSupport/IFF/IChunkData.h"
#include "source/Endian.h"
#include "XMPFiles/source/FormatSupport/IFF/ChunkPath.h"
+#include "XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.h"
#include "XMPFiles/source/FormatSupport/WAVE/BEXTMetadata.h"
#include "XMPFiles/source/FormatSupport/WAVE/CartMetadata.h"
#include "XMPFiles/source/FormatSupport/WAVE/DISPMetadata.h"
@@ -110,6 +111,7 @@ private:
BEXTMetadata mBEXTMeta;
CartMetadata mCartMeta;
DISPMetadata mDISPMeta;
+ iXMLMetadata miXMLMeta;
// cr8r is not yet required for WAVE
// Cr8rMetadata mCr8rMeta;
@@ -121,6 +123,7 @@ private:
IChunkData *mBEXTChunk;
IChunkData *mCartChunk;
IChunkData *mDISPChunk;
+ IChunkData *miXMLChunk;
// cr8r is not yet required for WAVE
// IChunkData *mCr8rChunk;
@@ -133,7 +136,7 @@ private:
static const ChunkIdentifier kRIFFDisp[2];
static const ChunkIdentifier kRIFFBext[2];
static const ChunkIdentifier kRIFFCart[2];
-
+ static const ChunkIdentifier kRIFFiXML[2];
// cr8r is not yet required for WAVE
// static const ChunkIdentifier kWAVECr8r[2];
@@ -143,7 +146,7 @@ private:
static const ChunkIdentifier kRF64Disp[2];
static const ChunkIdentifier kRF64Bext[2];
static const ChunkIdentifier kRF64Cart[2];
-
+ static const ChunkIdentifier kRF64iXML[2];
// cr8r is not yet required for WAVE
// static const ChunkIdentifier kRF64Cr8r[2];
@@ -162,6 +165,9 @@ private:
/** Path to cart chunk */
ChunkPath mWAVECartChunkPath;
+ /** Path to IXML chunk */
+ ChunkPath mWAVEiXMLChunkPath;
+
//cr8r is not yet required for WAVE
///** Path to Cr8r chunk */
//const ChunkPath mWAVECr8rChunkPath;
diff --git a/XMPFiles/source/FileHandlers/XDCAMEX_Handler.cpp b/XMPFiles/source/FileHandlers/XDCAMEX_Handler.cpp
index 9005fe8..826cc0b 100644
--- a/XMPFiles/source/FileHandlers/XDCAMEX_Handler.cpp
+++ b/XMPFiles/source/FileHandlers/XDCAMEX_Handler.cpp
@@ -388,7 +388,7 @@ bool XDCAMEX_MetaHandler::GetFileModDate ( XMP_DateTime * modDate )
ok = this->MakeMediaproPath ( &fullPath, true /* checkFile */ );
if ( ok ) ok = Host_IO::GetModifyDate ( fullPath.c_str(), &oneDate );
if ( ok ) {
- if ( (! haveDate) || (*modDate < oneDate) ) *modDate = oneDate;
+ if ( *modDate < oneDate ) *modDate = oneDate;
haveDate = true;
}
diff --git a/XMPFiles/source/FileHandlers/XDCAM_Handler.cpp b/XMPFiles/source/FileHandlers/XDCAM_Handler.cpp
index f455a8c..2a05be9 100644
--- a/XMPFiles/source/FileHandlers/XDCAM_Handler.cpp
+++ b/XMPFiles/source/FileHandlers/XDCAM_Handler.cpp
@@ -488,20 +488,13 @@ void XDCAM_MetaHandler::SetSidecarPath()
( ( GetUns32BE(&buffer[12]) & 0xFFFF00FF ) == 0x01020000 )
)
{
- // If cached MXF file name is present then use it otherwise
- // side car generated on case insensitive OS may not be read on case sensitive OS.
- // For example, if file name is X.MXF then windows says X.mxf is same as X.MXF so
- // we may land up generating side car name as X.mxf.xmp which will not be read on
- // Mac which will search specifically for X.MXF.xmp
- XMP_VarString filePath = this->parent->GetFilePath();
- XMP_VarString ext;
- XIO::SplitFileExtension(&filePath, &ext);
- if(ext == "MXF" || ext == "mxf")
- {
- this->sidecarPath = this->parent->GetFilePath() + ".xmp";
- }
- else
+ std::string pathtomxfclip=Host_IO::GetCasePreservedName(mxfFilePath);
+ if ( pathtomxfclip != "" )
{
+ std::string ext;
+ XIO::SplitFileExtension( &pathtomxfclip, &ext , false);
+ ext="."+ext;
+ MakeClipFilePath ( &mxfFilePath , ext.c_str() , false );
this->sidecarPath = mxfFilePath + ".xmp";
}
}
@@ -524,7 +517,7 @@ void XDCAM_MetaHandler::SetSidecarPath()
// XDCAM_MetaHandler::XDCAM_MetaHandler
// ====================================
-XDCAM_MetaHandler::XDCAM_MetaHandler ( XMPFiles * _parent ) : isFAM(false), expat(0)
+XDCAM_MetaHandler::XDCAM_MetaHandler ( XMPFiles * _parent ) : isFAM(false), expat(0),clipMetadata(NULL)
{
this->parent = _parent; // Inherited, can't set in the prefix.
@@ -737,7 +730,7 @@ bool XDCAM_MetaHandler::GetFileModDate ( XMP_DateTime * modDate )
ok = MakeMediaproPath ( &mediaproPath, true /* checkFile */ );
if ( ok ) ok = Host_IO::GetModifyDate ( mediaproPath.c_str(), &oneDate );
if ( ok ) {
- if ( (! haveDate) || (*modDate < oneDate) ) *modDate = oneDate;
+ if ( (! haveDate) ) *modDate = oneDate;
haveDate = true;
}
@@ -870,7 +863,7 @@ bool XDCAM_MetaHandler::IsClipsPlanning ( std::string clipUmid , XMP_StringPtr p
{
XML_NodePtr materialNode = mgNode->GetNamedElement( nameSpace, "Material" );
XMP_StringPtr materialType = materialNode->GetAttrValue ( "type" );
- if ( XMP_LitMatch( materialType , "clip" ) )
+ if ( materialType && XMP_LitMatch( materialType , "clip" ) )
{
XMP_StringPtr umidValue = materialNode->GetAttrValue ( "umidRef" );
if ( umidValue != 0 && XMP_LitMatch( umidValue , clipUmid.c_str() ) )
diff --git a/XMPFiles/source/FormatSupport/IFF/ChunkController.cpp b/XMPFiles/source/FormatSupport/IFF/ChunkController.cpp
index 2a5a322..fc7c2c6 100644
--- a/XMPFiles/source/FormatSupport/IFF/ChunkController.cpp
+++ b/XMPFiles/source/FormatSupport/IFF/ChunkController.cpp
@@ -50,6 +50,8 @@ ChunkController::ChunkController( IChunkBehavior* chunkBehavior, XMP_Bool bigEnd
ChunkController::~ChunkController()
{
+ XMP_Validate( mRoot != NULL, "ERROR inserting Chunk. mRoot is NULL.", kXMPErr_InternalFailure );
+ XMP_Assert(dynamic_cast<Chunk*>(mRoot) == static_cast<Chunk*>(mRoot));
delete dynamic_cast<Chunk*>(mRoot);
}
@@ -104,7 +106,9 @@ void ChunkController::parseChunks( XMP_IO* stream, ChunkPath& currentPath, XMP_O
XMP_Bool isRoot = (parent == mRoot);
XMP_Uns64 parseLimit = mFileSize;
XMP_Uns32 chunkCnt = 0;
-
+
+ XMP_Validate( mRoot != NULL, "ERROR inserting Chunk. mRoot is NULL.", kXMPErr_InternalFailure );
+ XMP_Assert(dynamic_cast<Chunk*>(mRoot) == static_cast<Chunk*>(mRoot));
parent = ( parent == NULL ? dynamic_cast<Chunk*>(mRoot) : parent );
//
@@ -592,6 +596,8 @@ void ChunkController::findChunks( const ChunkPath& path, ChunkPath& currentPath,
void ChunkController::cleanupTree()
{
+ XMP_Validate( mRoot != NULL, "ERROR inserting Chunk. mRoot is NULL.", kXMPErr_InternalFailure );
+ XMP_Assert(dynamic_cast<Chunk*>(mRoot) == static_cast<Chunk*>(mRoot));
delete dynamic_cast<Chunk*>(mRoot);
mRoot = Chunk::createChunk(*mEndian);
}
@@ -659,6 +665,8 @@ IChunkData* ChunkController::createChunk( XMP_Uns32 id, XMP_Uns32 type /*= kType
void ChunkController::insertChunk( IChunkData* chunk )
{
XMP_Validate( chunk != NULL, "ERROR inserting Chunk. Chunk is NULL.", kXMPErr_InternalFailure );
+ XMP_Assert(dynamic_cast<Chunk*>(chunk) == static_cast<Chunk*>(chunk));
+
Chunk* ch = dynamic_cast<Chunk*>(chunk);
mChunkBehavior->insertChunk( *mRoot, *ch );
// sets OriginalSize = Size / OriginalOffset = Offset
diff --git a/XMPFiles/source/FormatSupport/IFF/ChunkPath.h b/XMPFiles/source/FormatSupport/IFF/ChunkPath.h
index c0f149b..30ed3c0 100644
--- a/XMPFiles/source/FormatSupport/IFF/ChunkPath.h
+++ b/XMPFiles/source/FormatSupport/IFF/ChunkPath.h
@@ -57,6 +57,7 @@ enum {
kChunk_bext = 0x62657874,
kChunk_cart = 0x63617274,
kChunk_ds64 = 0x64733634,
+ kChunk_iXML = 0x69584D4C,
// AIFF
kChunk_APPL = 0x4150504C,
diff --git a/XMPFiles/source/FormatSupport/IPTC_Support.cpp b/XMPFiles/source/FormatSupport/IPTC_Support.cpp
index e8fda45..a6ff864 100644
--- a/XMPFiles/source/FormatSupport/IPTC_Support.cpp
+++ b/XMPFiles/source/FormatSupport/IPTC_Support.cpp
@@ -337,14 +337,14 @@ size_t IPTC_Manager::GetDataSet_UTF8 ( XMP_Uns8 dsNum, std::string * utf8Str, si
void IPTC_Manager::DisposeLooseValue ( DataSetInfo & dsInfo )
{
- if ( dsInfo.dataLen == 0 ) return;
+ if ( dsInfo.dataLen == 0 || dsInfo.dataPtr == NULL ) return;
XMP_Uns8* dataBegin = this->iptcContent;
XMP_Uns8* dataEnd = dataBegin + this->iptcLength;
if ( ((XMP_Uns8*)dsInfo.dataPtr < dataBegin) || ((XMP_Uns8*)dsInfo.dataPtr >= dataEnd) ) {
free ( (void*) dsInfo.dataPtr );
- dsInfo.dataPtr = 0;
+ dsInfo.dataPtr = NULL;
}
} // IPTC_Manager::DisposeLooseValue
diff --git a/XMPFiles/source/FormatSupport/ISOBaseMedia_Support.cpp b/XMPFiles/source/FormatSupport/ISOBaseMedia_Support.cpp
index 670b8fb..d4a8076 100644
--- a/XMPFiles/source/FormatSupport/ISOBaseMedia_Support.cpp
+++ b/XMPFiles/source/FormatSupport/ISOBaseMedia_Support.cpp
@@ -22,6 +22,25 @@
namespace ISOMedia {
+typedef std::set<XMP_Uns32> KnownBoxList;
+static KnownBoxList boxList;
+#define ISOboxType(x,y) boxList.insert(y)
+#define SEPARATOR ;
+ bool IsKnownBoxType(XMP_Uns32 boxType) {
+ if (boxList.empty()){
+ ISOBoxList ISOBoxPrivateList ;
+ }
+ if (boxList.find(boxType)!=boxList.end()){
+ return true;
+ }
+ return false;
+ }
+ void TerminateGlobals()
+ {
+ boxList.clear();
+ }
+#undef ISOboxType
+#undef SEPARATOR
static BoxInfo voidInfo;
// =================================================================================================
diff --git a/XMPFiles/source/FormatSupport/ISOBaseMedia_Support.hpp b/XMPFiles/source/FormatSupport/ISOBaseMedia_Support.hpp
index dd2fbea..728293f 100644
--- a/XMPFiles/source/FormatSupport/ISOBaseMedia_Support.hpp
+++ b/XMPFiles/source/FormatSupport/ISOBaseMedia_Support.hpp
@@ -1,5 +1,5 @@
#ifndef __ISOBaseMedia_Support_hpp__
-#define __ISOBaseMedia_Support_hpp__ 1
+#define __ISOBaseMedia_Support_hpp__ 1
// =================================================================================================
// ADOBE SYSTEMS INCORPORATED
@@ -10,13 +10,15 @@
// of the Adobe license agreement accompanying it.
// =================================================================================================
-#include "public/include/XMP_Environment.h" // ! This must be the first include.
+#include "public/include/XMP_Environment.h" // ! This must be the first include.
#include "public/include/XMP_Const.h"
#include "public/include/XMP_IO.hpp"
#include "XMPFiles/source/XMPFiles_Impl.hpp"
+#include <set>
+
// =================================================================================================
/// \file ISOBaseMedia_Support.hpp
/// \brief XMPFiles support for the ISO Base Media File Format.
@@ -27,82 +29,95 @@
namespace ISOMedia {
+#define ISOBoxList \
+ ISOboxType(k_ftyp,0x66747970UL)SEPARATOR /* File header Box, no version/flags.*/ \
+ \
+ ISOboxType(k_mp41,0x6D703431UL)SEPARATOR /* Compatible brand codes*/ \
+ ISOboxType(k_mp42,0x6D703432UL)SEPARATOR \
+ ISOboxType(k_f4v ,0x66347620UL)SEPARATOR \
+ ISOboxType(k_avc1,0x61766331UL)SEPARATOR \
+ ISOboxType(k_qt ,0x71742020UL)SEPARATOR \
+ \
+ ISOboxType(k_moov,0x6D6F6F76UL)SEPARATOR /* Container Box, no version/flags. */ \
+ ISOboxType(k_mvhd,0x6D766864UL)SEPARATOR /* Data FullBox, has version/flags. */ \
+ ISOboxType(k_hdlr,0x68646C72UL)SEPARATOR \
+ ISOboxType(k_udta,0x75647461UL)SEPARATOR /* Container Box, no version/flags. */ \
+ ISOboxType(k_cprt,0x63707274UL)SEPARATOR /* Data FullBox, has version/flags. */ \
+ ISOboxType(k_uuid,0x75756964UL)SEPARATOR /* Data Box, no version/flags. */ \
+ ISOboxType(k_free,0x66726565UL)SEPARATOR /* Free space Box, no version/flags.*/ \
+ ISOboxType(k_mdat,0x6D646174UL)SEPARATOR /* Media data Box, no version/flags.*/ \
+ \
+ ISOboxType(k_trak,0x7472616BUL)SEPARATOR /* Types for the QuickTime timecode track.*/ \
+ ISOboxType(k_tkhd,0x746B6864UL)SEPARATOR \
+ ISOboxType(k_edts,0x65647473UL)SEPARATOR \
+ ISOboxType(k_elst,0x656C7374UL)SEPARATOR \
+ ISOboxType(k_mdia,0x6D646961UL)SEPARATOR \
+ ISOboxType(k_mdhd,0x6D646864UL)SEPARATOR \
+ ISOboxType(k_tmcd,0x746D6364UL)SEPARATOR \
+ ISOboxType(k_mhlr,0x6D686C72UL)SEPARATOR \
+ ISOboxType(k_minf,0x6D696E66UL)SEPARATOR \
+ ISOboxType(k_stbl,0x7374626CUL)SEPARATOR \
+ ISOboxType(k_stsd,0x73747364UL)SEPARATOR \
+ ISOboxType(k_stsc,0x73747363UL)SEPARATOR \
+ ISOboxType(k_stco,0x7374636FUL)SEPARATOR \
+ ISOboxType(k_co64,0x636F3634UL)SEPARATOR \
+ ISOboxType(k_dinf,0x64696E66UL)SEPARATOR \
+ ISOboxType(k_dref,0x64726566UL)SEPARATOR \
+ ISOboxType(k_alis,0x616C6973UL)SEPARATOR \
+ \
+ ISOboxType(k_meta,0x6D657461UL)SEPARATOR /* Types for the iTunes metadata boxes.*/ \
+ ISOboxType(k_ilst,0x696C7374UL)SEPARATOR \
+ ISOboxType(k_mdir,0x6D646972UL)SEPARATOR \
+ ISOboxType(k_mean,0x6D65616EUL)SEPARATOR \
+ ISOboxType(k_name,0x6E616D65UL)SEPARATOR \
+ ISOboxType(k_data,0x64617461UL)SEPARATOR \
+ ISOboxType(k_hyphens,0x2D2D2D2DUL)SEPARATOR \
+ \
+ ISOboxType(k_skip,0x736B6970UL)SEPARATOR /* Additional classic QuickTime top level boxes.*/ \
+ ISOboxType(k_wide,0x77696465UL)SEPARATOR \
+ ISOboxType(k_pnot,0x706E6F74UL)SEPARATOR \
+ \
+ ISOboxType(k_XMP_,0x584D505FUL) /* The QuickTime variant XMP box.*/
+
+#define ISOBoxPrivateList
+#define ISOboxType(x,y) x=y
+#define SEPARATOR ,
enum {
- k_ftyp = 0x66747970UL, // File header Box, no version/flags.
-
- k_mp41 = 0x6D703431UL, // Compatible brand codes
- k_mp42 = 0x6D703432UL,
- k_f4v = 0x66347620UL,
- k_avc1 = 0x61766331UL,
- k_qt = 0x71742020UL,
-
- k_moov = 0x6D6F6F76UL, // Container Box, no version/flags.
- k_mvhd = 0x6D766864UL, // Data FullBox, has version/flags.
- k_hdlr = 0x68646C72UL,
- k_udta = 0x75647461UL, // Container Box, no version/flags.
- k_cprt = 0x63707274UL, // Data FullBox, has version/flags.
- k_uuid = 0x75756964UL, // Data Box, no version/flags.
- k_free = 0x66726565UL, // Free space Box, no version/flags.
- k_mdat = 0x6D646174UL, // Media data Box, no version/flags.
-
- k_trak = 0x7472616BUL, // Types for the QuickTime timecode track.
- k_tkhd = 0x746B6864UL,
- k_edts = 0x65647473UL,
- k_elst = 0x656C7374UL,
- k_mdia = 0x6D646961UL,
- k_mdhd = 0x6D646864UL,
- k_tmcd = 0x746D6364UL,
- k_mhlr = 0x6D686C72UL,
- k_minf = 0x6D696E66UL,
- k_stbl = 0x7374626CUL,
- k_stsd = 0x73747364UL,
- k_stsc = 0x73747363UL,
- k_stco = 0x7374636FUL,
- k_co64 = 0x636F3634UL,
- k_dinf = 0x64696E66UL,
- k_dref = 0x64726566UL,
- k_alis = 0x616C6973UL,
-
- k_meta = 0x6D657461UL, // Types for the iTunes metadata boxes.
- k_ilst = 0x696C7374UL,
- k_mdir = 0x6D646972UL,
- k_mean = 0x6D65616EUL,
- k_name = 0x6E616D65UL,
- k_data = 0x64617461UL,
- k_hyphens = 0x2D2D2D2DUL,
-
- k_skip = 0x736B6970UL, // Additional classic QuickTime top level boxes.
- k_wide = 0x77696465UL,
- k_pnot = 0x706E6F74UL,
-
- k_XMP_ = 0x584D505FUL // The QuickTime variant XMP box.
+ ISOBoxList
+ ISOBoxPrivateList
};
+#undef ISOboxType
+#undef SEPARATOR
+
+
+ bool IsKnownBoxType(XMP_Uns32 boxType) ;
+ void TerminateGlobals();
static XMP_Uns32 k_xmpUUID [4] = { MakeUns32BE ( 0xBE7ACFCBUL ),
- MakeUns32BE ( 0x97A942E8UL ),
- MakeUns32BE ( 0x9C719994UL ),
- MakeUns32BE ( 0x91E3AFACUL ) };
+ MakeUns32BE ( 0x97A942E8UL ),
+ MakeUns32BE ( 0x9C719994UL ),
+ MakeUns32BE ( 0x91E3AFACUL ) };
struct BoxInfo {
- XMP_Uns32 boxType; // In memory as native endian!
- XMP_Uns32 headerSize; // Normally 8 or 16, less than 8 if available space is too small.
- XMP_Uns64 contentSize; // Always the real size, never 0 for "to EoF".
+ XMP_Uns32 boxType; // In memory as native endian!
+ XMP_Uns32 headerSize; // Normally 8 or 16, less than 8 if available space is too small.
+ XMP_Uns64 contentSize; // Always the real size, never 0 for "to EoF".
BoxInfo() : boxType(0), headerSize(0), contentSize(0) {};
};
// Get basic info about a box in memory, returning a pointer to the following box.
const XMP_Uns8 * GetBoxInfo ( const XMP_Uns8 * boxPtr, const XMP_Uns8 * boxLimit,
- BoxInfo * info, bool throwErrors = false );
+ BoxInfo * info, bool throwErrors = false );
// Get basic info about a box in a file, returning the offset of the following box. The I/O
// pointer is left at the start of the box's content. Returns the offset of the following box.
XMP_Uns64 GetBoxInfo ( XMP_IO* fileRef, const XMP_Uns64 boxOffset, const XMP_Uns64 boxLimit,
- BoxInfo * info, bool doSeek = true, bool throwErrors = false );
+ BoxInfo * info, bool doSeek = true, bool throwErrors = false );
-// XMP_Uns32 CountChildBoxes ( XMP_IO* fileRef, const XMP_Uns64 childOffset, const XMP_Uns64 childLimit );
+ // XMP_Uns32 CountChildBoxes ( XMP_IO* fileRef, const XMP_Uns64 childOffset, const XMP_Uns64 childLimit );
-} // namespace ISO_Media
+} // namespace ISO_Media
// =================================================================================================
-#endif // __ISOBaseMedia_Support_hpp__
+#endif // __ISOBaseMedia_Support_hpp__
diff --git a/XMPFiles/source/FormatSupport/MOOV_Support.hpp b/XMPFiles/source/FormatSupport/MOOV_Support.hpp
index 1dace2a..7d34ca2 100644
--- a/XMPFiles/source/FormatSupport/MOOV_Support.hpp
+++ b/XMPFiles/source/FormatSupport/MOOV_Support.hpp
@@ -166,9 +166,9 @@ public:
#pragma pack( pop )
-#if SUNOS_SPARC
+#if SUNOS_SPARC || XMP_IOS_ARM
#pragma pack( )
-#endif //#if SUNOS_SPARC
+#endif //#if SUNOS_SPARC || XMP_IOS_ARM
// ---------------------------------------------------------------------------------------------
diff --git a/XMPFiles/source/FormatSupport/P2_Support.cpp b/XMPFiles/source/FormatSupport/P2_Support.cpp
new file mode 100644
index 0000000..a5336d5
--- /dev/null
+++ b/XMPFiles/source/FormatSupport/P2_Support.cpp
@@ -0,0 +1,566 @@
+
+// =================================================================================================
+// ADOBE SYSTEMS INCORPORATED
+// Copyright 2014 Adobe Systems Incorporated
+// All Rights Reserved
+//
+// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
+// of the Adobe license agreement accompanying it.
+// =================================================================================================
+
+#include "public/include/XMP_Environment.h" // ! XMP_Environment.h must be the first included header.
+
+#include "public/include/XMP_Const.h"
+#include "public/include/XMP_IO.hpp"
+
+#include "XMPFiles/source/XMPFiles_Impl.hpp"
+#include "source/XMPFiles_IO.hpp"
+#include "source/XIO.hpp"
+#include "source/ExpatAdapter.hpp"
+
+#include "source/IOUtils.hpp"
+
+#include "XMPFiles/source/FormatSupport/P2_Support.hpp"
+#include "third-party/zuid/interfaces/MD5.h"
+#include <sstream>
+
+P2_Clip::P2_Clip(const std::string & p2ClipMetadataFilePath)
+ try :p2XMLParser(0),p2Root(0),headContentCached(false)
+ ,p2ClipContent(0),filePath(p2ClipMetadataFilePath)
+{
+ Host_IO::FileRef hostRef = Host_IO::Open ( p2ClipMetadataFilePath.c_str(), Host_IO::openReadOnly );
+ XMPFiles_IO xmlFile ( hostRef, p2ClipMetadataFilePath.c_str(), Host_IO::openReadOnly );
+ CreateExpatParser(xmlFile);
+ xmlFile.Close();
+}
+catch(...)
+{
+ DestroyExpatParser();
+ throw;
+}
+
+P2_Clip::~P2_Clip()
+{
+ DestroyExpatParser();
+}
+
+void P2_Clip::CreateExpatParser(XMPFiles_IO &xmlFile)
+{
+ this->p2XMLParser = XMP_NewExpatAdapter ( ExpatAdapter::kUseLocalNamespaces );
+ if ( this->p2XMLParser == 0 ) XMP_Throw ( "P2_MetaHandler: Can't create Expat adapter", kXMPErr_NoMemory );
+
+ XMP_Uns8 buffer [64*1024];
+ while ( true ) {
+ XMP_Int32 ioCount = xmlFile.Read ( buffer, sizeof(buffer) );
+ if ( ioCount == 0 ) break;
+ this->p2XMLParser->ParseBuffer ( buffer, ioCount, false /* not the end */ );
+ }
+ this->p2XMLParser->ParseBuffer ( 0, 0, true );
+}
+
+void P2_Clip::DestroyExpatParser()
+{
+ delete this->p2XMLParser;
+ this->p2XMLParser = 0;
+ p2Root=0;
+ headContent.reset();
+ headContentCached = false;
+}
+
+XML_NodePtr P2_Clip::GetP2RootNode()
+{
+ if (p2Root!=0) return p2Root;
+ // The root element should be P2Main in some namespace. At least 2 different namespaces are in
+ // use (ending in "v3.0" and "v3.1"). Take whatever this file uses.
+
+ XML_Node & xmlTree = this->p2XMLParser->tree;
+ XML_NodePtr rootElem = 0;
+
+ for ( size_t i = 0, limit = xmlTree.content.size(); i < limit; ++i ) {
+ if ( xmlTree.content[i]->kind == kElemNode ) {
+ rootElem = xmlTree.content[i];
+ }
+ }
+
+ if ( rootElem == 0 ) return 0;
+ XMP_StringPtr rootLocalName = rootElem->name.c_str() + rootElem->nsPrefixLen;
+ if ( ! XMP_LitMatch ( rootLocalName, "P2Main" ) ) return 0;
+
+ this->p2Root = rootElem;
+ return p2Root;
+}
+static void GetElementLocation(XML_NodePtr p2node,std::string*& elemLoc )
+{
+ if ( p2node != 0 && p2node->IsLeafContentNode() )
+ {
+ elemLoc= p2node->GetLeafContentPtr();
+ }
+}
+
+static void GetElementValue(XML_NodePtr p2node, XMP_Uns32 &value)
+{
+ if ( p2node != 0 && p2node->IsLeafContentNode() )
+ {
+ value =atoi(p2node->GetLeafContentValue());
+ }
+}
+void P2_Clip::CacheClipContent()
+{
+ if (headContentCached) return;
+ headContentCached = true;
+ XMP_StringPtr p2NameSpace=GetP2RootNode()->ns.c_str();
+ p2ClipContent = GetP2RootNode()->GetNamedElement ( p2NameSpace, "ClipContent" );
+ if ( p2ClipContent == 0 ) return;
+ XML_NodePtr p2node;
+
+ p2node= p2ClipContent->GetNamedElement ( p2NameSpace, "GlobalClipID" );
+ GetElementLocation(p2node,headContent.clipId );
+
+ p2node= p2ClipContent->GetNamedElement ( p2NameSpace, "ClipName" );
+ GetElementLocation(p2node,headContent.clipTitle );
+
+ p2node= p2ClipContent->GetNamedElement ( p2NameSpace, "Duration" );
+ GetElementValue(p2node,headContent.duration );
+
+ p2node= p2ClipContent->GetNamedElement ( p2NameSpace, "EditUnit" );
+ GetElementLocation(p2node,headContent.scaleUnit );
+
+ headContent.clipMetadata= p2ClipContent->GetNamedElement ( p2NameSpace, "ClipMetadata" );
+ headContent.essenceList= p2ClipContent->GetNamedElement ( p2NameSpace, "EssenceList" );
+
+ p2node= p2ClipContent->GetNamedElement ( p2NameSpace, "Relation" );
+ if ( p2node != 0 )
+ {
+ XML_NodePtr p2Offset= p2node->GetNamedElement ( p2NameSpace, "OffsetInShot" );
+ GetElementValue(p2Offset,headContent.OffsetInShot );
+ p2Offset= p2node->GetNamedElement ( p2NameSpace, "GlobalShotID" );
+ GetElementLocation(p2Offset,headContent.shotId );
+ XML_NodePtr p2connection= p2node->GetNamedElement ( p2NameSpace, "Connection" );
+ if ( p2node != 0 )
+ {
+ p2node= p2connection->GetNamedElement ( p2NameSpace, "Top" );
+ if ( p2node != 0 )
+ {
+ p2node= p2node->GetNamedElement ( p2NameSpace, "GlobalClipID" );
+ GetElementLocation(p2node,headContent.topClipId );
+ }
+ p2node= p2connection->GetNamedElement ( p2NameSpace, "Next" );
+ if ( p2node != 0 )
+ {
+ p2node= p2node->GetNamedElement ( p2NameSpace, "GlobalClipID" );
+ GetElementLocation(p2node,headContent.nextClipId );
+ }
+ p2node= p2connection->GetNamedElement ( p2NameSpace, "Previous" );
+ if ( p2node != 0 )
+ {
+ p2node= p2node->GetNamedElement ( p2NameSpace, "GlobalClipID" );
+ GetElementLocation(p2node,headContent.prevClipId );
+ }
+ }
+ }
+}
+
+bool P2_Clip::IsValidClip()
+{
+ this->CacheClipContent();
+ return headContent.clipId != 0;
+}
+bool P2_Clip::IsSpannedClip()
+{
+ return IsValidClip() && headContent.topClipId != 0 &&( headContent.prevClipId != 0 || headContent.nextClipId!=0 );
+
+}
+
+bool P2_Clip::IsTopClip()
+{
+ return IsValidClip() && headContent.topClipId != 0 && *(headContent.topClipId) == *(headContent.clipId);
+}
+
+XMP_Uns32 P2_Clip::GetOffsetInShot()
+{
+ this->CacheClipContent();
+ return this->headContent.OffsetInShot;
+}
+
+XMP_Uns32 P2_Clip::GetDuration()
+{
+ this->CacheClipContent();
+ return this->headContent.duration;
+}
+
+std::string* P2_Clip::GetClipId()
+{
+ this->CacheClipContent();
+ return this->headContent.clipId;
+}
+
+std::string* P2_Clip::GetClipName()
+{
+ if ( this->clipName == "" )
+ {
+ std::string tempPath = this->filePath;
+ XIO::SplitLeafName(&tempPath, &this->clipName);
+ std::string ext;
+ XIO::SplitFileExtension(&this->clipName, &ext);
+ }
+ return &this->clipName;
+}
+
+std::string P2_Clip::GetClipTitle()
+{
+ this->CacheClipContent();
+ if ( ! this->headContent.clipTitle ) return std::string("");
+ return *this->headContent.clipTitle;
+}
+std::string* P2_Clip::GetNextClipId()
+{
+ this->CacheClipContent();
+ return this->headContent.nextClipId;
+}
+
+std::string* P2_Clip::GetPreviousClipId()
+{
+ this->CacheClipContent();
+ return this->headContent.prevClipId;
+}
+
+std::string* P2_Clip::GetTopClipId()
+{
+ this->CacheClipContent();
+ return this->headContent.topClipId;
+}
+
+std::string* P2_Clip::GetShotId()
+{
+ this->CacheClipContent();
+ return this->headContent.shotId;
+}
+
+std::string* P2_Clip::GetEditUnit()
+{
+ this->CacheClipContent();
+ return this->headContent.scaleUnit;
+}
+
+XML_NodePtr P2_Clip::GetClipContentNode()
+{
+ this->CacheClipContent();
+ return this->p2ClipContent;
+}
+
+XML_NodePtr P2_Clip::GetClipMetadataNode()
+{
+ this->CacheClipContent();
+ return this->headContent.clipMetadata;
+}
+
+XML_NodePtr P2_Clip::GetEssenceListNode()
+{
+ this->CacheClipContent();
+ return this->headContent.essenceList;
+}
+
+std::string P2_Clip::GetXMPFilePath()
+{
+ std::string ClipMetadataPath = this->GetClipPath();
+ std::string ignoreext;
+ XIO::SplitFileExtension(&ClipMetadataPath,&ignoreext);
+ return ClipMetadataPath+ ".XMP";
+}
+
+void P2_Clip::CreateDigest ( std::string * digestStr )
+{
+ return;
+}
+
+void P2_Clip::SerializeP2ClipContent(std::string& xmlContentData)
+{
+ this->p2XMLParser->tree.Serialize ( &xmlContentData );
+}
+
+
+P2_SpannedClip::P2_SpannedClip(const std::string & p2ClipMetadataFilePath):
+ P2_Clip(p2ClipMetadataFilePath)
+{
+ P2_Clip* p2Clip= dynamic_cast<P2_Clip*>(this);
+ spannedP2Clip.insert(p2Clip);
+ if (p2Clip->GetClipId())
+ addedClipIds.insert(*p2Clip->GetClipId());
+}
+
+bool P2_SpannedClip::AddIfRelated(P2_Clip* newClip)
+{
+ std::string* tClipId = newClip->GetTopClipId();
+ if( tClipId != 0 && *(tClipId)==*this->GetTopClipId() &&
+ newClip->IsValidClip() && addedClipIds.find(*newClip->GetClipId()) == addedClipIds.end())
+ {
+ spannedP2Clip.insert(newClip);
+ addedClipIds.insert(*newClip->GetClipId());
+ return true;
+ }
+ return false;
+}
+
+bool P2_SpannedClip::IsComplete() const
+{
+ RelatedP2ClipList::iterator iter=spannedP2Clip.begin();
+ if (! (*iter)->IsTopClip() ) return false;
+ std::string* next=(*iter)->GetNextClipId();
+ while(++iter != spannedP2Clip.end() &&
+ next != 0 && (*iter)->IsValidClip() &&
+ *next == *( (*iter)->GetClipId() )
+ )
+ next = (*iter)->GetNextClipId();
+ if ( iter != spannedP2Clip.end() || next != 0 )
+ {
+ iter=spannedP2Clip.begin();
+ std::string* prev= (*iter)->GetClipId();
+ while(++iter != spannedP2Clip.end() &&
+ prev != 0 && (*iter)->GetPreviousClipId() !=0 &&
+ *prev == *( (*iter)->GetPreviousClipId() )
+ )
+ prev= (*iter)->GetClipId();
+ if ( iter != spannedP2Clip.end() ) return false;
+ }
+ return true;
+}
+
+std::string P2_SpannedClip::GetXMPFilePath()
+{
+ if ( this->IsComplete() )
+ {
+ std::string ClipMetadataPath = (*spannedP2Clip.begin())->GetClipPath();
+ std::string ignoreext;
+ XIO::SplitFileExtension(&ClipMetadataPath,&ignoreext);
+ return ClipMetadataPath+ ".XMP";
+ }else
+ {
+ return P2_Clip::GetXMPFilePath();
+ }
+}
+
+void P2_SpannedClip::DigestElement( MD5_CTX & md5Context, XML_NodePtr legacyContext, XMP_StringPtr legacyPropName )
+{
+ XML_NodePtr legacyProp = legacyContext->GetNamedElement ( this->GetP2RootNode()->ns.c_str(), legacyPropName );
+
+ if ( (legacyProp != 0) && legacyProp->IsLeafContentNode() && (! legacyProp->content.empty()) ) {
+ const XML_Node * xmlValue = legacyProp->content[0];
+ MD5Update ( &md5Context, (XMP_Uns8*)xmlValue->value.c_str(), (unsigned int)xmlValue->value.size() );
+ }
+
+} // P2_MetaHandler::DigestLegacyItem
+#define kHexDigits "0123456789ABCDEF"
+
+void P2_SpannedClip::CreateDigest ( std::string * digestStr )
+{
+ digestStr->erase();
+ if ( this->headContent.clipMetadata == 0 ) return; // Bail if we don't have any legacy XML.
+
+ XMP_StringPtr p2NS = this->GetP2RootNode()->ns.c_str();
+ XML_NodePtr legacyContext;
+ MD5_CTX md5Context;
+ unsigned char digestBin [16];
+ MD5Init ( &md5Context );
+
+ MD5Update ( &md5Context, (XMP_Uns8*)this->GetClipTitle().c_str(), (unsigned int)this->GetClipTitle().size() );
+ if ( headContent.clipId )
+ MD5Update ( &md5Context, (XMP_Uns8*)headContent.clipId->c_str(), (unsigned int)headContent.clipId->size() );
+
+ XMP_Uns32 totalDuration=this->GetDuration();
+ std::ostringstream ostr;
+ ostr << totalDuration;
+ if ( totalDuration )
+ MD5Update ( &md5Context, (XMP_Uns8*)ostr.str().c_str(), (unsigned int)ostr.str().size() );
+ if ( headContent.scaleUnit )
+ MD5Update ( &md5Context, (XMP_Uns8*)headContent.scaleUnit->c_str(), (unsigned int)headContent.scaleUnit->size() );
+
+ if ( headContent.shotId )
+ MD5Update ( &md5Context, (XMP_Uns8*)headContent.shotId->c_str(), (unsigned int)headContent.shotId->size() );
+ if ( headContent.topClipId )
+ MD5Update ( &md5Context, (XMP_Uns8*)headContent.topClipId->c_str(), (unsigned int)headContent.topClipId->size() );
+ if ( headContent.prevClipId )
+ MD5Update ( &md5Context, (XMP_Uns8*)headContent.prevClipId->c_str(), (unsigned int)headContent.prevClipId->size() );
+ if ( headContent.nextClipId )
+ MD5Update ( &md5Context, (XMP_Uns8*)headContent.nextClipId->c_str(), (unsigned int)headContent.nextClipId->size() );
+
+ if ( this->headContent.essenceList != 0 ) {
+
+ XML_NodePtr videoContext = this->headContent.essenceList->GetNamedElement ( p2NS, "Video" );
+
+ if ( videoContext != 0 ) {
+ this->DigestElement ( md5Context, videoContext, "AspectRatio" );
+ this->DigestElement ( md5Context, videoContext, "Codec" );
+ this->DigestElement ( md5Context, videoContext, "FrameRate" );
+ this->DigestElement ( md5Context, videoContext, "StartTimecode" );
+ }
+
+ XML_NodePtr audioContext = this->headContent.essenceList->GetNamedElement ( p2NS, "Audio" );
+
+ if ( audioContext != 0 ) {
+ this->DigestElement ( md5Context, audioContext, "SamplingRate" );
+ this->DigestElement ( md5Context, audioContext, "BitsPerSample" );
+ }
+
+ }
+
+ legacyContext = this->headContent.clipMetadata;
+ this->DigestElement ( md5Context, legacyContext, "UserClipName" );
+ this->DigestElement ( md5Context, legacyContext, "ShotMark" );
+
+ legacyContext = this->headContent.clipMetadata->GetNamedElement ( p2NS, "Access" );
+ /* Rather return than create the digest because the "Access" element is listed as "required" in the P2 spec.
+ So a P2 file without an "Access" element does not follow the spec and might be corrupt.*/
+ if ( legacyContext == 0 ) return;
+
+ this->DigestElement ( md5Context, legacyContext, "Creator" );
+ this->DigestElement ( md5Context, legacyContext, "CreationDate" );
+ this->DigestElement ( md5Context, legacyContext, "LastUpdateDate" );
+
+ legacyContext = this->headContent.clipMetadata->GetNamedElement ( p2NS, "Shoot" );
+
+ if ( legacyContext != 0 ) {
+ this->DigestElement ( md5Context, legacyContext, "Shooter" );
+
+ legacyContext = legacyContext->GetNamedElement ( p2NS, "Location" );
+
+ if ( legacyContext != 0 ) {
+ this->DigestElement ( md5Context, legacyContext, "PlaceName" );
+ this->DigestElement ( md5Context, legacyContext, "Longitude" );
+ this->DigestElement ( md5Context, legacyContext, "Latitude" );
+ this->DigestElement ( md5Context, legacyContext, "Altitude" );
+ }
+ }
+
+ legacyContext = this->headContent.clipMetadata->GetNamedElement ( p2NS, "Scenario" );
+
+ if ( legacyContext != 0 ) {
+ this->DigestElement ( md5Context, legacyContext, "SceneNo." );
+ this->DigestElement ( md5Context, legacyContext, "TakeNo." );
+ }
+
+ legacyContext = this->headContent.clipMetadata->GetNamedElement ( p2NS, "Device" );
+
+ if ( legacyContext != 0 ) {
+ this->DigestElement ( md5Context, legacyContext, "Manufacturer" );
+ this->DigestElement ( md5Context, legacyContext, "SerialNo." );
+ this->DigestElement ( md5Context, legacyContext, "ModelName" );
+ }
+
+ MD5Final ( digestBin, &md5Context );
+
+ char buffer [40];
+ for ( int in = 0, out = 0; in < 16; in += 1, out += 2 ) {
+ XMP_Uns8 byte = digestBin[in];
+ buffer[out] = kHexDigits [ byte >> 4 ];
+ buffer[out+1] = kHexDigits [ byte & 0xF ];
+ }
+ buffer[32] = 0;
+ digestStr->append ( buffer );
+
+}
+
+P2_SpannedClip::~P2_SpannedClip()
+{
+ RelatedP2ClipList::iterator iter = spannedP2Clip.begin();
+ for(;iter!=spannedP2Clip.end();iter++)
+ {
+ if (GetClipPath() != (*iter)->GetClipPath())
+ delete *iter;
+ }
+ spannedP2Clip.clear();
+}
+
+P2_Clip* P2_SpannedClip::TopP2Clip()
+{
+ if ( this->IsComplete() && spannedP2Clip.size() > 1 )
+ {
+ return *spannedP2Clip.begin();
+ }
+ return this;
+}
+
+XMP_Uns32 P2_SpannedClip::GetDuration()
+{
+ if ( IsComplete() )
+ {
+ RelatedP2ClipList::iterator iter = this->spannedP2Clip.begin();
+ XMP_Uns32 totalDuration=0;
+ for(;iter!=spannedP2Clip.end();iter++)
+ totalDuration+=(*iter)->GetDuration();
+ return totalDuration;
+ }
+ return P2_Clip::GetDuration();
+}
+
+void P2_SpannedClip::GetAllClipNames(std::vector <std::string> & clipNameList)
+{
+ clipNameList.clear();
+ if ( IsComplete() )
+ {
+ RelatedP2ClipList::iterator iter = this->spannedP2Clip.begin();
+ for(;iter!=spannedP2Clip.end();iter++)
+ clipNameList.push_back(*( (*iter)->GetClipName() ) );
+ }else
+ {
+ clipNameList.push_back(*( this->GetClipName() ) );
+ }
+}
+
+P2_Manager::P2_Manager():spannedClips(0)
+{
+
+}
+
+P2_Manager::~P2_Manager()
+{
+ delete this->spannedClips;
+ this->spannedClips = 0;
+}
+
+void P2_Manager::ProcessClip(std::string & clipPath)
+{
+ this->spannedClips = new P2_SpannedClip(clipPath);
+ if ( this->spannedClips->IsSpannedClip())
+ {
+ std::string clipFolder,filename,regExp;
+ XMP_StringVector clipFileList,regExpVec;
+ clipFolder=clipPath;
+ XIO::SplitLeafName ( &clipFolder, &filename );
+ regExp = "^\\d\\d\\d\\d\\d\\d.XML$";
+ regExpVec.push_back ( regExp );
+ regExp = "^\\d\\d\\d\\d\\W\\W.XML$";
+ regExpVec.push_back ( regExp );
+ regExp = "^\\d\\d\\d\\d\\d\\W.XML$";
+ regExpVec.push_back ( regExp );
+ regExp = "^\\d\\d\\d\\d\\W\\d.XML$";
+ regExpVec.push_back ( regExp );
+ IOUtils::GetMatchingChildren ( clipFileList, clipFolder, regExpVec, false, true, true );
+ for(XMP_StringVector::iterator iter=clipFileList.begin();
+ iter!=clipFileList.end();iter++)
+ {
+ P2_Clip * tempClip= new P2_Clip(*iter);
+ if ( ! spannedClips->AddIfRelated(tempClip) )
+ delete tempClip;
+ }
+ if(spannedClips->IsComplete())
+ {
+ return;
+ }
+ }
+}
+
+bool P2_Manager::IsValidP2()
+{
+ return spannedClips!= 0;
+}
+
+P2_Clip* P2_Manager::GetManagedClip()
+{
+ return spannedClips->TopP2Clip();
+}
+
+P2_SpannedClip* P2_Manager::GetSpannedClip()
+{
+ return spannedClips;
+}
+
diff --git a/XMPFiles/source/FormatSupport/P2_Support.hpp b/XMPFiles/source/FormatSupport/P2_Support.hpp
new file mode 100644
index 0000000..e16faea
--- /dev/null
+++ b/XMPFiles/source/FormatSupport/P2_Support.hpp
@@ -0,0 +1,135 @@
+#ifndef __P2_Support_hpp__
+#define __P2_Support_hpp__ 1
+
+// =================================================================================================
+// ADOBE SYSTEMS INCORPORATED
+// Copyright 2014 Adobe Systems Incorporated
+// All Rights Reserved
+//
+// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
+// of the Adobe license agreement accompanying it.
+// =================================================================================================
+
+#include "public/include/XMP_Environment.h"
+#include "public/include/XMP_Const.h"
+
+#include "XMPFiles/source/XMPFiles_Impl.hpp"
+#include "source/XIO.hpp"
+#include "third-party/zuid/interfaces/MD5.h"
+#include <set>
+
+class P2_Clip {
+public:
+ P2_Clip(const std::string & p2ClipMetadataFilePath);
+ bool IsSpannedClip() ;
+ bool IsTopClip() ;
+ bool IsValidClip() ;
+ virtual void CreateDigest ( std::string * digestStr );
+ XMP_Uns32 GetOffsetInShot();
+ XMP_Uns32 GetDuration();
+ std::string* GetClipName();
+ std::string GetClipTitle();
+ std::string* GetClipId();
+ std::string* GetNextClipId();
+ std::string* GetPreviousClipId();
+ std::string* GetTopClipId();
+ std::string* GetShotId();
+ std::string* GetEditUnit();
+ std::string GetClipPath(){return filePath;}
+ virtual std::string GetXMPFilePath();
+ XML_NodePtr GetClipContentNode();
+ XML_NodePtr GetClipMetadataNode();
+ XML_NodePtr GetEssenceListNode();
+ XML_NodePtr GetP2RootNode() ;
+ void SerializeP2ClipContent(std::string& xmlContentData) ;
+ virtual ~P2_Clip();
+protected:
+ class ClipContent
+ {
+ public:
+ ClipContent():clipId(0),scaleUnit(0),
+ duration(0),OffsetInShot(0),topClipId(0),nextClipId(0),
+ prevClipId(0),shotId(0),clipMetadata(0),essenceList(0),clipTitle(0){}
+ std::string* clipTitle;
+ std::string* clipId;
+ std::string* scaleUnit;
+ XMP_Uns32 duration;
+ XMP_Uns32 OffsetInShot;
+ std::string* topClipId;
+ std::string* nextClipId;
+ std::string* prevClipId;
+ std::string* shotId;
+ XML_NodePtr clipMetadata;
+ XML_NodePtr essenceList;
+ void reset(){*this=ClipContent();}
+ };
+ ClipContent headContent;
+private:
+ void DestroyExpatParser();
+ void CreateExpatParser(XMPFiles_IO &xmlFile);
+ void CacheClipContent();
+
+ bool headContentCached;
+ ExpatAdapter * p2XMLParser;
+ XML_NodePtr p2Root;
+ XML_NodePtr p2ClipContent;
+ std::string filePath;
+ std::string clipName;
+
+}; // class P2_Clip
+struct P2SpannedClip_Order
+{
+ bool operator()( P2_Clip* lhs, P2_Clip* rhs)
+ {
+ return lhs->GetOffsetInShot() < rhs->GetOffsetInShot();
+ }
+
+};
+
+class P2_SpannedClip : public P2_Clip{
+public:
+ P2_SpannedClip(const std::string & p2ClipMetadataFilePath);
+ bool AddIfRelated(P2_Clip* openedClip);
+ bool IsComplete()const;
+ XMP_Uns32 GetDuration();
+ P2_Clip* TopP2Clip() ;
+ std::string GetXMPFilePath();
+ void CreateDigest ( std::string * digestStr );
+ void GetAllClipNames(std::vector <std::string> & clipNameList);
+ virtual ~P2_SpannedClip();
+private:
+ P2_SpannedClip(const P2_SpannedClip &);
+ P2_SpannedClip operator=(const P2_SpannedClip &);
+
+ void DigestElement( MD5_CTX & md5Context, XML_NodePtr legacyContext, XMP_StringPtr legacyPropName );
+
+ typedef std::multiset<P2_Clip*,P2SpannedClip_Order> RelatedP2ClipList;
+ std::set<std::string> addedClipIds;
+ RelatedP2ClipList spannedP2Clip;
+
+}; // class P2_SpannedClip
+
+// =================================================================================================
+class P2_Manager {
+public:
+ P2_Manager();
+ void ProcessClip(std::string & clipPath);
+ P2_Clip* GetManagedClip();
+ P2_SpannedClip* GetSpannedClip();
+ bool IsValidP2();
+ ~P2_Manager();
+
+private:
+
+ P2_SpannedClip* spannedClips;
+
+}; // class P2_Manager
+
+
+// =================================================================================================
+
+
+
+// =================================================================================================
+
+#endif // __P2_Support_hpp__
diff --git a/XMPFiles/source/FormatSupport/PostScript_Support.cpp b/XMPFiles/source/FormatSupport/PostScript_Support.cpp
index a0c13d2..fec55fb 100644
--- a/XMPFiles/source/FormatSupport/PostScript_Support.cpp
+++ b/XMPFiles/source/FormatSupport/PostScript_Support.cpp
@@ -148,10 +148,8 @@ inline static bool SearchBBoxInTrailer(XMP_IO* fileRef,IOBuffer& ioBuf)
//skip chars till newline
if ( ! PostScript_Support::SkipUntilNewline( fileRef, ioBuf ) ) return false;
}
- if (!bboxfoundintrailer)
- return false;
- else
- break;
+
+ break;
}
else if ( CheckBytes ( ioBuf.ptr, Uns8Ptr(kPSContainsBeginDocString.c_str()), kPSContainsBeginDocString.length() ) )
{
@@ -267,7 +265,8 @@ bool PostScript_Support::IsValidPSFile(XMP_IO* fileRef,XMP_FileFormat &format
format=kXMP_PostScriptFile;
//return true if no "EPSF-" is found as it is a valid PS atleast
if ( ! CheckBytes ( ioBuf.ptr, Uns8Ptr("EPSF-"), 5 ) ) return true;
- }
+
+ }//intentional fall through for further checking of unknown files
case kXMP_EPSFile:
{
diff --git a/XMPFiles/source/FormatSupport/QuickTime_Support.cpp b/XMPFiles/source/FormatSupport/QuickTime_Support.cpp
index 5dde0c5..8e2d45a 100644
--- a/XMPFiles/source/FormatSupport/QuickTime_Support.cpp
+++ b/XMPFiles/source/FormatSupport/QuickTime_Support.cpp
@@ -12,6 +12,9 @@
#if XMP_MacBuild
#include <CoreServices/CoreServices.h>
+#elif XMP_iOSBuild
+ #include <CoreFoundation/CoreFoundation.h>
+ #include "XMPFiles/source/FormatSupport/MacScriptExtracts.h"
#else
#include "XMPFiles/source/FormatSupport/MacScriptExtracts.h"
#endif
@@ -354,7 +357,7 @@ static const char * kMacToXMPLang_128_151 [24] = {
#if XMP_WinBuild
-static UINT kMacScriptToWinCP[34] = {
+static UINT kMacScriptToWinCP[33] = {
/* smRoman (0) */ 10000, // There don't seem to be symbolic constants.
/* smJapanese (1) */ 10001, // From http://msdn.microsoft.com/en-us/library/dd317756(VS.85).aspx
/* smTradChinese (2) */ 10002,
@@ -383,8 +386,7 @@ static UINT kMacScriptToWinCP[34] = {
/* smSimpChinese (25) */ 10008,
/* smTibetan (26) */ 0,
/* smMongolian (27) */ 0,
- /* smEthiopic (28) */ 0,
- /* smGeez (28) */ 0,
+ /* smEthiopic/smGeez (28) */ 0,
/* smCentralEuroRoman (29) */ 10029,
/* smVietnamese (30) */ 0,
/* smExtArabic (31) */ 0,
@@ -502,6 +504,156 @@ static UINT kMacToWinCP_0_94 [95] = {
#endif
+
+#if XMP_iOSBuild
+
+static XMP_Uns32 kMacScriptToIOSEncodingCF[33] = {
+ /* smRoman (0) */ kCFStringEncodingMacRoman,
+ /* smJapanese (1) */ kCFStringEncodingMacJapanese,
+ /* smTradChinese (2) */ kCFStringEncodingMacChineseTrad,
+ /* smKorean (3) */ kCFStringEncodingMacKorean,
+ /* smArabic (4) */ kCFStringEncodingMacArabic,
+ /* smHebrew (5) */ kCFStringEncodingMacHebrew,
+ /* smGreek (6) */ kCFStringEncodingMacGreek,
+ /* smCyrillic (7) */ kCFStringEncodingMacCyrillic,
+ /* smRSymbol (8) */ kCFStringEncodingMacSymbol,
+ /* smDevanagari (9) */ kCFStringEncodingMacDevanagari,
+ /* smGurmukhi (10) */ kCFStringEncodingMacGurmukhi,
+ /* smGujarati (11) */ kCFStringEncodingMacGujarati,
+ /* smOriya (12) */ kCFStringEncodingMacOriya,
+ /* smBengali (13) */ kCFStringEncodingMacBengali,
+ /* smTamil (14) */ kCFStringEncodingMacTamil,
+ /* smTelugu (15) */ kCFStringEncodingMacTelugu,
+ /* smKannada (16) */ kCFStringEncodingMacKannada,
+ /* smMalayalam (17) */ kCFStringEncodingMacMalayalam,
+ /* smSinhalese (18) */ kCFStringEncodingMacSinhalese,
+ /* smBurmese (19) */ kCFStringEncodingMacBurmese,
+ /* smKhmer (20) */ kCFStringEncodingMacKhmer,
+ /* smThai (21) */ kCFStringEncodingMacThai,
+ /* smLao (22) */ kCFStringEncodingMacLaotian,
+ /* smGeorgian (23) */ kCFStringEncodingMacGeorgian,
+ /* smArmenian (24) */ kCFStringEncodingMacArmenian,
+ /* smSimpChinese (25) */ kCFStringEncodingMacChineseSimp,
+ /* smTibetan (26) */ kCFStringEncodingMacTibetan,
+ /* smMongolian (27) */ kCFStringEncodingMacMongolian,
+ /* smEthiopic/smGeez (28) */ kCFStringEncodingMacEthiopic,
+ /* smCentralEuroRoman (29) */ kCFStringEncodingMacCentralEurRoman,
+ /* smVietnamese (30) */ kCFStringEncodingMacVietnamese,
+ /* smExtArabic (31) */ kCFStringEncodingMacExtArabic,
+ /* smUninterp (32) */ kCFStringEncodingMacVT100
+}; // kMacScriptToIOSEncodingCF
+
+static XMP_Uns32 kMacToIOSEncodingCF_0_94 [95] = {
+
+ /* langEnglish (0) */ kCFStringEncodingMacRoman,
+ /* langFrench (1) */ kCFStringEncodingMacRoman,
+ /* langGerman (2) */ kCFStringEncodingMacRoman,
+ /* langItalian (3) */ kCFStringEncodingMacRoman,
+ /* langDutch (4) */ kCFStringEncodingMacRoman,
+ /* langSwedish (5) */ kCFStringEncodingMacRoman,
+ /* langSpanish (6) */ kCFStringEncodingMacRoman,
+ /* langDanish (7) */ kCFStringEncodingMacRoman,
+ /* langPortuguese (8) */ kCFStringEncodingMacRoman,
+ /* langNorwegian (9) */ kCFStringEncodingMacRoman,
+
+ /* langHebrew (10) */ kCFStringEncodingMacHebrew,
+ /* langJapanese (11) */ kCFStringEncodingMacJapanese,
+ /* langArabic (12) */ kCFStringEncodingMacArabic,
+ /* langFinnish (13) */ kCFStringEncodingMacRoman,
+ /* langGreek (14) */ kCFStringEncodingMacGreek,
+ /* langIcelandic (15) */ kCFStringEncodingMacIcelandic,
+ /* langMaltese (16) */ kCFStringEncodingMacRoman,
+ /* langTurkish (17) */ kCFStringEncodingMacTurkish,
+ /* langCroatian (18) */ kCFStringEncodingMacCroatian,
+ /* langTradChinese (19) */ kCFStringEncodingMacChineseTrad,
+
+ /* langUrdu (20) */ kCFStringEncodingMacArabic,
+ /* langHindi (21) */ kCFStringEncodingMacDevanagari,
+ /* langThai (22) */ kCFStringEncodingMacThai,
+ /* langKorean (23) */ kCFStringEncodingMacKorean,
+ /* langLithuanian (24) */ kCFStringEncodingMacCentralEurRoman,
+ /* langPolish (25) */ kCFStringEncodingMacCentralEurRoman,
+ /* langHungarian (26) */ kCFStringEncodingMacCentralEurRoman,
+ /* langEstonian (27) */ kCFStringEncodingMacCentralEurRoman,
+ /* langLatvian (28) */ kCFStringEncodingMacCentralEurRoman,
+ /* langSami (29) */ kCFStringEncodingInvalidId,
+
+ /* langFaroese (30) */ kCFStringEncodingMacRoman,
+ /* langFarsi (31) */ kCFStringEncodingMacFarsi,
+ /* langRussian (32) */ kCFStringEncodingMacCyrillic,
+ /* langSimpChinese (33) */ kCFStringEncodingMacChineseSimp,
+ /* langFlemish (34) */ kCFStringEncodingMacRoman,
+ /* langIrishGaelic (35) */ kCFStringEncodingMacRoman,
+ /* langAlbanian (36) */ kCFStringEncodingMacRoman,
+ /* langRomanian (37) */ kCFStringEncodingMacRomanian,
+ /* langCzech (38) */ kCFStringEncodingMacCentralEurRoman,
+ /* langSlovak (39) */ kCFStringEncodingMacCentralEurRoman,
+
+ /* langSlovenian (40) */ kCFStringEncodingMacRoman,
+ /* langYiddish (41) */ kCFStringEncodingMacHebrew,
+ /* langSerbian (42) */ kCFStringEncodingMacCyrillic,
+ /* langMacedonian (43) */ kCFStringEncodingMacCyrillic,
+ /* langBulgarian (44) */ kCFStringEncodingMacCyrillic,
+ /* langUkrainian (45) */ kCFStringEncodingMacUkrainian,
+ /* langBelorussian (46) */ kCFStringEncodingMacCyrillic,
+ /* langUzbek (47) */ kCFStringEncodingMacCyrillic,
+ /* langKazakh (48) */ kCFStringEncodingMacCyrillic,
+ /* langAzerbaijani (49) */ kCFStringEncodingMacCyrillic,
+
+ /* langAzerbaijanAr (50) */ kCFStringEncodingMacArabic,
+ /* langArmenian (51) */ kCFStringEncodingMacArmenian,
+ /* langGeorgian (52) */ kCFStringEncodingMacGeorgian,
+ /* langMoldavian (53) */ kCFStringEncodingMacCyrillic,
+ /* langKirghiz (54) */ kCFStringEncodingMacCyrillic,
+ /* langTajiki (55) */ kCFStringEncodingMacCyrillic,
+ /* langTurkmen (56) */ kCFStringEncodingMacCyrillic,
+ /* langMongolian (57) */ kCFStringEncodingMacMongolian,
+ /* langMongolianCyr (58) */ kCFStringEncodingMacCyrillic,
+ /* langPashto (59) */ kCFStringEncodingMacArabic,
+
+ /* langKurdish (60) */ kCFStringEncodingMacArabic,
+ /* langKashmiri (61) */ kCFStringEncodingMacArabic,
+ /* langSindhi (62) */ kCFStringEncodingMacArabic,
+ /* langTibetan (63) */ kCFStringEncodingMacTibetan,
+ /* langNepali (64) */ kCFStringEncodingMacDevanagari,
+ /* langSanskrit (65) */ kCFStringEncodingMacDevanagari,
+ /* langMarathi (66) */ kCFStringEncodingMacDevanagari,
+ /* langBengali (67) */ kCFStringEncodingMacBengali,
+ /* langAssamese (68) */ kCFStringEncodingMacBengali,
+ /* langGujarati (69) */ kCFStringEncodingMacGujarati,
+
+ /* langPunjabi (70) */ kCFStringEncodingMacGurmukhi,
+ /* langOriya (71) */ kCFStringEncodingMacOriya,
+ /* langMalayalam (72) */ kCFStringEncodingMacMalayalam,
+ /* langKannada (73) */ kCFStringEncodingMacKannada,
+ /* langTamil (74) */ kCFStringEncodingMacTamil,
+ /* langTelugu (75) */ kCFStringEncodingMacTelugu,
+ /* langSinhalese (76) */ kCFStringEncodingMacSinhalese,
+ /* langBurmese (77) */ kCFStringEncodingMacBurmese,
+ /* langKhmer (78) */ kCFStringEncodingMacKhmer,
+ /* langLao (79) */ kCFStringEncodingMacLaotian,
+
+ /* langVietnamese (80) */ kCFStringEncodingMacVietnamese,
+ /* langIndonesian (81) */ kCFStringEncodingMacRoman,
+ /* langTagalog (82) */ kCFStringEncodingMacRoman,
+ /* langMalayRoman (83) */ kCFStringEncodingMacRoman,
+ /* langMalayArabic (84) */ kCFStringEncodingMacArabic,
+ /* langAmharic (85) */ kCFStringEncodingMacEthiopic,
+ /* langTigrinya (86) */ kCFStringEncodingMacEthiopic,
+ /* langOromo (87) */ kCFStringEncodingMacEthiopic,
+ /* langSomali (88) */ kCFStringEncodingMacRoman,
+ /* langSwahili (89) */ kCFStringEncodingMacRoman,
+
+ /* langKinyarwanda (90) */ kCFStringEncodingMacRoman,
+ /* langRundi (91) */ kCFStringEncodingMacRoman,
+ /* langNyanja (92) */ kCFStringEncodingMacRoman,
+ /* langMalagasy (93) */ kCFStringEncodingMacRoman,
+ /* langEsperanto (94) */ kCFStringEncodingMacRoman
+
+}; // kMacToIOSEncodingCF_0_94
+
+#endif
+
// =================================================================================================
// GetMacScript
// ============
@@ -513,13 +665,35 @@ static XMP_Uns16 GetMacScript ( XMP_Uns16 macLang )
if ( macLang <= 94 ) {
macScript = kMacLangToScript_0_94[macLang];
} else if ( (128 <= macLang) && (macLang <= 151) ) {
- macScript = kMacLangToScript_0_94[macLang-128];
+ macScript = kMacLangToScript_128_151[macLang-128];
}
return macScript;
} // GetMacScript
+
+#if XMP_iOSBuild
+// =================================================================================================
+// GetIOSEncodingCF
+// ========
+
+static XMP_Uns32 GetIOSEncodingCF ( XMP_Uns16 macLang )
+{
+ XMP_Uns32 encCF = kCFStringEncodingInvalidId;
+
+ if ( macLang <= 94 ) encCF = kMacToIOSEncodingCF_0_94[macLang];
+
+ if ( encCF == kCFStringEncodingInvalidId || !CFStringIsEncodingAvailable(encCF)) {
+ XMP_Uns16 macScript = GetMacScript ( macLang );
+ if ( macScript != kNoMacScript ) encCF = kMacScriptToIOSEncodingCF[macScript];
+ }
+
+ return encCF;
+
+} // GetIOSEncodingCF
+#endif
+
// =================================================================================================
// GetWinCP
// ========
@@ -669,7 +843,10 @@ bool ConvertToMacLang ( const std::string & utf8Value, XMP_Uns16 macLang, std::s
#elif XMP_WinBuild
UINT winCP = GetWinCP ( macLang );
ReconcileUtils::UTF8ToWinEncoding ( winCP, (XMP_Uns8*)utf8Value.c_str(), utf8Value.size(), macValue );
- #endif
+ #elif XMP_iOSBuild
+ XMP_Uns32 iosEncCF = GetIOSEncodingCF(macLang);
+ ReconcileUtils::IOSConvertEncoding(kCFStringEncodingUTF8, iosEncCF, (XMP_Uns8*)utf8Value.c_str(), utf8Value.size(), macValue);
+ #endif
return true;
@@ -692,7 +869,10 @@ bool ConvertFromMacLang ( const std::string & macValue, XMP_Uns16 macLang, std::
#elif XMP_WinBuild
UINT winCP = GetWinCP ( macLang );
ReconcileUtils::WinEncodingToUTF8 ( winCP, (XMP_Uns8*)macValue.c_str(), macValue.size(), utf8Value );
- #endif
+ #elif XMP_iOSBuild
+ XMP_Uns32 iosEncCF = GetIOSEncodingCF(macLang);
+ ReconcileUtils::IOSConvertEncoding(iosEncCF, kCFStringEncodingUTF8, (XMP_Uns8*)macValue.c_str(), macValue.size(), utf8Value);
+#endif
return true;
@@ -988,7 +1168,7 @@ void TradQT_Manager::ExportLangAltXMP ( XMP_Uns32 id, const SXMPMeta & xmp, XMP_
for ( XMP_Index xmpIndex = 1; xmpIndex <= xmpCount; ++xmpIndex ) { // ! XMP index starts at 1!
SXMPUtils::ComposeArrayItemPath ( ns, langArray, xmpIndex, &xmpPath );
- xmp.GetProperty ( ns, xmpPath.c_str(), &xmpValue, 0 );
+ if ( !xmp.GetProperty ( ns, xmpPath.c_str(), &xmpValue, 0 ) ) continue;
xmp.GetQualifier ( ns, xmpPath.c_str(), kXMP_NS_XML, "lang", &xmpLang, 0 );
if ( xmpLang == "x-default" ) continue;
diff --git a/XMPFiles/source/FormatSupport/RIFF.cpp b/XMPFiles/source/FormatSupport/RIFF.cpp
index dcf55f2..4d9a0c1 100644
--- a/XMPFiles/source/FormatSupport/RIFF.cpp
+++ b/XMPFiles/source/FormatSupport/RIFF.cpp
@@ -137,6 +137,7 @@ Chunk* getChunk ( ContainerChunk* parent, RIFF_MetaHandler* handler )
// ad hoc creation
Chunk::Chunk( ContainerChunk* parent, ChunkType c, XMP_Uns32 id )
{
+ this->hasChange = false;
this->chunkType = c; // base class assumption
this->parent = parent;
this->id = id;
diff --git a/XMPFiles/source/FormatSupport/ReconcileTIFF.cpp b/XMPFiles/source/FormatSupport/ReconcileTIFF.cpp
index 5aa4435..e43a1e5 100644
--- a/XMPFiles/source/FormatSupport/ReconcileTIFF.cpp
+++ b/XMPFiles/source/FormatSupport/ReconcileTIFF.cpp
@@ -469,12 +469,12 @@ ImportSingleTIFF_SRational ( const TIFF_Manager::TagInfo & tagInfo, const bool n
{
try { // Don't let errors with one stop the others.
-#if SUNOS_SPARC
+#if SUNOS_SPARC || XMP_IOS_ARM
XMP_Uns32 binPtr[2];
memcpy(&binPtr, tagInfo.dataPtr, sizeof(XMP_Uns32)*2);
#else
XMP_Uns32 * binPtr = (XMP_Uns32*)tagInfo.dataPtr;
-#endif //#if SUNOS_SPARC
+#endif //#if SUNOS_SPARC || XMP_IOS_ARM
XMP_Int32 binNum = GetUns32AsIs ( &binPtr[0] );
XMP_Int32 binDenom = GetUns32AsIs ( &binPtr[1] );
if ( ! nativeEndian ) {
@@ -1289,7 +1289,7 @@ static void
ImportTIFF_Date ( const TIFF_Manager & tiff, const TIFF_Manager::TagInfo & dateInfo,
SXMPMeta * xmp, const char * xmpNS, const char * xmpProp )
{
- XMP_Uns16 secID;
+ XMP_Uns16 secID = 0;
switch ( dateInfo.id ) {
case kTIFF_DateTime : secID = kTIFF_SubSecTime; break;
case kTIFF_DateTimeOriginal : secID = kTIFF_SubSecTimeOriginal; break;
@@ -2584,7 +2584,8 @@ ExportArrayTIFF ( TIFF_Manager * tiff, XMP_Uns8 ifd, const TIFF_MappingToXMP & m
XMP_Uns32 num, denom;
for ( size_t i = 1; i <= arraySize; ++i, rationalPtr += 2 ) {
SXMPUtils::ComposeArrayItemPath ( xmpNS, xmpArray, (XMP_Index)i, &itemPath );
- xmp.GetProperty ( xmpNS, itemPath.c_str(), &xmpValue, 0 );
+ bool isPropoerty = xmp.GetProperty ( xmpNS, itemPath.c_str(), &xmpValue, 0 );
+ if ( ! isPropoerty ) return;
bool ok = DecodeRational ( xmpValue.c_str(), &num, &denom );
if ( ! ok ) return;
if ( ! nativeEndian ) { num = Flip4 ( num ); denom = Flip4 ( denom ); }
@@ -2680,7 +2681,7 @@ static void
ExportTIFF_Date ( const SXMPMeta & xmp, const char * xmpNS, const char * xmpProp, TIFF_Manager * tiff, XMP_Uns16 mainID )
{
XMP_Uns8 mainIFD = kTIFF_ExifIFD;
- XMP_Uns16 fracID;
+ XMP_Uns16 fracID=0;
switch ( mainID ) {
case kTIFF_DateTime : mainIFD = kTIFF_PrimaryIFD; fracID = kTIFF_SubSecTime; break;
case kTIFF_DateTimeOriginal : fracID = kTIFF_SubSecTimeOriginal; break;
@@ -3086,7 +3087,7 @@ static void ExportTIFF_PhotographicSensitivity ( SXMPMeta * xmp, TIFF_Manager *
TIFF_Manager::TagInfo tagInfo;
std::string xmpValue;
XMP_OptionBits flags;
- XMP_Int32 binValue;
+ XMP_Int32 binValue = 0;
bool haveOldExif = true; // Default to old Exif if no version tag.
diff --git a/XMPFiles/source/FormatSupport/Reconcile_Impl.cpp b/XMPFiles/source/FormatSupport/Reconcile_Impl.cpp
index 9dcef3d..ca0e1a0 100644
--- a/XMPFiles/source/FormatSupport/Reconcile_Impl.cpp
+++ b/XMPFiles/source/FormatSupport/Reconcile_Impl.cpp
@@ -17,6 +17,8 @@
#if XMP_WinBuild
#elif XMP_MacBuild
#include <CoreServices/CoreServices.h>
+#elif XMP_iOSBuild
+ #include <CoreFoundation/CoreFoundation.h>
#endif
// =================================================================================================
@@ -201,6 +203,13 @@ void ReconcileUtils::UTF8ToLocal ( const void * _utf8Ptr, size_t utf8Len, std::s
#elif XMP_UNIXBuild
XMP_Throw ( "Generic UNIX does not have conversions between local and Unicode", kXMPErr_Unavailable );
+
+ #elif XMP_iOSBuild
+
+ IOSConvertEncoding(kCFStringEncodingUTF8, CFStringGetSystemEncoding(), utf8Ptr, utf8Len, local);
+
+
+
#endif
@@ -371,6 +380,11 @@ void ReconcileUtils::LocalToUTF8 ( const void * _localPtr, size_t localLen, std:
#elif XMP_UNIXBuild
XMP_Throw ( "Generic UNIX does not have conversions between local and Unicode", kXMPErr_Unavailable );
+
+ #elif XMP_iOSBuild
+
+ IOSConvertEncoding(CFStringGetSystemEncoding(), kCFStringEncodingUTF8, localPtr, localLen, utf8);
+
#endif
@@ -429,3 +443,29 @@ void ReconcileUtils::NativeToUTF8( const std::string & input, std::string & outp
output = input;
}
} // ReconcileUtils::NativeToUTF8
+
+
+#if XMP_iOSBuild
+ void ReconcileUtils::IOSConvertEncoding(XMP_Uns32 srcEncoding, XMP_Uns32 destEncoding, const XMP_Uns8 * inputPtr, size_t inputLen, std::string * output)
+ {
+ if(srcEncoding == kCFStringEncodingInvalidId || destEncoding == kCFStringEncodingInvalidId ||
+ !CFStringIsEncodingAvailable(srcEncoding) || !CFStringIsEncodingAvailable(destEncoding))
+ return;
+ CFStringRef cStrRef = CFStringCreateWithBytesNoCopy(NULL, inputPtr, inputLen, srcEncoding, false, kCFAllocatorNull);
+ if(cStrRef == NULL)
+ return;
+ CFRange inputRange = CFRangeMake(0, CFStringGetLength(cStrRef));
+ const size_t kBufferLen = 1000;
+ while(inputRange.length > 0)
+ {
+ XMP_Uns8 buffer[kBufferLen];
+ CFIndex charsWritten;
+ CFIndex charsProcessed = CFStringGetBytes(cStrRef, inputRange, destEncoding, 0, FALSE, buffer, kBufferLen, &charsWritten);
+ if (charsProcessed == 0) break;
+ output->append(reinterpret_cast<const char*>(&buffer[0]), charsWritten);
+ inputRange.location += charsProcessed;
+ inputRange.length -= charsProcessed;
+ }
+ CFRelease(cStrRef);
+ }
+#endif
diff --git a/XMPFiles/source/FormatSupport/Reconcile_Impl.hpp b/XMPFiles/source/FormatSupport/Reconcile_Impl.hpp
index ea5d407..4efcb3f 100644
--- a/XMPFiles/source/FormatSupport/Reconcile_Impl.hpp
+++ b/XMPFiles/source/FormatSupport/Reconcile_Impl.hpp
@@ -58,6 +58,8 @@ namespace ReconcileUtils {
#elif XMP_MacBuild
void UTF8ToMacEncoding ( XMP_Uns16 macScript, XMP_Uns16 macLang, const XMP_Uns8 * utf8Ptr, size_t utf8Len, std::string * host );
void MacEncodingToUTF8 ( XMP_Uns16 macScript, XMP_Uns16 macLang, const XMP_Uns8 * hostPtr, size_t hostLen, std::string * utf8 );
+ #elif XMP_iOSBuild
+ void IOSConvertEncoding(XMP_Uns32 srcEncoding, XMP_Uns32 destEncoding, const XMP_Uns8 * inputPtr, size_t inputLen, std::string * output);
#endif
}; // ReconcileUtils
diff --git a/XMPFiles/source/FormatSupport/TIFF_MemoryReader.cpp b/XMPFiles/source/FormatSupport/TIFF_MemoryReader.cpp
index 05cd87f..a3b6ace 100644
--- a/XMPFiles/source/FormatSupport/TIFF_MemoryReader.cpp
+++ b/XMPFiles/source/FormatSupport/TIFF_MemoryReader.cpp
@@ -93,7 +93,7 @@ void TIFF_MemoryReader::SortIFD ( TweakedIFDInfo* thisIFD )
} else {
// Move the out of order entry to position j+1, move the middle of the array down.
- #if ! SUNOS_SPARC
+ #if ! (SUNOS_SPARC || XMP_IOS_ARM)
TweakedIFDEntry temp = ifdEntries[i];
++j; // ! So the insertion index becomes j.
memcpy ( &ifdEntries[j+1], &ifdEntries[j], 12*(i-j) ); // AUDIT: Safe, moving less than i entries to a location before i.
@@ -655,7 +655,7 @@ XMP_Uns32 TIFF_MemoryReader::ProcessOneIFD ( XMP_Uns32 ifdOffset, XMP_Uns8 ifd )
if ( (GetUns16AsIs(&thisEntry->type) < kTIFF_ByteType) || (GetUns16AsIs(&thisEntry->type) > kTIFF_LastType) ) continue; // Bad type, skip this tag.
- #if ! SUNOS_SPARC
+ #if ! (SUNOS_SPARC || XMP_IOS_ARM)
thisEntry->bytes *= (XMP_Uns32)kTIFF_TypeSizes[thisEntry->type];
if ( thisEntry->bytes > 4 ) {
diff --git a/XMPFiles/source/FormatSupport/TIFF_Support.hpp b/XMPFiles/source/FormatSupport/TIFF_Support.hpp
index 002376b..b43fe42 100644
--- a/XMPFiles/source/FormatSupport/TIFF_Support.hpp
+++ b/XMPFiles/source/FormatSupport/TIFF_Support.hpp
@@ -25,11 +25,11 @@
#include "source/Endian.h"
-#if SUNOS_SPARC
+#if SUNOS_SPARC || XMP_IOS_ARM
static const IEndian &IE = BigEndian::getInstance();
#else
static const IEndian &IE = LittleEndian::getInstance();
-#endif //#if SUNOS_SPARC
+#endif //#if SUNOS_SPARC || XMP_IOS_ARM
// =================================================================================================
/// \file TIFF_Support.hpp
diff --git a/XMPFiles/source/FormatSupport/TimeConversionUtils.cpp b/XMPFiles/source/FormatSupport/TimeConversionUtils.cpp
new file mode 100644
index 0000000..2dbb459
--- /dev/null
+++ b/XMPFiles/source/FormatSupport/TimeConversionUtils.cpp
@@ -0,0 +1,599 @@
+// =================================================================================================
+// ADOBE SYSTEMS INCORPORATED
+// Copyright 2014 Adobe Systems Incorporated
+// All Rights Reserved
+//
+// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
+// of the Adobe license agreement accompanying it.
+// =================================================================================================
+
+#include "public/include/XMP_Environment.h" // ! XMP_Environment.h must be the first included header.
+#include "public/include/XMP_Const.h"
+
+#include "XMPFiles/source/FormatSupport/TimeConversionUtils.hpp"
+
+#include <string>
+#include <sstream>
+#include <iomanip>
+#include <cmath>
+
+namespace TimeConversionUtils {
+
+ void DropFrameToHMSF(
+ XMP_Int64 inFrames,
+ XMP_Int64 inTimecodeFPS,
+ XMP_Uns32& outHours,
+ XMP_Uns32& outMinutes,
+ XMP_Uns32& outSeconds,
+ XMP_Uns32& outFrames)
+ {
+ XMP_Assert((inTimecodeFPS == 30) || (inTimecodeFPS == 60)); // No other drop frame rates are known at this time.
+
+ XMP_Int64 rateAdjustmentFactor = inTimecodeFPS / 30;
+ XMP_Int64 framesPerHour = (30 * 3600 - 108) * rateAdjustmentFactor;
+ XMP_Int64 framesPer10Minutes = (30 * 600 - 18) * rateAdjustmentFactor;
+ XMP_Int64 framesPerMinute = 30 * 60 * rateAdjustmentFactor;
+ XMP_Int64 framesPerSecond = 30 * rateAdjustmentFactor;
+ XMP_Int64 dropsPerMinute = 2 * rateAdjustmentFactor;
+
+ XMP_Int64 currentFrames = inFrames;
+ XMP_Int64 framesLeft = currentFrames;
+ if (currentFrames < 0)
+ {
+ framesLeft = -currentFrames;
+ }
+ if (framesLeft >= framesPerHour)
+ {
+ outHours = static_cast<XMP_Int32>(framesLeft / framesPerHour);
+ framesLeft = framesLeft % framesPerHour;
+ }
+ if (framesLeft >= framesPer10Minutes)
+ {
+ outMinutes = static_cast<XMP_Int32>(framesLeft / framesPer10Minutes) * 10;
+ framesLeft = framesLeft % framesPer10Minutes;
+ }
+ if (framesLeft >= framesPerMinute)
+ {
+ XMP_Int64 remainingDropMinutes = static_cast<XMP_Int64>((framesLeft - framesPerMinute) /
+ (framesPerMinute - dropsPerMinute));
+ ++remainingDropMinutes;
+
+ outMinutes += static_cast<XMP_Int32>(remainingDropMinutes);
+ framesLeft -= ((framesPerMinute - dropsPerMinute) * remainingDropMinutes);
+ }
+ if (framesLeft >= framesPerSecond)
+ {
+ outSeconds = static_cast<XMP_Int32>(framesLeft / framesPerSecond);
+ }
+ outFrames = static_cast<XMP_Int32>(framesLeft % framesPerSecond);
+ }
+
+ bool ConvertSamplesToTimecode(
+ std::string & outTimecode,
+ XMP_Int64 inSamples,
+ XMP_Uns64 inSampleRate,
+ XMP_Int64 inTimecodeFPS,
+ bool inIsDrop,
+ bool inIsNoDrop,
+ bool inShowOnlyFrames = false,
+ bool inOnlyShowSeconds = false ,
+ bool inNoZeroPrefix = false ,
+ bool inShowFractional = false ,
+ bool inNoHours = false )
+ {
+ if (!(inIsDrop ? !inIsNoDrop : true))
+ {
+ XMP_Assert( !(inIsDrop ? !inIsNoDrop : true) );
+ return false;
+ }
+
+ if (inSampleRate == 0)
+ {
+ outTimecode = "00:00:00:00";
+ return true;
+ }
+
+ std::string possibleNegStr;
+ if (inSamples < 0)
+ {
+ inSamples *= -1;
+ possibleNegStr = "-";
+ }
+
+ XMP_Int64 rateNumerator = inTimecodeFPS;
+ XMP_Int64 rateDenominator = 1;
+ if (inIsDrop || inIsNoDrop)
+ {
+ rateNumerator = 1000 * inTimecodeFPS;
+ rateDenominator = 1001;
+ }
+
+ XMP_Int64 frameNumber = (inSamples * rateNumerator) / (inSampleRate * rateDenominator);
+ XMP_Int64 hundredthsOfFrames = ((inSamples * rateNumerator * 100) / (inSampleRate * rateDenominator)) % 100;
+
+ std::stringstream stream;
+ double fSamples = static_cast<double>(inSamples);
+ double fSampleRate = static_cast<double>(inSampleRate);
+
+ if (inIsDrop)
+ {
+ if (inShowOnlyFrames)
+ {
+ double fAdjustmentFactor = static_cast<double>(inTimecodeFPS) / 30.0;
+ double fCorrectionRatio = (600.0 * static_cast<double>(inTimecodeFPS) / 1.001) / (17982.0 * fAdjustmentFactor);
+ double fValue = fSamples * fCorrectionRatio / fSampleRate;
+
+ // "%ld"
+ stream << static_cast<int>(fValue * 29.97 * fAdjustmentFactor);
+ }
+ else
+ {
+ XMP_Uns32 hours = 0;
+ XMP_Uns32 minutes = 0;
+ XMP_Uns32 seconds = 0;
+ XMP_Uns32 frames = 0;
+
+ DropFrameToHMSF(
+ frameNumber,
+ inTimecodeFPS,
+ hours,
+ minutes,
+ seconds,
+ frames);
+
+ hours = hours % 24;
+ // "%02d;%02d;%02d;%02d"
+ stream << possibleNegStr << std::setfill('0') << std::setw(2) << static_cast<int>(hours)
+ << ";"
+ << std::setfill('0') << std::setw(2) << static_cast<int>(minutes)
+ << ";"
+ << std::setfill('0') << std::setw(2) << static_cast<int>(seconds)
+ << ";"
+ << std::setfill('0') << std::setw(2) << static_cast<int>(frames);
+ possibleNegStr.clear();
+ }
+ }
+ else
+ {
+ if (inShowOnlyFrames)
+ {
+ // "%ld"
+ stream << static_cast<int>(frameNumber);
+ }
+ else
+ {
+ XMP_Int64 framesPerMinute = inTimecodeFPS * 60;
+ XMP_Int64 framesPerHour = framesPerMinute * 60;
+
+ XMP_Int64 iHours = frameNumber / framesPerHour;
+ frameNumber %= framesPerHour;
+ XMP_Int64 mins = frameNumber / framesPerMinute;
+ frameNumber %= framesPerMinute;
+ XMP_Int64 seconds = frameNumber / inTimecodeFPS;
+ XMP_Int64 ss = frameNumber % inTimecodeFPS;
+ XMP_Int64 s = seconds;
+
+ if (inNoHours)
+ {
+ mins += iHours * 60;
+ iHours = 0;
+ }
+
+ if (((iHours) || (!inNoZeroPrefix)) && (!inNoHours))
+ {
+ iHours = iHours % 24;
+ // "%02ld:"
+ stream << possibleNegStr << std::setfill('0') << std::setw(2) << static_cast<int>(iHours)
+ << ":";
+ possibleNegStr.clear();
+ }
+
+ if ((iHours) || (!inNoZeroPrefix))
+ {
+ // "%02ld:"
+ stream << possibleNegStr << std::setfill('0') << std::setw(2) << static_cast<int>(mins)
+ << ":";
+ possibleNegStr.clear();
+ }
+ else if (mins)
+ {
+ // "%ld:"
+ stream << possibleNegStr << static_cast<int>(mins)
+ << ":";
+ possibleNegStr.clear();
+ }
+
+ if (inOnlyShowSeconds)
+ {
+ // "%02ld"
+ stream << possibleNegStr << std::setfill('0') << std::setw(2) << static_cast<int>(s);
+ possibleNegStr.clear();
+ }
+ else
+ {
+ if ((iHours) || (mins) || (!inNoZeroPrefix))
+ {
+ // "%02ld:"
+ stream << possibleNegStr << std::setfill('0') << std::setw(2) << static_cast<int>(s)
+ << ":";
+ possibleNegStr.clear();
+ }
+ else if (s)
+ {
+ // "%ld:"
+ stream << possibleNegStr << static_cast<int>(s)
+ << ":";
+ possibleNegStr.clear();
+ }
+
+ if ((iHours) || (mins) || (s) || (!inNoZeroPrefix))
+ {
+ if (inTimecodeFPS <= 10)
+ {
+ // "%01ld"
+ stream << possibleNegStr << std::setfill('0') << std::setw(1) << static_cast<int>(ss);
+ possibleNegStr.clear();
+ }
+ else if ((inTimecodeFPS <= 100))
+ {
+ // "%02ld"
+ stream << possibleNegStr << std::setfill('0') << std::setw(2) << static_cast<int>(ss);
+ possibleNegStr.clear();
+ }
+ else if (inTimecodeFPS <= 1000)
+ {
+ // "%03ld"
+ stream << possibleNegStr << std::setfill('0') << std::setw(3) << static_cast<int>(ss);
+ possibleNegStr.clear();
+ }
+ else
+ {
+ // "%04ld"
+ stream << possibleNegStr << std::setfill('0') << std::setw(4) << static_cast<int>(ss);
+ possibleNegStr.clear();
+ }
+ }
+ else
+ {
+ // "%ld"
+ stream << possibleNegStr << static_cast<int>(ss);
+ possibleNegStr.clear();
+ }
+
+ if (inShowFractional)
+ {
+ // ".%02d"
+ stream << possibleNegStr << "."
+ << std::setfill('0') << std::setw(2) << static_cast<int>(hundredthsOfFrames);
+ possibleNegStr.clear();
+ }
+ }
+ }
+ }
+
+ outTimecode = stream.str();
+
+ return true;
+ }
+
+ bool ConvertSamplesToSMPTETimecode(
+ std::string & outTimecode,
+ XMP_Int64 inSamples,
+ XMP_Uns64 inSampleRate,
+ const std::string & inTimecodeFormat )
+ {
+ bool result = false;
+
+ if ( inTimecodeFormat.compare( "24Timecode" ) == 0 ) {
+ result = ConvertSamplesToTimecode( outTimecode, inSamples, inSampleRate, 24, false, false );
+ } else if ( inTimecodeFormat.compare( "25Timecode" ) == 0 ) {
+ result = ConvertSamplesToTimecode( outTimecode, inSamples, inSampleRate, 25, false, false );
+ } else if ( inTimecodeFormat.compare( "2997DropTimecode") == 0 ) {
+ result = ConvertSamplesToTimecode( outTimecode, inSamples, inSampleRate, 30, true, false );
+ } else if ( inTimecodeFormat.compare( "2997NonDropTimecode") == 0 ) {
+ result = ConvertSamplesToTimecode( outTimecode, inSamples, inSampleRate, 30, false, true );
+ } else if ( inTimecodeFormat.compare( "30Timecode" ) == 0 ) {
+ result = ConvertSamplesToTimecode( outTimecode, inSamples, inSampleRate, 30, false, false );
+ } else if ( inTimecodeFormat.compare( "50Timecode" ) == 0 ) {
+ result = ConvertSamplesToTimecode( outTimecode, inSamples, inSampleRate, 50, false, false );
+ } else if ( inTimecodeFormat.compare( "5994DropTimecode" ) == 0 ) {
+ result = ConvertSamplesToTimecode( outTimecode, inSamples, inSampleRate, 60, true, false );
+ } else if ( inTimecodeFormat.compare( "5994NonDropTimecode" ) == 0 ) {
+ result = ConvertSamplesToTimecode( outTimecode, inSamples, inSampleRate, 60, false, true );
+ } else if ( inTimecodeFormat.compare( "60Timecode" ) == 0 ) {
+ result = ConvertSamplesToTimecode( outTimecode, inSamples, inSampleRate, 60, false, false );
+ } else if ( inTimecodeFormat.compare( "23976Timecode" ) == 0 ) {
+ result = ConvertSamplesToTimecode(outTimecode, inSamples, inSampleRate, 24, false, true);
+ }
+ return result;
+ }
+
+ bool StringToNumber(
+ XMP_Int32 & outNumber,
+ const std::string & inString )
+ {
+ bool numberFound = false;
+ outNumber = 0;
+ for ( size_t i = 0, endIndex = inString.size(); i < endIndex; i++ ) {
+ XMP_Int32 digit = inString[i] - '0';
+ if ( digit >= 0 && digit <= 9 ) {
+ outNumber *= 10;
+ outNumber += digit;
+ numberFound = true;
+ } else {
+ return numberFound;
+ }
+ }
+ return numberFound;
+ }
+
+ void ParseTimeCodeString(
+ const std::string & inTimecode,
+ XMP_Int32 & outHours,
+ XMP_Int32 & outMinutes,
+ XMP_Int32 & outSeconds,
+ XMP_Int32 & outFrames,
+ XMP_Int32 & outFractionalFrameNumerator,
+ XMP_Int32 & outFractionalFrameDenominator )
+ {
+ XMP_Int32 m1 = 0;
+ XMP_Int32 m2 = 0;
+ XMP_Int32 m3 = 0;
+ XMP_Int32 m4 = 0;
+ XMP_Int32 m5 = 0;
+ bool hasFoundDecimal = false;
+ XMP_Int32 digitCount = 0;
+
+ outFractionalFrameNumerator = 0;
+ outFractionalFrameDenominator = 1;
+
+ std::string::const_iterator iter = inTimecode.begin();
+ std::string::const_iterator iterEnd = inTimecode.end();
+
+ while (1)
+ { // Skip leading white space
+ while ( iter != iterEnd && (*iter < '0' || *iter > '9') )
+ {
+ if (*iter == '.')
+ hasFoundDecimal = true;
+ iter++;
+ } // hh:mm:ss:ff.ddd
+ if (iter == iterEnd)
+ break;
+
+ if (!hasFoundDecimal)
+ {
+ // get MSB digits
+ StringToNumber(m1, std::string(iter, iterEnd));
+
+ // Skip the digits
+ while (iter != iterEnd && (*iter >= '0' && *iter <= '9'))
+ iter++;
+
+ // Skip the white space, note if "." or ":" ("." signifies decimal portion of frame)
+ while ( iter != iterEnd && (*iter < '0' || *iter > '9'))
+ {
+ if (*iter == '.')
+ hasFoundDecimal = true;
+ iter++;
+ }
+
+ if (iter == iterEnd)
+ break;
+ }
+ // shift and scan next MSB digits
+
+ if (!hasFoundDecimal)
+ {
+ m2 = m1;
+ digitCount = static_cast< XMP_Int32 >( iterEnd - iter );
+ StringToNumber(m1, std::string(iter, iterEnd));
+
+ // Skip the digits
+ while ( iter != iterEnd && (*iter >= '0' && *iter <= '9') )
+ iter++;
+
+ // Skip the white space, note if "." or ":" ("." signifies
+ // decimal portion of frame)
+ while (iter != iterEnd && (*iter < '0' || *iter > '9'))
+ {
+ if (*iter == '.')
+ hasFoundDecimal = true;
+ iter++;
+ }
+ }
+
+ if (iter == iterEnd)
+ break;
+
+ m3 = m2;
+ m2 = m1;
+ digitCount = static_cast< XMP_Int32 >( iterEnd - iter );
+ StringToNumber(m1, std::string(iter, iterEnd));
+ if (hasFoundDecimal)
+ break;
+
+ while (iter != iterEnd && (*iter >= '0' && *iter <= '9'))
+ iter++;
+
+ // Skip the white space, note if "." or ":" ("." signifies decimal portion of frame)
+ while (iter != iterEnd && (*iter < '0' || *iter > '9'))
+ {
+ if (*iter == '.')
+ hasFoundDecimal = true;
+ iter++;
+ }
+ if (iter == iterEnd)
+ break;
+
+ m4 = m3;
+ m3 = m2;
+ m2 = m1;
+ digitCount = static_cast< XMP_Int32 >( iterEnd - iter );
+ StringToNumber(m1, std::string(iter, iterEnd));
+ if (hasFoundDecimal)
+ break;
+
+ while (iter != iterEnd && (*iter >= '0' && *iter <= '9'))
+ {
+ iter++;
+ }
+
+ // Skip the white space, note if "." or ":" ("." signifies decimal portion of frame)
+ while (iter != iterEnd && (*iter < '0' || *iter > '9'))
+ {
+ if (*iter == '.')
+ hasFoundDecimal = true;
+ iter++;
+ }
+
+ if (iter == iterEnd)
+ break;
+
+ m5 = m4;
+ m4 = m3;
+ m3 = m2;
+ m2 = m1;
+ digitCount = static_cast< XMP_Int32 >( iterEnd - iter );
+ StringToNumber(m1, std::string(iter, iterEnd));
+ break;
+ }
+
+ if (hasFoundDecimal)
+ {
+ outFractionalFrameDenominator = static_cast<XMP_Int32>(pow(10.0, digitCount) + 0.5);
+ outFractionalFrameNumerator = m1;
+ m1 = m2;
+ m2 = m3;
+ m3 = m4;
+ m4 = m5;
+ m5 = 0;
+ }
+ outHours = m4;
+ outMinutes = m3;
+ outSeconds = m2;
+ outFrames = m1;
+ }
+
+ bool ConvertTimecodeToSamples(
+ XMP_Int64 & outSamples,
+ const std::string & inTimecode,
+ XMP_Uns64 inSampleRate,
+ XMP_Int64 inTimecodeFPS,
+ bool inNTSC,
+ bool inDropFrame)
+ {
+ /// @TODO: Ensure that negative and >64-bit values are OK and work as expected.
+
+ if (inTimecode.empty())
+ {
+ outSamples = static_cast<XMP_Int64>(-1);
+ return true;
+ }
+
+ XMP_Int32 hours;
+ XMP_Int32 minutes;
+ XMP_Int32 seconds;
+ XMP_Int32 frames;
+ XMP_Int32 fractionalFrameNumerator;
+ XMP_Int32 fractionalFrameDenominator;
+
+ ParseTimeCodeString(inTimecode, hours, minutes, seconds, frames, fractionalFrameNumerator, fractionalFrameDenominator);
+
+ XMP_Int64 framesPerSecond = inTimecodeFPS;
+ XMP_Int64 framesPerMinute = framesPerSecond * 60;
+ XMP_Int64 framesPerHour = framesPerMinute * 60;
+ XMP_Int64 wholeFrames = 0;
+ XMP_Int64 frameRateNumerator = inTimecodeFPS;
+ XMP_Int64 frameRateDenominator = 1;
+
+ if (inNTSC)
+ {
+ frameRateNumerator = 1000 * inTimecodeFPS;
+ frameRateDenominator = 1001;
+ }
+
+ if (inDropFrame)
+ {
+ XMP_Int64 frameGroupDropped = 2 * inTimecodeFPS / 30; // 2 or 4 frames dropped at a time.
+ XMP_Int64 framesPerHourDropped = 108 * inTimecodeFPS / 30;
+ framesPerHour -= framesPerHourDropped;
+ XMP_Int64 framesPerTenMinutes = framesPerHour / 6;
+ XMP_Assert( framesPerHour % 6 == 0 ); //, "Drop frame not supported on the given frame rate."
+ XMP_Int64 framesDroppedWithinTheLeastTenMinutes = 0;
+ if (minutes % 10 != 0)
+ {
+ if ((seconds == 0) && (frames < frameGroupDropped))
+ {
+ frames = static_cast<XMP_Int32>(frameGroupDropped); // Make sure invalid strings snap to the next higher valid frame.
+ }
+ framesDroppedWithinTheLeastTenMinutes = (minutes % 10) * frameGroupDropped;
+ }
+ wholeFrames = hours * framesPerHour + (minutes / 10) * framesPerTenMinutes + (minutes % 10) * framesPerMinute + seconds * framesPerSecond + frames - framesDroppedWithinTheLeastTenMinutes;
+ }
+ else
+ {
+ wholeFrames = hours * framesPerHour + minutes * framesPerMinute + seconds * framesPerSecond + frames;
+ }
+
+ if (frameRateNumerator * fractionalFrameDenominator == 0)
+ {
+ XMP_Assert( "Divide by zero in ConvertTimecodeToSamples" );
+ outSamples = 0;
+ return true;
+ }
+
+ //
+ // (frame count / frames per second) * samples per second = sample count.
+ //
+ // ((frame count + fractionalFrameNumerator / fractionalFrameDenominator) * samples per second / frames per second) = sample count.
+ // or in integer math:
+ // ((frame count * fractionalFrameDenominator + fractionalFrameNumerator) * samples per second / (frames per second * fractionalFrameDenominator)) = sample count.
+ // with rounding correction to give us the first sample contained entirely in the frame:
+
+ // There is a non-zero probability of rolling over this integer arithmetic.
+ double integerFailsafeNumerator = ((static_cast<double>(wholeFrames) * static_cast<double>(fractionalFrameDenominator) + fractionalFrameNumerator) * static_cast<double>(frameRateDenominator) * static_cast<double>(inSampleRate) + (frameRateNumerator * fractionalFrameDenominator - 1));
+ if (integerFailsafeNumerator > static_cast<double>(0x7000000000000000LL))
+ {
+ outSamples = static_cast<XMP_Int64>(integerFailsafeNumerator / (static_cast<double>(frameRateNumerator) * static_cast<double>(fractionalFrameDenominator)));
+ }
+ else
+ {
+ outSamples = ((wholeFrames * fractionalFrameDenominator + fractionalFrameNumerator) * frameRateDenominator * inSampleRate + (frameRateNumerator * fractionalFrameDenominator - 1)) / (frameRateNumerator * fractionalFrameDenominator);
+ }
+ return true;
+ }
+
+ bool ConvertSMPTETimecodeToSamples(
+ XMP_Int64 & outSamples,
+ const std::string & inTimecode,
+ XMP_Uns64 inSampleRate,
+ const std::string & inTimecodeFormat )
+ {
+ bool result = false;
+
+ if ( inTimecodeFormat.compare( "24Timecode" ) == 0 ) {
+ result = ConvertTimecodeToSamples( outSamples, inTimecode, inSampleRate, 24, false, false );
+ } else if ( inTimecodeFormat.compare( "25Timecode" ) == 0 ) {
+ result = ConvertTimecodeToSamples( outSamples, inTimecode, inSampleRate, 25, false, false );
+ } else if ( inTimecodeFormat.compare( "2997DropTimecode") == 0 ) {
+ result = ConvertTimecodeToSamples( outSamples, inTimecode, inSampleRate, 30, true, true );
+ } else if ( inTimecodeFormat.compare( "2997NonDropTimecode") == 0 ) {
+ result = ConvertTimecodeToSamples( outSamples, inTimecode, inSampleRate, 30, true, false );
+ } else if ( inTimecodeFormat.compare( "30Timecode" ) == 0 ) {
+ result = ConvertTimecodeToSamples( outSamples, inTimecode, inSampleRate, 30, false, false );
+ } else if ( inTimecodeFormat.compare( "50Timecode" ) == 0 ) {
+ result = ConvertTimecodeToSamples( outSamples, inTimecode, inSampleRate, 50, false, false );
+ } else if ( inTimecodeFormat.compare( "5994DropTimecode" ) == 0 ) {
+ result = ConvertTimecodeToSamples( outSamples, inTimecode, inSampleRate, 60, true, true );
+ } else if ( inTimecodeFormat.compare( "5994NonDropTimecode" ) == 0 ) {
+ result = ConvertTimecodeToSamples( outSamples, inTimecode, inSampleRate, 60, true, false );
+ } else if ( inTimecodeFormat.compare( "60Timecode" ) == 0 ) {
+ result = ConvertTimecodeToSamples( outSamples, inTimecode, inSampleRate, 60, false, false );
+ } else if ( inTimecodeFormat.compare( "23976Timecode" ) == 0 ) {
+ result = ConvertTimecodeToSamples( outSamples, inTimecode, inSampleRate, 24, true, false );
+ }
+ return result;
+ }
+
+}
diff --git a/XMPFiles/source/FormatSupport/TimeConversionUtils.hpp b/XMPFiles/source/FormatSupport/TimeConversionUtils.hpp
new file mode 100644
index 0000000..bf7ed04
--- /dev/null
+++ b/XMPFiles/source/FormatSupport/TimeConversionUtils.hpp
@@ -0,0 +1,35 @@
+#ifndef TimeConversionUtils_h__
+#define TimeConversionUtils_h__ 1
+
+// =================================================================================================
+// ADOBE SYSTEMS INCORPORATED
+// Copyright 2014 Adobe Systems Incorporated
+// All Rights Reserved
+//
+// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
+// of the Adobe license agreement accompanying it.
+// =================================================================================================
+
+#include "public/include/XMP_Environment.h" // ! XMP_Environment.h must be the first included header.
+#include "public/include/XMP_Const.h"
+
+#include "XMPFiles/source/XMPFiles_Impl.hpp"
+
+namespace TimeConversionUtils {
+ bool ConvertSamplesToSMPTETimecode(
+ std::string & outTimecode,
+ XMP_Int64 inSamples,
+ XMP_Uns64 inSampleRate,
+ const std::string & inTimecodeFormat );
+
+ bool ConvertSMPTETimecodeToSamples(
+ XMP_Int64 & outSamples,
+ const std::string & inTimecode,
+ XMP_Uns64 inSampleRate,
+ const std::string & inTimecodeFormat
+ );
+
+
+};
+
+#endif // TimeConversionUtils_h__
diff --git a/XMPFiles/source/FormatSupport/WAVE/Cr8rMetadata.cpp b/XMPFiles/source/FormatSupport/WAVE/Cr8rMetadata.cpp
index 277924f..d085aca 100644
--- a/XMPFiles/source/FormatSupport/WAVE/Cr8rMetadata.cpp
+++ b/XMPFiles/source/FormatSupport/WAVE/Cr8rMetadata.cpp
@@ -79,8 +79,6 @@ void Cr8rMetadata::parse( const XMP_Uns8* chunkData, XMP_Uns64 size )
{
if( size >= kCr8rSizeFix )
{
- const LittleEndian& LE = LittleEndian::getInstance();
-
Cr8rBoxContent cr8r;
memset( &cr8r, 0, kCr8rSizeFix );
diff --git a/XMPFiles/source/FormatSupport/WAVE/INFOMetadata.cpp b/XMPFiles/source/FormatSupport/WAVE/INFOMetadata.cpp
index 6597f2a..335acd7 100644
--- a/XMPFiles/source/FormatSupport/WAVE/INFOMetadata.cpp
+++ b/XMPFiles/source/FormatSupport/WAVE/INFOMetadata.cpp
@@ -189,6 +189,8 @@ XMP_Uns64 INFOMetadata::serialize( XMP_Uns8** outBuffer )
// chunk id
// chunk size
//
+ XMP_Validate( iter->second != NULL, "ERROR inserting serialize. iter->second is NULL.", kXMPErr_InternalFailure );
+ XMP_Assert(dynamic_cast<TValueObject<std::string>*>(iter->second) == static_cast<TValueObject<std::string>*>(iter->second));
TValueObject<std::string>* strObj = dynamic_cast<TValueObject<std::string>*>(iter->second);
std::string value = strObj->getValue();
XMP_Uns32 id = iter->first;
diff --git a/XMPFiles/source/FormatSupport/WAVE/PrmLMetadata.cpp b/XMPFiles/source/FormatSupport/WAVE/PrmLMetadata.cpp
index 477c31e..87d29fb 100644
--- a/XMPFiles/source/FormatSupport/WAVE/PrmLMetadata.cpp
+++ b/XMPFiles/source/FormatSupport/WAVE/PrmLMetadata.cpp
@@ -76,8 +76,6 @@ void PrmLMetadata::parse( const XMP_Uns8* chunkData, XMP_Uns64 size )
{
if( size >= kPrmlSizeFix )
{
- const LittleEndian& LE = LittleEndian::getInstance();
-
PrmlBoxContent prml;
memset( &prml, 0, kPrmlSizeFix );
diff --git a/XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.cpp b/XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.cpp
index 1e98f4f..60ce5ae 100644
--- a/XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.cpp
+++ b/XMPFiles/source/FormatSupport/WAVE/WAVEBehavior.cpp
@@ -431,7 +431,7 @@ WAVEBehavior::DS64* WAVEBehavior::getDS64( IChunkContainer& tree, XMP_IO* stream
ds64 = NULL;
}
- if( ds64 != NULL && ds64->getID() == kChunk_ds64 )
+ if( rf64 != NULL && ds64 != NULL && ds64->getID() == kChunk_ds64 )
{
//
// Successfully read 'ds64' chunk.
@@ -439,7 +439,6 @@ WAVEBehavior::DS64* WAVEBehavior::getDS64( IChunkContainer& tree, XMP_IO* stream
// add chunk to the 'RF64' chunk
//
ds64->cacheChunkData( stream );
-
rf64->appendChild( ds64, false );
}
else
@@ -600,7 +599,7 @@ bool WAVEBehavior::parseDS64Chunk( const Chunk& ds64Chunk, WAVEBehavior::DS64& d
const XMP_Uns8* data;
XMP_Uns64 size = ds64Chunk.getData(&data);
- memset( &ds64, 0, kMinimumDS64ChunkSize );
+ memset( &ds64, 0, kMinimumDS64ChunkSize);
//
// copy fix input data into RF64 block (except chunk size table)
diff --git a/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp b/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp
index 3798f3d..8c3067b 100644
--- a/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp
+++ b/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.cpp
@@ -15,6 +15,9 @@
#include "XMPFiles/source/FormatSupport/WAVE/INFOMetadata.h"
#include "XMPFiles/source/FormatSupport/WAVE/BEXTMetadata.h"
#include "XMPFiles/source/FormatSupport/WAVE/CartMetadata.h"
+#include "XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.h"
+
+#include "XMPFiles/source/FormatSupport/TimeConversionUtils.hpp"
// cr8r is not yet required for WAVE
//#include "Cr8rMetadata.h"
@@ -27,19 +30,69 @@ using namespace IFF_RIFF;
// ************** legacy Mappings ***************** //
+static const char * kBWF_description = "description";
+static const char * kBWF_originator = "originator";
+static const char * kBWF_originatorReference = "originatorReference";
+static const char * kBWF_originationDate = "originationDate";
+static const char * kBWF_originationTime = "originationTime";
+static const char * kBWF_timeReference = "timeReference";
+static const char * kBWF_version = "version";
+static const char * kBWF_umid = "umid";
+static const char * kBWF_codingHistory = "codingHistory";
+static const char * kBWF_timeStampSampleRate = "timeSampleRate"; // its transient should be deleted at the end.
+
static const MetadataPropertyInfo kBextProperties[] =
{
-// XMP NS XMP Property Name Native Metadata Identifier Native Datatype XMP Datatype Delete Priority ExportPolicy
- { kXMP_NS_BWF, "description", BEXTMetadata::kDescription, kNativeType_StrLocal, kXMPType_Simple, true, false, kExport_Always }, // bext:description <-> BEXT:Description
- { kXMP_NS_BWF, "originator", BEXTMetadata::kOriginator, kNativeType_StrLocal, kXMPType_Simple, true, false, kExport_Always }, // bext:originator <-> BEXT:originator
- { kXMP_NS_BWF, "originatorReference", BEXTMetadata::kOriginatorReference, kNativeType_StrLocal, kXMPType_Simple, true, false, kExport_Always }, // bext:OriginatorReference <-> BEXT:OriginatorReference
- { kXMP_NS_BWF, "originationDate", BEXTMetadata::kOriginationDate, kNativeType_StrLocal, kXMPType_Simple, true, false, kExport_Always }, // bext:originationDate <-> BEXT:originationDate
- { kXMP_NS_BWF, "originationTime", BEXTMetadata::kOriginationTime, kNativeType_StrLocal, kXMPType_Simple, true, false, kExport_Always }, // bext:originationTime <-> BEXT:originationTime
- { kXMP_NS_BWF, "timeReference", BEXTMetadata::kTimeReference, kNativeType_Uns64, kXMPType_Simple, true, false, kExport_Always }, // bext:timeReference <-> BEXT:TimeReferenceLow + BEXT:TimeReferenceHigh
+// XMP NS XMP Property Name Native Metadata Identifier Native Datatype XMP Datatype Delete Priority ExportPolicy
+ { kXMP_NS_BWF, kBWF_description, BEXTMetadata::kDescription, kNativeType_StrLocal, kXMPType_Simple, false, false, kExport_Always }, // bext:description <-> BEXT:Description
+ { kXMP_NS_BWF, kBWF_originator, BEXTMetadata::kOriginator, kNativeType_StrLocal, kXMPType_Simple, false, false, kExport_Always }, // bext:originator <-> BEXT:originator
+ { kXMP_NS_BWF, kBWF_originatorReference, BEXTMetadata::kOriginatorReference, kNativeType_StrLocal, kXMPType_Simple, false, false, kExport_Always }, // bext:OriginatorReference <-> BEXT:OriginatorReference
+ { kXMP_NS_BWF, kBWF_originationDate, BEXTMetadata::kOriginationDate, kNativeType_StrLocal, kXMPType_Simple, false, false, kExport_Always }, // bext:originationDate <-> BEXT:originationDate
+ { kXMP_NS_BWF, kBWF_originationTime, BEXTMetadata::kOriginationTime, kNativeType_StrLocal, kXMPType_Simple, false, false, kExport_Always }, // bext:originationTime <-> BEXT:originationTime
+ { kXMP_NS_BWF, kBWF_timeReference, BEXTMetadata::kTimeReference, kNativeType_Uns64, kXMPType_Simple, false, false, kExport_Always }, // bext:timeReference <-> BEXT:TimeReferenceLow + BEXT:TimeReferenceHigh
// Special case: On export BEXT:version is always written as 1
- { kXMP_NS_BWF, "version", BEXTMetadata::kVersion, kNativeType_Uns16, kXMPType_Simple, true, false, kExport_Never }, // bext:version <-> BEXT:version
+ { kXMP_NS_BWF, kBWF_version, BEXTMetadata::kVersion, kNativeType_Uns16, kXMPType_Simple, false, false, kExport_Never }, // bext:version <-> BEXT:version
// special case: bext:umid <-> BEXT:UMID
- { kXMP_NS_BWF, "codingHistory", BEXTMetadata::kCodingHistory, kNativeType_StrLocal, kXMPType_Simple, true, false, kExport_Always }, // bext:codingHistory <-> BEXT:codingHistory
+ { kXMP_NS_BWF, kBWF_codingHistory, BEXTMetadata::kCodingHistory, kNativeType_StrLocal, kXMPType_Simple, false, false, kExport_Always }, // bext:codingHistory <-> BEXT:codingHistory
+ { NULL }
+};
+
+static const char * kDM_takeNumber = "takeNumber";
+static const char * kDM_audioSampleType = "audioSampleType";
+static const char * kDM_scene = "scene";
+static const char * kDM_tapeName = "tapeName";
+static const char * kDM_logComment = "logComment";
+static const char * kDM_projectName = "projectName";
+static const char * kDM_audioSampleRate = "audioSampleRate";
+static const char * kDM_startTimecode = "startTimecode";
+static const char * kDM_timeFormat = "timeFormat";
+static const char * kDM_timeValue = "timeValue";
+static const char * kDM_good = "good";
+
+static const MetadataPropertyInfo kiXMLProperties[] =
+{
+// XMP NS XMP Property Name Native Metadata Identifier Native Datatype XMP Datatype Delete Priority ExportPolicy
+ { kXMP_NS_DM, kDM_tapeName, iXMLMetadata::kTape, kNativeType_StrUTF8, kXMPType_Simple, false, false, kExport_Always }, //xmpDM:tapeName <-> iXML:TAPE
+ { kXMP_NS_DM, kDM_takeNumber, iXMLMetadata::kTake, kNativeType_Uns64, kXMPType_Simple, false, false, kExport_Always }, //xmpDM:tapeName <-> iXML:TAPE
+ { kXMP_NS_DM, kDM_scene, iXMLMetadata::kScene, kNativeType_StrUTF8, kXMPType_Simple, false, false, kExport_Always }, //xmpDM:scene <-> iXML:SCENE
+ { kXMP_NS_DM, kDM_logComment, iXMLMetadata::kNote, kNativeType_StrUTF8, kXMPType_Simple, false, false, kExport_Always }, //xmpDM:logComment <-> iXML:NOTE
+ { kXMP_NS_DM, kDM_projectName, iXMLMetadata::kProject, kNativeType_StrUTF8, kXMPType_Simple, false, false, kExport_Always }, //xmpDM:project <-> iXML:PROJECT
+ { kXMP_NS_DM, kDM_good, iXMLMetadata::kCircled, kNativeType_Bool, kXMPType_Simple, false, false, kExport_Always }, //xmpDM:good <-> iXML:CIRCLED
+ { kXMP_NS_DM, kDM_audioSampleRate, iXMLMetadata::kFileSampleRate, kNativeType_Uns64, kXMPType_Simple, false, false, kExport_Always }, // xmpDM:audioSampleRate <-> iXML:FILE_SAMPLE_RATE
+ // special case for AudioBitDepth // xmpDM:audioSampleType <-> iXML:AUDIO_BIT_DEPTH
+ { kXMP_NS_BWF, kBWF_description, iXMLMetadata::kBWFDescription, kNativeType_StrUTF8, kXMPType_Simple, true, false, kExport_Always }, // bext:description <-> iXML:BWF_DESCRIPTION
+ { kXMP_NS_BWF, kBWF_originator, iXMLMetadata::kBWFOriginator, kNativeType_StrUTF8, kXMPType_Simple, true, false, kExport_Always }, // bext:originator <-> iXML:BWF_ORIGINATOR
+ { kXMP_NS_BWF, kBWF_originatorReference, iXMLMetadata::kBWFOriginatorReference, kNativeType_StrUTF8, kXMPType_Simple, true, false, kExport_Always }, // bext:OriginatorReference <-> iXML:BWF_ORIGINATOR_REFERENCE
+ { kXMP_NS_BWF, kBWF_originationDate, iXMLMetadata::kBWFOriginationDate, kNativeType_StrUTF8, kXMPType_Simple, true, false, kExport_Always }, // bext:originationDate <-> iXML:BWF_ORIGINATION_DATE
+ { kXMP_NS_BWF, kBWF_originationTime, iXMLMetadata::kBWFOriginationTime, kNativeType_StrUTF8, kXMPType_Simple, true, false, kExport_Always }, // bext:originationTime <-> iXML:BWF_ORIGINATION_TIME
+ // special case for timeReference // bext:timeReference <-> iXML:BWF_TIME_REFERENCE_LOW and iXML:BWF_TIME_REFERENCE_HIGH
+ // Special case: On export BEXT:version is always written as 1
+ { kXMP_NS_BWF, kBWF_version, iXMLMetadata::kBWFVersion, kNativeType_Uns64, kXMPType_Simple, true, false, kExport_Never }, // bext:version <-> iXML:BWF_VERSION
+ { kXMP_NS_BWF, kBWF_codingHistory, iXMLMetadata::kBWFHistory, kNativeType_StrUTF8, kXMPType_Simple, true, false, kExport_Always }, // bext:codingHistory <-> iXML:BWF_CODING_HISTORY
+ { kXMP_NS_BWF, kBWF_umid, iXMLMetadata::kBWFUMID, kNativeType_StrASCII, kXMPType_Simple, true, false, kExport_Always }, // bext:codingHistory <-> iXML:BWF_CODING_HISTORY
+ // special case for timeReference // bext:timeReference <-> iXML:TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_HO and iXML:TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_HI
+ // special case for startTimeCode // xmpDM:startTimecode <-> iXML:TIMECODE_RATE, iXML:TIMECODE_FLAG and bext:timeReference.
+ { kXMP_NS_BWF, kBWF_timeStampSampleRate, iXMLMetadata::kTimeStampSampleRate, kNativeType_Uns64, kXMPType_Simple, false, false, kExport_NoDelete }, // bext::timeStampSampleRate <-> iXML
{ NULL }
};
@@ -140,6 +193,14 @@ XMP_Bool WAVEReconcile::importToXMP( SXMPMeta& outXMP, const MetadataSet& inMeta
if ( ! ignoreLocalText )
{
+ //
+ // Import iXML
+ //
+ iXMLMetadata * iXMLMeta = inMetaData.get<iXMLMetadata>();
+ if ( iXMLMeta != NULL ) {
+ changed |= IReconcile::importNativeToXMP( outXMP, *iXMLMeta, kiXMLProperties, false );
+ changed |= exportSpecialiXMLToXMP( *iXMLMeta, outXMP );
+ }
//
// Import BEXT
@@ -291,6 +352,45 @@ XMP_Bool WAVEReconcile::importToXMP( SXMPMeta& outXMP, const MetadataSet& inMeta
}
}
+ // do timecode calculations
+ if ( outXMP.DoesPropertyExist( kXMP_NS_BWF, kBWF_timeReference ) &&
+ outXMP.DoesPropertyExist( kXMP_NS_BWF, kDM_timeFormat ) &&
+ outXMP.DoesPropertyExist( kXMP_NS_BWF, kBWF_timeStampSampleRate ) )
+ {
+ std::string xmpValue;
+ XMP_Int64 sampleRate = 0;
+ XMP_Uns64 nSamples = 0;
+ std::string timeFormat;
+ bool ok = outXMP.GetProperty( kXMP_NS_BWF, kBWF_timeReference, &xmpValue, 0 );
+
+ if ( ok )
+ {
+ int count;
+ char nextCh;
+ const char * strValue = xmpValue.c_str();
+ count = sscanf ( strValue, "%llu%c", &nSamples, &nextCh );
+
+ if ( count != 1 ) ok = false;
+ }
+ if ( ok )
+ ok = outXMP.GetProperty_Int64( kXMP_NS_BWF, kBWF_timeStampSampleRate, &sampleRate, 0 );
+ if ( ok )
+ ok = outXMP.GetProperty( kXMP_NS_BWF, kDM_timeFormat, &timeFormat, 0 );
+
+ if ( ok && sampleRate != 0 && timeFormat.size() > 0 ) {
+ // compute time code from all the information we have
+ std::string timecode;
+ if ( TimeConversionUtils::ConvertSamplesToSMPTETimecode( timecode, nSamples, sampleRate, timeFormat ) ) {
+ outXMP.SetStructField( kXMP_NS_DM, kDM_startTimecode, kXMP_NS_DM, kDM_timeValue, timecode, 0 );
+ outXMP.SetStructField( kXMP_NS_DM, kDM_startTimecode, kXMP_NS_DM, kDM_timeFormat, timeFormat, 0 );
+ }
+ }
+ }
+
+ // delete transient properties
+ outXMP.DeleteProperty( kXMP_NS_BWF, kBWF_timeStampSampleRate );
+ outXMP.DeleteProperty( kXMP_NS_BWF, kDM_timeFormat );
+
return changed;
} // importToXMP
@@ -310,9 +410,55 @@ XMP_Bool WAVEReconcile::exportFromXMP( MetadataSet& outMetaData, SXMPMeta& inXMP
changed |= IReconcile::exportXMPToNative( *dispMeta, inXMP, kDISPProperties );
}
-
+ PropertyList propertiesToBeRemovedFromXMPMeta;
if ( ! ignoreLocalText )
{
+ bool removeAllPropertiesinBextNameSpace = false;
+ //
+ // Export iXML
+ //
+ iXMLMetadata *iXMLMeta = outMetaData.get<iXMLMetadata>();
+ if (iXMLMeta != NULL)
+ {
+ IReconcile::exportXMPToNative( *iXMLMeta, inXMP, kiXMLProperties, &propertiesToBeRemovedFromXMPMeta );
+ exportSpecialXMPToiXML( inXMP, *iXMLMeta, propertiesToBeRemovedFromXMPMeta );
+ changed |= iXMLMeta->hasChanged();
+ removeAllPropertiesinBextNameSpace = true;
+ // for maintaing backward compatibility we don't want to remove properties from xmp packet.
+ propertiesToBeRemovedFromXMPMeta.clear();
+
+ // update time code value
+ if ( iXMLMeta->valueExists( iXMLMetadata::kTimeStampSampleRate ) &&
+ iXMLMeta->valueExists( iXMLMetadata::kTimeStampSampleSinceMidnightHigh ) &&
+ iXMLMeta->valueExists( iXMLMetadata::kTimeStampSampleSinceMidnightLow ) &&
+ iXMLMeta->valueExists( iXMLMetadata::kTimeCodeRate ) )
+ {
+ if ( iXMLMeta->valueChanged( iXMLMetadata::kTimeStampSampleRate ) ||
+ iXMLMeta->valueChanged( iXMLMetadata::kTimeStampSampleSinceMidnightHigh ) ||
+ iXMLMeta->valueChanged( iXMLMetadata::kTimeStampSampleSinceMidnightLow ) ||
+ iXMLMeta->valueChanged( iXMLMetadata::kTimeCodeRate ) ||
+ ( iXMLMeta->valueExists( iXMLMetadata::kTimeCodeFlag ) && iXMLMeta->valueChanged( iXMLMetadata::kTimeCodeFlag ) ) )
+ {
+ // update the time code value
+ XMP_Int64 sampleRate = iXMLMeta->getValue<XMP_Uns64>( iXMLMetadata::kTimeStampSampleRate );
+ XMP_Int64 nSamples = 0;
+ std::string timeFormat;
+ bool ok = inXMP.GetProperty_Int64( kXMP_NS_BWF, kBWF_timeReference, &nSamples, 0 );
+ if ( ok )
+ ok = inXMP.GetStructField( kXMP_NS_DM, kDM_startTimecode, kXMP_NS_DM, kDM_timeFormat, &timeFormat, 0 );
+
+ if ( ok && sampleRate != 0 && timeFormat.size() > 0 ) {
+ // compute time code from all the information we have
+ std::string timecode;
+ if ( TimeConversionUtils::ConvertSamplesToSMPTETimecode( timecode, nSamples, sampleRate, timeFormat ) ) {
+ inXMP.SetStructField( kXMP_NS_DM, kDM_startTimecode, kXMP_NS_DM, kDM_timeValue, timecode, 0 );
+ }
+ }
+
+ }
+ }
+ }
+
//
// Export BEXT
//
@@ -355,12 +501,13 @@ XMP_Bool WAVEReconcile::exportFromXMP( MetadataSet& outMetaData, SXMPMeta& inXMP
bextMeta->deleteValue(BEXTMetadata::kVersion);
}
- // Remove BWF properties from the XMP
- SXMPUtils::RemoveProperties(&inXMP, kXMP_NS_BWF, NULL, kXMPUtil_DoAllProperties );
+ removeAllPropertiesinBextNameSpace = true;
changed |= bextMeta->hasChanged();
}
+ if ( removeAllPropertiesinBextNameSpace )
+ SXMPUtils::RemoveProperties(&inXMP, kXMP_NS_BWF, NULL, kXMPUtil_DoAllProperties );
//
// Export cart
@@ -486,6 +633,11 @@ XMP_Bool WAVEReconcile::exportFromXMP( MetadataSet& outMetaData, SXMPMeta& inXMP
//
inXMP.DeleteProperty( kXMP_NS_WAV, "NativeDigest" );
+ for ( PropertyList::iterator it = propertiesToBeRemovedFromXMPMeta.begin(), last = propertiesToBeRemovedFromXMPMeta.end(); it != last; it++ )
+ {
+ inXMP.DeleteProperty( it->first, it->second );
+ }
+
return changed;
} // exportFromXMP
@@ -574,3 +726,342 @@ bool WAVEReconcile::stringToFOURCC ( std::string input, XMP_Uns32 &output )
return result;
}
+
+struct iXMLAudioSampleTypeMapping
+{
+ const char * xmpStringValue;
+ XMP_Uns64 ixmlIntValue;
+};
+
+iXMLAudioSampleTypeMapping ixmlAudioSampleTypeMappings[] = {
+ { "8Int", 8 },
+ { "16Int", 16 },
+ { "24Int", 24 },
+ { "32Float", 32 },
+};
+
+struct iXMLTimeCodeRateAndFlagMapping
+{
+ const char * xmpStringValue;
+ const char * ixmlTimeCodeRateValue;
+ const char * ixmlTimeCodeFlagValue;
+};
+
+iXMLTimeCodeRateAndFlagMapping ixmlTimeCodeRateAndFlagMappings[] = {
+ { "24Timecode", "24/1", "NDF" },
+ { "25Timecode", "25/1", "NDF" },
+ { "2997DropTimecode", "30000/1001", "DF" },
+ { "2997NonDropTimecode", "30000/1001", "NDF" },
+ { "30Timecode", "30/1", "NDF" },
+ { "50Timecode", "50/1", "NDF" },
+ { "5994DropTimecode", "60000/1001", "DF" },
+ { "5994NonDropTimecode", "60000/1001", "NDF" },
+ { "60Timecode", "60/1", "NDF" },
+ { "23976Timecode", "24000/1001", "NDF" },
+};
+
+void IFF_RIFF::WAVEReconcile::exportSpecialXMPToiXML( SXMPMeta & inXMP, IMetadata & outNativeMeta, PropertyList & propertiesToBeDeleted )
+{
+ std::string sXmpValue;
+ XMP_Int64 iXMPValue;
+
+ // special case for NoGood and Circled // xmpDM:good ,-> iXML:NO_GOOD and iXML:CIRCLED
+
+ // special case for AudioBitDepth // xmpDM:audioSampleType <-> iXML:AUDIO_BIT_DEPTH
+ bool deleteNativeEntry = false;
+ try
+ {
+ if ( inXMP.GetProperty( kXMP_NS_DM, kDM_audioSampleType, &sXmpValue, 0 ) )
+ {
+ bool matchingValueFound = false;
+ XMP_Uns64 ixmlValue = 0;
+ for ( size_t i = 0, total = sizeof(ixmlAudioSampleTypeMappings )/sizeof( iXMLAudioSampleTypeMapping); i < total; i++ )
+ {
+ if ( sXmpValue.compare( ixmlAudioSampleTypeMappings[i].xmpStringValue ) == 0 )
+ {
+ ixmlValue = ixmlAudioSampleTypeMappings[i].ixmlIntValue;
+ matchingValueFound = true;
+ break;
+ }
+ }
+
+ if ( matchingValueFound )
+ {
+ outNativeMeta.setValue< XMP_Uns64 >( iXMLMetadata::kAudioBitDepth, ixmlValue );
+ propertiesToBeDeleted.push_back( std::make_pair( kXMP_NS_DM, kDM_audioSampleType ) );
+ deleteNativeEntry = false;
+ }
+ else
+ {
+ deleteNativeEntry = true;
+ }
+ }
+ else
+ {
+ deleteNativeEntry = true;
+ }
+
+ if ( deleteNativeEntry )
+ {
+ if ( outNativeMeta.valueExists( iXMLMetadata::kAudioBitDepth ) )
+ {
+ XMP_Uns64 ixmlValue = outNativeMeta.getValue< XMP_Uns64 >( iXMLMetadata::kAudioBitDepth );
+ bool validValue = false;
+ for ( size_t i = 0, total = sizeof(ixmlAudioSampleTypeMappings )/sizeof( iXMLAudioSampleTypeMapping); i < total; i++ )
+ {
+ if ( ixmlValue == ixmlAudioSampleTypeMappings[i].ixmlIntValue )
+ {
+ validValue = true;
+ break;
+ }
+ }
+ if ( validValue )
+ outNativeMeta.deleteValue( iXMLMetadata::kAudioBitDepth );
+ }
+ }
+ }
+ catch ( ... )
+ {
+ // do nothing
+ }
+
+ // Special case: On export BEXT:version is always written as 1
+ try
+ {
+ if ( inXMP.GetProperty( kXMP_NS_BWF, "version", NULL, 0 ) )
+ {
+ outNativeMeta.setValue< XMP_Uns64 >( iXMLMetadata::kBWFVersion, 1 );
+ }
+ else
+ {
+ outNativeMeta.deleteValue( iXMLMetadata::kBWFVersion );
+ }
+ }
+ catch( ... )
+ {
+ // do nothing
+ }
+
+ // special case for xmpDM:startTimecode\xmpDM:timeFormat
+ try
+ {
+ if ( inXMP.GetStructField( kXMP_NS_DM, kDM_startTimecode, kXMP_NS_DM, kDM_timeFormat, &sXmpValue, 0 ) )
+ {
+ bool matchingValueFound = false;
+ const char * ixmlValueForTimeCodeRate = NULL;
+ const char * ixmlValueForTimeCodeFlag = NULL;
+ for ( size_t i = 0, total = sizeof(ixmlTimeCodeRateAndFlagMappings)/sizeof(iXMLTimeCodeRateAndFlagMapping); i < total; i++ )
+ {
+ if ( sXmpValue.compare( ixmlTimeCodeRateAndFlagMappings[i].xmpStringValue ) == 0 )
+ {
+ ixmlValueForTimeCodeRate = ixmlTimeCodeRateAndFlagMappings[i].ixmlTimeCodeRateValue;
+ ixmlValueForTimeCodeFlag = ixmlTimeCodeRateAndFlagMappings[i].ixmlTimeCodeFlagValue;
+ matchingValueFound = true;
+ deleteNativeEntry = false;
+ break;
+ }
+ }
+
+ if ( matchingValueFound )
+ {
+ outNativeMeta.setValue< std::string >( iXMLMetadata::kTimeCodeRate, ixmlValueForTimeCodeRate );
+ outNativeMeta.setValue< std::string >( iXMLMetadata::kTimeCodeFlag, ixmlValueForTimeCodeFlag );
+ }
+ else
+ {
+ deleteNativeEntry = true;
+ }
+ }
+ else
+ {
+ deleteNativeEntry = true;
+ }
+
+ if ( deleteNativeEntry )
+ {
+ if ( outNativeMeta.valueExists( iXMLMetadata::kTimeCodeRate ) )
+ {
+ std::string ixmlValueForTimecodeRate = outNativeMeta.getValue< std::string >( iXMLMetadata::kTimeCodeRate );
+ bool validValue = false;
+ for ( size_t i = 0, total = sizeof(ixmlTimeCodeRateAndFlagMappings)/sizeof(iXMLTimeCodeRateAndFlagMapping); i < total; i++ )
+ {
+ if ( ixmlValueForTimecodeRate.compare( ixmlTimeCodeRateAndFlagMappings[i].ixmlTimeCodeRateValue ) == 0 )
+ {
+ validValue = true;
+ break;
+ }
+ }
+ if ( validValue )
+ {
+ outNativeMeta.deleteValue( iXMLMetadata::kTimeCodeRate );
+ outNativeMeta.deleteValue( iXMLMetadata::kTimeCodeFlag );
+ }
+ }
+ }
+ }
+ catch( ... )
+ {
+ // do nothing
+ }
+
+ // special case for timeReference // bext:timeReference <-> iXML:BWF_TIME_REFERENCE_LOW and iXML:BWF_TIME_REFERENCE_HIGH
+ bool bextTimeReferenceDataAvailable = false;
+ XMP_Uns32 bextLowValue = 0;
+ XMP_Uns32 bextHighValue = 0;
+ bool timeCodeDataAvailable = false;
+ XMP_Uns32 tcLowValue = 0;
+ XMP_Uns32 tcHighValue = 0;
+
+ try
+ {
+ if ( inXMP.GetProperty_Int64( kXMP_NS_BWF, "timeReference", &iXMPValue, 0 ) )
+ {
+ bextTimeReferenceDataAvailable = true;
+ XMP_Uns64 uXmpValue = ( XMP_Uns64 )( iXMPValue );
+ bextLowValue = ( XMP_Uns32 ) uXmpValue;
+ bextHighValue = ( XMP_Uns32 ) ( uXmpValue >> 32 );
+ }
+ }
+ catch ( ... )
+ {
+ // do nothing
+ }
+
+#if 0 // reverse calculation from timecode to samples can result in different number of samples. So ignoring for time being
+ if ( outNativeMeta.valueExists( iXMLMetadata::kTimeStampSampleRate ) )
+ {
+ try
+ {
+ std::string timeFormat, timeValue;
+ if ( inXMP.GetStructField( kXMP_NS_DM, kDM_startTimecode, kXMP_NS_DM, kDM_timeValue, &timeValue, 0 ) &&
+ inXMP.GetStructField( kXMP_NS_DM, kDM_startTimecode, kXMP_NS_DM, kDM_timeFormat, &timeFormat, 0) )
+ {
+ XMP_Int64 nSamples;
+ if ( TimeConversionUtils::ConvertSMPTETimecodeToSamples( nSamples, timeValue,
+ outNativeMeta.getValue< XMP_Uns64 >( iXMLMetadata::kTimeStampSampleRate ), timeFormat ) )
+ {
+ timeCodeDataAvailable = true;
+ XMP_Uns64 uXmpValue = ( XMP_Uns64 )( nSamples );
+ tcLowValue = ( XMP_Uns32 ) uXmpValue;
+ tcHighValue = ( XMP_Uns32 ) ( uXmpValue >> 32 );
+ }
+
+ }
+ }
+ catch ( ... )
+ {
+ // do nothing
+ }
+ }
+
+ if ( bextTimeReferenceDataAvailable && timeCodeDataAvailable )
+ {
+ // pick the one which is different, if both different pick the bext one
+ XMP_Uns64
+ }
+ else if ( bextTimeReferenceDataAvailable )
+ {
+ }
+ else if ( timeCodeDataAvailable )
+ {
+ }
+ else // none of the bextTimeReference and timeCode data is available
+ {
+ outNativeMeta.deleteValue( iXMLMetadata::kTimeStampSampleSinceMidnightHigh );
+ outNativeMeta.deleteValue( iXMLMetadata::kTimeStampSampleSinceMidnightLow );
+ outNativeMeta.deleteValue( iXMLMetadata::kBWFTimeReferenceHigh );
+ outNativeMeta.deleteValue( iXMLMetadata::kBWFTimeReferenceLow );
+ }
+#endif
+
+ if ( bextTimeReferenceDataAvailable ) {
+ outNativeMeta.setValue< XMP_Uns64 >( iXMLMetadata::kBWFTimeReferenceHigh, bextHighValue );
+ outNativeMeta.setValue< XMP_Uns64 >( iXMLMetadata::kBWFTimeReferenceLow, bextLowValue );
+ outNativeMeta.setValue< XMP_Uns64 >( iXMLMetadata::kTimeStampSampleSinceMidnightHigh, bextHighValue );
+ outNativeMeta.setValue< XMP_Uns64 >( iXMLMetadata::kTimeStampSampleSinceMidnightLow, bextLowValue );
+ } else {
+ outNativeMeta.deleteValue( iXMLMetadata::kTimeStampSampleSinceMidnightHigh );
+ outNativeMeta.deleteValue( iXMLMetadata::kTimeStampSampleSinceMidnightLow );
+ outNativeMeta.deleteValue( iXMLMetadata::kBWFTimeReferenceHigh );
+ outNativeMeta.deleteValue( iXMLMetadata::kBWFTimeReferenceLow );
+ }
+}
+
+bool IFF_RIFF::WAVEReconcile::exportSpecialiXMLToXMP( IMetadata & inNativeMeta, SXMPMeta & outXMP )
+{
+ bool changed = false;
+ // special case for AudioBitDepth // xmpDM:audioSampleType <-> iXML:AUDIO_BIT_DEPTH
+ if ( inNativeMeta.valueExists( iXMLMetadata::kAudioBitDepth ) ) {
+ XMP_Uns64 ixmlValue = inNativeMeta.getValue< XMP_Uns64 >( iXMLMetadata::kAudioBitDepth);
+ const char * xmpValue = NULL;
+ bool matchingValueFound = false;
+
+ for ( size_t i = 0, total = sizeof(ixmlAudioSampleTypeMappings)/sizeof(iXMLAudioSampleTypeMapping); i < total; i++ )
+ {
+ if ( ixmlAudioSampleTypeMappings[i].ixmlIntValue == ixmlValue )
+ {
+ xmpValue = ixmlAudioSampleTypeMappings[i].xmpStringValue;
+ matchingValueFound = true;
+ break;
+ }
+ }
+ if ( matchingValueFound )
+ {
+ outXMP.SetProperty( kXMP_NS_DM, kDM_audioSampleType, xmpValue );
+ changed = true;
+ }
+ }
+
+ // special case for timeReference // bext:timeReference <-> iXML:TIME_SAMPLES_SINCE_MIDNIGHT_LO and iXML:TIME_SAMPLES_SINCE_MIDNIGHT_HI
+ if ( inNativeMeta.valueExists( iXMLMetadata::kTimeStampSampleSinceMidnightHigh ) && inNativeMeta.valueExists( iXMLMetadata::kTimeStampSampleSinceMidnightLow ) ) {
+ XMP_Uns64 combinedValue = inNativeMeta.getValue< XMP_Uns64 >( iXMLMetadata::kTimeStampSampleSinceMidnightHigh );
+ combinedValue = combinedValue << 32;
+ combinedValue += inNativeMeta.getValue< XMP_Uns64 >( iXMLMetadata::kTimeStampSampleSinceMidnightLow );
+ std::string strValue;
+ SXMPUtils::ConvertFromInt64( combinedValue, "%llu", &strValue );
+ outXMP.SetProperty( kXMP_NS_BWF, "timeReference", strValue );
+ changed = true;
+ }
+
+ // special case for timeReference // bext:timeReference <-> iXML:BWF_TIME_REFERENCE_LOW and iXML:BWF_TIME_REFERENCE_HIGH
+ if ( inNativeMeta.valueExists( iXMLMetadata::kBWFTimeReferenceHigh ) && inNativeMeta.valueExists( iXMLMetadata::kBWFTimeReferenceLow ) ) {
+ XMP_Uns64 combinedValue = inNativeMeta.getValue< XMP_Uns64 >( iXMLMetadata::kBWFTimeReferenceHigh );
+ combinedValue = combinedValue << 32;
+ combinedValue += inNativeMeta.getValue< XMP_Uns64 >( iXMLMetadata::kBWFTimeReferenceLow );
+ std::string strValue;
+ SXMPUtils::ConvertFromInt64( combinedValue, "%llu", &strValue );
+ outXMP.SetProperty( kXMP_NS_BWF, "timeReference", strValue );
+ changed = true;
+ }
+
+ // special case for xmpDM:startTimecode\xmpDM:timeFormat
+ if ( inNativeMeta.valueExists( iXMLMetadata::kTimeCodeRate ) )
+ {
+ std::string ixmlTimecodeRateValue = inNativeMeta.getValue<std::string>( iXMLMetadata::kTimeCodeRate );
+ std::string ixmlTimecodeFlagValue = "NDF";
+ const char * xmpValue = NULL;
+ bool matchingValueFound = false;
+ if ( inNativeMeta.valueExists( iXMLMetadata::kTimeCodeFlag ) )
+ {
+ ixmlTimecodeFlagValue = inNativeMeta.getValue<std::string>( iXMLMetadata::kTimeCodeFlag );
+ }
+
+ for ( size_t i = 0, total = sizeof(ixmlTimeCodeRateAndFlagMappings)/sizeof(iXMLTimeCodeRateAndFlagMapping); i < total; i++ )
+ {
+ if ( ( ixmlTimecodeRateValue.compare(ixmlTimeCodeRateAndFlagMappings[i].ixmlTimeCodeRateValue) == 0 ) &&
+ ( ixmlTimecodeFlagValue.compare(ixmlTimeCodeRateAndFlagMappings[i].ixmlTimeCodeFlagValue) == 0 ) )
+ {
+ xmpValue = ixmlTimeCodeRateAndFlagMappings[i].xmpStringValue;
+ matchingValueFound = true;
+ break;
+ }
+ }
+ if ( matchingValueFound )
+ {
+ outXMP.SetProperty( kXMP_NS_BWF, kDM_timeFormat, xmpValue );
+ changed = true;
+ }
+ }
+
+ return changed;
+}
diff --git a/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.h b/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.h
index 44a4ef3..7f0c2b8 100644
--- a/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.h
+++ b/XMPFiles/source/FormatSupport/WAVE/WAVEReconcile.h
@@ -59,6 +59,12 @@ private:
* convert a 4 character string to XPM_Uns32 (FOURCC)
*/
static bool stringToFOURCC ( std::string input, XMP_Uns32 &output );
+
+ // export all the properties requiring special conversion from inXMP into iXMLMetadata.
+ static void exportSpecialXMPToiXML( SXMPMeta & inXMP, IMetadata & outNativeMeta, PropertyList & propertiesToBeDeleted );
+
+ // export all the properties requiring special conversion from iXMLMetadata into inXMP.
+ static bool exportSpecialiXMLToXMP( IMetadata & inNativeMeta, SXMPMeta & outXMP );
};
}
diff --git a/XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.cpp b/XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.cpp
new file mode 100644
index 0000000..5df7439
--- /dev/null
+++ b/XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.cpp
@@ -0,0 +1,815 @@
+// =================================================================================================
+// ADOBE SYSTEMS INCORPORATED
+// Copyright 2014 Adobe Systems Incorporated
+// All Rights Reserved
+//
+// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
+// of the Adobe license agreement accompanying it.
+// =================================================================================================
+
+#include "public/include/XMP_Environment.h" // ! XMP_Environment.h must be the first included header.
+#include "public/include/XMP_Const.h"
+
+#include "XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.h"
+#include "source/Endian.h"
+
+#include "source/ExpatAdapter.hpp"
+#include "XMPFiles/source/XMPFiles_Impl.hpp"
+#include <algorithm>
+
+namespace IFF_RIFF {
+
+ static const char * tagNames[ iXMLMetadata::kLastEntry ] = {
+ "TAPE", //kTape, // std::string
+ "TAKE", //kTake, // XMP_Uns64
+ "SCENE", //kScene, // std::string
+ "NOTE", //kNote, // std::string
+ "PROJECT", //kProject, // std::string
+ "NO_GOOD", //kNoGood, // bool( true/false )
+ "FILE_SAMPLE_RATE", //kFileSampleRate, // XMP_Uns64
+ "AUDIO_BIT_DEPTH", //kAudioBitDepth, // XMP_Uns64
+ "CIRCLED", //kCircled, // bool( true/false )
+ "BWF_DESCRIPTION", //kBWFDescription, // std::string( 256 )
+ "BWF_ORIGINATOR", //kBWFOriginator, // std::string( 32 )
+ "BWF_ORIGINATOR_REFERENCE", //kBWFOriginatorReference, // std::string( 32 )
+ "BWF_ORIGINATION_DATE", //kBWFOriginationDate, // std::string( 10 )
+ "BWF_ORIGINATION_TIME", //kBWFOriginationTime, // std::string( 8 )
+ "BWF_TIME_REFERENCE_LOW", //kBWFTimeReferenceLow, // XMP_Uns32
+ "BWF_TIME_REFERENCE_HIGH", //kBWFTimeReferenceHigh, // XMP_Uns32
+ "BWF_VERSION", //kBWFVersion, // XMP_Uns16
+ "BWF_UMID", //kBWFUMID, // std::string[64]
+ "BWF_CODING_HISTORY", //kBWFHistory, // std::string
+ "TIMECODE_FLAG", //kTimeCodeFlag, // std::string[DF/NDF]
+ "TIMECODE_RATE", //kTimeCodeRate, // std::string
+ "TIMESTAMP_SAMPLE_RATE", //kTimeStampSampleRate, // XMP_Uns64
+ "TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_LO", //kTimeStampSampleSinceMidnightLow, // XMP_Uns32
+ "TIMESTAMP_SAMPLES_SINCE_MIDNIGHT_HI", //kTimeStampSampleSinceMidnightHi, // XMP_Uns32
+ };
+
+ static const char * rootTagName = "BWFXML";
+ static const char * speedTagName = "SPEED";
+ static const char * bextTagName = "BEXT";
+
+ iXMLMetadata::iXMLMetadata()
+ : mRootNode( NULL )
+ , mExpatAdapter( NULL )
+ , mErrorCallback( NULL )
+ , mExtraSpaceSize( 1024 ) {}
+
+ iXMLMetadata::~iXMLMetadata() {
+ if ( mExpatAdapter ) {
+ mRootNode = NULL;
+ }
+ delete mExpatAdapter;
+ delete mRootNode;
+ mExpatAdapter = NULL;
+ }
+
+#define MAX_SZ ((size_t)~((size_t)0))
+
+ void iXMLMetadata::parse( const XMP_Uns8 * chunkData, XMP_Uns64 size ) {
+ if ( chunkData == NULL || size == 0 ) {
+ XMP_Error error( kXMPErr_BadBlockFormat, "iXML Metadata reconciliation failure: iXML chunk is not well formed" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return;
+ }
+
+ mExpatAdapter = XMP_NewExpatAdapter ( ExpatAdapter::kUseLocalNamespaces );
+ if ( mExpatAdapter == 0 ) XMP_Throw ( "iXMLMetadata: Can't create Expat adapter", kXMPErr_NoMemory );
+ mExpatAdapter->SetErrorCallback( mErrorCallback );
+
+ try {
+ XMP_Uns64 parsedSize = 0;
+ while ( parsedSize < size ) {
+ XMP_Uns64 currentSize = std::min<XMP_Uns64>( size - parsedSize, MAX_SZ );
+ mExpatAdapter->ParseBuffer( chunkData + parsedSize, (size_t) currentSize, false );
+ parsedSize += currentSize;
+ }
+ mExpatAdapter->ParseBuffer( 0, 0, true );
+ } catch( ... ) {
+ XMP_Error error( kXMPErr_BadBlockFormat, "iXML Metadata reconciliation failure: iXML chunk is not well formed" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return;
+ }
+
+ // read the particular nodes we are interested in and store in the map
+ // Get the root node
+
+ // Get the root node of the XML tree.
+
+ XML_Node & xmlTree = mExpatAdapter->tree;
+
+ for ( size_t i = 0, limit = xmlTree.content.size(); i < limit; ++i ) {
+ if ( xmlTree.content[i]->kind == kElemNode ) {
+ mRootNode = xmlTree.content[i];
+ break;
+ }
+ }
+
+ if ( mRootNode == NULL ) {
+ XMP_Error error( kXMPErr_BadBlockFormat, "iXML Metadata reconciliation failure: No Root Element present in iXML chunk" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return;
+ }
+
+ XMP_StringPtr rootLocalName = mRootNode->name.c_str() + mRootNode->nsPrefixLen;
+
+ if ( ! XMP_LitMatch ( rootLocalName, rootTagName ) ) {
+ XMP_Error error( kXMPErr_BadBlockFormat, "iXML Metadata reconciliation failure: Unexpected Root Element present in iXML chunk" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return;
+ }
+
+ XMP_StringPtr ns = mRootNode->ns.c_str();
+
+ XML_NodePtr currentNode( NULL );
+
+ ParseAndSetProperties();
+ resetChanges();
+ }
+
+ XMP_Uns64 iXMLMetadata::serialize( XMP_Uns8** buffer ) {
+ *buffer = NULL;
+ if ( mRootNode == NULL ) {
+ mRootNode = new XML_Node( NULL, rootTagName, kElemNode );
+ if ( mRootNode == NULL ) {
+ XMP_Error error( kXMPErr_NoMemory, "iXML Metadata reconciliation failure: Can't create Root Node" );
+ NotifyClient( kXMPErrSev_OperationFatal, error );
+ return 0;
+ }
+ }
+
+
+ // Create SPEED and bext node if required
+ XML_Node * node = mRootNode->GetNamedElement( "", speedTagName );
+ if ( node == NULL ) {
+ node = new XML_Node( mRootNode, speedTagName, kElemNode );
+ if ( node == NULL ) {
+ XMP_Error error( kXMPErr_NoMemory, "iXML Metadata reconciliation failure: Can't create Speed Node" );
+ NotifyClient( kXMPErrSev_OperationFatal, error );
+ return 0;
+ }
+ mRootNode->content.push_back( node );
+ }
+
+ node = mRootNode->GetNamedElement( "", bextTagName );
+ if ( node == NULL ) {
+ node = new XML_Node( mRootNode, bextTagName, kElemNode );
+ if ( node == NULL ) {
+ XMP_Error error( kXMPErr_NoMemory, "iXML Metadata reconciliation failure: Can't create Bext Node" );
+ NotifyClient( kXMPErrSev_OperationFatal, error );
+ return 0;
+ }
+ mRootNode->content.push_back( node );
+ }
+
+ UpdateProperties();
+
+ // get the SPEED and bext node and remove them if empty
+ if ( node->content.size() == 0 )
+ RemoveXMLNode( mRootNode, bextTagName );
+ node = mRootNode->GetNamedElement( "", speedTagName );
+ if ( node->content.size() == 0 )
+ RemoveXMLNode( mRootNode, speedTagName );
+ node = NULL;
+
+ std::string strBuffer;
+ mRootNode->Serialize( &strBuffer );
+
+ // move the contents of the string into the new bigger buffer
+ size_t newSize = strBuffer.size() + mExtraSpaceSize;
+ XMP_Uns8 * newBuffer = new XMP_Uns8[ newSize ];
+ memset( newBuffer, 0x20, newSize );
+ memcpy( newBuffer, "<\?xml version=\"1.0\" encoding=\"UTF-8\"\?>\n", 39 );
+ memcpy( newBuffer + 39, strBuffer.c_str(), strBuffer.size() );
+
+ *buffer = newBuffer;
+
+ return newSize;
+ }
+
+ bool iXMLMetadata::isEmptyValue( XMP_Uns32 id, ValueObject& valueObj ) {
+ bool ret = true;
+
+ switch( id )
+ {
+ case kTape:
+ case kScene:
+ case kNote:
+ case kProject:
+ case kBWFDescription:
+ case kBWFOriginator:
+ case kBWFOriginatorReference:
+ case kBWFOriginationDate:
+ case kBWFOriginationTime:
+ case kBWFHistory:
+ case kBWFUMID:
+ case kTimeCodeFlag:
+ case kTimeCodeRate:
+ {
+ TValueObject<std::string>* strObj = dynamic_cast<TValueObject<std::string>*>(&valueObj);
+
+ ret = ( strObj == NULL || ( strObj != NULL && strObj->getValue().empty() ) );
+ }
+ break;
+
+ case kTake:
+ case kFileSampleRate:
+ case kAudioBitDepth:
+ case kBWFTimeReferenceLow:
+ case kBWFTimeReferenceHigh:
+ case kBWFVersion:
+ case kTimeStampSampleRate:
+ case kTimeStampSampleSinceMidnightLow:
+ case kTimeStampSampleSinceMidnightHigh:
+ ret = false;
+ break;
+
+ case kNoGood:
+ case kCircled:
+ ret = false;
+ break;
+
+ default:
+ ret = true;
+ }
+
+ return ret;
+ }
+
+ void iXMLMetadata::ParseAndSetStringProperty( XML_Node * parentNode, XMP_Uns32 id ) {
+ std::string nodeValue = ParseStringValue( parentNode, id );
+ if ( nodeValue.size() > 0 ) {
+ this->setValue< std::string >( id, nodeValue );
+ }
+ }
+
+ void iXMLMetadata::SetErrorCallback( GenericErrorCallback * errorCallback ) {
+ mErrorCallback = errorCallback;
+ }
+
+ void iXMLMetadata::NotifyClient( XMP_ErrorSeverity severity, XMP_Error & error ) {
+ XMPFileHandler::NotifyClient( mErrorCallback, severity, error );
+ }
+
+ static XMP_Uns64 ConvertStringToUns64( const std::string & strValue ) {
+ int count;
+ char nextCh;
+ XMP_Uns64 result;
+
+ count = sscanf ( strValue.c_str(), "%llu%c", &result, &nextCh );
+ if ( count != 1 ) XMP_Throw ( "Invalid integer string", kXMPErr_BadParam );
+
+ return result;
+ }
+
+ void iXMLMetadata::ParseAndSetIntegerProperty( XML_Node * parentNode, XMP_Uns32 id ) {
+ std::string strValue = ParseStringValue( parentNode, id );
+
+ if ( strValue.size() > 0 ) {
+ XMP_Uns64 uValue;
+ try {
+ uValue = ConvertStringToUns64( strValue );
+ } catch( ... ) {
+ // some nodes like tape can be non integer also. Treat it as warning
+ XMP_Error error( kXMPErr_BadFileFormat, "iXML Metadata reconciliation failure: node is supposed to have integer value" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return;
+ }
+ this->setValue< XMP_Uns64 >( id, uValue );
+ }
+ }
+
+ void iXMLMetadata::ParseAndSetBoolProperty( XML_Node * parentNode, XMP_Uns32 id ) {
+ std::string strValue = ParseStringValue( parentNode, id );
+ if ( strValue.size() > 0 ) {
+ if ( strValue.compare( "TRUE" ) == 0 )
+ this->setValue< bool >( id, true );
+ else if ( strValue.compare( "FALSE" ) == 0 )
+ this->setValue< bool >( id, false );
+ else {
+ XMP_Error error( kXMPErr_BadBlockFormat, "iXML Metadata reconciliation failure: invalid boolean value present" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ }
+ }
+ }
+
+ void iXMLMetadata::ParseAndSetProperties() {
+
+ // top level properties
+ ParseAndSetStringProperty( mRootNode, kTape );
+ ParseAndSetIntegerProperty( mRootNode, kTake );
+ ParseAndSetStringProperty( mRootNode, kScene );
+ ParseAndSetStringProperty( mRootNode, kNote );
+ ParseAndSetStringProperty( mRootNode, kProject );
+ ParseAndSetBoolProperty( mRootNode, kNoGood );
+ ParseAndSetBoolProperty( mRootNode, kCircled );
+
+ // speed node children
+ XML_Node * speedNode = mRootNode->GetNamedElement( "", speedTagName );
+ if ( speedNode ) {
+ ParseAndSetIntegerProperty( speedNode, kFileSampleRate );
+ ParseAndSetIntegerProperty( speedNode, kAudioBitDepth );
+ ParseAndSetStringProperty( speedNode, kTimeCodeFlag );
+ ParseAndSetStringProperty( speedNode, kTimeCodeRate );
+ ParseAndSetIntegerProperty( speedNode, kTimeStampSampleRate );
+ ParseAndSetIntegerProperty( speedNode, kTimeStampSampleSinceMidnightLow );
+ ParseAndSetIntegerProperty( speedNode, kTimeStampSampleSinceMidnightHigh );
+ }
+
+ // bext node children
+ XML_Node * bextNode = mRootNode->GetNamedElement( "", bextTagName );
+ if ( bextNode ) {
+ ParseAndSetStringProperty( bextNode, kBWFDescription );
+ ParseAndSetStringProperty( bextNode, kBWFOriginator );
+ ParseAndSetStringProperty( bextNode, kBWFOriginatorReference );
+ ParseAndSetStringProperty( bextNode, kBWFOriginationDate );
+ ParseAndSetStringProperty( bextNode, kBWFOriginationTime );
+ ParseAndSetIntegerProperty( bextNode, kBWFTimeReferenceLow );
+ ParseAndSetIntegerProperty( bextNode, kBWFTimeReferenceHigh );
+ ParseAndSetIntegerProperty( bextNode, kBWFVersion );
+ ParseAndSetStringProperty( bextNode, kBWFHistory );
+ ParseAndSetStringProperty( bextNode, kBWFUMID );
+ }
+ }
+
+ void iXMLMetadata::UpdateStringProperty( XML_Node * parentNode, XMP_Uns32 id ) {
+ if ( valueExists( id ) ) {
+ std::string value;
+ try {
+ value = this->getValue< std::string >( id );
+ } catch ( ... ) {
+ XMP_Error e1( kXMPErr_BadValue, "iXML Metadata reconciliation failure: expected the value to be of string type" );
+ NotifyClient( kXMPErrSev_Recoverable, e1 );
+ return;
+ }
+ UpdateXMLNode( parentNode, tagNames[ id ], value );
+ } else {
+ RemoveXMLNode( parentNode, tagNames[ id ] );
+ }
+ }
+
+ void iXMLMetadata::UpdateXMLNode( XML_Node * parentNode, const char * localName, const std::string & value ) {
+ XML_Node * node = parentNode->GetNamedElement( "", localName );
+
+ if ( node == NULL ) {
+ node = new XML_Node( parentNode, localName, kElemNode );
+ if ( node == NULL ) {
+ XMP_Error error( kXMPErr_NoMemory, "Unable to create new objects" );
+ NotifyClient( kXMPErrSev_OperationFatal, error );
+ return;
+ }
+ parentNode->content.push_back( node );
+ }
+
+ if ( node->IsLeafContentNode() == false ) {
+ XMP_Error error( kXMPErr_BadBlockFormat, "iXML Metadata reconciliation failure: node was supposed to be a leaf node" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ node->RemoveContent();
+ }
+ node->SetLeafContentValue( value.c_str() );
+ }
+
+ void iXMLMetadata::RemoveXMLNode( XML_Node * parentNode, const char * localName ) {
+ XML_Node * node = parentNode->GetNamedElement( "", localName );
+ if ( node ) {
+ // find the position
+ XML_NodeVector::iterator it = std::find( parentNode->content.begin(), parentNode->content.end(), node );
+ XMP_Assert( it != parentNode->content.end() );
+ parentNode->content.erase( it );
+ delete node;
+ }
+ }
+
+#if XMP_WinBuild
+ #define snprintf _snprintf
+#endif
+ static std::string ConvertUns64ToString( XMP_Uns64 uValue ) {
+ char buffer[64];
+
+ snprintf( buffer, sizeof( buffer ), "%llu", uValue );
+ std::string str( buffer );
+ return str;
+ }
+
+ void iXMLMetadata::UpdateIntegerProperty( XML_Node * parentNode, XMP_Uns32 id ) {
+ if ( valueExists( id ) ) {
+ XMP_Uns64 uValue;
+ try {
+ uValue = this->getValue< XMP_Uns64 >( id );
+ } catch ( ... ) {
+ XMP_Error error( kXMPErr_BadValue, "iXML Metadata reconciliation failure: expected the value to be of XMP_Uns64 type" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return;
+ }
+ std::string strValue = ConvertUns64ToString( uValue );
+ UpdateXMLNode( parentNode, tagNames[ id ], strValue );
+ } else {
+ RemoveXMLNode( parentNode, tagNames[ id ] );
+ }
+ }
+
+ void iXMLMetadata::UpdateBoolProperty( XML_Node * parentNode, XMP_Uns32 id ) {
+ if ( valueExists( id ) ) {
+ bool value;
+
+ try {
+ value = this->getValue< bool >( id );
+ } catch ( ... ) {
+ XMP_Error error( kXMPErr_BadValue, "iXML Metadata reconciliation failure: expected the value to be of bool type" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return;
+ }
+
+ std::string strValue;
+ if ( value ) strValue = "TRUE";
+ else strValue = "FALSE";
+
+ UpdateXMLNode( parentNode, tagNames[ id ], strValue );
+ } else {
+ RemoveXMLNode( parentNode, tagNames[ id ] );
+ }
+ }
+
+ void iXMLMetadata::UpdateProperties() {
+ // top level properties
+ UpdateStringProperty( mRootNode, kTape );
+ UpdateIntegerProperty( mRootNode, kTake );
+ UpdateStringProperty( mRootNode, kScene );
+ UpdateStringProperty( mRootNode, kNote );
+ UpdateStringProperty( mRootNode, kProject );
+ UpdateBoolProperty( mRootNode, kNoGood );
+ UpdateBoolProperty( mRootNode, kCircled );
+
+ // speed node children
+ XML_Node * speedNode = mRootNode->GetNamedElement( "", speedTagName );
+ if ( speedNode ) {
+ UpdateIntegerProperty( speedNode, kFileSampleRate );
+ UpdateIntegerProperty( speedNode, kAudioBitDepth );
+ UpdateStringProperty( speedNode, kTimeCodeFlag );
+ UpdateStringProperty( speedNode, kTimeCodeRate );
+ UpdateIntegerProperty( speedNode, kTimeStampSampleRate );
+ UpdateIntegerProperty( speedNode, kTimeStampSampleSinceMidnightLow );
+ UpdateIntegerProperty( speedNode, kTimeStampSampleSinceMidnightHigh );
+ }
+
+ // bext node children
+ XML_Node * bextNode = mRootNode->GetNamedElement( "", bextTagName );
+ if ( bextNode ) {
+ UpdateStringProperty( bextNode, kBWFDescription );
+ UpdateStringProperty( bextNode, kBWFOriginator );
+ UpdateStringProperty( bextNode, kBWFOriginatorReference );
+ UpdateStringProperty( bextNode, kBWFOriginationDate );
+ UpdateStringProperty( bextNode, kBWFOriginationTime );
+ UpdateIntegerProperty( bextNode, kBWFTimeReferenceLow );
+ UpdateIntegerProperty( bextNode, kBWFTimeReferenceHigh );
+ UpdateIntegerProperty( bextNode, kBWFVersion );
+ UpdateStringProperty( bextNode, kBWFHistory );
+ UpdateStringProperty( bextNode, kBWFUMID );
+ }
+
+ }
+
+ bool iXMLMetadata::valueValid( XMP_Uns32 id, ValueObject * valueObj ) {
+ switch( id ) {
+ case kTape:
+ return validateStringSize( valueObj );
+ break;
+
+ case kTake:
+ return validateInt( valueObj );
+ break;
+
+ case kScene:
+ return validateStringSize( valueObj );
+ break;
+
+ case kNote:
+ return validateStringSize( valueObj );
+ break;
+
+ case kProject:
+ return validateStringSize( valueObj );
+ break;
+
+ case kNoGood:
+ return validateBool( valueObj );
+ break;
+
+ case kFileSampleRate:
+ return validateInt( valueObj );
+ break;
+
+ case kAudioBitDepth:
+ return validateInt( valueObj );
+ break;
+
+ case kCircled:
+ return validateBool( valueObj );
+ break;
+
+ case kBWFDescription:
+ case kBWFOriginator:
+ case kBWFOriginatorReference:
+ // string length can be anything but while setting it will be trimmed.
+ return validateStringSize( valueObj );
+ break;
+
+ case kBWFOriginationDate:
+ return validateDate( valueObj );
+ break;
+
+ case kBWFOriginationTime:
+ return validateTime( valueObj );
+ break;
+
+ case kBWFTimeReferenceLow:
+ case kBWFTimeReferenceHigh:
+ return validateInt( valueObj, 0, Max_XMP_Uns32 );
+ break;
+
+ case kBWFVersion:
+ return validateInt( valueObj, 0, Max_XMP_Uns16 );
+ break;
+
+ case kBWFUMID:
+ return validateUMID( valueObj );
+ break;
+
+ case kBWFHistory:
+ return validateStringSize( valueObj );
+ break;
+
+ case kTimeCodeFlag:
+ return validateTimeCodeFlag( valueObj );
+ break;
+
+ case kTimeCodeRate:
+ return validateRational( valueObj );
+ break;
+
+ case kTimeStampSampleRate:
+ return validateInt( valueObj );
+ break;
+
+ case kTimeStampSampleSinceMidnightHigh:
+ case kTimeStampSampleSinceMidnightLow:
+ return validateInt( valueObj, 0, Max_XMP_Uns32 );
+ break;
+
+ default:
+ return false;
+ break;
+ }
+ }
+
+ void iXMLMetadata::valueModify( XMP_Uns32 id, ValueObject * value ) {
+ switch( id ) {
+ case kBWFDescription:
+ shortenString( value, 256 );
+ break;
+
+ case kBWFOriginator:
+ shortenString( value, 32 );
+ break;
+
+ case kBWFOriginatorReference:
+ shortenString( value, 32 );
+ break;
+
+ case kBWFUMID:
+ shortenString( value, 128 );
+ break;
+
+ default:
+ // do nothing
+ break;
+ }
+ }
+
+ bool iXMLMetadata::validateStringSize( ValueObject * value, size_t minSize /*= 1*/, size_t maxSize /*= std::string::npos */ ) {
+ TValueObject<std::string>* strObj = dynamic_cast<TValueObject<std::string>*>(value);
+ if ( strObj ) {
+ const std::string * strPtr = &strObj->getValue();
+ size_t sizeOfString = strPtr->size();
+ if ( sizeOfString < minSize ) {
+ XMP_Error error( kXMPErr_BadValue, "iXML Metadata reconciliation failure: length of string is less than expected" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return false;
+ } else if ( sizeOfString > maxSize ) {
+ XMP_Error error( kXMPErr_BadBlockFormat, "iXML Metadata reconciliation failure: length of string is more than expected" );
+ NotifyClient( kXMPErrSev_Recoverable, error);
+ return false;
+ } else {
+ return true;
+ }
+ } else { // object is not of string type
+ XMP_Error error( kXMPErr_BadValue, "iXML Metadata reconciliation failure: expected string value" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return false;
+ }
+ return false;
+ }
+
+ bool iXMLMetadata::validateInt( ValueObject * value, XMP_Uns64 minValue /*= 0*/, XMP_Uns64 maxValue /*= Max_XMP_Uns64*/ ) {
+ TValueObject< XMP_Uns64 > * valuePtr = dynamic_cast< TValueObject< XMP_Uns64 > * > ( value );
+
+ if ( valuePtr ) {
+ XMP_Uns64 uValue = valuePtr->getValue();
+ if ( uValue < minValue ) {
+ XMP_Error error( kXMPErr_BadBlockFormat, "iXML Metadata reconciliation failure: node integer value is less than allowed" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return false;
+ } else if ( uValue > maxValue ) {
+ XMP_Error error( kXMPErr_BadBlockFormat, "iXML Metadata reconciliation failure: node integer value is more than allowed" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return false;
+ } else {
+ return true;
+ }
+ } else {
+ XMP_Error error( kXMPErr_BadValue, "iXML Metadata reconciliation failure: expected XMP_Uns64 value" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return false;
+ }
+ }
+
+ bool iXMLMetadata::validateBool( ValueObject * value ) {
+ // just check typecasts is possible or not
+ TValueObject< bool > * boolValuePtr = dynamic_cast< TValueObject< bool > * > ( value );
+ if ( boolValuePtr ) {
+ return true;
+ } else {
+ XMP_Error error( kXMPErr_BadValue, "iXML Metadata reconciliation failure: expected bool value" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return false;
+ }
+ }
+
+ void iXMLMetadata::shortenString( ValueObject * value, size_t lengthOfString ) {
+ TValueObject< std::string > * strObj = dynamic_cast< TValueObject< std::string > * >( value );
+ if ( strObj ) {
+ const std::string * strPtr = &strObj->getValue();
+ size_t sizeOfString = strPtr->size();
+ if ( sizeOfString > lengthOfString ) {
+ std::string newString;
+ newString.append( *strPtr, 0, lengthOfString );
+ strObj->setValue( newString );
+ }
+ }
+ }
+
+ static bool charIsNumber( const char & ch ) {
+ if ( ch >= '0' && ch <= '9' )
+ return true;
+ else
+ return false;
+ }
+
+ bool iXMLMetadata::validateDate( ValueObject * value ) {
+ bool stringOK = validateStringSize( value, 10, 10 );
+ if ( stringOK ) {
+ TValueObject< std::string > * strObj = dynamic_cast< TValueObject< std::string > * >( value );
+ const std::string * strPtr = &strObj->getValue();
+ // check 0,1,2,3,5,6,8,9 elements are integer
+ for ( size_t i = 0; i < 10; i++ ) {
+ if ( i == 4 || i == 7 )
+ continue;
+ stringOK = charIsNumber( strPtr->operator[]( i ) );
+ if ( !stringOK ) {
+ XMP_Error error( kXMPErr_BadValue, "iXML Metadata reconciliation failure: expected a number character" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return false;
+ }
+ }
+ return stringOK;
+ }
+ return false;
+ }
+
+ bool iXMLMetadata::validateTime( ValueObject * value ) {
+ bool stringOK = validateStringSize( value, 8, 8 );
+ if ( stringOK ) {
+ TValueObject< std::string > * strObj = dynamic_cast< TValueObject< std::string > * >( value );
+ const std::string * strPtr = &strObj->getValue();
+ // check 0,1,3,4,6,7 elements are integer
+ for ( size_t i = 0; i < 8; i++ ) {
+ if ( i == 2 || i == 5 )
+ continue;
+ stringOK = charIsNumber( strPtr->operator[]( i ) );
+ if ( !stringOK ) {
+ XMP_Error error( kXMPErr_BadValue, "iXML Metadata reconciliation failure: expected a number character" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return false;
+ }
+ }
+ return stringOK;
+ }
+ return false;
+ }
+
+ static bool charIsHexDigit( const char & ch ) {
+ if ( charIsNumber( ch ) ) {
+ return true;
+ } else {
+ if ( ch >= 'A' && ch <= 'F' )
+ return true;
+ else if ( ch >= 'a' && ch <= 'f' )
+ return true;
+ else
+ return false;
+ }
+ }
+
+ bool iXMLMetadata::validateUMID( ValueObject * value ) {
+ bool stringOK = validateStringSize( value );
+ if ( stringOK ) {
+ // max size to consider is 128
+ TValueObject< std::string > * strObj = dynamic_cast< TValueObject< std::string > * >( value );
+ const std::string * strPtr = &strObj->getValue();
+ size_t effectiveLength = strPtr->size();
+ if ( effectiveLength > 128 )
+ effectiveLength = 128;
+
+ // first check length needs to even
+ if ( effectiveLength % 2 == 0 ) {
+ for ( size_t i = 0; i < effectiveLength; i++ ) {
+ stringOK = charIsHexDigit( strPtr->operator[]( i ) );
+ if ( !stringOK ) {
+ XMP_Error error( kXMPErr_BadValue, "iXML Metadata reconciliation failure: expected a hex character" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return false;
+ }
+ }
+ return stringOK;
+ } else {
+ XMP_Error error( kXMPErr_BadValue, "iXML Metadata reconciliation failure: expected the hex string length to be even" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return false;
+ }
+ }
+ return false;
+ }
+
+ std::string iXMLMetadata::ParseStringValue( XML_Node * parentNode, XMP_Uns32 id ) {
+ std::string nodeValue;
+ XML_Node * node = parentNode->GetNamedElement( "", tagNames[ id ] );
+ if ( node ) {
+ if ( node->IsLeafContentNode() && node->content.size() != 0 ) {
+ size_t lengthOfValue = node->content[0]->value.size();
+ if ( lengthOfValue > 0 ) {
+ nodeValue = node->content[0]->value;
+ }
+ } else {
+ XMP_Error error( kXMPErr_BadBlockFormat, "iXML Metadata reconciliation failure: node was supposed to be a leaf node" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ }
+ }
+ return nodeValue;
+ }
+
+ bool iXMLMetadata::validateTimeCodeFlag( ValueObject * value ) {
+ bool returnValue = validateStringSize( value, 2, 3 );
+ if ( returnValue ) {
+ TValueObject<std::string>* strObj = dynamic_cast<TValueObject<std::string>*>(value);
+ if ( strObj ) {
+ const std::string * strPtr = &strObj->getValue();
+ if ( strPtr->compare( "DF" ) == 0 )
+ return true;
+ else if ( strPtr->compare( "NDF" ) == 0 )
+ return true;
+ }
+ }
+ return false;
+ }
+
+ bool iXMLMetadata::validateRational( ValueObject * value ) {
+ bool returnValue = validateStringSize( value, 3 );
+ if ( returnValue ) {
+ TValueObject<std::string>* strObj = dynamic_cast<TValueObject<std::string>*>(value);
+ if ( strObj ) {
+ const std::string * strPtr = &strObj->getValue();
+ size_t posOfSlash = strPtr->find( "/" );
+ if ( posOfSlash == std::string::npos || posOfSlash == strPtr->size() - 1 || posOfSlash == 0 ) {
+ XMP_Error error( kXMPErr_BadValue, "iXML Metadata reconciliation failure: node value was supposed to be in a fractional format" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return false;
+ }
+
+ for ( size_t i = 0; i < strPtr->size(); i++ ) {
+ if ( i == posOfSlash )
+ continue;
+ returnValue = charIsNumber( strPtr->operator[]( i ) );
+ if ( ! returnValue ) {
+ XMP_Error error( kXMPErr_BadValue, "iXML Metadata reconciliation failure: expected a number character" );
+ NotifyClient( kXMPErrSev_Recoverable, error );
+ return false;
+ }
+ }
+ return returnValue;
+ }
+ }
+ return false;
+ }
+
+}
diff --git a/XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.h b/XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.h
new file mode 100644
index 0000000..815fe85
--- /dev/null
+++ b/XMPFiles/source/FormatSupport/WAVE/iXMLMetadata.h
@@ -0,0 +1,157 @@
+#ifndef __iXMLMetadata_h__
+#define __iXMLMetadata_h__ 1
+
+// =================================================================================================
+// ADOBE SYSTEMS INCORPORATED
+// Copyright 2014 Adobe Systems Incorporated
+// All Rights Reserved
+//
+// NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
+// of the Adobe license agreement accompanying it.
+// =================================================================================================
+
+#include "public/include/XMP_Environment.h" // ! XMP_Environment.h must be the first included header.
+#include "public/include/XMP_Const.h"
+#include "public/include/XMP_IO.hpp"
+
+#include "XMPFiles/source/NativeMetadataSupport/IMetadata.h"
+
+class ExpatAdapter;
+class XML_Node;
+
+namespace IFF_RIFF {
+
+ /**
+ * iXML Metadata model.
+ * Implements the IMetadata interface
+ */
+ class iXMLMetadata : public IMetadata
+ {
+ public:
+ enum
+ {
+ kTape, // std::string
+ kTake, // XMP_Uns64
+ kScene, // std::string
+ kNote, // std::string
+ kProject, // std::string
+ kNoGood, // bool( true/false )
+ kFileSampleRate, // XMP_Uns64
+ kAudioBitDepth, // XMP_Uns64
+ kCircled, // bool( true/false )
+ kBWFDescription, // std::string
+ kBWFOriginator, // std::string
+ kBWFOriginatorReference, // std::string
+ kBWFOriginationDate, // std::string
+ kBWFOriginationTime, // std::string
+ kBWFTimeReferenceLow, // XMP_Uns32
+ kBWFTimeReferenceHigh, // XMP_Uns32
+ kBWFVersion, // XMP_Uns16
+ kBWFUMID, // std::string[64]
+ kBWFHistory, // std::string
+ kTimeCodeFlag, // std::string[DF/NDF]
+ kTimeCodeRate, // std::string
+ kTimeStampSampleRate, // XMP_Uns64
+ kTimeStampSampleSinceMidnightLow, // XMP_Uns32
+ kTimeStampSampleSinceMidnightHigh, // XMP_Uns32
+ kLastEntry
+ };
+
+ public:
+ /**
+ *ctor/dtor
+ */
+ iXMLMetadata();
+ ~iXMLMetadata();
+
+ /**
+ * Parses the given memory block and creates a data model representation
+ * The implementation expects that the memory block is the data area of
+ * the iXML chunk.
+ * Throws exceptions if parsing is not possible
+ *
+ * @param input The byte buffer to parse
+ * @param size Size of the given byte buffer
+ */
+ void parse( const XMP_Uns8* chunkData, XMP_Uns64 size );
+
+ /**
+ * See IMetadata::parse( const LFA_FileRef input )
+ */
+ void parse( XMP_IO* input ) { IMetadata::parse( input ); }
+
+ /**
+ * Serializes the data model to a memory block.
+ * The memory block will be the data area of a iXML chunk.
+ * Throws exceptions if serializing is not possible
+ *
+ * @param buffer Buffer that gets filled with serialized data
+ * @param size Size of passed in buffer
+ *
+ * @return Size of serialized data (might be smaller than buffer size)
+ */
+ XMP_Uns64 serialize( XMP_Uns8** buffer );
+
+ void SetErrorCallback( GenericErrorCallback * errorCallback );
+
+ void SetExtraSpaceSize( size_t size ) { mExtraSpaceSize = size; }
+
+ size_t GetExtraSpaceSize() const { return mExtraSpaceSize; }
+
+ protected:
+ /**
+ * @see IMetadata::isEmptyValue
+ */
+ virtual bool isEmptyValue( XMP_Uns32 id, ValueObject& valueObj );
+
+ /**
+ * @see iMetadata::valueValid
+ */
+ virtual bool valueValid( XMP_Uns32 id, ValueObject * valueObj );
+
+ /**
+ * @see IMetadata::valueModify
+ */
+ virtual void valueModify( XMP_Uns32 id, ValueObject * value );
+
+ void ParseAndSetProperties();
+ void UpdateProperties();
+
+ std::string ParseStringValue( XML_Node * parentNode, XMP_Uns32 id );
+ void ParseAndSetStringProperty( XML_Node * parentNode, XMP_Uns32 id );
+ void ParseAndSetIntegerProperty( XML_Node * parentNode, XMP_Uns32 id );
+ void ParseAndSetBoolProperty( XML_Node * parentNode, XMP_Uns32 id );
+
+ void UpdateStringProperty( XML_Node * parentNode, XMP_Uns32 id );
+ void UpdateIntegerProperty( XML_Node * parentNode, XMP_Uns32 id );
+ void UpdateBoolProperty( XML_Node * parentNode, XMP_Uns32 id );
+
+ void UpdateXMLNode( XML_Node * parentNode, const char * localName, const std::string & value );
+ void RemoveXMLNode( XML_Node * parentNode, const char * localName );
+
+ void NotifyClient( XMP_ErrorSeverity severity, XMP_Error & error );
+
+ bool validateStringSize( ValueObject * value, size_t minSize = 1, size_t maxSize = std::string::npos );
+ bool validateInt( ValueObject * value, XMP_Uns64 minValue = 0, XMP_Uns64 maxValue = Max_XMP_Uns64 );
+ bool validateBool( ValueObject * value );
+ void shortenString( ValueObject * value, size_t lengthOfString );
+ bool validateDate( ValueObject * value );
+ bool validateTime( ValueObject * value );
+ bool validateUMID( ValueObject * value );
+ bool validateTimeCodeFlag( ValueObject * value );
+ bool validateRational( ValueObject * value );
+
+ private:
+ // Operators hidden on purpose
+ iXMLMetadata( const iXMLMetadata& ) {};
+ iXMLMetadata& operator=( const iXMLMetadata& ) { return *this; };
+
+ ExpatAdapter * mExpatAdapter;
+ XML_Node * mRootNode;
+ GenericErrorCallback * mErrorCallback;
+ size_t mExtraSpaceSize;
+ };
+
+}
+
+#endif // __iXMLMetadata_h__
diff --git a/XMPFiles/source/NativeMetadataSupport/IMetadata.cpp b/XMPFiles/source/NativeMetadataSupport/IMetadata.cpp
index 40a864e..2a3560c 100644
--- a/XMPFiles/source/NativeMetadataSupport/IMetadata.cpp
+++ b/XMPFiles/source/NativeMetadataSupport/IMetadata.cpp
@@ -204,3 +204,28 @@ bool IMetadata::valueChanged( XMP_Uns32 id ) const
return false;
}
+
+//-----------------------------------------------------------------------------
+//
+// IMetadata::valueValid(...)
+//
+// Purpose: Return true if the value for the passed identifier is valid
+//
+//-----------------------------------------------------------------------------
+
+bool IMetadata::valueValid( XMP_Uns32 id, ValueObject *value )
+{
+ return true;
+}
+
+//-----------------------------------------------------------------------------
+//
+// IMetadata::valueValid(...)
+//
+// Purpose: Return true if the value for the passed identifier is valid
+//
+//-----------------------------------------------------------------------------
+void IMetadata::valueModify(XMP_Uns32 id, ValueObject *value)
+{
+ return;
+} \ No newline at end of file
diff --git a/XMPFiles/source/NativeMetadataSupport/IMetadata.h b/XMPFiles/source/NativeMetadataSupport/IMetadata.h
index 1a66c86..b85239b 100644
--- a/XMPFiles/source/NativeMetadataSupport/IMetadata.h
+++ b/XMPFiles/source/NativeMetadataSupport/IMetadata.h
@@ -149,7 +149,7 @@ public:
* @param id Identifier of value
*/
virtual bool valueChanged( XMP_Uns32 id ) const;
-
+
protected:
/**
* Is the value of the passed ValueObject that belongs to the given id "empty"?
@@ -164,6 +164,20 @@ protected:
*/
virtual bool isEmptyValue( XMP_Uns32 id, ValueObject& valueObj ) = 0;
+ /**
+ * Validates the value for the passed identifier
+ * @param id Identifier of value
+ * @param value pointer to value object
+ */
+ virtual bool valueValid( XMP_Uns32 id, ValueObject * value );
+
+ /**
+ * Modify the value for the passed identifier
+ * @param id Identifier of value
+ * @param value pointer to value object
+ */
+ virtual void valueModify( XMP_Uns32 id, ValueObject * value );
+
private:
// Operators hidden on purpose
IMetadata( const IMetadata& ) {};
@@ -191,9 +205,13 @@ template<class T> void IMetadata::setValue( XMP_Uns32 id, const T& value )
//
valueObj = dynamic_cast<TValueObject<T>*>( iterator->second );
- if( valueObj != NULL )
+ if( valueObj != NULL )
{
- valueObj->setValue( value );
+ TValueObject< T > newValueObj( value );
+ if ( valueValid( id, &newValueObj ) ) {
+ valueModify( id, &newValueObj );
+ valueObj->setValue( newValueObj.getValue() );
+ }
}
else
{
@@ -206,10 +224,14 @@ template<class T> void IMetadata::setValue( XMP_Uns32 id, const T& value )
// value doesn't exists yet and is not "empty"
// so add a new value to the map
//
- valueObj = new TValueObject<T>( value );
- mValues[id] = valueObj;
-
- mDirty = true; // the new created value isn't dirty, but the container becomes dirty
+ TValueObject< T > newValueObj( value );
+ if ( this->valueValid( id, &newValueObj ) )
+ {
+ this->valueModify( id, &newValueObj );
+ valueObj = new TValueObject<T>( newValueObj.getValue() );
+ mValues[id] = valueObj;
+ mDirty = true; // the new created value isn't dirty, but the container becomes dirty
+ }
}
//
diff --git a/XMPFiles/source/NativeMetadataSupport/IReconcile.cpp b/XMPFiles/source/NativeMetadataSupport/IReconcile.cpp
index dd34725..b7d4405 100644
--- a/XMPFiles/source/NativeMetadataSupport/IReconcile.cpp
+++ b/XMPFiles/source/NativeMetadataSupport/IReconcile.cpp
@@ -141,6 +141,12 @@ bool IReconcile::importNativeToXMP( SXMPMeta& outXMP, const IMetadata& nativeMet
}
break;
+ case kNativeType_Bool:
+ {
+ SXMPUtils::ConvertFromBool( nativeMeta.getValue<bool>( propertyInfo[index].mMetadataID ), &xmpValue );
+ }
+ break;
+
default:
{
XMP_Throw( "Unknown native data type", kXMPErr_InternalFailure );
@@ -217,7 +223,7 @@ bool IReconcile::importNativeToXMP( SXMPMeta& outXMP, const IMetadata& nativeMet
//
//-----------------------------------------------------------------------------
-bool IReconcile::exportXMPToNative( IMetadata& outNativeMeta, SXMPMeta& inXMP, const MetadataPropertyInfo* propertyInfo )
+bool IReconcile::exportXMPToNative( IMetadata& outNativeMeta, SXMPMeta& inXMP, const MetadataPropertyInfo* propertyInfo, PropertyList * propertiesExportedSuccessfully /*= NULL*/ )
{
std::string xmpValue;
XMP_Uns32 index = 0;
@@ -275,6 +281,8 @@ bool IReconcile::exportXMPToNative( IMetadata& outNativeMeta, SXMPMeta& inXMP, c
std::string ascii;
convertToASCII( xmpValue, ascii );
outNativeMeta.setValue<std::string>( propertyInfo[index].mMetadataID, ascii );
+ if ( propertiesExportedSuccessfully )
+ propertiesExportedSuccessfully->push_back( std::make_pair( propertyInfo[index].mXMPSchemaNS, propertyInfo[index].mXMPPropName ) );
}
break;
@@ -282,6 +290,8 @@ bool IReconcile::exportXMPToNative( IMetadata& outNativeMeta, SXMPMeta& inXMP, c
case kNativeType_StrUTF8:
{
outNativeMeta.setValue<std::string>( propertyInfo[index].mMetadataID, xmpValue );
+ if ( propertiesExportedSuccessfully )
+ propertiesExportedSuccessfully->push_back( std::make_pair( propertyInfo[index].mXMPSchemaNS, propertyInfo[index].mXMPPropName ) );
}
break;
@@ -293,6 +303,8 @@ bool IReconcile::exportXMPToNative( IMetadata& outNativeMeta, SXMPMeta& inXMP, c
{
ReconcileUtils::UTF8ToLocal( xmpValue.c_str(), xmpValue.size(), &value );
outNativeMeta.setValue<std::string>( propertyInfo[index].mMetadataID, value );
+ if ( propertiesExportedSuccessfully )
+ propertiesExportedSuccessfully->push_back( std::make_pair( propertyInfo[index].mXMPSchemaNS, propertyInfo[index].mXMPPropName ) );
}
catch( XMP_Error& e )
{
@@ -330,6 +342,8 @@ bool IReconcile::exportXMPToNative( IMetadata& outNativeMeta, SXMPMeta& inXMP, c
if( ! error && value >= 0 )
{
outNativeMeta.setValue<XMP_Uns64>( propertyInfo[index].mMetadataID, static_cast<XMP_Uns64>(value) );
+ if ( propertiesExportedSuccessfully )
+ propertiesExportedSuccessfully->push_back( std::make_pair( propertyInfo[index].mXMPSchemaNS, propertyInfo[index].mXMPPropName ) );
}
}
break;
@@ -358,6 +372,8 @@ bool IReconcile::exportXMPToNative( IMetadata& outNativeMeta, SXMPMeta& inXMP, c
if( ! error && value >= 0 )
{
outNativeMeta.setValue<XMP_Uns32>( propertyInfo[index].mMetadataID, static_cast<XMP_Uns32>(value) );
+ if ( propertiesExportedSuccessfully )
+ propertiesExportedSuccessfully->push_back( std::make_pair( propertyInfo[index].mXMPSchemaNS, propertyInfo[index].mXMPPropName ) );
}
}
break;
@@ -386,6 +402,8 @@ bool IReconcile::exportXMPToNative( IMetadata& outNativeMeta, SXMPMeta& inXMP, c
if( ! error )
{
outNativeMeta.setValue<XMP_Int32>( propertyInfo[index].mMetadataID, static_cast<XMP_Int32>(value) );
+ if ( propertiesExportedSuccessfully )
+ propertiesExportedSuccessfully->push_back( std::make_pair( propertyInfo[index].mXMPSchemaNS, propertyInfo[index].mXMPPropName ) );
}
}
break;
@@ -414,6 +432,38 @@ bool IReconcile::exportXMPToNative( IMetadata& outNativeMeta, SXMPMeta& inXMP, c
if( ! error && value >= 0 )
{
outNativeMeta.setValue<XMP_Uns16>( propertyInfo[index].mMetadataID, static_cast<XMP_Uns16>(value) );
+ if ( propertiesExportedSuccessfully )
+ propertiesExportedSuccessfully->push_back( std::make_pair( propertyInfo[index].mXMPSchemaNS, propertyInfo[index].mXMPPropName ) );
+ }
+ }
+ break;
+
+ case kNativeType_Bool:
+ {
+ bool value;
+ bool error = false;
+
+ try
+ {
+ value = SXMPUtils::ConvertToBool( xmpValue );
+ }
+ catch( XMP_Error& e )
+ {
+ if ( e.GetID() != kXMPErr_BadParam )
+ {
+ // rethrow exception if it wasn't caused by an
+ // invalid parameter for the conversion
+ throw e;
+ }
+ error = true;
+ }
+
+ // Only write the value if it could be converted to a number and has a positive value
+ if( ! error )
+ {
+ outNativeMeta.setValue<bool>( propertyInfo[index].mMetadataID, value );
+ if ( propertiesExportedSuccessfully )
+ propertiesExportedSuccessfully->push_back( std::make_pair( propertyInfo[index].mXMPSchemaNS, propertyInfo[index].mXMPPropName ) );
}
}
break;
diff --git a/XMPFiles/source/NativeMetadataSupport/IReconcile.h b/XMPFiles/source/NativeMetadataSupport/IReconcile.h
index af8646d..16a0109 100644
--- a/XMPFiles/source/NativeMetadataSupport/IReconcile.h
+++ b/XMPFiles/source/NativeMetadataSupport/IReconcile.h
@@ -42,7 +42,8 @@ enum MetadataPropertyType
kNativeType_Uns64,
kNativeType_Uns32,
kNativeType_Int32,
- kNativeType_Uns16
+ kNativeType_Uns16,
+ kNativeType_Bool
};
/** Types that describe how an XMP property is exported to native Metadata */
@@ -71,6 +72,8 @@ struct MetadataPropertyInfo
class IReconcile
{
public:
+ typedef std::vector< std::pair< XMP_StringPtr, XMP_StringPtr > > PropertyList;
+
virtual ~IReconcile() {};
/**
* Reconciles metadata from legacy formats into XMP.
@@ -128,7 +131,7 @@ protected:
@return true if any native metadata value were changed
*/
- static bool exportXMPToNative( IMetadata& outNativeMeta, SXMPMeta& inXMP, const MetadataPropertyInfo* propertyInfo );
+ static bool exportXMPToNative( IMetadata& outNativeMeta, SXMPMeta& inXMP, const MetadataPropertyInfo* propertyInfo, PropertyList * propertiesExportedSuccessfully = NULL );
// Converts input string to an ascii output string
// - terminates at first 0
diff --git a/XMPFiles/source/PluginHandler/FileHandler.h b/XMPFiles/source/PluginHandler/FileHandler.h
index 8d68258..ca43ced 100644
--- a/XMPFiles/source/PluginHandler/FileHandler.h
+++ b/XMPFiles/source/PluginHandler/FileHandler.h
@@ -51,7 +51,7 @@ class FileHandler
public:
FileHandler(std::string & uid, XMP_OptionBits handlerFlags, FileHandlerType type, ModuleSharedPtr module):
- mVersion(0), mUID(uid), mHandlerFlags(handlerFlags), mOverwrite(false), mType(type), mModule(module) {}
+ mVersion(0), mUID(uid), mHandlerFlags(handlerFlags), mOverwrite(false), mType(type), mModule(module),mSerializeOption(0) {}
virtual ~FileHandler(){}
diff --git a/XMPFiles/source/PluginHandler/Module.cpp b/XMPFiles/source/PluginHandler/Module.cpp
index 595c17d..d76589c 100644
--- a/XMPFiles/source/PluginHandler/Module.cpp
+++ b/XMPFiles/source/PluginHandler/Module.cpp
@@ -246,10 +246,6 @@ bool Module::loadInternal()
errorMsg = "Plugin initialization failed.";
}
}
- else
- {
- errorMsg = "Missing plugin entry point in plugin";
- }
}
if( mLoaded != kModuleLoaded )
diff --git a/XMPFiles/source/PluginHandler/PluginManager.cpp b/XMPFiles/source/PluginHandler/PluginManager.cpp
index 3802c9b..0f47300 100644
--- a/XMPFiles/source/PluginHandler/PluginManager.cpp
+++ b/XMPFiles/source/PluginHandler/PluginManager.cpp
@@ -385,7 +385,6 @@ void PluginManager::initialize( const std::string& pluginDir, const std::string&
{
try
{
- HandlerRegistry & hdlrReg = HandlerRegistry::getInstance();
if( msPluginManager == 0 ) msPluginManager = new PluginManager( pluginDir, plugins );
msPluginManager->initializeHostAPI();
@@ -817,10 +816,7 @@ void PluginManager::initializeHostAPI()
break;
}
- if( hostAPI != NULL )
- {
- msPluginManager->mHostAPIs[ hostAPI->mVersion ] = hostAPI;
- }
+ msPluginManager->mHostAPIs[ hostAPI->mVersion ] = hostAPI;
}
}
diff --git a/XMPFiles/source/XMPFiles.cpp b/XMPFiles/source/XMPFiles.cpp
index 32ea41f..ae8f701 100644
--- a/XMPFiles/source/XMPFiles.cpp
+++ b/XMPFiles/source/XMPFiles.cpp
@@ -26,11 +26,16 @@
#endif
#include "XMPFiles/source/FormatSupport/ID3_Support.hpp"
+#include "XMPFiles/source/FormatSupport/ISOBaseMedia_Support.hpp"
#if EnablePacketScanning
#include "XMPFiles/source/FileHandlers/Scanner_Handler.hpp"
#endif
+#if EnableGenericHandling
+ #include "XMPFiles/source/FileHandlers/Generic_Handler.hpp"
+#endif
+
// =================================================================================================
/// \file XMPFiles.cpp
/// \brief High level support to access metadata in files of interest to Adobe applications.
@@ -93,6 +98,10 @@ const char * kXMPFiles_EmbeddedCopyright = kXMPFilesName " " kXMP_CopyrightStr;
(CheckFileFormatProc)0, Scanner_MetaHandlerCTor );
#endif
+#if EnableGenericHandling
+ static XMPFileHandlerInfo kGenericHandlerInfo ( kXMP_UnknownFile, kGeneric_HandlerFlags,
+ (CheckFileFormatProc)0, Generic_MetaHandlerCTor );
+#endif
// =================================================================================================
/* class-static */
@@ -291,6 +300,7 @@ XMPFiles::Terminate()
SXMPMeta::Terminate(); // Just in case the client does not.
ID3_Support::TerminateGlobals();
+ ISOMedia::TerminateGlobals();
Terminate_LibUtils();
#if UseGlobalLibraryLock & (! XMP_StaticBuild )
@@ -302,6 +312,9 @@ XMPFiles::Terminate()
xmpFilesLog = stderr;
#endif
+ // reset static variables
+ sDefaultErrorCallback.Clear();
+ sProgressDefault.Clear();
XMP_FILES_STATIC_END1 ( kXMPErrSev_ProcessFatal )
} // XMPFiles::Terminate
@@ -380,9 +393,9 @@ XMPFiles::GetFormatInfo ( XMP_FileFormat format,
XMP_OptionBits * flags /* = 0 */ )
{
XMP_FILES_STATIC_START
- return HandlerRegistry::getInstance().getFormatInfo ( format, flags );
+ return HandlerRegistry::getInstance().getFormatInfo ( format, flags );
XMP_FILES_STATIC_END1 ( kXMPErrSev_OperationFatal )
- return false;
+ return false;
} // XMPFiles::GetFormatInfo
@@ -487,11 +500,12 @@ static XMPFileHandlerInfo* CreateFileHandlerInfo (
XMPFiles* dummyParent,
XMP_FileFormat * format,
XMP_OptionBits options,
+ XMP_Bool& excluded,
const XMPFiles::ErrorCallbackInfo * _errorCallbackInfoPtr = NULL )
{
Host_IO::FileMode clientMode;
std::string fileExt; // Used to check for excluded files.
- bool excluded = FileIsExcluded ( dummyParent->GetFilePath().c_str(), &fileExt, &clientMode, &sDefaultErrorCallback ); // ! Fills in fileExt and clientMode.
+ excluded = FileIsExcluded ( dummyParent->GetFilePath().c_str(), &fileExt, &clientMode, &sDefaultErrorCallback ); // ! Fills in fileExt and clientMode.
if ( excluded ) return 0;
XMPFileHandlerInfo * handlerInfo = 0;
@@ -533,7 +547,26 @@ XMPFiles::GetFileModDate ( XMP_StringPtr clientPath,
XMPFileHandlerInfo * handlerInfo = 0;
- handlerInfo = CreateFileHandlerInfo ( &dummyParent, format, options, &sDefaultErrorCallback );
+ XMP_Bool excluded=false;
+ handlerInfo = CreateFileHandlerInfo ( &dummyParent, format, options, excluded, &sDefaultErrorCallback );
+#if EnableGenericHandling
+#if GenericHandlingAlwaysOn
+ XMP_OptionBits oldOptions = options;
+ options |= kXMPFiles_OpenUseGenericHandler;
+#endif
+ if (handlerInfo == 0 && !excluded
+ && (options & kXMPFiles_OpenUseGenericHandler) )
+ {
+ Host_IO::FileMode fileMode = Host_IO::GetFileMode( clientPath );
+ if ( fileMode == Host_IO::kFMode_DoesNotExist )
+ return false;
+
+ handlerInfo = &kGenericHandlerInfo;
+ }
+#if GenericHandlingAlwaysOn
+ options = oldOptions;
+#endif
+#endif
if ( handlerInfo == 0 ) return false;
// -------------------------------------------------------------------------
@@ -556,7 +589,7 @@ XMPFiles::GetFileModDate ( XMP_StringPtr clientPath,
for ( size_t index = 0; index < countRes ; ++index ){
XMP_StringPtr curFilePath = resourceList[index].c_str();
if( Host_IO::GetFileMode ( curFilePath ) != Host_IO::kFMode_IsFile ) continue;// only interested in files
- Host_IO::GetModifyDate ( curFilePath, &lastModDate );
+ if (!Host_IO::GetModifyDate ( curFilePath, &lastModDate ) ) continue;
if ( ! ok || ( SXMPUtils::CompareDateTime ( *modDate , lastModDate ) < 0 ) )
{
*modDate = lastModDate;
@@ -602,7 +635,26 @@ XMPFiles::GetAssociatedResources (
dummyParent.SetFilePath ( filePath );
XMPFileHandlerInfo * handlerInfo = 0;
- handlerInfo = CreateFileHandlerInfo ( &dummyParent, &format, options, &sDefaultErrorCallback );
+ XMP_Bool excluded=false;
+ handlerInfo = CreateFileHandlerInfo ( &dummyParent, &format, options, excluded, &sDefaultErrorCallback );
+#if EnableGenericHandling
+#if GenericHandlingAlwaysOn
+ XMP_OptionBits oldOptions = options;
+ options |= kXMPFiles_OpenUseGenericHandler;
+#endif
+ if (handlerInfo == 0 && !excluded
+ && (options & kXMPFiles_OpenUseGenericHandler) )
+ {
+ Host_IO::FileMode fileMode = Host_IO::GetFileMode( filePath );
+ if ( fileMode == Host_IO::kFMode_DoesNotExist )
+ return false;
+
+ handlerInfo = &kGenericHandlerInfo;
+ }
+#if GenericHandlingAlwaysOn
+ options = oldOptions;
+#endif
+#endif
if ( handlerInfo == 0 ) return false;
// -------------------------------------------------------------------------
@@ -650,7 +702,26 @@ XMPFiles::IsMetadataWritable (
dummyParent.SetFilePath ( filePath );
XMPFileHandlerInfo * handlerInfo = 0;
- handlerInfo = CreateFileHandlerInfo ( &dummyParent, &format, options, &sDefaultErrorCallback );
+ XMP_Bool excluded=false;
+ handlerInfo = CreateFileHandlerInfo ( &dummyParent, &format, options, excluded, &sDefaultErrorCallback );
+#if EnableGenericHandling
+#if GenericHandlingAlwaysOn
+ XMP_OptionBits oldOptions = options;
+ options |= kXMPFiles_OpenUseGenericHandler;
+#endif
+ if (handlerInfo == 0 && !excluded
+ && (options & kXMPFiles_OpenUseGenericHandler))
+ {
+ Host_IO::FileMode fileMode = Host_IO::GetFileMode( filePath );
+ if ( fileMode == Host_IO::kFMode_DoesNotExist )
+ return false;
+
+ handlerInfo = &kGenericHandlerInfo;
+ }
+#if GenericHandlingAlwaysOn
+ options = oldOptions;
+#endif
+#endif
if ( handlerInfo == 0 ) return false;
if ( writable == 0 ) {
@@ -670,8 +741,9 @@ XMPFiles::IsMetadataWritable (
try {
*writable = ConvertBoolToXMP_Bool( dummyParent.handler->IsMetadataWritable() );
- }
- catch ( XMP_Error& error ) {
+ } catch ( XMP_Error& error ) {
+ delete dummyParent.handler;
+ dummyParent.handler = 0;
if ( error.GetID() == kXMPErr_Unimplemented ) {
XMP_FILES_STATIC_NOTIFY_ERROR ( &sDefaultErrorCallback, filePath, kXMPErrSev_Recoverable, error );
return false;
@@ -679,8 +751,10 @@ XMPFiles::IsMetadataWritable (
throw;
}
}
- delete dummyParent.handler;
- dummyParent.handler = 0;
+ if ( dummyParent.handler ) {
+ delete dummyParent.handler;
+ dummyParent.handler = 0;
+ }
XMP_FILES_STATIC_END2 ( filePath, kXMPErrSev_OperationFatal )
return true;
} // XMPFiles::IsMetadataWritable
@@ -699,6 +773,10 @@ DoOpenFile ( XMPFiles * thiz,
openFlags &= ~kXMPFiles_ForceGivenHandler; // Don't allow this flag for OpenFile.
+ if ( (openFlags & kXMPFiles_OptimizeFileLayout) && (! (openFlags & kXMPFiles_OpenForUpdate)) ) {
+ XMP_Throw ( "OptimizeFileLayout requires OpenForUpdate", kXMPErr_BadParam );
+ }
+
if ( thiz->handler != 0 ) XMP_Throw ( "File already open", kXMPErr_BadParam );
CloseLocalFile ( thiz ); // Sanity checks if prior call failed.
@@ -728,6 +806,24 @@ DoOpenFile ( XMPFiles * thiz,
if ( ! (openFlags & kXMPFiles_OpenUsePacketScanning) ) {
handlerInfo = HandlerRegistry::getInstance().selectSmartHandler( thiz, clientPath, format, openFlags );
+#if EnableGenericHandling
+#if GenericHandlingAlwaysOn
+ XMP_OptionBits oldOpenFlags = openFlags;
+ openFlags |= kXMPFiles_OpenUseGenericHandler;
+#endif
+ if (handlerInfo==0
+ && !(openFlags & kXMPFiles_OpenStrictly)
+ && (openFlags & kXMPFiles_OpenUseGenericHandler))
+ {
+ if ( clientMode == Host_IO::kFMode_DoesNotExist )
+ return false;
+
+ handlerInfo = &kGenericHandlerInfo;
+ }
+#if GenericHandlingAlwaysOn
+ openFlags = oldOpenFlags;
+#endif
+#endif
}
#if ! EnablePacketScanning
@@ -754,11 +850,21 @@ DoOpenFile ( XMPFiles * thiz,
}
if ( openFlags & kXMPFiles_OpenUseSmartHandler ) {
+ CloseLocalFile ( thiz );
XMP_Error error ( kXMPErr_NoFileHandler, "XMPFiles: No smart file handler available to handle file" );
XMP_FILES_STATIC_NOTIFY_ERROR ( &thiz->errorCallback, clientPath, kXMPErrSev_Recoverable, error );
return false;
}
+#if EnableGenericHandling
+ if ( openFlags & kXMPFiles_OpenUseGenericHandler ) {
+ CloseLocalFile ( thiz );
+ XMP_Error error ( kXMPErr_NoFileHandler, "XMPFiles: Generic handler not available to handle file" );
+ XMP_FILES_STATIC_NOTIFY_ERROR ( &thiz->errorCallback, clientPath, kXMPErrSev_Recoverable, error );
+ return false;
+ }
+#endif
+
if ( openFlags & kXMPFiles_OpenLimitedScanning ) {
bool scanningOK = false;
for ( size_t i = 0; kKnownScannedFiles[i] != 0; ++i ) {
@@ -793,6 +899,12 @@ DoOpenFile ( XMPFiles * thiz,
thiz->handler = handler;
try {
+ if ( !readOnly && handlerFlags & kXMPFiles_FolderBasedFormat ) {
+ bool isMetadataWritable = handler->IsMetadataWritable();
+ if ( !isMetadataWritable ) {
+ XMP_Throw ( "Open, file permission error", kXMPErr_FilePermission );
+ }
+ }
handler->CacheFileData();
} catch ( ... ) {
delete thiz->handler;
@@ -824,6 +936,9 @@ static bool DoOpenFile( XMPFiles* thiz,
openFlags &= ~kXMPFiles_ForceGivenHandler; // Don't allow this flag for OpenFile.
+ if ( (openFlags & kXMPFiles_OptimizeFileLayout) && (! (openFlags & kXMPFiles_OpenForUpdate)) ) {
+ XMP_Throw ( "OptimizeFileLayout requires OpenForUpdate", kXMPErr_BadParam );
+ }
if ( thiz->handler != 0 ) XMP_Throw ( "File already open", kXMPErr_BadParam );
@@ -950,6 +1065,8 @@ XMPFiles::CloseFile ( XMP_OptionBits closeFlags /* = 0 */ )
if ( this->handler == 0 ) return; // Return if there is no open file (not an error).
bool needsUpdate = this->handler->needsUpdate;
+ bool optimizeFileLayout = XMP_OptionIsSet ( this->openFlags, kXMPFiles_OptimizeFileLayout );
+
XMP_OptionBits handlerFlags = this->handler->handlerFlags;
// Decide if we're doing a safe update. If so, make sure the handler supports it. All handlers
@@ -982,6 +1099,8 @@ XMPFiles::CloseFile ( XMP_OptionBits closeFlags /* = 0 */ )
// Close the file without doing common crash-safe writing. The handler might do it.
+ needsUpdate |= optimizeFileLayout;
+
if ( needsUpdate ) {
#if GatherPerformanceData
sAPIPerf->back().extraInfo += ", direct update";
@@ -1057,7 +1176,10 @@ XMPFiles::CloseFile ( XMP_OptionBits closeFlags /* = 0 */ )
// *** Don't delete the temp or copy files, not sure which is best.
try {
- if ( this->handler != 0 ) delete this->handler;
+ if ( this->handler != 0 ) {
+ delete this->handler;
+ this->handler = 0;
+ }
} catch ( ... ) { /* Do nothing, throw the outer exception later. */ }
if ( this->ioRef ) this->ioRef->DeleteTemp();
diff --git a/XMPFiles/source/XMPFiles.hpp b/XMPFiles/source/XMPFiles.hpp
index 70ab020..e3ecb8b 100644
--- a/XMPFiles/source/XMPFiles.hpp
+++ b/XMPFiles/source/XMPFiles.hpp
@@ -17,7 +17,7 @@
#include "public/include/XMP.hpp"
#include "public/include/XMP_IO.hpp"
-
+#include "source/SafeStringAPIs.h"
#include "source/XMP_ProgressTracker.hpp"
class XMPFileHandler;
diff --git a/XMPFiles/source/XMPFiles_Impl.cpp b/XMPFiles/source/XMPFiles_Impl.cpp
index 471c48d..68fa99f 100644
--- a/XMPFiles/source/XMPFiles_Impl.cpp
+++ b/XMPFiles/source/XMPFiles_Impl.cpp
@@ -502,3 +502,18 @@ XMP_OptionBits XMPFileHandler::GetSerializeOptions()
} // XMPFileHandler::GetSerializeOptions
// =================================================================================================
+// XMPFileHandler::NotifyClient
+// ===================================
+//
+// Generic function for all the file handlers to replace existing exception throws
+//
+void XMPFileHandler::NotifyClient(GenericErrorCallback * errCBptr, XMP_ErrorSeverity severity, XMP_Error & error)
+{
+ if (errCBptr)
+ errCBptr->NotifyClient( severity, error );
+ else {
+ if ( severity != kXMPErrSev_Recoverable )
+ throw error;
+ }
+}
+// =================================================================================================
diff --git a/XMPFiles/source/XMPFiles_Impl.hpp b/XMPFiles/source/XMPFiles_Impl.hpp
index 6e21c23..72d82e7 100644
--- a/XMPFiles/source/XMPFiles_Impl.hpp
+++ b/XMPFiles/source/XMPFiles_Impl.hpp
@@ -302,6 +302,8 @@ public:
virtual void UpdateFile ( bool doSafeUpdate ) = 0;
virtual void WriteTempFile ( XMP_IO* tempRef ) = 0;
+ static void NotifyClient(GenericErrorCallback * errCBptr, XMP_ErrorSeverity severity, XMP_Error & error);
+
// ! Leave the data members public so common code can see them.
XMPFiles * parent; // Let's the handler see the file info.
diff --git a/XMPFilesPlugins/PDF_Handler/resource/linux/PDF_Handler.exp b/XMPFilesPlugins/PDF_Handler/resource/linux/PDF_Handler.exp
new file mode 100755
index 0000000..39538a9
--- /dev/null
+++ b/XMPFilesPlugins/PDF_Handler/resource/linux/PDF_Handler.exp
@@ -0,0 +1,11 @@
+VERSION {
+global:
+
+ InitializePlugin;
+ InitializePlugin2;
+
+local:
+
+ *;
+
+};
diff --git a/XMPFilesPlugins/PDF_Handler/resource/mac/PDF_Handler.exp b/XMPFilesPlugins/PDF_Handler/resource/mac/PDF_Handler.exp
new file mode 100755
index 0000000..836c85c
--- /dev/null
+++ b/XMPFilesPlugins/PDF_Handler/resource/mac/PDF_Handler.exp
@@ -0,0 +1,2 @@
+_InitializePlugin
+_InitializePlugin2
diff --git a/XMPFilesPlugins/PDF_Handler/resource/mac/PDF_Handler.plist b/XMPFilesPlugins/PDF_Handler/resource/mac/PDF_Handler.plist
new file mode 100755
index 0000000..3ed3d33
--- /dev/null
+++ b/XMPFilesPlugins/PDF_Handler/resource/mac/PDF_Handler.plist
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleExecutable</key>
+ <string>PDF_Handler</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.xmp.PDF_Handler</string>
+ <key>CFBundleName</key>
+ <string>PDF_Handler</string>
+ <key>CFBundleGetInfoString</key>
+ <string>PDF Handler kBasicVersion, kXMP_Copyright</string>
+ <key>CFBundleShortVersionString</key>
+ <string>PDF Handler kBasicVersion</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleSignature</key>
+ <string>XMP </string>
+ <key>Configuration</key>
+ <string>kConfig</string>
+ <key>FileVersion</key>
+ <string>kBasicVersion</string>
+ <key>ProductName</key>
+ <string>PDF Handler</string>
+ <key>ProductVersion</key>
+ <string>PDF_HANDLER_VERSION</string>
+</dict>
+</plist>
diff --git a/XMPFilesPlugins/PDF_Handler/resource/mac/PDF_HandlerPList.h b/XMPFilesPlugins/PDF_Handler/resource/mac/PDF_HandlerPList.h
new file mode 100755
index 0000000..1835b9c
--- /dev/null
+++ b/XMPFilesPlugins/PDF_Handler/resource/mac/PDF_HandlerPList.h
@@ -0,0 +1,12 @@
+#include "../../../../build/XMP_BuildInfo.h"
+#define PDF_HANDLER_VERSION 1.0
+#if NDEBUG // Can't use XMP_Environment.h, it seems to mess up the PList compiler.
+ #define kConfig Release
+ #define kDebugSuffix
+ #define kBasicVersion PDF_HANDLER_VERSION
+#else
+ #define kConfig Debug
+ #define kDebugSuffix (debug)
+ #define kBasicVersion PDF_HANDLER_VERSION kDebugSuffix
+#endif
+
diff --git a/XMPFilesPlugins/PDF_Handler/resource/win/CopyPDFL.bat b/XMPFilesPlugins/PDF_Handler/resource/win/CopyPDFL.bat
new file mode 100755
index 0000000..8983a55
--- /dev/null
+++ b/XMPFilesPlugins/PDF_Handler/resource/win/CopyPDFL.bat
@@ -0,0 +1,14 @@
+@ECHO OFF
+@rem Copy the needed PDFL to the public folder.
+@rem Usage: CopyPDFL <mode> <platform>
+@rem <mode> is debug or release
+@rem <platform> is windows or windows_x64. defaults to "windows" (32-bit)
+
+set workingDir=%~dp0%
+set mode=%1
+if "%1" == "" set mode=release
+set platform=%2
+if "%2" == "" set platform=windows
+
+mkdir %workingDir%\..\..\..\public\%platform%\%mode%\PDF_Handler
+xcopy /y /r %workingDir%\..\..\third-party\MiniPDFL\libraries\%platform%\release\MiniPDFL.dll %workingDir%\..\..\..\public\%platform%\%mode%\PDF_Handler
diff --git a/XMPFilesPlugins/PDF_Handler/resource/win/PDF_Handler-32.rc b/XMPFilesPlugins/PDF_Handler/resource/win/PDF_Handler-32.rc
new file mode 100644
index 0000000..9f3c0b6
--- /dev/null
+++ b/XMPFilesPlugins/PDF_Handler/resource/win/PDF_Handler-32.rc
@@ -0,0 +1,8 @@
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// TXT
+//
+
+XMPPLUGINUIDS TXT "../../../resource/txt/XMPPLUGINUIDS-32.txt"
+MODULE_IDENTIFIER TXT "../../../resource/txt/MODULE_IDENTIFIER.txt"
diff --git a/XMPFilesPlugins/PDF_Handler/resource/win/PDF_Handler-64.rc b/XMPFilesPlugins/PDF_Handler/resource/win/PDF_Handler-64.rc
new file mode 100644
index 0000000..2d6b025
--- /dev/null
+++ b/XMPFilesPlugins/PDF_Handler/resource/win/PDF_Handler-64.rc
@@ -0,0 +1,8 @@
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// TXT
+//
+
+XMPPLUGINUIDS TXT "../../../resource/txt/XMPPLUGINUIDS-64.txt"
+MODULE_IDENTIFIER TXT "../../../resource/txt/MODULE_IDENTIFIER.txt"
diff --git a/XMPFilesPlugins/PDF_Handler/resource/win/PDF_Handler.def b/XMPFilesPlugins/PDF_Handler/resource/win/PDF_Handler.def
new file mode 100755
index 0000000..714f780
--- /dev/null
+++ b/XMPFilesPlugins/PDF_Handler/resource/win/PDF_Handler.def
@@ -0,0 +1,9 @@
+; Declares the entry points for the DLL.
+; Highest index: 2 - InitializePlugin2
+
+LIBRARY PDF_Handler
+
+EXPORTS
+
+ InitializePlugin @1
+ InitializePlugin2 @2
diff --git a/XMPFilesPlugins/PDF_Handler/windows/windows/MiniPDFL.lib b/XMPFilesPlugins/PDF_Handler/windows/windows/MiniPDFL.lib
new file mode 100644
index 0000000..b9f84f2
--- /dev/null
+++ b/XMPFilesPlugins/PDF_Handler/windows/windows/MiniPDFL.lib
Binary files differ
diff --git a/XMPFilesPlugins/PDF_Handler/windows/windows_x64/MiniPDFL.lib b/XMPFilesPlugins/PDF_Handler/windows/windows_x64/MiniPDFL.lib
new file mode 100644
index 0000000..be9cdf3
--- /dev/null
+++ b/XMPFilesPlugins/PDF_Handler/windows/windows_x64/MiniPDFL.lib
Binary files differ
diff --git a/XMPFilesPlugins/PluginTemplate/build/GeneratePluginTemplate_win.bat b/XMPFilesPlugins/PluginTemplate/build/GeneratePluginTemplate_win.bat
index 9183dfb..f346490 100755
--- a/XMPFilesPlugins/PluginTemplate/build/GeneratePluginTemplate_win.bat
+++ b/XMPFilesPlugins/PluginTemplate/build/GeneratePluginTemplate_win.bat
@@ -47,9 +47,9 @@ set GENERATE_ALL=On
:32DLL
echo "Generating PluginTemplate Dynamic Win32"
-set GENERATOR=Visual Studio 10
+set GENERATOR=Visual Studio 11
set BITS64=OFF
-set CMakeFolder="vc10/windows"
+set CMakeFolder="vc11/windows"
set CMake_ARCH=x86
IF "%GENERATE_ALL%"=="On" (
set NEXT_LABEL=64DLL
@@ -59,9 +59,9 @@ GOTO GenerateNow
:64DLL
echo "Generating PluginTemplate Dynamic x64"
-set GENERATOR=Visual Studio 10 Win64
+set GENERATOR=Visual Studio 11 Win64
set BITS64=ON
-set CMakeFolder="vc10/windows_x64"
+set CMakeFolder="vc11/windows_x64"
set CMake_ARCH=x64
IF "%GENERATE_ALL%"=="On" (
set NEXT_LABEL=ok
@@ -94,7 +94,7 @@ exit /B 0
:CLEANALL
echo "Cleaning..."
-if exist vc10 rmdir /S /Q vc10
+if exist vc11 rmdir /S /Q vc11
echo "Done"
pause
exit /B 0
diff --git a/XMPFilesPlugins/PluginTemplate/build/README.txt b/XMPFilesPlugins/PluginTemplate/build/README.txt
index 207b57c..01030b9 100644
--- a/XMPFilesPlugins/PluginTemplate/build/README.txt
+++ b/XMPFilesPlugins/PluginTemplate/build/README.txt
@@ -2,13 +2,13 @@ Building Template Plugin Projects:
Windows:
-1. Double Click "GenerateSamples_win.bat" or run it through command prompt.
+1. Double Click GeneratePluginTemplate_win.bat" or run it through command prompt.
2. Enter the type of project to create
-3. The project files will be created in vc10\windows or vc10\windows_x64 folder
+3. The project files will be created in vc11\windows or vc11\windows_x64 folder
Mac:
-1. Run the shell script GenerateSamples_mac.sh.
+1. Run the shell script GeneratePluginTemplate_mac.sh.
2. Enter the type of project to create
3. The project files will be created in xcode\intel or xcode\intel_64 folder
diff --git a/XMPFilesPlugins/api/source/PluginRegistry.cpp b/XMPFilesPlugins/api/source/PluginRegistry.cpp
index 7cf7dd2..1f7c340 100644
--- a/XMPFilesPlugins/api/source/PluginRegistry.cpp
+++ b/XMPFilesPlugins/api/source/PluginRegistry.cpp
@@ -120,6 +120,7 @@ bool PluginRegistry::terminate()
}
delete msRegistry;
+ msRegistry = NULL;
}
return true;
}
diff --git a/build/CMakeLists.txt b/build/CMakeLists.txt
index 7a04a8d..2a96ea9 100644
--- a/build/CMakeLists.txt
+++ b/build/CMakeLists.txt
@@ -65,8 +65,7 @@ set(XMP_ROOT ${PROJECT_SOURCE_DIR}/..)
# Shared config
# ==============================================================================
# setup some values before calling shared config
-set(XMP_THIS_PROJECT_RELATIVEPATH "..")
-include(${CMAKE_CURRENT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/build/XMP_Config.cmake)
+include(${XMP_ROOT}/build/XMP_Config.cmake)
# ==============================================================================
# Sub projects
diff --git a/build/GenerateXMPToolkitSDK_win.bat b/build/GenerateXMPToolkitSDK_win.bat
index 06444d5..767d625 100755
--- a/build/GenerateXMPToolkitSDK_win.bat
+++ b/build/GenerateXMPToolkitSDK_win.bat
@@ -41,7 +41,7 @@ set GENERATE_ALL=On
:32DLL
echo "Generating XMPSDKToolkit Dynamic Win32"
-set VS_VERSION=2010
+set VS_VERSION=2011
set BUILD_TYPE=Dynamic
set BITS=32
IF "%GENERATE_ALL%"=="On" (
@@ -52,7 +52,7 @@ GOTO GenerateNow
:32LIB
echo "Generating XMPSDKToolkit Static Win32"
-set VS_VERSION=2010
+set VS_VERSION=2011
set BUILD_TYPE=Static
set BITS=32
IF "%GENERATE_ALL%"=="On" (
@@ -62,7 +62,7 @@ GOTO GenerateNow
:64DLL
echo "Generating XMPSDKToolkit Dynamic x64"
-set VS_VERSION=2010
+set VS_VERSION=2011
set BUILD_TYPE=Dynamic
set BITS=64
IF "%GENERATE_ALL%"=="On" (
@@ -72,7 +72,7 @@ GOTO GenerateNow
:64LIB
echo "Generating XMPSDKToolkit Static x64"
-set VS_VERSION=2010
+set VS_VERSION=2011
set BUILD_TYPE=Static
set BITS=64
IF "%GENERATE_ALL%"=="On" (
@@ -98,9 +98,9 @@ exit /B 0
:CLEANALL
echo "Cleaning..."
-if exist vc10 rmdir /S /Q vc10
-if exist ..\XMPCore\build\vc10 rmdir /S /Q ..\XMPCore\build\vc10
-if exist ..\XMPFiles\build\vc10 rmdir /S /Q ..\XMPFiles\build\vc10
+if exist vc11 rmdir /S /Q vc11
+if exist ..\XMPCore\build\vc11 rmdir /S /Q ..\XMPCore\build\vc11
+if exist ..\XMPFiles\build\vc11 rmdir /S /Q ..\XMPFiles\build\vc11
if exist ..\public\libraries\windows rmdir /S /Q ..\public\libraries\windows
if exist ..\public\libraries\windows_x64 rmdir /S /Q ..\public\libraries\windows_x64
echo "Done"
diff --git a/build/ProductConfig.cmake b/build/ProductConfig.cmake
new file mode 100644
index 0000000..b310ca9
--- /dev/null
+++ b/build/ProductConfig.cmake
@@ -0,0 +1,170 @@
+#/*************************************************************************
+#*
+#* ADOBE CONFIDENTIAL
+#* ___________________
+#*
+#* Copyright [2012] Adobe Systems Incorporated
+#* All Rights Reserved.
+#*
+#* NOTICE: All information contained herein is, and remains
+#* the property of Adobe Systems Incorporated and its suppliers,
+#* if any. The intellectual and technical concepts contained
+#* herein are proprietary to Adobe Systems Incorporated and its
+#* suppliers and are protected by trade secret or copyright law.
+#* Dissemination of this information or reproduction of this material
+#* is strictly forbidden unless prior written permission is obtained
+#* from Adobe Systems Incorporated.
+#**************************************************************************/
+
+# ==============================================================================
+# define minimum cmake version
+cmake_minimum_required(VERSION 2.8.0)
+
+# ==============================================================================
+# Product Config for XMP Toolkit
+# ==============================================================================
+if (UNIX)
+ if (APPLE)
+ set(XMP_ENABLE_SECURE_SETTINGS "ON")
+
+ if (APPLE_IOS)
+ set(XMP_PLATFORM_SHORT "ios")
+ set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_BIT)")
+ add_definitions(-DIOS_ENV=1)
+
+ # shared flags
+ set(XMP_SHARED_COMPILE_FLAGS "${XMP_SHARED_COMPILE_FLAGS} ${XMP_EXTRA_COMPILE_FLAGS}")
+ set(XMP_SHARED_COMPILE_DEBUG_FLAGS "-O0 -DDEBUG=1 -D_DEBUG=1")
+ set(XMP_SHARED_COMPILE_RELEASE_FLAGS "-Os -DNDEBUG=1 -D_NDEBUG=1")
+
+ set(XMP_PLATFORM_BEGIN_WHOLE_ARCHIVE "")
+ set(XMP_PLATFORM_END_WHOLE_ARCHIVE "")
+ else ()
+ set(XMP_PLATFORM_SHORT "mac")
+ if(CMAKE_CL_64)
+ set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX" FORCE)
+ add_definitions(-DXMP_64=1)
+ else(CMAKE_CL_64)
+ set(CMAKE_OSX_ARCHITECTURES "i386" CACHE STRING "Build architectures for OSX" FORCE)
+ add_definitions(-DXMP_64=0)
+ endif(CMAKE_CL_64)
+
+ # is SDK and deployment target set?
+ if(NOT DEFINED XMP_OSX_SDK)
+ # no, so default to CS6 settings
+ #set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.2")
+ set(XMP_OSX_SDK 10.8)
+ set(XMP_OSX_TARGET 10.7)
+ endif()
+
+ add_definitions(-DMAC_ENV=1)
+
+
+ #
+ # shared flags
+ #
+ set(XMP_SHARED_COMPILE_FLAGS "-Wall -Wextra")
+ set(XMP_SHARED_COMPILE_FLAGS "${XMP_SHARED_COMPILE_FLAGS} -Wno-missing-field-initializers -Wno-shadow") # disable some warnings
+
+ set(XMP_SHARED_COMPILE_FLAGS "${XMP_SHARED_COMPILE_FLAGS}")
+
+ set(XMP_SHARED_CXX_COMPILE_FLAGS "${XMP_SHARED_COMPILE_FLAGS} -Wno-reorder") # disable warnings
+
+ set(XMP_PLATFORM_BEGIN_WHOLE_ARCHIVE "")
+ set(XMP_PLATFORM_END_WHOLE_ARCHIVE "")
+ set(XMP_DYLIBEXTENSION "dylib")
+ endif ()
+
+ #There were getting set from SetupTargetArchitecture.
+ if(APPLE_IOS)
+ set(XMP_CPU_FOLDERNAME "$(ARCHS_STANDARD_32_BIT)")
+ else()
+ if(CMAKE_CL_64)
+ set(XMP_BITDEPTH "64")
+ set(XMP_CPU_FOLDERNAME "intel_64")
+ else()
+ set(XMP_BITDEPTH "32")
+ set(XMP_CPU_FOLDERNAME "intel")
+ endif()
+ endif()
+
+ # XMP_PLATFORM_FOLDER is used in OUTPUT_DIR and Debug/Release get automatically added for VS/XCode projects
+ if(APPLE_IOS)
+ set(XMP_PLATFORM_FOLDER "ios/${XMP_CPU_FOLDERNAME}")
+ else()
+ set(XMP_PLATFORM_FOLDER "macintosh/${XMP_CPU_FOLDERNAME}")
+ endif()
+ else ()
+ if(NOT CMAKE_CROSSCOMPILING)
+ if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
+ # running on 64bit machine
+ set(XMP_EXTRA_BUILDMACHINE "Buildmachine is 64bit")
+ else()
+ # running on 32bit machine
+ set(XMP_EXTRA_BUILDMACHINE "Buildmachine is 32bit")
+ endif()
+
+ if(CMAKE_CL_64)
+ set(XMP_EXTRA_COMPILE_FLAGS "-m64")
+ set(XMP_EXTRA_LINK_FLAGS "-m64")
+ set(XMP_PLATFORM_FOLDER "i80386linux_x64") # add XMP_BUILDMODE_DIR to follow what other platforms do
+ set(XMP_GCC_LIBPATH /user/unicore/i80386linux_x64/compiler/gcc4.4.4/linux2.6_64/lib64)
+ else()
+ set(XMP_EXTRA_LINK_FLAGS "-m32 -mtune=i686")
+ set(XMP_PLATFORM_FOLDER "i80386linux") # add XMP_BUILDMODE_DIR to follow what other platforms do
+ set(XMP_GCC_LIBPATH /user/unicore/i80386linux/compiler/gcc4.4.4/linux2.6_32/lib)
+ endif()
+ else()
+ # running toolchain
+ if(CMAKE_CL_64)
+ set(XMP_EXTRA_COMPILE_FLAGS "-m64")
+ set(XMP_EXTRA_LINK_FLAGS "-m64")
+ set(XMP_PLATFORM_FOLDER "i80386linux_x64") # add XMP_BUILDMODE_DIR to follow what other platforms do
+ set(XMP_GCC_LIBPATH /user/unicore/i80386linux_x64/compiler/gcc4.4.4/linux2.6_64/lib64)
+ else()
+ set(XMP_EXTRA_COMPILE_FLAGS "-m32 -mtune=i686")
+ set(XMP_EXTRA_LINK_FLAGS "-m32")
+ set(XMP_PLATFORM_FOLDER "i80386linux") # add XMP_BUILDMODE_DIR to follow what other platforms do
+ set(XMP_GCC_LIBPATH /user/unicore/i80386linux/compiler/gcc4.4.4/linux2.6_32/lib)
+ endif()
+
+ set(XMP_EXTRA_BUILDMACHINE "Cross compiling")
+ endif()
+ set(XMP_PLATFORM_VERSION "linux2.6") # add XMP_BUILDMODE_DIR to follow what other platforms do
+
+ add_definitions(-DUNIX_ENV=1)
+ # Linux -------------------------------------------
+ set(XMP_PLATFORM_SHORT "linux")
+ #gcc path is not set correctly
+ #set(CMAKE_C_COMPILER "/user/unicore/i80386linux/compiler/gcc4.4.4/linux2.6_32/bin/gcc")
+ #set(CMAKE_CXX_COMPILER "/user/unicore/i80386linux/compiler/gcc4.4.4/linux2.6_32/bin/gcc")
+ #set(XMP_GCC_LIBPATH /user/unicore/i80386linux/compiler/gcc4.4.4/linux2.6_32/lib)
+ set(XMP_PLATFORM_LINK "-z defs -Xlinker -Bsymbolic -Wl,--no-undefined ${XMP_EXTRA_LINK_FLAGS} ${XMP_TOOLCHAIN_LINK_FLAGS} -lrt -ldl -luuid -lpthread ${XMP_GCC_LIBPATH}/libssp.a")
+ set(XMP_SHARED_COMPILE_FLAGS "-Wno-multichar -Wno-implicit -D_FILE_OFFSET_BITS=64 -funsigned-char ${XMP_EXTRA_COMPILE_FLAGS} ${XMP_TOOLCHAIN_COMPILE_FLAGS}")
+ set(XMP_SHARED_COMPILE_DEBUG_FLAGS " ")
+ set(XMP_SHARED_COMPILE_RELEASE_FLAGS "-fwrapv ")
+
+ if(NOT XMP_DISABLE_FASTMATH)
+ # set(XMP_SHARED_COMPILE_FLAGS "${XMP_SHARED_COMPILE_FLAGS} -ffast-math")
+ # set(XMP_SHARED_COMPILE_RELEASE_FLAGS "${XMP_SHARED_COMPILE_RELEASE_FLAGS} -fomit-frame-pointer -funroll-loops")
+ endif()
+ endif()
+else ()
+ if(CMAKE_CL_64)
+ set(XMP_PLATFORM_FOLDER "windows_x64") # leave XMP_BUILDMODE_DIR away, since CMAKE_CFG_INTDIR gets added by CMake automatically
+ else(CMAKE_CL_64)
+ set(XMP_PLATFORM_FOLDER "windows") # leave XMP_BUILDMODE_DIR away, since CMAKE_CFG_INTDIR gets added by CMake automatically
+ endif(CMAKE_CL_64)
+ set(XMP_PLATFORM_SHORT "win")
+ set(XMP_PLATFORM_LINK "")
+ set(XMP_SHARED_COMPILE_FLAGS "-DWIN_ENV=1 -D_CRT_SECURE_NO_WARNINGS=1 -D_SCL_SECURE_NO_WARNINGS=1 /J /fp:precise")
+ set(XMP_SHARED_COMPILE_DEBUG_FLAGS "")
+ set(XMP_SHARED_COMPILE_RELEASE_FLAGS "/O1 /Ob2 /Os /Oy- /GL /FD ")
+
+ set(XMP_SHARED_COMPILE_DEBUG_FLAGS "${XMP_SHARED_COMPILE_DEBUG_FLAGS} /MDd")
+ set(XMP_SHARED_COMPILE_RELEASE_FLAGS "${XMP_SHARED_COMPILE_RELEASE_FLAGS} /MD")
+
+ set(XMP_PLATFORM_LINK_WIN "${XMP_WIN32_LINK_EXTRAFLAGS} /MAP")
+endif ()
+
+
diff --git a/build/README.txt b/build/README.txt
index 1169937..322c4c8 100644
--- a/build/README.txt
+++ b/build/README.txt
@@ -1,23 +1,23 @@
-This README describes steps to generate project files on different platforms.These platform specific projects can then be used to build the XMPToolkit SDK.Before generating the projects the SDK developer needs to copy dependencies to the proper locations. Refer to "Dependencies" section in XMP Toolkit Programmer's Guide.
+This README describes steps to generate project files on different platforms. These platform specific projects can then be used to build the XMPToolkit SDK. Before generating the projects the SDK developer needs to copy the dependencies to the proper locations. Refer to "Dependencies" section in the XMP Toolkit Programmer's Guide.
-WINDOWS XP and above
-Options to generate Project files in Windows is of the form "Generate XMPSDKToolkit [Dynamic|static] [Win32|x64]".An option of "Dynamic" indicates that the generated project files will build a dll for the XMP SDK components.On the other hand the option of "Static" indicates that the generated project files will build a static lib for the XMP SDK components.Options for "Win32" or "x64" indicates that the generated project files will build the library for 32 bit or 64 bit applications respectively.
-1. Open the windows command prompt and change the current directory to <xmpsdk>/build. 2. Run the batch file GenerateXMPToolkitSDK_win.bat. There will be four options(2-5) to build projects for different configurations, one option(6) to generate projects for all configurations and one option(1) to clean all the projects. 3. After running the batch file (options 2-6),the vc10 projects(using cmake) will be generated at the location <xmpsdk>/build/vc10/<static|dynamic>/<windows|windows_x64>/<XMPToolkitSDK.sln|XMPToolkitSDK64.sln>. 4. Open the visual studio solution file and build XMP Toolkit SDK for debug/release configuration.
-MAC OS X 10.6 and above
-Options to generate Project files in Mac is of the form "Generate XMPSDKToolkit [Dynamic|static] [32|64|iOS]".An option of "Dynamic" indicates that the generated project files will build a framework for the XMP SDK components.On the other hand the option of "Static" indicates that the generated project files will build a static lib for the XMP SDK components.Options for "32" or "64" indicates that the generated project files will build for 32 bit or 64 bit applications respectively. The option of "iOS" will generate the project files that will build XMP Core library for iOS simulators and iOS devices.
+WINDOWS 7 and above
+Options to generate Project files in Windows are of the form "Generate XMPSDKToolkit [Dynamic|static] [Win32|x64]". An option of "Dynamic" indicates that the generated project files will build a dll for the XMP SDK components. On the other hand the option of "Static" indicates that the generated project files will build a static lib for the XMP SDK components. Options for "Win32" or "x64" indicate that the generated project files will build the library for 32 bit or 64 bit applications respectively.
+1. Open the windows command prompt and change the current directory to <xmpsdk>/build. 2. Run the batch file GenerateXMPToolkitSDK_win.bat. There will be four options(2-5) to build projects for different configurations, one option(6) to generate projects for all configurations and one option(1) to clean all the projects. 3. After running the batch file (options 2-6),the vc11 projects(using cmake) will be generated at the location <xmpsdk>/build/vc11/<static|dynamic>/<windows|windows_x64>/<XMPToolkitSDK.sln|XMPToolkitSDK64.sln>. 4. Open the Visual Studio solution file and build XMP Toolkit SDK for debug/release configuration.
+MAC OS X 10.7 and above
+Options to generate Project files in Mac are of the form "Generate XMPSDKToolkit [Dynamic|static] [32|64|iOS]". An option of "Dynamic" indicates that the generated project files will build a framework for the XMP SDK components. On the other hand the option of "Static" indicates that the generated project files will build a static lib for the XMP SDK components. Options for "32" or "64" indicate that the generated project files will build for 32 bit or 64 bit applications respectively. The option of "iOS" will generate the project files that will build XMP Core library for iOS simulators and iOS devices.
1. Open the Terminal on Mac and change the current directory to <xmpsdk>/build. 2. Run the shell script GenerateXMPToolkitSDK_mac.sh. There will be five options(2-6) to build projects for different configurations, one option(7) to generate projects for all configurations and one option(1) to clean all the projects.
3. After running the batch file (options 2-7),the xcode projects will be generated(using cmake) at the location <xmpsdk>/build/xcode/<static|dynamic>/<intel|intel_64>/<XMPToolkitSDK.xcodeproj|XMPToolkitSDK64.xcodeproj>.
4. Open the xcodeproj file and build XMP Toolkit SDK for debug/release configuration.
-Note: When multiple Xcode versions are installed on a system, the developer has to use xcode-select command to specify the Xcode version that he wishes to use.This is done in two steps by fetching the current Xcode folder and changing it if required.
+Note: When multiple Xcode versions are installed on a system, the developer has to use xcode-select command to specify the Xcode version that he/she wishes to use. This is done in two steps by fetching the current Xcode folder and changing it if required.
1) Fetch the current Xcode folder $ xcode-select -print-path
-2) Change the Xcode Folder if required.For example if the new XCode path is /Applications/Xcode.app $ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer Note: Presently a single scheme is created for each project. For building different configurations the Release or Debug configurations has to be selected using "Edit Scheme -> Run -> Release/Debug
-LINUX
-Options to generate makefiles in Linux is given in the form of a Makefile with different targets.The targets available are
-StaticAll: Generate the Makefiles for static libraries and build them. Includes both Debug and Release libs. DynamicAll: Generate the Makefiles for shared libraries and build them. Includes both Debug and Release libs. DebugAll: Generate the Makefiles for Debug libraries and build them. Includes both static and dynamic libs. ReleaseAll: Generate the Makefiles for Release libraries and build them. Includes both static and dynamic libs.
+2) Change the Xcode Folder if required. For example if the new XCode path is /Applications/Xcode.app $ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer Note: Presently a single scheme is created for each project. For building different configurations the Release or Debug configurations has to be selected using "Edit Scheme -> Run -> Release/Debug
+ LINUX
+Options to generate makefiles in Linux are given in the form of a Makefile with different targets. The targets available are
+StaticAll: Generates the Makefiles for static libraries and builds them. Includes both Debug and Release libs. DynamicAll: Generates the Makefiles for shared libraries and builds them. Includes both Debug and Release libs. DebugAll: Generates the Makefiles for Debug libraries and builds them. Includes both static and dynamic libs. ReleaseAll: Generates the Makefiles for Release libraries and builds them. Includes both static and dynamic libs.
1. Change the current directory to <xmpsdk>/build. 2. Make sure the gcc location is added to $PATH and its libraries location to $LD_LIBRARY_PATH. There is a need to add libuuid.so library path to the $LD_LIBRARY_PATH as well.
-3. This <xmpsdk>/build folder contains a Makefile which has different targets to build and the default is to build all of them.The Makefile generates the makefiles(using cmake) to build the project and then calls these makefiles to build the target.
+3. This <xmpsdk>/build folder contains a Makefile which has different targets to build and the default is to build all of them. The Makefile generates the makefiles(using cmake) to build the project and then calls these makefiles to build the target.
-Note: Generating gcc Makefiles to build the project requires the path to the gcc set in the CMake toolchain file for Linux i.e. <xmpsdk>/build/shared/ToolchainGCC.cmake. In this file modifications must be done by the developer to set the CMAKE_FIND_ROOT_PATH so that CMake picks the desired gcc compiler. He may also want to change the parameter XMP_ENABLE_SECURE_SETTINGS as per the configured gcc.
- a) If the gcc is configured with --enable-libssp (can be checked by executing gcc -v), he has to set the variable XMP_GCC_LIBPATH inside of file <xmpsdk>/build/XMP_Linux.cmake to the path containing the static lib( libssp.a).In this case he can set the variable the XMP_ENABLE_SECURE_SETTINGS on.
-b) If the gcc is configured with --disable-libssp, he has to set the variable XMP_ENABLE_SECURE_SETTINGS off.
-================================================================================================================================================= Note: The projects for different platforms are now generated using CMake. CMake generates projects with absolute paths so they cannot be copied from one place to other. If the projects is to be moved then whole tree has to be copied to the new location and CMake should be invoked again
+Note: Generating gcc Makefiles to build the project requires the path to the gcc set in the CMake toolchain file for Linux i.e. <xmpsdk>/build/shared/ToolchainGCC.cmake. In this file modifications must be done by the developer to set the CMAKE_FIND_ROOT_PATH so that CMake picks the desired gcc compiler. He/She may also want to change the parameter XMP_ENABLE_SECURE_SETTINGS as per the configured gcc.
+ a) If the gcc is configured with --enable-libssp (can be checked by executing gcc -v), he/she has to set the variable XMP_GCC_LIBPATH inside of file <xmpsdk>/build/ProductConfig.cmake to the path containing the static lib( libssp.a). In this case he/she can set the variable the XMP_ENABLE_SECURE_SETTINGS on.
+b) If the gcc is configured with --disable-libssp, he/she has to set the variable XMP_ENABLE_SECURE_SETTINGS off.
+================================================================================================================================================= Note: The projects for different platforms are generated using CMake. CMake generates projects with absolute paths so they cannot be copied from one place to other. If the project is to be moved, then the whole tree has to be copied to the new location and CMake should be invoked again.
diff --git a/build/XMP_Config.cmake b/build/XMP_Config.cmake
index 60526c3..e0377de 100644
--- a/build/XMP_Config.cmake
+++ b/build/XMP_Config.cmake
@@ -12,510 +12,13 @@
cmake_minimum_required(VERSION 2.8.6)
# ==============================================================================
-# Shared config for XMPTOOLKIT and TestRunner
+# XMP config for XMPTOOLKIT and TestRunner
# ==============================================================================
if(NOT DEFINED XMP_ROOT)
set(XMP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH})
- message (XMP_ROOT= " ${XMP_ROOT} ")
endif()
if(NOT DEFINED COMMON_BUILD_SHARED_DIR)
set(COMMON_BUILD_SHARED_DIR ${XMP_ROOT}/build/shared)
- message (COMMON_BUILD_SHARED_DIR= " ${COMMON_BUILD_SHARED_DIR} ")
endif()
+include(${XMP_ROOT}/build/XMP_ConfigCommon.cmake)
-#add definition specific to XMP and shared by all projects
-add_definitions(-DXML_STATIC=1 -DHAVE_EXPAT_CONFIG_H=1)
-if(XMP_BUILD_STATIC)
- add_definitions(-DXMP_StaticBuild=1)
-endif()
-
-set (XMPROOT_DIR ${XMP_ROOT})
-set (COMPONENT XMP)
-
-
-# Load project specific MACRO, VARIABLES; set for component and pass to the common file where there are set
-if (UNIX)
- if (APPLE)
- if (APPLE_IOS)
- include(${XMP_ROOT}/build/XMP_Ios.cmake)
- else ()
- include(${XMP_ROOT}/build/XMP_Mac.cmake)
- endif ()
- else ()
- execute_process(COMMAND "uname" OUTPUT_VARIABLE OSNAME)
- string(TOUPPER "${OSNAME}" OSNAME)
-
- if ( ${OSNAME} MATCHES SUNOS)
- execute_process(COMMAND "uname" "-p" OUTPUT_VARIABLE PLATFORM_SUNOS_ARCH)
- string(TOUPPER "${PLATFORM_SUNOS_ARCH}" PLATFORM_SUNOS_ARCH)
-
- if ( ${PLATFORM_SUNOS_ARCH} MATCHES SPARC)
- include(${XMP_ROOT}/build/XMP_sunos_sparc.cmake)
- else()
- include(${XMP_ROOT}/build/XMP_sunos_intel.cmake)
- endif()
- else()
- include(${XMP_ROOT}/build/XMP_Linux.cmake)
- endif()
- endif ()
-else ()
- if (WIN32)
- include(${XMP_ROOT}/build/XMP_Win.cmake)
- endif ()
-endif ()
-
-
-
-include(${COMMON_BUILD_SHARED_DIR}/SharedConfig.cmake)
-
-
-# ==============================================================================
-# Function: Create output dir and copy static library to it
-# ==============================================================================
-#
-function(CreateStaticLib productname outputDir)
- if(UNIX)
- add_custom_command (TARGET ${productname} POST_BUILD
- COMMAND mkdir -p ${outputDir}
- COMMAND cp -f -p ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${productname}.a ${outputDir}/lib${productname}.a
- COMMENT "create output directory and copy lib to it")
- endif(UNIX)
-endfunction(CreateStaticLib)
-
-# ==============================================================================
-# Function: Copy resource(s) to bundle/lib resource folder
-# ==============================================================================
-#
-function(CopyResource appname outputDir copyWhat)
- if(XMP_BUILD_STATIC)
- add_custom_command (TARGET ${productname} COMMAND ${CMAKE_COMMAND} -E remove_directory ${outputDir} COMMENT "Remove resource dir")
- if(UNIX)
- add_custom_command (TARGET ${appname} POST_BUILD
- COMMAND mkdir -p ${outputDir}
- COMMAND cp -f ${copyWhat} ${outputDir}
- COMMENT "Copy resource")
- else(UNIX)
- file(TO_NATIVE_PATH "${outputDir}" outputDir_NAT)
- file(TO_NATIVE_PATH "${copyWhat}" copyWhat_NAT)
- add_custom_command (TARGET ${appname} POST_BUILD
- COMMAND mkdir ${outputDir_NAT}
- COMMAND copy /Y ${copyWhat_NAT} ${outputDir_NAT}
- COMMENT "Copy resource")
- endif(UNIX)
- else(XMP_BUILD_STATIC)
- if(UNIX)
- if(APPLE)
- if(APPLE_IOS)
- else(APPLE_IOS)
- add_custom_command (TARGET ${appname} POST_BUILD
- COMMAND mkdir -p ${outputDir}
- COMMAND cp -f ${copyWhat} ${outputDir}
- COMMENT "Copy resource")
- endif(APPLE_IOS)
- else(APPLE)
- # Linux
- add_custom_command (TARGET ${appname} POST_BUILD
- COMMAND mkdir -p ${outputDir}
- COMMAND cp -f ${copyWhat} ${outputDir}
- COMMENT "Copy resource")
- endif(APPLE)
- endif(UNIX)
- endif(XMP_BUILD_STATIC)
-endfunction(CopyResource)
-
-# ==============================================================================
-# Function: Create a plugin shell and copy necessary things into resource folder
-# ==============================================================================
-# Win: DLL, resources are linked into DLL
-# OSX: Make Bundle, resources are copied into Bundle's resource folder
-# Linux: so, resources reside in a folder next to the so with so's name and ".resource" extension
-#
-function(CreatePlugin productname outputDir copyWhat)
- if(UNIX)
- if(APPLE)
- if(APPLE_IOS OR XMP_BUILD_STATIC)
- CreateStaticLib(${productname} ${outputDir})
- CopyResource(${productname} "${outputDir}/lib${productname}.resources" "${copyWhat}")
- else()
- # create a bundle, copy essential executable into bundle, but don't change output path
- #MakeBundle(${productname} "bundle" ${outputDir} "Info.plist" "Info_plist.h")
- MakeBundle(${productname} "xpi" ${outputDir} "" )
- # copy resources
- #CopyResource(${productname} "${outputDir}/${productname}.bundle/Contents/Resources" "${copyWhat}")
-
- # redo on this level: force no extension to make below bundle creation work
- set(CMAKE_SHARED_MODULE_PREFIX "" PARENT_SCOPE)
- set(CMAKE_SHARED_MODULE_SUFFIX "" PARENT_SCOPE)
- endif()
- else(APPLE)
- # Linux
- if(XMP_BUILD_STATIC)
- CreateStaticLib(${productname} ${outputDir})
- CopyResource(${productname} "${outputDir}/lib${productname}.resources" "${copyWhat}")
- else()
- set(XMP_SHARED_MODULE_SUFFIX ".xpi")
- set_target_properties(${productname} PROPERTIES SUFFIX ${XMP_SHARED_MODULE_SUFFIX})
- set_target_properties(${productname} PROPERTIES PREFIX "")
- set(LIBRARY_OUTPUT_PATH ${outputDir} PARENT_SCOPE)
- # copy resources
- #CopyResource(${productname} "${outputDir}/${productname}.resources" "${copyWhat}")
-
- # ExpliXMPly set a softlink with the version e.g plugin.so.2.0.0-> plugin.so for each Plugin
- #if ( NOT DEFINED XMP_VERSION)
- set (XMP_VERSION 1.0.0) # if not set this should only be the case for the SDK templates we set it to 1.0.0
- #endif()
- #set_target_properties(${productname} PROPERTIES SOVERSION ${XMP_VERSION})
- endif()
- endif(APPLE)
- else(UNIX)
- if(WIN32)
- # set pre/suf-fix
- set(CMAKE_SHARED_MODULE_PREFIX "" PARENT_SCOPE)
- set(XMP_SHARED_MODULE_SUFFIX ".xpi")
- set_target_properties(${productname} PROPERTIES SUFFIX ${XMP_SHARED_MODULE_SUFFIX})
- # we can't use LIBRARY_OUTPUT_PATH, so build in CMake dir and copy, otherwise an unwanted subfolder is created
- add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND}
- -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/${XMP_BUILDMODE_DIR} ${outputDir}/${TARGET_NAME}
- COMMENT "Copy to output dir")
-
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPRODUCT_NAME=\"${PRODUCT_NAME}\"" PARENT_SCOPE)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPRODUCT_NAME=\"${PRODUCT_NAME}\"" PARENT_SCOPE)
-
- if(XMP_BUILD_STATIC)
- CopyResource(${productname} "${outputDir}/${productname}.resources" "${copyWhat}")
- endif(XMP_BUILD_STATIC)
- endif(WIN32)
- endif(UNIX)
-endfunction(CreatePlugin)
-
-# ==============================================================================
-# Function: Find plugins in XMPPlugin folder and return the list of names
-# ==============================================================================
-#
-function(FindEnabledPlugins resultName)
- file (GLOB XMPPLUGIN_DIRS ${XMP_ROOT}/XMPPlugin/*)
- foreach(item ${XMPPLUGIN_DIRS})
- file (GLOB plugin_project FILES ${item}/build/CMakeLists.txt)
- if(plugin_project)
- get_filename_component(pluginProjectName ${item} NAME)
- if (NOT ${pluginProjectName}_EXCLUDE)
- set(names ${names} ${pluginProjectName})
- endif()
- endif()
- endforeach()
- set(${resultName} ${names} PARENT_SCOPE)
-endfunction(FindEnabledPlugins)
-
-# ==============================================================================
-# Function: Append static lib to target
-# ==============================================================================
-#
-function(AppendStaticLib outputDir targetName srcLibDir srcLibName)
- if(UNIX)
- if(APPLE_IOS)
- add_custom_command (TARGET ${targetName} POST_BUILD
- COMMAND mkdir -p ${srcLibDir}/${srcLibName}_TEMP
- COMMAND cd ${srcLibDir}/${srcLibName}_TEMP && ${CMAKE_AR} x ${srcLibDir}/lib${srcLibName}.a
- #COMMAND split lipo ${srcLibDir}/lib${srcLibName}.a -thin armv6 -output ${srcLibDir}/lib${srcLibName}arm6.a
- #COMMAND split lipo ${srcLibDir}/lib${srcLibName}.a -thin armv7 -output ${srcLibDir}/lib${srcLibName}arm7.a
- #COMMAND merge again lipo ${srcLibDir}/lib${srcLibName}arm6.a ${srcLibDir}/lib${srcLibName}arm7.a -create -output ${srcLibDir}/lib${srcLibName}.a
- COMMAND ${CMAKE_AR} rs ${outputDir}/lib${targetName}.a ${srcLibDir}/${srcLibName}_TEMP/*.o
- COMMAND rm -rf ${srcLibDir}/${srcLibName}_TEMP
- COMMENT "extract objects from lib${srcLibName}.a and pack to lib${targetName}.a")
- else()
- add_custom_command (TARGET ${targetName} POST_BUILD
- COMMAND mkdir -p ${srcLibDir}/${srcLibName}_TEMP
- COMMAND cd ${srcLibDir}/${srcLibName}_TEMP
- && ${CMAKE_AR} x ${srcLibDir}/lib${srcLibName}.a
- COMMAND ${CMAKE_AR} rs ${outputDir}/lib${targetName}.a ${srcLibDir}/${srcLibName}_TEMP/*.o
- COMMAND rm -rf ${srcLibDir}/${srcLibName}_TEMP
- COMMENT "extract objects from lib${srcLibName}.a and pack to lib${targetName}.a")
- endif()
- else(UNIX)
- if(WIN32)
- add_custom_command (TARGET ${targetName} POST_BUILD
- COMMAND cd ${outputDir}
- && lib.exe /OUT:${targetName}.lib ${outputDir}/${targetName}.lib ${srcLibDir}/${srcLibName}.lib
- COMMENT "extract objects from ${srcLibName}.lib and pack to ${targetName}.lib")
- endif(WIN32)
- endif(UNIX)
-endfunction(AppendStaticLib)
-
-# ==============================================================================
-# Function: INTERNAL used only!
-# Merge static plugin libraries into output library
-# ==============================================================================
-#
-function(MergeStaticLibs_Internal outputDir targetName useSubDir srcLibDir srcLibNames)
- foreach(libName ${${srcLibNames}})
- if(useSubDir)
- set(correctedDir ${srcLibDir}/${libName})
- else()
- set(correctedDir ${srcLibDir})
- endif()
- AppendStaticLib(${outputDir} ${targetName} ${correctedDir} ${libName})
- endforeach()
-endfunction(MergeStaticLibs_Internal)
-
-# ==============================================================================
-# Function: Merge static plugin libraries into output library
-# ==============================================================================
-#
-function(MergeStaticLibs outputDir targetName useSubDir srcLibDir srcLibNames)
- MergeStaticLibs_Internal(${outputDir} ${targetName} ${useSubDir} ${srcLibDir} ${srcLibNames})
- if(APPLE)
- if(APPLE_IOS)
- else(APPLE_IOS)
- # APPLE need run ranlib to fix broken TOC
- add_custom_command (TARGET ${targetName} POST_BUILD
- COMMENT "Run ranlib to fix broken TOC of library file lib${targetName}.a"
- COMMAND ${CMAKE_RANLIB} ${outputDir}/lib${targetName}.a
- )
- endif(APPLE_IOS)
- endif(APPLE)
-endfunction(MergeStaticLibs)
-
-# ==============================================================================
-# Function: Get XMP Framework's output name
-# ==============================================================================
-#
-function(GetXMPFrameworkOutputName result)
- if(UNIX)
- if(APPLE)
- if(XMP_BUILD_STATIC)
- set(outputName "libXMP.a")
- else()
- set(outputName "XMP.framework")
- endif()
- else(APPLE)
- if(XMP_BUILD_STATIC)
- set(outputName "libXMP.a")
- else()
- set(outputName "libXMP.so")
- endif()
- endif(APPLE)
- else(UNIX)
- if(WIN32)
- if(XMP_BUILD_STATIC)
- set(outputName "XMP.lib")
- else()
- set(outputName "XMP.dll")
- endif()
- endif(WIN32)
- endif(UNIX)
- set(${result} ${outputName} PARENT_SCOPE)
-endfunction(GetXMPFrameworkOutputName)
-
-# ==============================================================================
-# Macro: Add Plugin API files to project
-# For convenience we define the sources as a variable. You can add
-# header files and cpp/c files and CMake will sort them out
-# ==============================================================================
-#
-macro(AddPluginApiFiles relativePathToXMPPluginFolder)
- file (GLOB API_INCLUDE_FILES ${PROJECT_SOURCE_DIR}/${relativePathToXMPPluginFolder}/XMPFilesPlugins/api/source/*.h)
- source_group(api\\include FILES ${API_INCLUDE_FILES})
-
- file (GLOB API_SOURCE_FILES ${PROJECT_SOURCE_DIR}/${relativePathToXMPPluginFolder}/XMPFilesPlugins/api/source/*.cpp )
- source_group(api\\source FILES ${API_SOURCE_FILES})
-endmacro(AddPluginApiFiles)
-
-# ==============================================================================
-# Macro: Add Resource files to project
-# For convenience we define the sources as a variable. You can add
-# header files and cpp/c files and CMake will sort them out
-# ==============================================================================
-#
-macro(AddPluginResourceFiles)
- list(APPEND RESOURCE_FILES ${PROJECT_ROOT}/resource/txt/MODULE_IDENTIFIER.txt)
- if (CMAKE_CL_64)
- list(APPEND RESOURCE_FILES ${PROJECT_ROOT}/resource/txt/XMPPLUGINUIDS-64.txt)
- else()
- list(APPEND RESOURCE_FILES ${PROJECT_ROOT}/resource/txt/XMPPLUGINUIDS-32.txt)
- endif()
-
- # If we build for windows systems, we also include the resource file containing the manifest, icon and other resources
- if(WIN32)
- if (CMAKE_CL_64)
- list (APPEND RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${PRODUCT_NAME}-64.rc)
- else(CMAKE_CL_64)
- list (APPEND RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${PRODUCT_NAME}-32.rc)
- endif(CMAKE_CL_64)
- endif()
- source_group("Resource Files" FILES ${RESOURCE_FILES})
-endmacro(AddPluginResourceFiles)
-
-
-# ==============================================================================
-# Macro: Set Plugin Output folder
-# ==============================================================================
-#
-macro(SetPluginOutputPath)
- if(UNIX)
- if(APPLE)
- set(OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/XMPFilesPlugins/public/${XMP_PLATFORM_FOLDER}/${CMAKE_CFG_INTDIR})
- else()
- endif()
- else()
- set(OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/XMPFilesPlugins/public/${XMP_PLATFORM_FOLDER}/${CMAKE_CFG_INTDIR}/${PRODUCT_NAME})
- endif()
-endmacro(SetPluginOutputPath)
-
-# ==============================================================================
-# Function: Setup XMP for the application
-# Copy XMP library, create a symbolic link to Plug-ins, copy MediaAccess and fixup
-# ==============================================================================
-#
-function(SetupXMPForApp appname outputDir)
- # are optional parameter set?
- if(ARGV2 AND NOT APPLE_IOS)
- if(${ARGV2} MATCHES "FFMPEG")
- set(copyFFMpegLibs 1)
- else()
- set(copyFFMpegLibs 0)
- endif()
- else()
- set(copyFFMpegLibs 0)
- endif()
-
- if(NOT copyFFMpegLibs)
- set(ignoreCommand "#")
- else ()
- set(ignoreCommand "COMMAND")
- endif()
-
- if(APPLE_IOS)
- set(ignoreCommandOnIOS "#")
- set(ignoreCommandOnOSX "COMMAND")
- else ()
- set(ignoreCommandOnIOS "COMMAND")
- set(ignoreCommandOnOSX "#")
- endif()
-
-
- if(UNIX)
- if(APPLE)
- set(BUILT_PRODUCTS_DIR ${outputDir}/${appname}.app/Contents)
- # GetXMPFrameworkOutputName(XMP_FRAMEWORK_NAME)
- add_custom_command (TARGET ${appname} POST_BUILD
- COMMENT "Copy necessary XMP items and create symlink to Plug-ins dir"
- COMMAND echo clear XMP dir
- ${ignoreCommandOnIOS} rm -fR ${BUILT_PRODUCTS_DIR}/Frameworks/XMP
- COMMAND mkdir -p ${BUILT_PRODUCTS_DIR}/Frameworks/XMP
- ${ignoreCommandOnIOS} echo Copy XMP
- ${ignoreCommandOnIOS} rm -fR ${BUILT_PRODUCTS_DIR}/Frameworks/${XMP_FRAMEWORK_NAME}*
- ${ignoreCommandOnIOS} ln -s ${XMPLIBRARIES_DIR}/${XMP_FRAMEWORK_NAME} ${BUILT_PRODUCTS_DIR}/Frameworks/${XMP_FRAMEWORK_NAME}
- ${ignoreCommandOnIOS} ln -s ${XMPLIBRARIES_DIR}/${XMP_FRAMEWORK_NAME}.dSYM ${BUILT_PRODUCTS_DIR}/Frameworks/${XMP_FRAMEWORK_NAME}.dSYM
- ${ignoreCommand} echo Copy MediaAccess
- ${ignoreCommand} mkdir -p ${BUILT_PRODUCTS_DIR}/Frameworks/XMP/MediaAccess
- ${ignoreCommand} cp -fpR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/ ${BUILT_PRODUCTS_DIR}/Frameworks/XMP/MediaAccess
- ${ignoreCommand} cp -fpR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/ffmpeg/bin/${XMP_BITDEPTH}/lib* ${BUILT_PRODUCTS_DIR}/Frameworks/XMP/MediaAccess
- ${ignoreCommand} ${XMPROOT_DIR}/XMPMediaAccess/build/UpdateFFMPEGLibSearchPath.sh "@executable_path/../Frameworks/XMP/MediaAccess" "${BUILT_PRODUCTS_DIR}/Frameworks/XMP/MediaAccess"
- ${ignoreCommandOnIOS} echo Copy XMP plugins shared libs
- ${ignoreCommandOnIOS} cp -f -p -R ${XMPLIBRARIES_DIR}/Plug-ins/copy_to_app_dir/ ${BUILT_PRODUCTS_DIR}/Frameworks/
- ${ignoreCommandOnIOS} echo create symlinks
- ${ignoreCommandOnIOS} ln -s ${XMPLIBRARIES_DIR}/Plug-ins/ ${BUILT_PRODUCTS_DIR}/Frameworks/XMP/Plug-ins
- ${ignoreCommandOnOSX} echo copy plugin data
- ${ignoreCommandOnOSX} mkdir -p ${BUILT_PRODUCTS_DIR}/Resources/XMP/Plug-ins
- ${ignoreCommandOnOSX} cp -fpR ${XMPLIBRARIES_DIR}/Plug-ins/ ${BUILT_PRODUCTS_DIR}/Resources/XMP/Plug-ins
- )
- else(APPLE)
- # Do not copy FFMpeg libs if they don't exist
- if(NOT EXISTS ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/FFMpegWrapper.mediaaccess)
- set(ignoreCommand "#")
- else ()
- set(ignoreCommand "COMMAND")
- endif()
-
- set(BUILT_PRODUCTS_DIR ${outputDir})
- # GetXMPFrameworkOutputName(XMP_FRAMEWORK_NAME)
- add_custom_command (TARGET ${appname} POST_BUILD
- COMMENT "Copy necessary XMP items and create symlink to Plug-ins dir"
- COMMAND echo clear XMP dir
- COMMAND rm -f -R ${BUILT_PRODUCTS_DIR}/XMP
- COMMAND mkdir -p ${BUILT_PRODUCTS_DIR}/XMP
- COMMAND echo Copy XMP
- COMMAND rm -f -R ${BUILT_PRODUCTS_DIR}/libXMP*
- COMMAND ln -s ${XMPLIBRARIES_DIR}/${XMP_FRAMEWORK_NAME} ${BUILT_PRODUCTS_DIR}/${XMP_FRAMEWORK_NAME}
- ${ignoreCommand} echo Copy MediaAccess
- ${ignoreCommand} mkdir -p ${BUILT_PRODUCTS_DIR}/XMP/MediaAccess
- ${ignoreCommand} cp -fpR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/*.* ${BUILT_PRODUCTS_DIR}/XMP/MediaAccess
- #COMMAND ${ignoreCommand} cp -fpR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/ffmpeg/bin/${XMP_BITDEPTH}/*.* ${BUILT_PRODUCTS_DIR}/XMP/MediaAccess
- COMMAND echo Copy XMP plugins shared libs
- #COMMAND cp -f -p -R ${XMPLIBRARIES_DIR}/Plug-ins/copy_to_app_dir/ ${BUILT_PRODUCTS_DIR}/
- COMMAND echo create symlinks
- COMMAND ln -s ${XMPLIBRARIES_DIR}/Plug-ins/ ${BUILT_PRODUCTS_DIR}/XMP/Plug-ins
- )
- endif(APPLE)
- else(UNIX)
- if(WIN32)
- # Windows -------------------------------------------
- set(BUILT_PRODUCTS_DIR ${outputDir})
- # GetXMPFrameworkOutputName(XMP_FRAMEWORK_NAME)
- file(TO_NATIVE_PATH "${BUILT_PRODUCTS_DIR}/XMP/Plug-ins" BUILT_PLUGINS_DIR_NAT)
- file(TO_NATIVE_PATH "${XMPLIBRARIES_DIR}/Plug-ins" PLUGINS_DIR_NAT)
- file(TO_NATIVE_PATH "${BUILT_PRODUCTS_DIR}/${XMP_FRAMEWORK_NAME}" DEST_XMP_NAT)
- file(TO_NATIVE_PATH "${XMPLIBRARIES_DIR}/${XMP_FRAMEWORK_NAME}" SRC_XMP_NAT)
- file(TO_NATIVE_PATH "${BUILT_PRODUCTS_DIR}/XMP.pdb" DEST_XMP_PDB_NAT)
- file(TO_NATIVE_PATH "${XMPLIBRARIES_DIR}/XMP.pdb" SRC_XMP_PDB_NAT)
-
- #For Windows XP we need to use junction.exe instead of mklink which is only available on Windows Vista and above
- if((${CMAKE_SYSTEM} MATCHES "Windows-5.1") OR (${CMAKE_SYSTEM} MATCHES "Windows-5.2"))
- message (STATUS "- Use junction.exe to create links instead of mklink we either run on Win XP 32 or 64 bit")
- set(link_command ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/resources/tools/junction/junction.exe -accepteula )
- set(remove_XMP "echo")
- set(copy_link_XMP ${CMAKE_COMMAND} -E copy ${SRC_XMP_NAT} ${BUILT_PRODUCTS_DIR}/)
- set(copy_link_XMP_pdb ${CMAKE_COMMAND} -E copy ${SRC_XMP_PDB_NAT} ${BUILT_PRODUCTS_DIR}/)
- else()
- set(link_command mklink /D )
- set(remove_XMP ${CMAKE_COMMAND} -E remove -f ${DEST_XMP_NAT} ${DEST_XMP_PDB_NAT})
- set(copy_link_XMP mklink ${DEST_XMP_NAT} ${SRC_XMP_NAT})
- set(copy_link_XMP_pdb mklink ${DEST_XMP_PDB_NAT} ${SRC_XMP_PDB_NAT})
- endif()
-
- add_custom_command (TARGET ${appname} POST_BUILD
- COMMENT "Copy necessary XMP items and create symlink to Plug-ins dir"
- COMMAND echo - clear XMP dir
- COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILT_PRODUCTS_DIR}/XMP
- COMMAND echo - symlink XMP.dll and XMP.pdb
- COMMAND ${remove_XMP}
- COMMAND ${copy_link_XMP}
- COMMAND ${copy_link_XMP_pdb}
- COMMAND echo - copy XMP plugins shared libs (tbb etc)
- COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMPLIBRARIES_DIR}/Plug-ins/copy_to_app_dir/ ${BUILT_PRODUCTS_DIR}
- ${ignoreCommand} echo - copy FFMPEG libs
- ${ignoreCommand} ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/ffmpeg/bin/${XMP_BITDEPTH}/ ${BUILT_PRODUCTS_DIR}/XMP/MediaAccess
- ${ignoreCommand} ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/FFMpegWrapper.mediaaccess ${BUILT_PRODUCTS_DIR}/XMP/MediaAccess/FFMpegWrapper.mediaaccess
- ${ignoreCommand} ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/ffmpegwrapper.pdb ${BUILT_PRODUCTS_DIR}/XMP/MediaAccess/ffmpegwrapper.pdb
- COMMAND echo - remove symbolic link to plug-ins dir
- COMMAND rmdir ${BUILT_PLUGINS_DIR_NAT}
- COMMAND echo - execute symbolic link command
- COMMAND ${link_command} ${BUILT_PLUGINS_DIR_NAT} ${PLUGINS_DIR_NAT}
- )
- endif(WIN32)
- endif(UNIX)
-endfunction(SetupXMPForApp)
-
-# ==============================================================================
-# Function: GenerateInitFileForStaticBuild
-# Collect registrar initializer functions and create source in temp directory
-# out of it for static linkage
-# ==============================================================================
-#
-function(GenerateInitFileForStaticBuild)
- if(XMP_BUILD_STATIC)
- set(targetFile ${XMP_ROOT}/XMPApi/source/PluginStaticInit_TEMP.cpp)
- file(REMOVE ${targetFile})
-
- set(initDecl "#if XMP_BUILD_STATIC\n\n")
- set(initFunc "namespace XMP\n{\n void InstanciateRegistrarsForAllPlugins()\n {\n")
- foreach(pluginName ${XMP_ENABLED_PLUGINS})
- set(initDecl "${initDecl}extern void ${pluginName}_InstanciateRegistrars()\;\n")
- set(initFunc "${initFunc} ::${pluginName}_InstanciateRegistrars()\;\n")
- endforeach()
- set(initFunc "${initFunc} }\n}\n")
- set(initFunc "${initDecl}\n${initFunc}\n#endif\n")
-
- file(WRITE ${targetFile} ${initFunc})
- endif(XMP_BUILD_STATIC)
-endfunction(GenerateInitFileForStaticBuild)
diff --git a/build/XMP_ConfigCommon.cmake b/build/XMP_ConfigCommon.cmake
new file mode 100644
index 0000000..0dbb31b
--- /dev/null
+++ b/build/XMP_ConfigCommon.cmake
@@ -0,0 +1,481 @@
+# =================================================================================================
+# ADOBE SYSTEMS INCORPORATED
+# Copyright 2013 Adobe Systems Incorporated
+# All Rights Reserved
+#
+# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
+# of the Adobe license agreement accompanying it.
+# =================================================================================================
+
+# ==============================================================================
+# define minimum cmake version
+cmake_minimum_required(VERSION 2.8.6)
+
+#add definition specific to XMP and shared by all projects
+add_definitions(-DXML_STATIC=1 -DHAVE_EXPAT_CONFIG_H=1 )
+if(XMP_BUILD_STATIC)
+ add_definitions(-DXMP_StaticBuild=1)
+else()
+ add_definitions(-DXMP_DynamicBuild=1)
+endif()
+add_definitions(-DBUILDING_XMPCOMMON_LIB=1)
+
+set (XMPROOT_DIR ${XMP_ROOT})
+set (COMPONENT XMP)
+
+
+# Load project specific MACRO, VARIABLES; set for component and pass to the common file where there are set
+include(${XMP_ROOT}/build/ProductConfig.cmake)
+include(${COMMON_BUILD_SHARED_DIR}/SharedConfig.cmake)
+
+
+# ==============================================================================
+# Function: Create output dir and copy static library to it
+# ==============================================================================
+#
+function(CreateStaticLib productname outputDir)
+ if(UNIX)
+ add_custom_command (TARGET ${productname} POST_BUILD
+ COMMAND mkdir -p ${outputDir}
+ COMMAND cp -f -p ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${productname}.a ${outputDir}/lib${productname}.a
+ COMMENT "create output directory and copy lib to it")
+ endif(UNIX)
+endfunction(CreateStaticLib)
+
+# ==============================================================================
+# Function: Copy resource(s) to bundle/lib resource folder
+# ==============================================================================
+#
+function(CopyResource appname outputDir copyWhat)
+ if(XMP_BUILD_STATIC)
+ add_custom_command (TARGET ${productname} COMMAND ${CMAKE_COMMAND} -E remove_directory ${outputDir} COMMENT "Remove resource dir")
+ if(UNIX)
+ add_custom_command (TARGET ${appname} POST_BUILD
+ COMMAND mkdir -p ${outputDir}
+ COMMAND cp -f ${copyWhat} ${outputDir}
+ COMMENT "Copy resource")
+ else(UNIX)
+ file(TO_NATIVE_PATH "${outputDir}" outputDir_NAT)
+ file(TO_NATIVE_PATH "${copyWhat}" copyWhat_NAT)
+ add_custom_command (TARGET ${appname} POST_BUILD
+ COMMAND mkdir ${outputDir_NAT}
+ COMMAND copy /Y ${copyWhat_NAT} ${outputDir_NAT}
+ COMMENT "Copy resource")
+ endif(UNIX)
+ else(XMP_BUILD_STATIC)
+ if(UNIX)
+ if(APPLE)
+ if(APPLE_IOS)
+ else(APPLE_IOS)
+ add_custom_command (TARGET ${appname} POST_BUILD
+ COMMAND mkdir -p ${outputDir}
+ COMMAND cp -f ${copyWhat} ${outputDir}
+ COMMENT "Copy resource")
+ endif(APPLE_IOS)
+ else(APPLE)
+ # Linux
+ add_custom_command (TARGET ${appname} POST_BUILD
+ COMMAND mkdir -p ${outputDir}
+ COMMAND cp -f ${copyWhat} ${outputDir}
+ COMMENT "Copy resource")
+ endif(APPLE)
+ endif(UNIX)
+ endif(XMP_BUILD_STATIC)
+endfunction(CopyResource)
+
+# ==============================================================================
+# Function: Create a plugin shell and copy necessary things into resource folder
+# ==============================================================================
+# Win: DLL, resources are linked into DLL
+# OSX: Make Bundle, resources are copied into Bundle's resource folder
+# Linux: so, resources reside in a folder next to the so with so's name and ".resource" extension
+#
+function(CreatePlugin productname outputDir copyWhat)
+ if(UNIX)
+ if(APPLE)
+ if(APPLE_IOS OR XMP_BUILD_STATIC)
+ CreateStaticLib(${productname} ${outputDir})
+ CopyResource(${productname} "${outputDir}/lib${productname}.resources" "${copyWhat}")
+ else()
+ # create a bundle, copy essential executable into bundle, but don't change output path
+ #MakeBundle(${productname} "bundle" ${outputDir} "Info.plist" "Info_plist.h")
+ MakeBundle(${productname} "xpi" ${outputDir} "" )
+ # copy resources
+ #CopyResource(${productname} "${outputDir}/${productname}.bundle/Contents/Resources" "${copyWhat}")
+
+ # redo on this level: force no extension to make below bundle creation work
+ set(CMAKE_SHARED_MODULE_PREFIX "" PARENT_SCOPE)
+ set(CMAKE_SHARED_MODULE_SUFFIX "" PARENT_SCOPE)
+ endif()
+ else(APPLE)
+ # Linux
+ if(XMP_BUILD_STATIC)
+ CreateStaticLib(${productname} ${outputDir})
+ CopyResource(${productname} "${outputDir}/lib${productname}.resources" "${copyWhat}")
+ else()
+ set(XMP_SHARED_MODULE_SUFFIX ".xpi")
+ set_target_properties(${productname} PROPERTIES SUFFIX ${XMP_SHARED_MODULE_SUFFIX})
+ set_target_properties(${productname} PROPERTIES PREFIX "")
+ set(LIBRARY_OUTPUT_PATH ${outputDir} PARENT_SCOPE)
+ # copy resources
+ #CopyResource(${productname} "${outputDir}/${productname}.resources" "${copyWhat}")
+
+ # ExpliXMPly set a softlink with the version e.g plugin.so.2.0.0-> plugin.so for each Plugin
+ #if ( NOT DEFINED XMP_VERSION)
+ set (XMP_VERSION 1.0.0) # if not set this should only be the case for the SDK templates we set it to 1.0.0
+ #endif()
+ #set_target_properties(${productname} PROPERTIES SOVERSION ${XMP_VERSION})
+ endif()
+ endif(APPLE)
+ else(UNIX)
+ if(WIN32)
+ # set pre/suf-fix
+ set(CMAKE_SHARED_MODULE_PREFIX "" PARENT_SCOPE)
+ set(XMP_SHARED_MODULE_SUFFIX ".xpi")
+ set_target_properties(${productname} PROPERTIES SUFFIX ${XMP_SHARED_MODULE_SUFFIX})
+ # we can't use LIBRARY_OUTPUT_PATH, so build in CMake dir and copy, otherwise an unwanted subfolder is created
+ add_custom_command (TARGET ${TARGET_NAME} POST_BUILD COMMAND ${CMAKE_COMMAND}
+ -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/${XMP_BUILDMODE_DIR} ${outputDir}/${TARGET_NAME}
+ COMMENT "Copy to output dir")
+
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DPRODUCT_NAME=\"${PRODUCT_NAME}\"" PARENT_SCOPE)
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DPRODUCT_NAME=\"${PRODUCT_NAME}\"" PARENT_SCOPE)
+
+ if(XMP_BUILD_STATIC)
+ CopyResource(${productname} "${outputDir}/${productname}.resources" "${copyWhat}")
+ endif(XMP_BUILD_STATIC)
+ endif(WIN32)
+ endif(UNIX)
+endfunction(CreatePlugin)
+
+# ==============================================================================
+# Function: Find plugins in XMPPlugin folder and return the list of names
+# ==============================================================================
+#
+function(FindEnabledPlugins resultName)
+ file (GLOB XMPPLUGIN_DIRS ${XMP_ROOT}/XMPPlugin/*)
+ foreach(item ${XMPPLUGIN_DIRS})
+ file (GLOB plugin_project FILES ${item}/build/CMakeLists.txt)
+ if(plugin_project)
+ get_filename_component(pluginProjectName ${item} NAME)
+ if (NOT ${pluginProjectName}_EXCLUDE)
+ set(names ${names} ${pluginProjectName})
+ endif()
+ endif()
+ endforeach()
+ set(${resultName} ${names} PARENT_SCOPE)
+endfunction(FindEnabledPlugins)
+
+# ==============================================================================
+# Function: Append static lib to target
+# ==============================================================================
+#
+function(AppendStaticLib outputDir targetName srcLibDir srcLibName)
+ if(UNIX)
+ if(APPLE_IOS)
+ add_custom_command (TARGET ${targetName} POST_BUILD
+ COMMAND mkdir -p ${srcLibDir}/${srcLibName}_TEMP
+ COMMAND cd ${srcLibDir}/${srcLibName}_TEMP && ${CMAKE_AR} x ${srcLibDir}/lib${srcLibName}.a
+ #COMMAND split lipo ${srcLibDir}/lib${srcLibName}.a -thin armv6 -output ${srcLibDir}/lib${srcLibName}arm6.a
+ #COMMAND split lipo ${srcLibDir}/lib${srcLibName}.a -thin armv7 -output ${srcLibDir}/lib${srcLibName}arm7.a
+ #COMMAND merge again lipo ${srcLibDir}/lib${srcLibName}arm6.a ${srcLibDir}/lib${srcLibName}arm7.a -create -output ${srcLibDir}/lib${srcLibName}.a
+ COMMAND ${CMAKE_AR} rs ${outputDir}/lib${targetName}.a ${srcLibDir}/${srcLibName}_TEMP/*.o
+ COMMAND rm -rf ${srcLibDir}/${srcLibName}_TEMP
+ COMMENT "extract objects from lib${srcLibName}.a and pack to lib${targetName}.a")
+ else()
+ add_custom_command (TARGET ${targetName} POST_BUILD
+ COMMAND mkdir -p ${srcLibDir}/${srcLibName}_TEMP
+ COMMAND cd ${srcLibDir}/${srcLibName}_TEMP
+ && ${CMAKE_AR} x ${srcLibDir}/lib${srcLibName}.a
+ COMMAND ${CMAKE_AR} rs ${outputDir}/lib${targetName}.a ${srcLibDir}/${srcLibName}_TEMP/*.o
+ COMMAND rm -rf ${srcLibDir}/${srcLibName}_TEMP
+ COMMENT "extract objects from lib${srcLibName}.a and pack to lib${targetName}.a")
+ endif()
+ else(UNIX)
+ if(WIN32)
+ add_custom_command (TARGET ${targetName} POST_BUILD
+ COMMAND cd ${outputDir}
+ && lib.exe /OUT:${targetName}.lib ${outputDir}/${targetName}.lib ${srcLibDir}/${srcLibName}.lib
+ COMMENT "extract objects from ${srcLibName}.lib and pack to ${targetName}.lib")
+ endif(WIN32)
+ endif(UNIX)
+endfunction(AppendStaticLib)
+
+# ==============================================================================
+# Function: INTERNAL used only!
+# Merge static plugin libraries into output library
+# ==============================================================================
+#
+function(MergeStaticLibs_Internal outputDir targetName useSubDir srcLibDir srcLibNames)
+ foreach(libName ${${srcLibNames}})
+ if(useSubDir)
+ set(correctedDir ${srcLibDir}/${libName})
+ else()
+ set(correctedDir ${srcLibDir})
+ endif()
+ AppendStaticLib(${outputDir} ${targetName} ${correctedDir} ${libName})
+ endforeach()
+endfunction(MergeStaticLibs_Internal)
+
+# ==============================================================================
+# Function: Merge static plugin libraries into output library
+# ==============================================================================
+#
+function(MergeStaticLibs outputDir targetName useSubDir srcLibDir srcLibNames)
+ MergeStaticLibs_Internal(${outputDir} ${targetName} ${useSubDir} ${srcLibDir} ${srcLibNames})
+ if(APPLE)
+ if(APPLE_IOS)
+ else(APPLE_IOS)
+ # APPLE need run ranlib to fix broken TOC
+ add_custom_command (TARGET ${targetName} POST_BUILD
+ COMMENT "Run ranlib to fix broken TOC of library file lib${targetName}.a"
+ COMMAND ${CMAKE_RANLIB} ${outputDir}/lib${targetName}.a
+ )
+ endif(APPLE_IOS)
+ endif(APPLE)
+endfunction(MergeStaticLibs)
+
+# ==============================================================================
+# Function: Get XMP Framework's output name
+# ==============================================================================
+#
+function(GetXMPFrameworkOutputName result)
+ if(UNIX)
+ if(APPLE)
+ if(XMP_BUILD_STATIC)
+ set(outputName "libXMP.a")
+ else()
+ set(outputName "XMP.framework")
+ endif()
+ else(APPLE)
+ if(XMP_BUILD_STATIC)
+ set(outputName "libXMP.a")
+ else()
+ set(outputName "libXMP.so")
+ endif()
+ endif(APPLE)
+ else(UNIX)
+ if(WIN32)
+ if(XMP_BUILD_STATIC)
+ set(outputName "XMP.lib")
+ else()
+ set(outputName "XMP.dll")
+ endif()
+ endif(WIN32)
+ endif(UNIX)
+ set(${result} ${outputName} PARENT_SCOPE)
+endfunction(GetXMPFrameworkOutputName)
+
+# ==============================================================================
+# Macro: Add Plugin API files to project
+# For convenience we define the sources as a variable. You can add
+# header files and cpp/c files and CMake will sort them out
+# ==============================================================================
+#
+macro(AddPluginApiFiles relativePathToXMPPluginFolder)
+ file (GLOB API_INCLUDE_FILES ${PROJECT_SOURCE_DIR}/${relativePathToXMPPluginFolder}/XMPFilesPlugins/api/source/*.h)
+ source_group(api\\include FILES ${API_INCLUDE_FILES})
+
+ file (GLOB API_SOURCE_FILES ${PROJECT_SOURCE_DIR}/${relativePathToXMPPluginFolder}/XMPFilesPlugins/api/source/*.cpp )
+ source_group(api\\source FILES ${API_SOURCE_FILES})
+endmacro(AddPluginApiFiles)
+
+# ==============================================================================
+# Macro: Add Resource files to project
+# For convenience we define the sources as a variable. You can add
+# header files and cpp/c files and CMake will sort them out
+# ==============================================================================
+#
+macro(AddPluginResourceFiles)
+ list(APPEND RESOURCE_FILES ${PROJECT_ROOT}/resource/txt/MODULE_IDENTIFIER.txt)
+ if (CMAKE_CL_64)
+ list(APPEND RESOURCE_FILES ${PROJECT_ROOT}/resource/txt/XMPPLUGINUIDS-64.txt)
+ else()
+ list(APPEND RESOURCE_FILES ${PROJECT_ROOT}/resource/txt/XMPPLUGINUIDS-32.txt)
+ endif()
+
+ # If we build for windows systems, we also include the resource file containing the manifest, icon and other resources
+ if(WIN32)
+ if (CMAKE_CL_64)
+ list (APPEND RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${PRODUCT_NAME}-64.rc)
+ else(CMAKE_CL_64)
+ list (APPEND RESOURCE_FILES ${RESOURCE_ROOT}/${XMP_PLATFORM_SHORT}/${PRODUCT_NAME}-32.rc)
+ endif(CMAKE_CL_64)
+ endif()
+ source_group("Resource Files" FILES ${RESOURCE_FILES})
+endmacro(AddPluginResourceFiles)
+
+
+# ==============================================================================
+# Macro: Set Plugin Output folder
+# ==============================================================================
+#
+macro(SetPluginOutputPath)
+ if(UNIX)
+ if(APPLE)
+ set(OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/XMPFilesPlugins/public/${XMP_PLATFORM_FOLDER}/${CMAKE_CFG_INTDIR})
+ else()
+ endif()
+ else()
+ set(OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/XMPFilesPlugins/public/${XMP_PLATFORM_FOLDER}/${CMAKE_CFG_INTDIR}/${PRODUCT_NAME})
+ endif()
+endmacro(SetPluginOutputPath)
+
+# ==============================================================================
+# Function: Setup XMP for the application
+# Copy XMP library, create a symbolic link to Plug-ins, copy MediaAccess and fixup
+# ==============================================================================
+#
+function(SetupXMPForApp appname outputDir)
+ # are optional parameter set?
+ if(ARGV2 AND NOT APPLE_IOS)
+ if(${ARGV2} MATCHES "FFMPEG")
+ set(copyFFMpegLibs 1)
+ else()
+ set(copyFFMpegLibs 0)
+ endif()
+ else()
+ set(copyFFMpegLibs 0)
+ endif()
+
+ if(NOT copyFFMpegLibs)
+ set(ignoreCommand "#")
+ else ()
+ set(ignoreCommand "COMMAND")
+ endif()
+
+ if(APPLE_IOS)
+ set(ignoreCommandOnIOS "#")
+ set(ignoreCommandOnOSX "COMMAND")
+ else ()
+ set(ignoreCommandOnIOS "COMMAND")
+ set(ignoreCommandOnOSX "#")
+ endif()
+
+
+ if(UNIX)
+ if(APPLE)
+ set(BUILT_PRODUCTS_DIR ${outputDir}/${appname}.app/Contents)
+ # GetXMPFrameworkOutputName(XMP_FRAMEWORK_NAME)
+ add_custom_command (TARGET ${appname} POST_BUILD
+ COMMENT "Copy necessary XMP items and create symlink to Plug-ins dir"
+ COMMAND echo clear XMP dir
+ ${ignoreCommandOnIOS} rm -fR ${BUILT_PRODUCTS_DIR}/Frameworks/XMP
+ COMMAND mkdir -p ${BUILT_PRODUCTS_DIR}/Frameworks/XMP
+ ${ignoreCommandOnIOS} echo Copy XMP
+ ${ignoreCommandOnIOS} rm -fR ${BUILT_PRODUCTS_DIR}/Frameworks/${XMP_FRAMEWORK_NAME}*
+ ${ignoreCommandOnIOS} ln -s ${XMPLIBRARIES_DIR}/${XMP_FRAMEWORK_NAME} ${BUILT_PRODUCTS_DIR}/Frameworks/${XMP_FRAMEWORK_NAME}
+ ${ignoreCommandOnIOS} ln -s ${XMPLIBRARIES_DIR}/${XMP_FRAMEWORK_NAME}.dSYM ${BUILT_PRODUCTS_DIR}/Frameworks/${XMP_FRAMEWORK_NAME}.dSYM
+ ${ignoreCommand} echo Copy MediaAccess
+ ${ignoreCommand} mkdir -p ${BUILT_PRODUCTS_DIR}/Frameworks/XMP/MediaAccess
+ ${ignoreCommand} cp -fpR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/ ${BUILT_PRODUCTS_DIR}/Frameworks/XMP/MediaAccess
+ ${ignoreCommand} cp -fpR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/ffmpeg/bin/${XMP_BITDEPTH}/lib* ${BUILT_PRODUCTS_DIR}/Frameworks/XMP/MediaAccess
+ ${ignoreCommand} ${XMPROOT_DIR}/XMPMediaAccess/build/UpdateFFMPEGLibSearchPath.sh "@executable_path/../Frameworks/XMP/MediaAccess" "${BUILT_PRODUCTS_DIR}/Frameworks/XMP/MediaAccess"
+ ${ignoreCommandOnIOS} echo Copy XMP plugins shared libs
+ ${ignoreCommandOnIOS} cp -f -p -R ${XMPLIBRARIES_DIR}/Plug-ins/copy_to_app_dir/ ${BUILT_PRODUCTS_DIR}/Frameworks/
+ ${ignoreCommandOnIOS} echo create symlinks
+ ${ignoreCommandOnIOS} ln -s ${XMPLIBRARIES_DIR}/Plug-ins/ ${BUILT_PRODUCTS_DIR}/Frameworks/XMP/Plug-ins
+ ${ignoreCommandOnOSX} echo copy plugin data
+ ${ignoreCommandOnOSX} mkdir -p ${BUILT_PRODUCTS_DIR}/Resources/XMP/Plug-ins
+ ${ignoreCommandOnOSX} cp -fpR ${XMPLIBRARIES_DIR}/Plug-ins/ ${BUILT_PRODUCTS_DIR}/Resources/XMP/Plug-ins
+ )
+ else(APPLE)
+ # Do not copy FFMpeg libs if they don't exist
+ if(NOT EXISTS ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/FFMpegWrapper.mediaaccess)
+ set(ignoreCommand "#")
+ else ()
+ set(ignoreCommand "COMMAND")
+ endif()
+
+ set(BUILT_PRODUCTS_DIR ${outputDir})
+ # GetXMPFrameworkOutputName(XMP_FRAMEWORK_NAME)
+ add_custom_command (TARGET ${appname} POST_BUILD
+ COMMENT "Copy necessary XMP items and create symlink to Plug-ins dir"
+ COMMAND echo clear XMP dir
+ COMMAND rm -f -R ${BUILT_PRODUCTS_DIR}/XMP
+ COMMAND mkdir -p ${BUILT_PRODUCTS_DIR}/XMP
+ COMMAND echo Copy XMP
+ COMMAND rm -f -R ${BUILT_PRODUCTS_DIR}/libXMP*
+ COMMAND ln -s ${XMPLIBRARIES_DIR}/${XMP_FRAMEWORK_NAME} ${BUILT_PRODUCTS_DIR}/${XMP_FRAMEWORK_NAME}
+ ${ignoreCommand} echo Copy MediaAccess
+ ${ignoreCommand} mkdir -p ${BUILT_PRODUCTS_DIR}/XMP/MediaAccess
+ ${ignoreCommand} cp -fpR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/*.* ${BUILT_PRODUCTS_DIR}/XMP/MediaAccess
+ #COMMAND ${ignoreCommand} cp -fpR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/ffmpeg/bin/${XMP_BITDEPTH}/*.* ${BUILT_PRODUCTS_DIR}/XMP/MediaAccess
+ COMMAND echo Copy XMP plugins shared libs
+ #COMMAND cp -f -p -R ${XMPLIBRARIES_DIR}/Plug-ins/copy_to_app_dir/ ${BUILT_PRODUCTS_DIR}/
+ COMMAND echo create symlinks
+ COMMAND ln -s ${XMPLIBRARIES_DIR}/Plug-ins/ ${BUILT_PRODUCTS_DIR}/XMP/Plug-ins
+ )
+ endif(APPLE)
+ else(UNIX)
+ if(WIN32)
+ # Windows -------------------------------------------
+ set(BUILT_PRODUCTS_DIR ${outputDir})
+ # GetXMPFrameworkOutputName(XMP_FRAMEWORK_NAME)
+ file(TO_NATIVE_PATH "${BUILT_PRODUCTS_DIR}/XMP/Plug-ins" BUILT_PLUGINS_DIR_NAT)
+ file(TO_NATIVE_PATH "${XMPLIBRARIES_DIR}/Plug-ins" PLUGINS_DIR_NAT)
+ file(TO_NATIVE_PATH "${BUILT_PRODUCTS_DIR}/${XMP_FRAMEWORK_NAME}" DEST_XMP_NAT)
+ file(TO_NATIVE_PATH "${XMPLIBRARIES_DIR}/${XMP_FRAMEWORK_NAME}" SRC_XMP_NAT)
+ file(TO_NATIVE_PATH "${BUILT_PRODUCTS_DIR}/XMP.pdb" DEST_XMP_PDB_NAT)
+ file(TO_NATIVE_PATH "${XMPLIBRARIES_DIR}/XMP.pdb" SRC_XMP_PDB_NAT)
+
+ #For Windows XP we need to use junction.exe instead of mklink which is only available on Windows Vista and above
+ if((${CMAKE_SYSTEM} MATCHES "Windows-5.1") OR (${CMAKE_SYSTEM} MATCHES "Windows-5.2"))
+ message (STATUS "- Use junction.exe to create links instead of mklink we either run on Win XP 32 or 64 bit")
+ set(link_command ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/resources/tools/junction/junction.exe -accepteula )
+ set(remove_XMP "echo")
+ set(copy_link_XMP ${CMAKE_COMMAND} -E copy ${SRC_XMP_NAT} ${BUILT_PRODUCTS_DIR}/)
+ set(copy_link_XMP_pdb ${CMAKE_COMMAND} -E copy ${SRC_XMP_PDB_NAT} ${BUILT_PRODUCTS_DIR}/)
+ else()
+ set(link_command mklink /D )
+ set(remove_XMP ${CMAKE_COMMAND} -E remove -f ${DEST_XMP_NAT} ${DEST_XMP_PDB_NAT})
+ set(copy_link_XMP mklink ${DEST_XMP_NAT} ${SRC_XMP_NAT})
+ set(copy_link_XMP_pdb mklink ${DEST_XMP_PDB_NAT} ${SRC_XMP_PDB_NAT})
+ endif()
+
+ add_custom_command (TARGET ${appname} POST_BUILD
+ COMMENT "Copy necessary XMP items and create symlink to Plug-ins dir"
+ COMMAND echo - clear XMP dir
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${BUILT_PRODUCTS_DIR}/XMP
+ COMMAND echo - symlink XMP.dll and XMP.pdb
+ COMMAND ${remove_XMP}
+ COMMAND ${copy_link_XMP}
+ COMMAND ${copy_link_XMP_pdb}
+ COMMAND echo - copy XMP plugins shared libs (tbb etc)
+ COMMAND ${CMAKE_COMMAND} -E copy_directory ${XMPLIBRARIES_DIR}/Plug-ins/copy_to_app_dir/ ${BUILT_PRODUCTS_DIR}
+ ${ignoreCommand} echo - copy FFMPEG libs
+ ${ignoreCommand} ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/ffmpeg/bin/${XMP_BITDEPTH}/ ${BUILT_PRODUCTS_DIR}/XMP/MediaAccess
+ ${ignoreCommand} ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/FFMpegWrapper.mediaaccess ${BUILT_PRODUCTS_DIR}/XMP/MediaAccess/FFMpegWrapper.mediaaccess
+ ${ignoreCommand} ${CMAKE_COMMAND} -E copy ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/toolkit/public/SDK/bin/MediaAccess/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}/ffmpegwrapper.pdb ${BUILT_PRODUCTS_DIR}/XMP/MediaAccess/ffmpegwrapper.pdb
+ COMMAND echo - remove symbolic link to plug-ins dir
+ COMMAND rmdir ${BUILT_PLUGINS_DIR_NAT}
+ COMMAND echo - execute symbolic link command
+ COMMAND ${link_command} ${BUILT_PLUGINS_DIR_NAT} ${PLUGINS_DIR_NAT}
+ )
+ endif(WIN32)
+ endif(UNIX)
+endfunction(SetupXMPForApp)
+
+# ==============================================================================
+# Function: GenerateInitFileForStaticBuild
+# Collect registrar initializer functions and create source in temp directory
+# out of it for static linkage
+# ==============================================================================
+#
+function(GenerateInitFileForStaticBuild)
+ if(XMP_BUILD_STATIC)
+ set(targetFile ${XMP_ROOT}/XMPApi/source/PluginStaticInit_TEMP.cpp)
+ file(REMOVE ${targetFile})
+
+ set(initDecl "#if XMP_BUILD_STATIC\n\n")
+ set(initFunc "namespace XMP\n{\n void InstanciateRegistrarsForAllPlugins()\n {\n")
+ foreach(pluginName ${XMP_ENABLED_PLUGINS})
+ set(initDecl "${initDecl}extern void ${pluginName}_InstanciateRegistrars()\;\n")
+ set(initFunc "${initFunc} ::${pluginName}_InstanciateRegistrars()\;\n")
+ endforeach()
+ set(initFunc "${initFunc} }\n}\n")
+ set(initFunc "${initDecl}\n${initFunc}\n#endif\n")
+
+ file(WRITE ${targetFile} ${initFunc})
+ endif(XMP_BUILD_STATIC)
+endfunction(GenerateInitFileForStaticBuild)
diff --git a/build/XMP_Ios.cmake b/build/XMP_Ios.cmake
deleted file mode 100644
index 3dd2e08..0000000
--- a/build/XMP_Ios.cmake
+++ /dev/null
@@ -1,109 +0,0 @@
-# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# ==============================================================================
-# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.6)
-
-# ==============================================================================
-# Shared config for ios
-# ==============================================================================
-
-
-set(XMP_PLATFORM_SHORT "ios")
-
-set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_BIT)")
-
-add_definitions(-DIOS_ENV=1)
-
-set(XMP_ENABLE_SECURE_SETTINGS "ON")
-
-# shared flags
-set(XMP_SHARED_COMPILE_FLAGS "${XMP_SHARED_COMPILE_FLAGS} ${XMP_EXTRA_COMPILE_FLAGS}")
-set(XMP_SHARED_COMPILE_DEBUG_FLAGS "-O0 -DDEBUG=1 -D_DEBUG=1")
-set(XMP_SHARED_COMPILE_RELEASE_FLAGS "-Os -DNDEBUG=1 -D_NDEBUG=1")
-
-set(XMP_PLATFORM_BEGIN_WHOLE_ARCHIVE "")
-set(XMP_PLATFORM_END_WHOLE_ARCHIVE "")
-
-# ==============================================================================
-# Function: architecture related settings
-# ==============================================================================
-function(SetupTargetArchitecture)
- if(APPLE_IOS)
- set(XMP_CPU_FOLDERNAME "$(ARCHS_STANDARD_32_BIT)" PARENT_SCOPE)
- else()
- if(CMAKE_CL_64)
- set(XMP_BITDEPTH "64" PARENT_SCOPE)
- set(XMP_CPU_FOLDERNAME "intel_64" PARENT_SCOPE)
- else()
- set(XMP_BITDEPTH "32" PARENT_SCOPE)
- set(XMP_CPU_FOLDERNAME "intel" PARENT_SCOPE)
- endif()
- endif()
-endfunction(SetupTargetArchitecture)
-
-SetupTargetArchitecture()
-# XMP_PLATFORM_FOLDER is used in OUTPUT_DIR and Debug/Release get automatically added for VS/XCode projects
-set(XMP_PLATFORM_FOLDER "ios/${XMP_CPU_FOLDERNAME}")
-
-# ==============================================================================
-# Function: Set internal build target directory. See XMP_PLATFORM_FOLDER for
-# further construction and when CMAKE_CFG_INTDIR/CMAKE_BUILD_TYPE are set
-# (generator dependent).
-# ==============================================================================
-function(SetupInternalBuildDirectory)
- if(CMAKE_CFG_INTDIR STREQUAL ".")
- # CMAKE_BUILD_TYPE only available for makefile builds
- set(XMP_IS_MAKEFILE_BUILD "ON" PARENT_SCOPE)
- if((${CMAKE_BUILD_TYPE} MATCHES "Debug") OR (${CMAKE_BUILD_TYPE} MATCHES "debug") )
- set(XMP_BUILDMODE_DIR "debug" PARENT_SCOPE)
- else()
- set(XMP_BUILDMODE_DIR "release" PARENT_SCOPE)
- endif()
- else()
- # Visual/XCode have dedicated Debug/Release target modes. CMAKE_CFG_INTDIR is set.
- if(APPLE_IOS)
-# TODO: fixme
-# set(XMP_BUILDMODE_DIR "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" PARENT_SCOPE)
- set(XMP_BUILDMODE_DIR "$(CONFIGURATION)" PARENT_SCOPE)
- else()
- set(XMP_BUILDMODE_DIR ${CMAKE_CFG_INTDIR} PARENT_SCOPE)
- endif()
- set(XMP_IS_MAKEFILE_BUILD "OFF" PARENT_SCOPE)
- endif()
-endfunction(SetupInternalBuildDirectory)
-
-# ==============================================================================
-# Function: Setup general and specific folder structures
-# ==============================================================================
-function(SetupGeneralDirectories)
- set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} PARENT_SCOPE)
- set(PROJECT_ROOT ${PROJECT_SOURCE_DIR} PARENT_SCOPE)
- set(SOURCE_ROOT ${PROJECT_SOURCE_DIR}/../source PARENT_SCOPE)
- set(RESOURCE_ROOT ${PROJECT_SOURCE_DIR}/../resource PARENT_SCOPE)
-
- # ==============================================================================
- # XMP specific defines
- # ==============================================================================
-
- # Construct output directory
- # The CMAKE_CFG_INTDIR gets automatically set for generators which differenciate different build targets (eg. VS, XCode), but is emtpy for Linux !
- # In this case Debug/Release is added to the OUTPUT_DIR when used for LIBRARY_OUTPUT_PATH.
- string(TOLOWER ${XMP_BUILDMODE_DIR} LOWERCASE_XMP_BUILDMODE_DIR)
- set(OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/public/libraries/${XMP_PLATFORM_FOLDER}/${LOWERCASE_XMP_BUILDMODE_DIR} PARENT_SCOPE)
-
- # XMP lib locations constructed with ${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}, since the target folder (Debug/Release) isn't added automatically
- set(XMPROOT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH} PARENT_SCOPE)
- set(XMPLIBRARIES_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/public/libraries/${XMP_PLATFORM_FOLDER}/${LOWERCASE_XMP_BUILDMODE_DIR} PARENT_SCOPE)
- set(XMPPLUGIN_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/XMPPlugin PARENT_SCOPE)
- set(XMPPLUGIN_OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/XMPFilesPlugins/public/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} PARENT_SCOPE)
-
- # each plugin project should implement function named SetupProjectSpecifiedDirectories to specify the directories used by project itself
-endfunction(SetupGeneralDirectories) \ No newline at end of file
diff --git a/build/XMP_Linux.cmake b/build/XMP_Linux.cmake
deleted file mode 100644
index 8e668b7..0000000
--- a/build/XMP_Linux.cmake
+++ /dev/null
@@ -1,143 +0,0 @@
-# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# ==============================================================================
-# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.6)
-
-# ==============================================================================
-# Shared config for linux
-# ==============================================================================
-
-# ==============================================================================
-# Linux: Setup cross-compiling 32/64bit
-# ==============================================================================
-if(NOT CMAKE_CROSSCOMPILING)
- if (${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64")
- # running on 64bit machine
- set(XMP_EXTRA_BUILDMACHINE "Buildmachine is 64bit")
- else()
- # running on 32bit machine
- set(XMP_EXTRA_BUILDMACHINE "Buildmachine is 32bit")
- endif()
-
- if(CMAKE_CL_64)
- set(XMP_EXTRA_COMPILE_FLAGS "-m64")
- set(XMP_EXTRA_LINK_FLAGS "-m64")
- set(XMP_PLATFORM_FOLDER "i80386linux_x64") # add XMP_BUILDMODE_DIR to follow what other platforms do
- set(XMP_GCC_LIBPATH /usr/lib64/gcc/x86_64-redhat-linux/4.4.4/)
- else()
- set(XMP_EXTRA_LINK_FLAGS "-m32 -mtune=i686")
- set(XMP_PLATFORM_FOLDER "i80386linux") # add XMP_BUILDMODE_DIR to follow what other platforms do
- set(XMP_GCC_LIBPATH /usr/lib/gcc/i686-redhat-linux/4.4.4/)
- endif()
-else()
- # running toolchain
- if(CMAKE_CL_64)
- set(XMP_EXTRA_COMPILE_FLAGS "-m64")
- set(XMP_EXTRA_LINK_FLAGS "-m64")
- set(XMP_PLATFORM_FOLDER "i80386linux_x64") # add XMP_BUILDMODE_DIR to follow what other platforms do
- set(XMP_GCC_LIBPATH /usr/lib64/gcc/x86_64-redhat-linux/4.4.4/)
- else()
- set(XMP_EXTRA_COMPILE_FLAGS "-m32 -mtune=i686")
- set(XMP_EXTRA_LINK_FLAGS "-m32")
- set(XMP_PLATFORM_FOLDER "i80386linux") # add XMP_BUILDMODE_DIR to follow what other platforms do
- set(XMP_GCC_LIBPATH /usr/lib/gcc/i686-redhat-linux/4.4.4/)
- endif()
-
- set(XMP_EXTRA_BUILDMACHINE "Cross compiling")
-endif()
-set(XMP_PLATFORM_VERSION "linux2.6") # add XMP_BUILDMODE_DIR to follow what other platforms do
-
-add_definitions(-DUNIX_ENV=1)
-# Linux -------------------------------------------
-set(XMP_PLATFORM_SHORT "linux")
-#gcc path is not set correctly
-
-set(XMP_PLATFORM_LINK "-z defs -Xlinker -Bsymbolic -Wl,--no-undefined ${XMP_EXTRA_LINK_FLAGS} ${XMP_TOOLCHAIN_LINK_FLAGS} -lrt -ldl -luuid -lpthread")
-
-if(XMP_ENABLE_SECURE_SETTINGS)
- set(XMP_PLATFORM_LINK "${XMP_PLATFORM_LINK} ${XMP_GCC_LIBPATH}/libssp.a")
-endif()
-set(XMP_SHARED_COMPILE_FLAGS "-Wno-multichar -Wno-implicit -D_FILE_OFFSET_BITS=64 -funsigned-char ${XMP_EXTRA_COMPILE_FLAGS} ${XMP_TOOLCHAIN_COMPILE_FLAGS}")
-set(XMP_SHARED_COMPILE_DEBUG_FLAGS " ")
-set(XMP_SHARED_COMPILE_RELEASE_FLAGS "-fwrapv ")
-
-
-# ==============================================================================
-# Function: architecture related settings
-# ==============================================================================
-function(SetupTargetArchitecture)
- if(APPLE_IOS)
- set(XMP_CPU_FOLDERNAME "$(ARCHS_STANDARD_32_BIT)" PARENT_SCOPE)
- else()
- if(CMAKE_CL_64)
- set(XMP_BITDEPTH "64" PARENT_SCOPE)
- set(XMP_CPU_FOLDERNAME "intel_64" PARENT_SCOPE)
- else()
- set(XMP_BITDEPTH "32" PARENT_SCOPE)
- set(XMP_CPU_FOLDERNAME "intel" PARENT_SCOPE)
- endif()
- endif()
-endfunction(SetupTargetArchitecture)
-
-# ==============================================================================
-# Function: Set internal build target directory. See XMP_PLATFORM_FOLDER for
-# further construction and when CMAKE_CFG_INTDIR/CMAKE_BUILD_TYPE are set
-# (generator dependent).
-# ==============================================================================
-function(SetupInternalBuildDirectory)
- if(CMAKE_CFG_INTDIR STREQUAL ".")
- # CMAKE_BUILD_TYPE only available for makefile builds
- set(XMP_IS_MAKEFILE_BUILD "ON" PARENT_SCOPE)
- if((${CMAKE_BUILD_TYPE} MATCHES "Debug") OR (${CMAKE_BUILD_TYPE} MATCHES "debug") )
- set(XMP_BUILDMODE_DIR "debug" PARENT_SCOPE)
- else()
- set(XMP_BUILDMODE_DIR "release" PARENT_SCOPE)
- endif()
- else()
- # Visual/XCode have dedicated Debug/Release target modes. CMAKE_CFG_INTDIR is set.
- if(APPLE_IOS)
- # TODO: fixme
- # set(XMP_BUILDMODE_DIR "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" PARENT_SCOPE)
- set(XMP_BUILDMODE_DIR "$(CONFIGURATION)" PARENT_SCOPE)
- else()
- set(XMP_BUILDMODE_DIR ${CMAKE_CFG_INTDIR} PARENT_SCOPE)
- endif()
- set(XMP_IS_MAKEFILE_BUILD "OFF" PARENT_SCOPE)
- endif()
- endfunction(SetupInternalBuildDirectory)
-
- # ==============================================================================
- # Function: Setup general and specific folder structures
- # ==============================================================================
- function(SetupGeneralDirectories)
- set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} PARENT_SCOPE)
- set(PROJECT_ROOT ${PROJECT_SOURCE_DIR} PARENT_SCOPE)
- set(SOURCE_ROOT ${PROJECT_SOURCE_DIR}/../source PARENT_SCOPE)
- set(RESOURCE_ROOT ${PROJECT_SOURCE_DIR}/../resource PARENT_SCOPE)
-
- # ==============================================================================
- # XMP specific defines
- # ==============================================================================
-
- # Construct output directory
- # The CMAKE_CFG_INTDIR gets automatically set for generators which differenciate different build targets (eg. VS, XCode), but is emtpy for Linux !
- # In this case Debug/Release is added to the OUTPUT_DIR when used for LIBRARY_OUTPUT_PATH.
- string(TOLOWER ${XMP_BUILDMODE_DIR} LOWERCASE_XMP_BUILDMODE_DIR)
- set(OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/public/libraries/${XMP_PLATFORM_FOLDER}/${LOWERCASE_XMP_BUILDMODE_DIR} PARENT_SCOPE)
-
- # XMP lib locations constructed with ${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}, since the target folder (Debug/Release) isn't added automatically
- set(XMPROOT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH} PARENT_SCOPE)
- set(XMPLIBRARIES_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/public/libraries/${XMP_PLATFORM_FOLDER}/${LOWERCASE_XMP_BUILDMODE_DIR} PARENT_SCOPE)
- set(XMPPLUGIN_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/XMPPlugin PARENT_SCOPE)
- set(XMPPLUGIN_OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/XMPFilesPlugins/public/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} PARENT_SCOPE)
-
- # each plugin project should implement function named SetupProjectSpecifiedDirectories to specify the directories used by project itself
-endfunction(SetupGeneralDirectories)
diff --git a/build/XMP_Mac.cmake b/build/XMP_Mac.cmake
deleted file mode 100644
index 7087d07..0000000
--- a/build/XMP_Mac.cmake
+++ /dev/null
@@ -1,129 +0,0 @@
-# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# ==============================================================================
-# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.6)
-
-# ==============================================================================
-# Shared config for mac
-# ==============================================================================
-
-
-set(XMP_PLATFORM_SHORT "mac")
-if(CMAKE_CL_64)
- set(CMAKE_OSX_ARCHITECTURES "x86_64" CACHE STRING "Build architectures for OSX" FORCE)
- add_definitions(-DXMP_64=1)
-else(CMAKE_CL_64)
- set(CMAKE_OSX_ARCHITECTURES "i386" CACHE STRING "Build architectures for OSX" FORCE)
- add_definitions(-DXMP_64=0)
-endif(CMAKE_CL_64)
-
-# is SDK and deployment target set?
-if(NOT DEFINED XMP_OSX_SDK)
- # no, so default to CS6 settings
- #set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.2")
- set(XMP_OSX_SDK 10.7)
- set(XMP_OSX_TARGET 10.6)
-endif()
-
-add_definitions(-DMAC_ENV=1)
-
-
-#
-# shared flags
-#
-set(XMP_SHARED_COMPILE_FLAGS "-Wall -Wextra")
-set(XMP_SHARED_COMPILE_FLAGS "${XMP_SHARED_COMPILE_FLAGS} -Wno-missing-field-initializers -Wno-shadow") # disable some warnings
-
-set(XMP_SHARED_COMPILE_FLAGS "${XMP_SHARED_COMPILE_FLAGS}")
-
-set(XMP_SHARED_CXX_COMPILE_FLAGS "${XMP_SHARED_COMPILE_FLAGS} -Wno-reorder") # disable warnings
-
-set(XMP_PLATFORM_BEGIN_WHOLE_ARCHIVE "")
-set(XMP_PLATFORM_END_WHOLE_ARCHIVE "")
-set(XMP_DYLIBEXTENSION "dylib")
-
-
-
-# ==============================================================================
-# Function: architecture related settings
-# ==============================================================================
-function(SetupTargetArchitecture)
- if(APPLE_IOS)
- set(XMP_CPU_FOLDERNAME "$(ARCHS_STANDARD_32_BIT)" PARENT_SCOPE)
- else()
- if(CMAKE_CL_64)
- set(XMP_BITDEPTH "64" PARENT_SCOPE)
- set(XMP_CPU_FOLDERNAME "intel_64" PARENT_SCOPE)
- else()
- set(XMP_BITDEPTH "32" PARENT_SCOPE)
- set(XMP_CPU_FOLDERNAME "intel" PARENT_SCOPE)
- endif()
- endif()
-endfunction(SetupTargetArchitecture)
-
-SetupTargetArchitecture()
-# XMP_PLATFORM_FOLDER is used in OUTPUT_DIR and Debug/Release get automatically added for VS/XCode projects
-set(XMP_PLATFORM_FOLDER "macintosh/${XMP_CPU_FOLDERNAME}")
-
-# ==============================================================================
-# Function: Set internal build target directory. See XMP_PLATFORM_FOLDER for
-# further construction and when CMAKE_CFG_INTDIR/CMAKE_BUILD_TYPE are set
-# (generator dependent).
-# ==============================================================================
-function(SetupInternalBuildDirectory)
- if(CMAKE_CFG_INTDIR STREQUAL ".")
- # CMAKE_BUILD_TYPE only available for makefile builds
- set(XMP_IS_MAKEFILE_BUILD "ON" PARENT_SCOPE)
- if((${CMAKE_BUILD_TYPE} MATCHES "Debug") OR (${CMAKE_BUILD_TYPE} MATCHES "debug") )
- set(XMP_BUILDMODE_DIR "debug" PARENT_SCOPE)
- else()
- set(XMP_BUILDMODE_DIR "release" PARENT_SCOPE)
- endif()
- else()
- # Visual/XCode have dedicated Debug/Release target modes. CMAKE_CFG_INTDIR is set.
- if(APPLE_IOS)
-# TODO: fixme
-# set(XMP_BUILDMODE_DIR "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" PARENT_SCOPE)
- set(XMP_BUILDMODE_DIR "$(CONFIGURATION)" PARENT_SCOPE)
- else()
- set(XMP_BUILDMODE_DIR ${CMAKE_CFG_INTDIR} PARENT_SCOPE)
- endif()
- set(XMP_IS_MAKEFILE_BUILD "OFF" PARENT_SCOPE)
- endif()
-endfunction(SetupInternalBuildDirectory)
-
-# ==============================================================================
-# Function: Setup general and specific folder structures
-# ==============================================================================
-function(SetupGeneralDirectories)
- set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} PARENT_SCOPE)
- set(PROJECT_ROOT ${PROJECT_SOURCE_DIR} PARENT_SCOPE)
- set(SOURCE_ROOT ${PROJECT_SOURCE_DIR}/../source PARENT_SCOPE)
- set(RESOURCE_ROOT ${PROJECT_SOURCE_DIR}/../resource PARENT_SCOPE)
-
- # ==============================================================================
- # XMP specific defines
- # ==============================================================================
-
- # Construct output directory
- # The CMAKE_CFG_INTDIR gets automatically set for generators which differenciate different build targets (eg. VS, XCode), but is emtpy for Linux !
- # In this case Debug/Release is added to the OUTPUT_DIR when used for LIBRARY_OUTPUT_PATH.
- string(TOLOWER ${XMP_BUILDMODE_DIR} LOWERCASE_XMP_BUILDMODE_DIR)
- set(OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/public/libraries/${XMP_PLATFORM_FOLDER}/${LOWERCASE_XMP_BUILDMODE_DIR} PARENT_SCOPE)
-
- # XMP lib locations constructed with ${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}, since the target folder (Debug/Release) isn't added automatically
- set(XMPROOT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH} PARENT_SCOPE)
- set(XMPLIBRARIES_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/public/libraries/${XMP_PLATFORM_FOLDER}/${LOWERCASE_XMP_BUILDMODE_DIR} PARENT_SCOPE)
- set(XMPPLUGIN_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/XMPPlugin PARENT_SCOPE)
- set(XMPPLUGIN_OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/XMPFilesPlugins/public/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} PARENT_SCOPE)
-
- # each plugin project should implement function named SetupProjectSpecifiedDirectories to specify the directories used by project itself
-endfunction(SetupGeneralDirectories) \ No newline at end of file
diff --git a/build/XMP_Win.cmake b/build/XMP_Win.cmake
deleted file mode 100644
index 1e31dc5..0000000
--- a/build/XMP_Win.cmake
+++ /dev/null
@@ -1,127 +0,0 @@
-# =================================================================================================
-# ADOBE SYSTEMS INCORPORATED
-# Copyright 2013 Adobe Systems Incorporated
-# All Rights Reserved
-#
-# NOTICE: Adobe permits you to use, modify, and distribute this file in accordance with the terms
-# of the Adobe license agreement accompanying it.
-# =================================================================================================
-
-# ==============================================================================
-# define minimum cmake version
-cmake_minimum_required(VERSION 2.8.6)
-
-# ==============================================================================
-# Shared config for windows
-# ==============================================================================
-
-if(CMAKE_CL_64)
- set(XMP_SHARED_COMPILE_FLAGS " -DWIN64 -D_WIN64=1 ")
- set(XMP_PLATFORM_FOLDER "windows_x64") # leave XMP_BUILDMODE_DIR away, since CMAKE_CFG_INTDIR gets added by CMake automatically
- set(XMP_WIN32_CXX_EXTRAFLAGS "/bigobj")
- set(XMP_WIN32_LINK_EXTRAFLAGS "")
-else(CMAKE_CL_64)
- set(XMP_SHARED_COMPILE_FLAGS "-DWIN32")
- set(XMP_PLATFORM_FOLDER "windows") # leave XMP_BUILDMODE_DIR away, since CMAKE_CFG_INTDIR gets added by CMake automatically
- set(XMP_WIN32_CXX_EXTRAFLAGS "/arch:SSE2")
- set(XMP_WIN32_LINK_EXTRAFLAGS "/SAFESEH /NXCOMPAT /LARGEADDRESSAWARE")
-endif(CMAKE_CL_64)
-set(XMP_PLATFORM_SHORT "win")
-set(XMP_PLATFORM_LINK "")
-set(XMP_SHARED_COMPILE_FLAGS "${XMP_SHARED_COMPILE_FLAGS} -DWIN_ENV=1 -D_CRT_SECURE_NO_WARNINGS=1 -D_SCL_SECURE_NO_WARNINGS=1 -DNOMINMAX -DUNICODE -D_UNICODE ${XMP_WIN32_CXX_EXTRAFLAGS} /J /MP /W3 /GF /GS /EHsc /fp:precise /nologo /Zi /TP /errorReport:prompt")
-set(XMP_SHARED_COMPILE_DEBUG_FLAGS "-DDEBUG /Od /RTC1")
-set(XMP_SHARED_COMPILE_RELEASE_FLAGS "-DNDEBUG /O1 /Ob2 /Os /Oy- /GL /FD /Gy")
-
-set(XMP_SHARED_COMPILE_DEBUG_FLAGS "${XMP_SHARED_COMPILE_DEBUG_FLAGS} /MDd")
-set(XMP_SHARED_COMPILE_RELEASE_FLAGS "${XMP_SHARED_COMPILE_RELEASE_FLAGS} /MD")
-if(MSVC90)
- set(XMP_SHARED_COMPILE_DEBUG_FLAGS "${XMP_SHARED_COMPILE_DEBUG_FLAGS} -D_SECURE_SCL=1 -D_HAS_ITERATOR_DEBUGGING=1")
- set(XMP_SHARED_COMPILE_RELEASE_FLAGS "${XMP_SHARED_COMPILE_RELEASE_FLAGS} -D_SECURE_SCL=0 -D_HAS_ITERATOR_DEBUGGING=0")
-else()
- set(XMP_SHARED_COMPILE_DEBUG_FLAGS "${XMP_SHARED_COMPILE_DEBUG_FLAGS} -D_ITERATOR_DEBUG_LEVEL=2")
- set(XMP_SHARED_COMPILE_RELEASE_FLAGS "${XMP_SHARED_COMPILE_RELEASE_FLAGS} -D_ITERATOR_DEBUG_LEVEL=0")
-endif()
-
-
-set(XMP_PLATFORM_LINK_WIN "${XMP_WIN32_LINK_EXTRAFLAGS} /INCREMENTAL:NO /DYNAMICBASE /MAP")
-
-if(NOT DEFINED XMP_TOOLSET)
- if(MSVC90)
- set(XMP_TOOLSET "${XMP_TOOLSET} -DXMP_TOOLSET_VC90")
- elseif(MSVC10)
- set(XMP_TOOLSET "${XMP_TOOLSET} -DXMP_TOOLSET_VC10")
- endif()
-endif()
-
-
-# ==============================================================================
-# Function: architecture related settings
-# ==============================================================================
-function(SetupTargetArchitecture)
- if(APPLE_IOS)
- set(XMP_CPU_FOLDERNAME "$(ARCHS_STANDARD_32_BIT)" PARENT_SCOPE)
- else()
- if(CMAKE_CL_64)
- set(XMP_BITDEPTH "64" PARENT_SCOPE)
- set(XMP_CPU_FOLDERNAME "intel_64" PARENT_SCOPE)
- else()
- set(XMP_BITDEPTH "32" PARENT_SCOPE)
- set(XMP_CPU_FOLDERNAME "intel" PARENT_SCOPE)
- endif()
- endif()
-endfunction(SetupTargetArchitecture)
-
-# ==============================================================================
-# Function: Set internal build target directory. See XMP_PLATFORM_FOLDER for
-# further construction and when CMAKE_CFG_INTDIR/CMAKE_BUILD_TYPE are set
-# (generator dependent).
-# ==============================================================================
-function(SetupInternalBuildDirectory)
- if(CMAKE_CFG_INTDIR STREQUAL ".")
- # CMAKE_BUILD_TYPE only available for makefile builds
- set(XMP_IS_MAKEFILE_BUILD "ON" PARENT_SCOPE)
- if((${CMAKE_BUILD_TYPE} MATCHES "Debug") OR (${CMAKE_BUILD_TYPE} MATCHES "debug") )
- set(XMP_BUILDMODE_DIR "debug" PARENT_SCOPE)
- else()
- set(XMP_BUILDMODE_DIR "release" PARENT_SCOPE)
- endif()
- else()
- # Visual/XCode have dedicated Debug/Release target modes. CMAKE_CFG_INTDIR is set.
- if(APPLE_IOS)
-# TODO: fixme
-# set(XMP_BUILDMODE_DIR "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" PARENT_SCOPE)
- set(XMP_BUILDMODE_DIR "$(CONFIGURATION)" PARENT_SCOPE)
- else()
- set(XMP_BUILDMODE_DIR ${CMAKE_CFG_INTDIR} PARENT_SCOPE)
- endif()
- set(XMP_IS_MAKEFILE_BUILD "OFF" PARENT_SCOPE)
- endif()
-endfunction(SetupInternalBuildDirectory)
-
-# ==============================================================================
-# Function: Setup general and specific folder structures
-# ==============================================================================
-function(SetupGeneralDirectories)
- set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} PARENT_SCOPE)
- set(PROJECT_ROOT ${PROJECT_SOURCE_DIR} PARENT_SCOPE)
- set(SOURCE_ROOT ${PROJECT_SOURCE_DIR}/../source PARENT_SCOPE)
- set(RESOURCE_ROOT ${PROJECT_SOURCE_DIR}/../resource PARENT_SCOPE)
-
- # ==============================================================================
- # XMP specific defines
- # ==============================================================================
-
- # Construct output directory
- # The CMAKE_CFG_INTDIR gets automatically set for generators which differenciate different build targets (eg. VS, XCode), but is emtpy for Linux !
- # In this case Debug/Release is added to the OUTPUT_DIR when used for LIBRARY_OUTPUT_PATH.
- string(TOLOWER ${XMP_BUILDMODE_DIR} LOWERCASE_XMP_BUILDMODE_DIR)
- set(OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/public/libraries/${XMP_PLATFORM_FOLDER}/${LOWERCASE_XMP_BUILDMODE_DIR} PARENT_SCOPE)
-
- # XMP lib locations constructed with ${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR}, since the target folder (Debug/Release) isn't added automatically
- set(XMPROOT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH} PARENT_SCOPE)
- set(XMPLIBRARIES_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/public/libraries/${XMP_PLATFORM_FOLDER}/${LOWERCASE_XMP_BUILDMODE_DIR} PARENT_SCOPE)
- set(XMPPLUGIN_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/XMPPlugin PARENT_SCOPE)
- set(XMPPLUGIN_OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${XMP_THIS_PROJECT_RELATIVEPATH}/XMPFilesPlugins/public/${XMP_PLATFORM_FOLDER}/${XMP_BUILDMODE_DIR} PARENT_SCOPE)
-
- # each plugin project should implement function named SetupProjectSpecifiedDirectories to specify the directories used by project itself
-endfunction(SetupGeneralDirectories)
diff --git a/build/cmake.bat b/build/cmake.bat
index de802bd..de802bd 100644..100755
--- a/build/cmake.bat
+++ b/build/cmake.bat
diff --git a/build/cmake.command b/build/cmake.command
index 4c540e6..4c540e6 100644..100755
--- a/build/cmake.command
+++ b/build/cmake.command
diff --git a/build/cmake_all.bat b/build/cmake_all.bat
index a79b43c..a79b43c 100644..100755
--- a/build/cmake_all.bat
+++ b/build/cmake_all.bat
diff --git a/build/shared/CMakeUtils.bat b/build/shared/CMakeUtils.bat
index 7203697..d2719b5 100755
--- a/build/shared/CMakeUtils.bat
+++ b/build/shared/CMakeUtils.bat
@@ -8,7 +8,7 @@
REM Available Arguments:
REM [64|32] Bit Architecture (optional, 64 is default)
-REM [2008|2010|2012] VS Version(optional, 2010 is default)
+REM [2008|2011|2011] VS Version(optional, 2011 is default)
REM [Dynamic | Static] optional, Dynamic by default
REM [WarningAsError] optional
REM [Clean] optional
@@ -22,7 +22,7 @@ set CleanCMake=OFF
set XMPROOT=%buildSharedLoc%/../..
:: Default Generator
-set GeneratorVersion=Visual Studio 10
+set GeneratorVersion=Visual Studio 11
set GeneratorArchitecture=Win64
set CMake_Arch64Bit=ON
set CMake_ARCH=x64
@@ -59,9 +59,9 @@ set CMake_LibTypeFolderName=dynamic
)
:: Visual Studio Version
- if /I "%1"=="2010" (
- echo "Generator VS 2010 specified"
- set GeneratorVersion=Visual Studio 10
+ if /I "%1"=="2011" (
+ echo "Generator VS 2011 specified"
+ set GeneratorVersion=Visual Studio 11
set CMakeGenVersion_FolderSuffix=
)
@@ -94,7 +94,7 @@ set CMake64_Folder_Suffix=
)
:: CMake Folder specified:
-set CMakeFolder="vc10/%CMake_LibTypeFolderName%/windows%CMake64_Folder_Suffix%"
+set CMakeFolder="vc11/%CMake_LibTypeFolderName%/windows%CMake64_Folder_Suffix%"
echo CMakeFolder: %CMakeFolder%
:: Create generator type from VS version and architecture
diff --git a/build/shared/SharedConfig_Common.cmake b/build/shared/SharedConfig_Common.cmake
index 32341c5..20ddbf1 100644
--- a/build/shared/SharedConfig_Common.cmake
+++ b/build/shared/SharedConfig_Common.cmake
@@ -11,6 +11,49 @@
# define minimum cmake version
cmake_minimum_required(VERSION 2.8.6)
+# ==============================================================================
+# Function: architecture related settings
+# ==============================================================================
+function(SetupTargetArchitecture)
+ if(APPLE_IOS)
+ set(${COMPONENT}_CPU_FOLDERNAME "$(ARCHS_STANDARD_32_BIT)" PARENT_SCOPE)
+ else()
+ if(CMAKE_CL_64)
+ set(${COMPONENT}_BITDEPTH "64" PARENT_SCOPE)
+ set(${COMPONENT}_CPU_FOLDERNAME "intel_64" PARENT_SCOPE)
+ else()
+ set(${COMPONENT}_BITDEPTH "32" PARENT_SCOPE)
+ set(${COMPONENT}_CPU_FOLDERNAME "intel" PARENT_SCOPE)
+ endif()
+ endif()
+endfunction(SetupTargetArchitecture)
+
+# ==============================================================================
+# Function: Set internal build target directory. See ${COMPONENT}_PLATFORM_FOLDER for
+# further construction and when CMAKE_CFG_INTDIR/CMAKE_BUILD_TYPE are set
+# (generator dependent).
+# ==============================================================================
+function(SetupInternalBuildDirectory)
+ if(CMAKE_CFG_INTDIR STREQUAL ".")
+ # CMAKE_BUILD_TYPE only available for makefile builds
+ set(${COMPONENT}_IS_MAKEFILE_BUILD "ON" PARENT_SCOPE)
+ if((${CMAKE_BUILD_TYPE} MATCHES "Debug") OR (${CMAKE_BUILD_TYPE} MATCHES "debug") )
+ set(${COMPONENT}_BUILDMODE_DIR "debug" PARENT_SCOPE)
+ else()
+ set(${COMPONENT}_BUILDMODE_DIR "release" PARENT_SCOPE)
+ endif()
+ else()
+ # Visual/XCode have dedicated Debug/Release target modes. CMAKE_CFG_INTDIR is set.
+ if(APPLE_IOS)
+# TODO: fixme
+# set(${COMPONENT}_BUILDMODE_DIR "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" PARENT_SCOPE)
+ set(${COMPONENT}_BUILDMODE_DIR "$(CONFIGURATION)" PARENT_SCOPE)
+ else()
+ set(${COMPONENT}_BUILDMODE_DIR ${CMAKE_CFG_INTDIR} PARENT_SCOPE)
+ endif()
+ set(${COMPONENT}_IS_MAKEFILE_BUILD "OFF" PARENT_SCOPE)
+ endif()
+endfunction(SetupInternalBuildDirectory)
# ==============================================================================
@@ -46,6 +89,34 @@ function(SetupCompilerFlags)
endfunction(SetupCompilerFlags)
+# ==============================================================================
+# Function: Setup general and specific folder structures
+# ==============================================================================
+function(SetupGeneralDirectories)
+ set(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR} PARENT_SCOPE)
+ set(PROJECT_ROOT ${PROJECT_SOURCE_DIR} PARENT_SCOPE)
+ set(SOURCE_ROOT ${PROJECT_SOURCE_DIR}/../source PARENT_SCOPE)
+ set(RESOURCE_ROOT ${PROJECT_SOURCE_DIR}/../resource PARENT_SCOPE)
+
+ # ==============================================================================
+ # ${COMPONENT} specific defines
+ # ==============================================================================
+
+ # Construct output directory
+ # The CMAKE_CFG_INTDIR gets automatically set for generators which differenciate different build targets (eg. VS, XCode), but is emtpy for Linux !
+ # In this case Debug/Release is added to the OUTPUT_DIR when used for LIBRARY_OUTPUT_PATH.
+
+ string(TOLOWER ${${COMPONENT}_BUILDMODE_DIR} LOWERCASE_${COMPONENT}_BUILDMODE_DIR)
+ set(OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${${COMPONENT}_THIS_PROJECT_RELATIVEPATH}/public/libraries/${${COMPONENT}_PLATFORM_FOLDER}/${LOWERCASE_${COMPONENT}_BUILDMODE_DIR} PARENT_SCOPE)
+
+ # ${COMPONENT} lib locations constructed with ${${COMPONENT}_PLATFORM_FOLDER}/${${COMPONENT}_BUILDMODE_DIR}, since the target folder (Debug/Release) isn't added automatically
+ set(${COMPONENT}ROOT_DIR ${PROJECT_SOURCE_DIR}/${${COMPONENT}_THIS_PROJECT_RELATIVEPATH}/ PARENT_SCOPE)
+ set(${COMPONENT}LIBRARIES_DIR ${PROJECT_SOURCE_DIR}/${${COMPONENT}_THIS_PROJECT_RELATIVEPATH}/public/libraries/${${COMPONENT}_PLATFORM_FOLDER}/${LOWERCASE_${COMPONENT}_BUILDMODE_DIR} PARENT_SCOPE)
+ set(${COMPONENT}PLUGIN_DIR ${PROJECT_SOURCE_DIR}/${${COMPONENT}_THIS_PROJECT_RELATIVEPATH}/${COMPONENT}Plugin PARENT_SCOPE)
+ set(${COMPONENT}PLUGIN_OUTPUT_DIR ${PROJECT_SOURCE_DIR}/${${COMPONENT}_THIS_PROJECT_RELATIVEPATH}/${COMPONENT}FilesPlugins/public/${${COMPONENT}_PLATFORM_FOLDER}/${${COMPONENT}_BUILDMODE_DIR} PARENT_SCOPE)
+
+ # each plugin project should implement function named SetupProjectSpecifiedDirectories to specify the directories used by project itself
+endfunction(SetupGeneralDirectories)
# ==============================================================================
# Function: Converts a semicolon separated list into whitespace separated string
diff --git a/build/shared/ToolchainLLVM.cmake b/build/shared/ToolchainLLVM.cmake
index a20abff..37bbb71 100644
--- a/build/shared/ToolchainLLVM.cmake
+++ b/build/shared/ToolchainLLVM.cmake
@@ -14,5 +14,5 @@
set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvm.clang.1_0")
# SDK and deployment
-set(XMP_OSX_SDK 10.7)
-set(XMP_OSX_TARGET 10.6)
+set(XMP_OSX_SDK 10.8)
+set(XMP_OSX_TARGET 10.7)
diff --git a/docs/API/TXMPFiles_8hpp.html b/docs/API/TXMPFiles_8hpp.html
index 4db1103..834d8f4 100644
--- a/docs/API/TXMPFiles_8hpp.html
+++ b/docs/API/TXMPFiles_8hpp.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: TXMPFiles.hpp File Reference</title>
+<title>XMP-Toolkit-SDK-CC201411-17: TXMPFiles.hpp File Reference</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -84,6 +84,6 @@ window.onload = initDynSections;
<p><code><a class="el" href="classTXMPFiles.html" title="API for access to the main (document-level) metadata in a file.">TXMPFiles</a></code> is designed for use by clients interested in the metadata and not in the primary file content; the Adobe Bridge application is a typical example. <code><a class="el" href="classTXMPFiles.html" title="API for access to the main (document-level) metadata in a file.">TXMPFiles</a></code> is not intended to be appropriate for files authored by an application; that is, those files for which the application has explicit knowledge of the file format. </p>
</div>
<hr size="1"><address style="text-align: right;"><small>
-XMP-Toolkit-SDK-CC201306 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
+XMP-Toolkit-SDK-CC201411-17 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
</body>
</html>
diff --git a/docs/API/TXMPFiles_8hpp_source.html b/docs/API/TXMPFiles_8hpp_source.html
index fbf6d19..c09414a 100644
--- a/docs/API/TXMPFiles_8hpp_source.html
+++ b/docs/API/TXMPFiles_8hpp_source.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: TXMPFiles.hpp Source File</title>
+<title>XMP-Toolkit-SDK-CC201411-17: TXMPFiles.hpp Source File</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -203,127 +203,127 @@ window.onload = initDynSections;
<a name="l00444"></a>00444 <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a> options = 0 );
<a name="l00445"></a>00445
<a name="l00446"></a>00446 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00499"></a>00499 <span class="comment"></span>
-<a name="l00500"></a>00500 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#afcd21cfe5d6f13c648c5541e161919cb" title="OpenFile() opens a file for metadata access.">OpenFile</a> ( <a class="code" href="XMP__Const_8h.html#ad439e3ceeb4590d310f6125aa12c6df6" title="The type for input string parameters. A const char *, a null-terminated UTF-8 string...">XMP_StringPtr</a> filePath,
-<a name="l00501"></a>00501 <a class="code" href="XMP__Const_8h.html#a300d9a9189cb4ddb6970d05389f5c28e" title="Type for file format identification constants. See kXMP_PDFFile and following.">XMP_FileFormat</a> format = <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da2845f95eaaaf492f5011bff05a398719" title="Unknown file format constant: &amp;#39; &amp;#39;.">kXMP_UnknownFile</a>,
-<a name="l00502"></a>00502 <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a> openFlags = 0 );
-<a name="l00503"></a>00503
-<a name="l00504"></a>00504 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00509"></a>00509 <span class="comment"></span>
-<a name="l00510"></a>00510 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#afcd21cfe5d6f13c648c5541e161919cb" title="OpenFile() opens a file for metadata access.">OpenFile</a> ( <span class="keyword">const</span> tStringObj &amp; filePath,
-<a name="l00511"></a>00511 <a class="code" href="XMP__Const_8h.html#a300d9a9189cb4ddb6970d05389f5c28e" title="Type for file format identification constants. See kXMP_PDFFile and following.">XMP_FileFormat</a> format = <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da2845f95eaaaf492f5011bff05a398719" title="Unknown file format constant: &amp;#39; &amp;#39;.">kXMP_UnknownFile</a>,
-<a name="l00512"></a>00512 <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a> openFlags = 0 );
-<a name="l00513"></a>00513
-<a name="l00514"></a>00514 <span class="preprocessor"> #if XMP_StaticBuild // ! Client XMP_IO objects can only be used in static builds.</span>
-<a name="l00515"></a>00515 <span class="preprocessor"></span> <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00521"></a>00521 <span class="comment"></span>
-<a name="l00522"></a>00522 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#afcd21cfe5d6f13c648c5541e161919cb" title="OpenFile() opens a file for metadata access.">OpenFile</a> ( XMP_IO * clientIO,
-<a name="l00523"></a>00523 <a class="code" href="XMP__Const_8h.html#a300d9a9189cb4ddb6970d05389f5c28e" title="Type for file format identification constants. See kXMP_PDFFile and following.">XMP_FileFormat</a> format = <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da2845f95eaaaf492f5011bff05a398719" title="Unknown file format constant: &amp;#39; &amp;#39;.">kXMP_UnknownFile</a>,
-<a name="l00524"></a>00524 <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a> openFlags = 0 );
-<a name="l00525"></a>00525 <span class="preprocessor"> #endif</span>
-<a name="l00526"></a>00526 <span class="preprocessor"></span>
-<a name="l00527"></a>00527 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00548"></a>00548 <span class="comment"></span>
-<a name="l00549"></a>00549 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#aeca89170c7aa3e2d56e30bff04dd7927" title="CloseFile() explicitly closes an opened file.">CloseFile</a> ( <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a> closeFlags = 0 );
-<a name="l00550"></a>00550
-<a name="l00551"></a>00551 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00568"></a>00568 <span class="comment"></span>
-<a name="l00569"></a>00569 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#af9931d081cb19f98c81e41786030765b" title="GetFileInfo() retrieves basic information about an opened file.">GetFileInfo</a> ( tStringObj * filePath = 0,
-<a name="l00570"></a>00570 <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a> * openFlags = 0,
-<a name="l00571"></a>00571 <a class="code" href="XMP__Const_8h.html#a300d9a9189cb4ddb6970d05389f5c28e" title="Type for file format identification constants. See kXMP_PDFFile and following.">XMP_FileFormat</a> * format = 0,
-<a name="l00572"></a>00572 <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a> * handlerFlags = 0 );
-<a name="l00573"></a>00573
-<a name="l00574"></a>00574 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00584"></a>00584 <span class="comment"></span>
-<a name="l00585"></a>00585 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#a7b86c130fdbd54b5ac158ec3fee93777" title="SetAbortProc() registers a callback function used to check for a user-signaled abort...">SetAbortProc</a> ( <a class="code" href="XMP__Const_8h.html#aa2738ce2fca7f1809b12834b1b5e2d0e">XMP_AbortProc</a> abortProc,
-<a name="l00586"></a>00586 <span class="keywordtype">void</span> * abortArg );
-<a name="l00587"></a>00587
+<a name="l00501"></a>00501 <span class="comment"></span>
+<a name="l00502"></a>00502 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#afcd21cfe5d6f13c648c5541e161919cb" title="OpenFile() opens a file for metadata access.">OpenFile</a> ( <a class="code" href="XMP__Const_8h.html#ad439e3ceeb4590d310f6125aa12c6df6" title="The type for input string parameters. A const char *, a null-terminated UTF-8 string...">XMP_StringPtr</a> filePath,
+<a name="l00503"></a>00503 <a class="code" href="XMP__Const_8h.html#a300d9a9189cb4ddb6970d05389f5c28e" title="Type for file format identification constants. See kXMP_PDFFile and following.">XMP_FileFormat</a> format = <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da2845f95eaaaf492f5011bff05a398719" title="Unknown file format constant: &amp;#39; &amp;#39;.">kXMP_UnknownFile</a>,
+<a name="l00504"></a>00504 <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a> openFlags = 0 );
+<a name="l00505"></a>00505
+<a name="l00506"></a>00506 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00511"></a>00511 <span class="comment"></span>
+<a name="l00512"></a>00512 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#afcd21cfe5d6f13c648c5541e161919cb" title="OpenFile() opens a file for metadata access.">OpenFile</a> ( <span class="keyword">const</span> tStringObj &amp; filePath,
+<a name="l00513"></a>00513 <a class="code" href="XMP__Const_8h.html#a300d9a9189cb4ddb6970d05389f5c28e" title="Type for file format identification constants. See kXMP_PDFFile and following.">XMP_FileFormat</a> format = <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da2845f95eaaaf492f5011bff05a398719" title="Unknown file format constant: &amp;#39; &amp;#39;.">kXMP_UnknownFile</a>,
+<a name="l00514"></a>00514 <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a> openFlags = 0 );
+<a name="l00515"></a>00515
+<a name="l00516"></a>00516 <span class="preprocessor"> #if XMP_StaticBuild // ! Client XMP_IO objects can only be used in static builds.</span>
+<a name="l00517"></a>00517 <span class="preprocessor"></span> <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00523"></a>00523 <span class="comment"></span>
+<a name="l00524"></a>00524 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#afcd21cfe5d6f13c648c5541e161919cb" title="OpenFile() opens a file for metadata access.">OpenFile</a> ( XMP_IO * clientIO,
+<a name="l00525"></a>00525 <a class="code" href="XMP__Const_8h.html#a300d9a9189cb4ddb6970d05389f5c28e" title="Type for file format identification constants. See kXMP_PDFFile and following.">XMP_FileFormat</a> format = <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da2845f95eaaaf492f5011bff05a398719" title="Unknown file format constant: &amp;#39; &amp;#39;.">kXMP_UnknownFile</a>,
+<a name="l00526"></a>00526 <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a> openFlags = 0 );
+<a name="l00527"></a>00527 <span class="preprocessor"> #endif</span>
+<a name="l00528"></a>00528 <span class="preprocessor"></span>
+<a name="l00529"></a>00529 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00550"></a>00550 <span class="comment"></span>
+<a name="l00551"></a>00551 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#aeca89170c7aa3e2d56e30bff04dd7927" title="CloseFile() explicitly closes an opened file.">CloseFile</a> ( <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a> closeFlags = 0 );
+<a name="l00552"></a>00552
+<a name="l00553"></a>00553 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00570"></a>00570 <span class="comment"></span>
+<a name="l00571"></a>00571 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#af9931d081cb19f98c81e41786030765b" title="GetFileInfo() retrieves basic information about an opened file.">GetFileInfo</a> ( tStringObj * filePath = 0,
+<a name="l00572"></a>00572 <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a> * openFlags = 0,
+<a name="l00573"></a>00573 <a class="code" href="XMP__Const_8h.html#a300d9a9189cb4ddb6970d05389f5c28e" title="Type for file format identification constants. See kXMP_PDFFile and following.">XMP_FileFormat</a> * format = 0,
+<a name="l00574"></a>00574 <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a> * handlerFlags = 0 );
+<a name="l00575"></a>00575
+<a name="l00576"></a>00576 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00586"></a>00586 <span class="comment"></span>
+<a name="l00587"></a>00587 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#a7b86c130fdbd54b5ac158ec3fee93777" title="SetAbortProc() registers a callback function used to check for a user-signaled abort...">SetAbortProc</a> ( <a class="code" href="XMP__Const_8h.html#aa2738ce2fca7f1809b12834b1b5e2d0e">XMP_AbortProc</a> abortProc,
+<a name="l00588"></a>00588 <span class="keywordtype">void</span> * abortArg );
<a name="l00589"></a>00589
-<a name="l00590"></a>00590 <span class="comment">// =============================================================================================</span>
-<a name="l00597"></a>00597 <span class="comment"></span>
-<a name="l00598"></a>00598 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00625"></a>00625 <span class="comment"></span>
-<a name="l00626"></a>00626 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#a42ca0bbc5ac66a8de1710e03a7ff17b3" title="GetXMP() retrieves the XMP metadata from an open file.">GetXMP</a> ( SXMPMeta * xmpObj = 0,
-<a name="l00627"></a>00627 tStringObj * xmpPacket = 0,
-<a name="l00628"></a>00628 <a class="code" href="structXMP__PacketInfo.html" title="XMP packet description.">XMP_PacketInfo</a> * packetInfo = 0 );
-<a name="l00629"></a>00629
-<a name="l00630"></a>00630 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00638"></a>00638 <span class="comment"></span>
-<a name="l00639"></a>00639 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#ad3f7babdc07c7de0d0cd9a3362b4710a" title="PutXMP() updates the XMP metadata in this object without writing out the file.">PutXMP</a> ( <span class="keyword">const</span> SXMPMeta &amp; xmpObj );
-<a name="l00640"></a>00640
-<a name="l00641"></a>00641 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00649"></a>00649 <span class="comment"></span>
-<a name="l00650"></a>00650 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#ad3f7babdc07c7de0d0cd9a3362b4710a" title="PutXMP() updates the XMP metadata in this object without writing out the file.">PutXMP</a> ( <span class="keyword">const</span> tStringObj &amp; xmpPacket );
-<a name="l00651"></a>00651
-<a name="l00652"></a>00652 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00663"></a>00663 <span class="comment"></span>
-<a name="l00664"></a>00664 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#ad3f7babdc07c7de0d0cd9a3362b4710a" title="PutXMP() updates the XMP metadata in this object without writing out the file.">PutXMP</a> ( <a class="code" href="XMP__Const_8h.html#ad439e3ceeb4590d310f6125aa12c6df6" title="The type for input string parameters. A const char *, a null-terminated UTF-8 string...">XMP_StringPtr</a> xmpPacket,
-<a name="l00665"></a>00665 <a class="code" href="XMP__Const_8h.html#a9f7dcc184f901c713274edfdac5bcc9a" title="The type for string length parameters. A 32-bit unsigned integer, as big as will...">XMP_StringLen</a> xmpLength = <a class="code" href="XMP__Const_8h.html#a8283c9596c03b6d626d5a2b7a90e23ab" title="Options macro sets string style.">kXMP_UseNullTermination</a> );
-<a name="l00666"></a>00666
-<a name="l00667"></a>00667 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00701"></a>00701 <span class="comment"></span>
-<a name="l00702"></a>00702 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#a29a11a1539d6300da3fb4c7e9ea02bb6" title="CanPutXMP() reports whether this file can be updated with a specific XMP packet.">CanPutXMP</a> ( <span class="keyword">const</span> SXMPMeta &amp; xmpObj );
-<a name="l00703"></a>00703
-<a name="l00704"></a>00704 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00712"></a>00712 <span class="comment"></span>
-<a name="l00713"></a>00713 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#a29a11a1539d6300da3fb4c7e9ea02bb6" title="CanPutXMP() reports whether this file can be updated with a specific XMP packet.">CanPutXMP</a> ( <span class="keyword">const</span> tStringObj &amp; xmpPacket );
-<a name="l00714"></a>00714
-<a name="l00715"></a>00715 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00726"></a>00726 <span class="comment"></span>
-<a name="l00727"></a>00727 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#a29a11a1539d6300da3fb4c7e9ea02bb6" title="CanPutXMP() reports whether this file can be updated with a specific XMP packet.">CanPutXMP</a> ( <a class="code" href="XMP__Const_8h.html#ad439e3ceeb4590d310f6125aa12c6df6" title="The type for input string parameters. A const char *, a null-terminated UTF-8 string...">XMP_StringPtr</a> xmpPacket,
-<a name="l00728"></a>00728 <a class="code" href="XMP__Const_8h.html#a9f7dcc184f901c713274edfdac5bcc9a" title="The type for string length parameters. A 32-bit unsigned integer, as big as will...">XMP_StringLen</a> xmpLength = <a class="code" href="XMP__Const_8h.html#a8283c9596c03b6d626d5a2b7a90e23ab" title="Options macro sets string style.">kXMP_UseNullTermination</a> );
-<a name="l00729"></a>00729
+<a name="l00591"></a>00591
+<a name="l00592"></a>00592 <span class="comment">// =============================================================================================</span>
+<a name="l00599"></a>00599 <span class="comment"></span>
+<a name="l00600"></a>00600 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00627"></a>00627 <span class="comment"></span>
+<a name="l00628"></a>00628 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#a42ca0bbc5ac66a8de1710e03a7ff17b3" title="GetXMP() retrieves the XMP metadata from an open file.">GetXMP</a> ( SXMPMeta * xmpObj = 0,
+<a name="l00629"></a>00629 tStringObj * xmpPacket = 0,
+<a name="l00630"></a>00630 <a class="code" href="structXMP__PacketInfo.html" title="XMP packet description.">XMP_PacketInfo</a> * packetInfo = 0 );
+<a name="l00631"></a>00631
+<a name="l00632"></a>00632 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00640"></a>00640 <span class="comment"></span>
+<a name="l00641"></a>00641 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#ad3f7babdc07c7de0d0cd9a3362b4710a" title="PutXMP() updates the XMP metadata in this object without writing out the file.">PutXMP</a> ( <span class="keyword">const</span> SXMPMeta &amp; xmpObj );
+<a name="l00642"></a>00642
+<a name="l00643"></a>00643 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00651"></a>00651 <span class="comment"></span>
+<a name="l00652"></a>00652 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#ad3f7babdc07c7de0d0cd9a3362b4710a" title="PutXMP() updates the XMP metadata in this object without writing out the file.">PutXMP</a> ( <span class="keyword">const</span> tStringObj &amp; xmpPacket );
+<a name="l00653"></a>00653
+<a name="l00654"></a>00654 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00665"></a>00665 <span class="comment"></span>
+<a name="l00666"></a>00666 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#ad3f7babdc07c7de0d0cd9a3362b4710a" title="PutXMP() updates the XMP metadata in this object without writing out the file.">PutXMP</a> ( <a class="code" href="XMP__Const_8h.html#ad439e3ceeb4590d310f6125aa12c6df6" title="The type for input string parameters. A const char *, a null-terminated UTF-8 string...">XMP_StringPtr</a> xmpPacket,
+<a name="l00667"></a>00667 <a class="code" href="XMP__Const_8h.html#a9f7dcc184f901c713274edfdac5bcc9a" title="The type for string length parameters. A 32-bit unsigned integer, as big as will...">XMP_StringLen</a> xmpLength = <a class="code" href="XMP__Const_8h.html#a8283c9596c03b6d626d5a2b7a90e23ab" title="Options macro sets string style.">kXMP_UseNullTermination</a> );
+<a name="l00668"></a>00668
+<a name="l00669"></a>00669 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00703"></a>00703 <span class="comment"></span>
+<a name="l00704"></a>00704 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#a29a11a1539d6300da3fb4c7e9ea02bb6" title="CanPutXMP() reports whether this file can be updated with a specific XMP packet.">CanPutXMP</a> ( <span class="keyword">const</span> SXMPMeta &amp; xmpObj );
+<a name="l00705"></a>00705
+<a name="l00706"></a>00706 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00714"></a>00714 <span class="comment"></span>
+<a name="l00715"></a>00715 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#a29a11a1539d6300da3fb4c7e9ea02bb6" title="CanPutXMP() reports whether this file can be updated with a specific XMP packet.">CanPutXMP</a> ( <span class="keyword">const</span> tStringObj &amp; xmpPacket );
+<a name="l00716"></a>00716
+<a name="l00717"></a>00717 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00728"></a>00728 <span class="comment"></span>
+<a name="l00729"></a>00729 <span class="keywordtype">bool</span> <a class="code" href="classTXMPFiles.html#a29a11a1539d6300da3fb4c7e9ea02bb6" title="CanPutXMP() reports whether this file can be updated with a specific XMP packet.">CanPutXMP</a> ( <a class="code" href="XMP__Const_8h.html#ad439e3ceeb4590d310f6125aa12c6df6" title="The type for input string parameters. A const char *, a null-terminated UTF-8 string...">XMP_StringPtr</a> xmpPacket,
+<a name="l00730"></a>00730 <a class="code" href="XMP__Const_8h.html#a9f7dcc184f901c713274edfdac5bcc9a" title="The type for string length parameters. A 32-bit unsigned integer, as big as will...">XMP_StringLen</a> xmpLength = <a class="code" href="XMP__Const_8h.html#a8283c9596c03b6d626d5a2b7a90e23ab" title="Options macro sets string style.">kXMP_UseNullTermination</a> );
<a name="l00731"></a>00731
-<a name="l00732"></a>00732 <span class="comment">// =============================================================================================</span>
-<a name="l00741"></a>00741 <span class="comment"></span>
-<a name="l00742"></a>00742 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00756"></a>00756 <span class="comment"></span>
-<a name="l00757"></a>00757 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#a83335ee20bb3ea543c8c86a5757a7753" title="SetDefaultProgressCallback() sets a global default for progress tracking. This is...">SetDefaultProgressCallback</a> ( <a class="code" href="XMP__Const_8h.html#af18be2d0c8accad813e0d8962da24b4e">XMP_ProgressReportProc</a> proc, <span class="keywordtype">void</span> * context = 0,
-<a name="l00758"></a>00758 <span class="keywordtype">float</span> interval = 1.0, <span class="keywordtype">bool</span> sendStartStop = <span class="keyword">false</span> );
-<a name="l00759"></a>00759
-<a name="l00760"></a>00760 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00773"></a>00773 <span class="comment"></span>
-<a name="l00774"></a>00774 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#aa283e2a1c16918c86148446859ed1a2d" title="SetProgressCallback() sets the progress notification callback for the associated...">SetProgressCallback</a> ( <a class="code" href="XMP__Const_8h.html#af18be2d0c8accad813e0d8962da24b4e">XMP_ProgressReportProc</a> proc, <span class="keywordtype">void</span> * context = 0,
-<a name="l00775"></a>00775 <span class="keywordtype">float</span> interval = 1.0, <span class="keywordtype">bool</span> sendStartStop = <span class="keyword">false</span> );
-<a name="l00776"></a>00776
-<a name="l00778"></a>00778
-<a name="l00779"></a>00779 <span class="comment">// =============================================================================================</span>
-<a name="l00780"></a>00780 <span class="comment">// Error notifications</span>
-<a name="l00781"></a>00781 <span class="comment">// ===================</span>
-<a name="l00782"></a>00782
-<a name="l00783"></a>00783 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
-<a name="l00805"></a>00805 <span class="comment"></span>
-<a name="l00806"></a>00806 <span class="comment">// --------------------------------------------------------------------------------------------</span>
-<a name="l00814"></a>00814 <span class="comment"></span>
-<a name="l00815"></a>00815 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#accc6c1cef9f124f6c5ed360251aa5aa7" title="SetDefaultErrorCallback() registers a global default error notification callback...">SetDefaultErrorCallback</a> ( <a class="code" href="XMP__Const_8h.html#aaceb0287e961c16649487db026bcfc61">XMPFiles_ErrorCallbackProc</a> proc, <span class="keywordtype">void</span>* context = 0, XMP_Uns32 limit = 1 );
-<a name="l00816"></a>00816
-<a name="l00817"></a>00817 <span class="comment">// --------------------------------------------------------------------------------------------</span>
-<a name="l00825"></a>00825 <span class="comment"></span>
-<a name="l00826"></a>00826 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#a43a98633a0090fb4ade76edf24302ab1" title="SetErrorCallback() registers an error notification callback.">SetErrorCallback</a> ( <a class="code" href="XMP__Const_8h.html#aaceb0287e961c16649487db026bcfc61">XMPFiles_ErrorCallbackProc</a> proc, <span class="keywordtype">void</span>* context = 0, XMP_Uns32 limit = 1 );
-<a name="l00827"></a>00827
-<a name="l00828"></a>00828 <span class="comment">// --------------------------------------------------------------------------------------------</span>
-<a name="l00833"></a>00833 <span class="comment"></span>
-<a name="l00834"></a>00834 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#a8e37b25dd1cba1e9a3f45037022717f2" title="ResetErrorCallbackLimit() resets the error notification limit and counting. It has...">ResetErrorCallbackLimit</a> ( XMP_Uns32 limit = 1 );
-<a name="l00835"></a>00835
+<a name="l00733"></a>00733
+<a name="l00734"></a>00734 <span class="comment">// =============================================================================================</span>
+<a name="l00743"></a>00743 <span class="comment"></span>
+<a name="l00744"></a>00744 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00758"></a>00758 <span class="comment"></span>
+<a name="l00759"></a>00759 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#a83335ee20bb3ea543c8c86a5757a7753" title="SetDefaultProgressCallback() sets a global default for progress tracking. This is...">SetDefaultProgressCallback</a> ( <a class="code" href="XMP__Const_8h.html#af18be2d0c8accad813e0d8962da24b4e">XMP_ProgressReportProc</a> proc, <span class="keywordtype">void</span> * context = 0,
+<a name="l00760"></a>00760 <span class="keywordtype">float</span> interval = 1.0, <span class="keywordtype">bool</span> sendStartStop = <span class="keyword">false</span> );
+<a name="l00761"></a>00761
+<a name="l00762"></a>00762 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00775"></a>00775 <span class="comment"></span>
+<a name="l00776"></a>00776 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#aa283e2a1c16918c86148446859ed1a2d" title="SetProgressCallback() sets the progress notification callback for the associated...">SetProgressCallback</a> ( <a class="code" href="XMP__Const_8h.html#af18be2d0c8accad813e0d8962da24b4e">XMP_ProgressReportProc</a> proc, <span class="keywordtype">void</span> * context = 0,
+<a name="l00777"></a>00777 <span class="keywordtype">float</span> interval = 1.0, <span class="keywordtype">bool</span> sendStartStop = <span class="keyword">false</span> );
+<a name="l00778"></a>00778
+<a name="l00780"></a>00780
+<a name="l00781"></a>00781 <span class="comment">// =============================================================================================</span>
+<a name="l00782"></a>00782 <span class="comment">// Error notifications</span>
+<a name="l00783"></a>00783 <span class="comment">// ===================</span>
+<a name="l00784"></a>00784
+<a name="l00785"></a>00785 <span class="comment">// ---------------------------------------------------------------------------------------------</span>
+<a name="l00807"></a>00807 <span class="comment"></span>
+<a name="l00808"></a>00808 <span class="comment">// --------------------------------------------------------------------------------------------</span>
+<a name="l00816"></a>00816 <span class="comment"></span>
+<a name="l00817"></a>00817 <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#accc6c1cef9f124f6c5ed360251aa5aa7" title="SetDefaultErrorCallback() registers a global default error notification callback...">SetDefaultErrorCallback</a> ( <a class="code" href="XMP__Const_8h.html#aaceb0287e961c16649487db026bcfc61">XMPFiles_ErrorCallbackProc</a> proc, <span class="keywordtype">void</span>* context = 0, XMP_Uns32 limit = 1 );
+<a name="l00818"></a>00818
+<a name="l00819"></a>00819 <span class="comment">// --------------------------------------------------------------------------------------------</span>
+<a name="l00827"></a>00827 <span class="comment"></span>
+<a name="l00828"></a>00828 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#a43a98633a0090fb4ade76edf24302ab1" title="SetErrorCallback() registers an error notification callback.">SetErrorCallback</a> ( <a class="code" href="XMP__Const_8h.html#aaceb0287e961c16649487db026bcfc61">XMPFiles_ErrorCallbackProc</a> proc, <span class="keywordtype">void</span>* context = 0, XMP_Uns32 limit = 1 );
+<a name="l00829"></a>00829
+<a name="l00830"></a>00830 <span class="comment">// --------------------------------------------------------------------------------------------</span>
+<a name="l00835"></a>00835 <span class="comment"></span>
+<a name="l00836"></a>00836 <span class="keywordtype">void</span> <a class="code" href="classTXMPFiles.html#a8e37b25dd1cba1e9a3f45037022717f2" title="ResetErrorCallbackLimit() resets the error notification limit and counting. It has...">ResetErrorCallbackLimit</a> ( XMP_Uns32 limit = 1 );
<a name="l00837"></a>00837
-<a name="l00838"></a>00838 <span class="comment">// =============================================================================================</span>
<a name="l00839"></a>00839
-<a name="l00840"></a>00840 <span class="keyword">private</span>:
+<a name="l00840"></a>00840 <span class="comment">// =============================================================================================</span>
<a name="l00841"></a>00841
-<a name="l00842"></a>00842 <a class="code" href="XMP__Const_8h.html#aa4bca98ad67d7a62c60cb13dbbab0f25">XMPFilesRef</a> xmpFilesRef;
+<a name="l00842"></a>00842 <span class="keyword">private</span>:
<a name="l00843"></a>00843
-<a name="l00844"></a>00844 <span class="comment">// These are used as callbacks from the library code to the client when returning values that</span>
-<a name="l00845"></a>00845 <span class="comment">// involve heap allocations. This ensures the allocations occur within the client.</span>
-<a name="l00846"></a>00846 <span class="keyword">static</span> <span class="keywordtype">void</span> SetClientString ( <span class="keywordtype">void</span> * clientPtr, <a class="code" href="XMP__Const_8h.html#ad439e3ceeb4590d310f6125aa12c6df6" title="The type for input string parameters. A const char *, a null-terminated UTF-8 string...">XMP_StringPtr</a> valuePtr, <a class="code" href="XMP__Const_8h.html#a9f7dcc184f901c713274edfdac5bcc9a" title="The type for string length parameters. A 32-bit unsigned integer, as big as will...">XMP_StringLen</a> valueLen );
-<a name="l00847"></a>00847 <span class="keyword">static</span> <span class="keywordtype">void</span> SetClientStringVector ( <span class="keywordtype">void</span> * clientPtr, <a class="code" href="XMP__Const_8h.html#ad439e3ceeb4590d310f6125aa12c6df6" title="The type for input string parameters. A const char *, a null-terminated UTF-8 string...">XMP_StringPtr</a>* arrayPtr, XMP_Uns32 stringCount );
-<a name="l00848"></a>00848
-<a name="l00849"></a>00849 }; <span class="comment">// class TXMPFiles</span>
+<a name="l00844"></a>00844 <a class="code" href="XMP__Const_8h.html#aa4bca98ad67d7a62c60cb13dbbab0f25">XMPFilesRef</a> xmpFilesRef;
+<a name="l00845"></a>00845
+<a name="l00846"></a>00846 <span class="comment">// These are used as callbacks from the library code to the client when returning values that</span>
+<a name="l00847"></a>00847 <span class="comment">// involve heap allocations. This ensures the allocations occur within the client.</span>
+<a name="l00848"></a>00848 <span class="keyword">static</span> <span class="keywordtype">void</span> SetClientString ( <span class="keywordtype">void</span> * clientPtr, <a class="code" href="XMP__Const_8h.html#ad439e3ceeb4590d310f6125aa12c6df6" title="The type for input string parameters. A const char *, a null-terminated UTF-8 string...">XMP_StringPtr</a> valuePtr, <a class="code" href="XMP__Const_8h.html#a9f7dcc184f901c713274edfdac5bcc9a" title="The type for string length parameters. A 32-bit unsigned integer, as big as will...">XMP_StringLen</a> valueLen );
+<a name="l00849"></a>00849 <span class="keyword">static</span> <span class="keywordtype">void</span> SetClientStringVector ( <span class="keywordtype">void</span> * clientPtr, <a class="code" href="XMP__Const_8h.html#ad439e3ceeb4590d310f6125aa12c6df6" title="The type for input string parameters. A const char *, a null-terminated UTF-8 string...">XMP_StringPtr</a>* arrayPtr, XMP_Uns32 stringCount );
<a name="l00850"></a>00850
-<a name="l00851"></a>00851 <span class="comment">// =================================================================================================</span>
+<a name="l00851"></a>00851 }; <span class="comment">// class TXMPFiles</span>
<a name="l00852"></a>00852
-<a name="l00853"></a>00853 <span class="preprocessor">#endif // __TXMPFiles_hpp__</span>
+<a name="l00853"></a>00853 <span class="comment">// =================================================================================================</span>
+<a name="l00854"></a>00854
+<a name="l00855"></a>00855 <span class="preprocessor">#endif // __TXMPFiles_hpp__</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>
-XMP-Toolkit-SDK-CC201306 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
+XMP-Toolkit-SDK-CC201411-17 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
</body>
</html>
diff --git a/docs/API/TXMPFiles_8incl__cpp.html b/docs/API/TXMPFiles_8incl__cpp.html
index a855944..5c4ac08 100644
--- a/docs/API/TXMPFiles_8incl__cpp.html
+++ b/docs/API/TXMPFiles_8incl__cpp.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: TXMPFiles.incl_cpp File Reference</title>
+<title>XMP-Toolkit-SDK-CC201411-17: TXMPFiles.incl_cpp File Reference</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -79,6 +79,6 @@ Include dependency graph for TXMPFiles.incl_cpp:</div>
<p>The implementation of the <a class="el" href="classTXMPFiles.html" title="API for access to the main (document-level) metadata in a file.">TXMPFiles</a> template class. </p>
</div>
<hr size="1"><address style="text-align: right;"><small>
-XMP-Toolkit-SDK-CC201306 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
+XMP-Toolkit-SDK-CC201411-17 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
</body>
</html>
diff --git a/docs/API/TXMPIterator_8hpp.html b/docs/API/TXMPIterator_8hpp.html
index e619f51..fd51ac6 100644
--- a/docs/API/TXMPIterator_8hpp.html
+++ b/docs/API/TXMPIterator_8hpp.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: TXMPIterator.hpp File Reference</title>
+<title>XMP-Toolkit-SDK-CC201411-17: TXMPIterator.hpp File Reference</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -89,6 +89,6 @@ This graph shows which files directly or indirectly include this file:</div>
<p><code><a class="el" href="classTXMPIterator.html" title="API for access to the XMP Toolkit iteration services.">TXMPIterator</a></code> is the template class providing iteration services for the XMP Toolkit. It must be instantiated with a string class such as <code>std::string</code>. See the instructions in XMP.hpp, and the Overview for a discussion of the overall architecture of the XMP API. </p>
</div>
<hr size="1"><address style="text-align: right;"><small>
-XMP-Toolkit-SDK-CC201306 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
+XMP-Toolkit-SDK-CC201411-17 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
</body>
</html>
diff --git a/docs/API/TXMPIterator_8hpp_source.html b/docs/API/TXMPIterator_8hpp_source.html
index 23f1849..79d7042 100644
--- a/docs/API/TXMPIterator_8hpp_source.html
+++ b/docs/API/TXMPIterator_8hpp_source.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: TXMPIterator.hpp Source File</title>
+<title>XMP-Toolkit-SDK-CC201411-17: TXMPIterator.hpp Source File</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -151,6 +151,6 @@ window.onload = initDynSections;
<a name="l00235"></a>00235 <span class="preprocessor">#endif // __TXMPIterator_hpp__</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>
-XMP-Toolkit-SDK-CC201306 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
+XMP-Toolkit-SDK-CC201411-17 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
</body>
</html>
diff --git a/docs/API/TXMPIterator_8incl__cpp.html b/docs/API/TXMPIterator_8incl__cpp.html
index 9674af5..28fa7da 100644
--- a/docs/API/TXMPIterator_8incl__cpp.html
+++ b/docs/API/TXMPIterator_8incl__cpp.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: TXMPIterator.incl_cpp File Reference</title>
+<title>XMP-Toolkit-SDK-CC201411-17: TXMPIterator.incl_cpp File Reference</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -80,6 +80,6 @@ Include dependency graph for TXMPIterator.incl_cpp:</div>
<p>The implementation of the <a class="el" href="classTXMPIterator.html" title="API for access to the XMP Toolkit iteration services.">TXMPIterator</a> template class. </p>
</div>
<hr size="1"><address style="text-align: right;"><small>
-XMP-Toolkit-SDK-CC201306 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
+XMP-Toolkit-SDK-CC201411-17 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
</body>
</html>
diff --git a/docs/API/TXMPMeta_8hpp.html b/docs/API/TXMPMeta_8hpp.html
index 0372e8e..e4d7fa5 100644
--- a/docs/API/TXMPMeta_8hpp.html
+++ b/docs/API/TXMPMeta_8hpp.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: TXMPMeta.hpp File Reference</title>
+<title>XMP-Toolkit-SDK-CC201411-17: TXMPMeta.hpp File Reference</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -79,6 +79,6 @@ window.onload = initDynSections;
<p>Access these functions through the concrete class, <code>SXMPMeta</code>. </p>
</div>
<hr size="1"><address style="text-align: right;"><small>
-XMP-Toolkit-SDK-CC201306 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
+XMP-Toolkit-SDK-CC201411-17 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
</body>
</html>
diff --git a/docs/API/TXMPMeta_8hpp_source.html b/docs/API/TXMPMeta_8hpp_source.html
index 3e3fd5c..d8da4fa 100644
--- a/docs/API/TXMPMeta_8hpp_source.html
+++ b/docs/API/TXMPMeta_8hpp_source.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: TXMPMeta.hpp Source File</title>
+<title>XMP-Toolkit-SDK-CC201411-17: TXMPMeta.hpp Source File</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -596,6 +596,6 @@ window.onload = initDynSections;
<a name="l01751"></a>01751 <span class="preprocessor">#endif // __TXMPMeta_hpp__</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>
-XMP-Toolkit-SDK-CC201306 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
+XMP-Toolkit-SDK-CC201411-17 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
</body>
</html>
diff --git a/docs/API/TXMPMeta_8incl__cpp.html b/docs/API/TXMPMeta_8incl__cpp.html
index 61b6ff0..2bdade1 100644
--- a/docs/API/TXMPMeta_8incl__cpp.html
+++ b/docs/API/TXMPMeta_8incl__cpp.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: TXMPMeta.incl_cpp File Reference</title>
+<title>XMP-Toolkit-SDK-CC201411-17: TXMPMeta.incl_cpp File Reference</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -80,6 +80,6 @@ Include dependency graph for TXMPMeta.incl_cpp:</div>
<p>The implementation of the <a class="el" href="classTXMPMeta.html" title="API for access to the XMP Toolkit core services.">TXMPMeta</a> template class. </p>
</div>
<hr size="1"><address style="text-align: right;"><small>
-XMP-Toolkit-SDK-CC201306 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
+XMP-Toolkit-SDK-CC201411-17 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
</body>
</html>
diff --git a/docs/API/TXMPUtils_8hpp.html b/docs/API/TXMPUtils_8hpp.html
index 78e8f3e..56a27cc 100644
--- a/docs/API/TXMPUtils_8hpp.html
+++ b/docs/API/TXMPUtils_8hpp.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: TXMPUtils.hpp File Reference</title>
+<title>XMP-Toolkit-SDK-CC201411-17: TXMPUtils.hpp File Reference</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -78,6 +78,6 @@ window.onload = initDynSections;
<p><code><a class="el" href="classTXMPUtils.html" title="API for access to the XMP Toolkit utility services.">TXMPUtils</a></code> is the template class providing utility services for the XMP Toolkit. It must be instantiated with a string class such as <code>std::string</code>. See the instructions in XMP.hpp, and the Overview for a discussion of the overall architecture of the XMP API. </p>
</div>
<hr size="1"><address style="text-align: right;"><small>
-XMP-Toolkit-SDK-CC201306 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
+XMP-Toolkit-SDK-CC201411-17 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
</body>
</html>
diff --git a/docs/API/TXMPUtils_8hpp_source.html b/docs/API/TXMPUtils_8hpp_source.html
index 5027000..3c92959 100644
--- a/docs/API/TXMPUtils_8hpp_source.html
+++ b/docs/API/TXMPUtils_8hpp_source.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: TXMPUtils.hpp Source File</title>
+<title>XMP-Toolkit-SDK-CC201411-17: TXMPUtils.hpp Source File</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -351,6 +351,6 @@ window.onload = initDynSections;
<a name="l00967"></a>00967 <span class="preprocessor">#endif // __TXMPUtils_hpp__</span>
</pre></div></div>
<hr size="1"><address style="text-align: right;"><small>
-XMP-Toolkit-SDK-CC201306 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
+XMP-Toolkit-SDK-CC201411-17 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
</body>
</html>
diff --git a/docs/API/TXMPUtils_8incl__cpp.html b/docs/API/TXMPUtils_8incl__cpp.html
index ee69068..d8d1ed3 100644
--- a/docs/API/TXMPUtils_8incl__cpp.html
+++ b/docs/API/TXMPUtils_8incl__cpp.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: TXMPUtils.incl_cpp File Reference</title>
+<title>XMP-Toolkit-SDK-CC201411-17: TXMPUtils.incl_cpp File Reference</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -80,6 +80,6 @@ Include dependency graph for TXMPUtils.incl_cpp:</div>
<p>The implementation of the <a class="el" href="classTXMPUtils.html" title="API for access to the XMP Toolkit utility services.">TXMPUtils</a> template class. </p>
</div>
<hr size="1"><address style="text-align: right;"><small>
-XMP-Toolkit-SDK-CC201306 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
+XMP-Toolkit-SDK-CC201411-17 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
</body>
</html>
diff --git a/docs/API/XMP_8incl__cpp.html b/docs/API/XMP_8incl__cpp.html
index 68cbcb9..8d571ae 100644
--- a/docs/API/XMP_8incl__cpp.html
+++ b/docs/API/XMP_8incl__cpp.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: XMP.incl_cpp File Reference</title>
+<title>XMP-Toolkit-SDK-CC201411-17: XMP.incl_cpp File Reference</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -90,6 +90,6 @@ This graph shows which files directly or indirectly include this file:</div>
<span class="preprocessor"> #include &quot;<a class="code" href="XMP_8incl__cpp.html" title="Overall client glue file for the XMP toolkit.">XMP.incl_cpp</a>&quot;</span>
</pre></div> </div>
<hr size="1"><address style="text-align: right;"><small>
-XMP-Toolkit-SDK-CC201306 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
+XMP-Toolkit-SDK-CC201411-17 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
</body>
</html>
diff --git a/docs/API/XMP__Const_8h.html b/docs/API/XMP__Const_8h.html
index 0f47b57..7dd7158 100644
--- a/docs/API/XMP__Const_8h.html
+++ b/docs/API/XMP__Const_8h.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: XMP_Const.h File Reference</title>
+<title>XMP-Toolkit-SDK-CC201411-17: XMP_Const.h File Reference</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -348,7 +348,9 @@ typedef XMP_Bool(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="
<br/>
&nbsp;&nbsp;<a class="el" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea79230f1d70d2625f7650db6ff5b1ea29">kXMP_OmitAllFormatting</a> = 0x0800UL,
<br/>
-&nbsp;&nbsp;<a class="el" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea9fb498d749d939e2ba9adf555a75b856">kXMP_OmitXMPMetaElement</a> = 0x1000UL
+&nbsp;&nbsp;<a class="el" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea9fb498d749d939e2ba9adf555a75b856">kXMP_OmitXMPMetaElement</a> = 0x1000UL,
+<br/>
+&nbsp;&nbsp;<a class="el" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea23054ea4ab89dfd802f14cb389e18745">kXMP_IncludeRDFHash</a> = 0x2000UL
, <br/>
&nbsp;&nbsp;<a class="el" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eaeb79571cac99ee97feefb0347b1c1845">kXMP_EncodingMask</a> = 0x0007UL,
<br/>
@@ -600,7 +602,9 @@ typedef XMP_Bool(*&nbsp;</td><td class="memItemRight" valign="bottom"><a class="
<br/>
&nbsp;&nbsp;<a class="el" href="XMP__Const_8h.html#a80155586fa275b28773c9b203f52cabaa77f34b1873bb2584feabe26a2c8f1182">kXMPFiles_OpenLimitedScanning</a> = 0x00000080,
<br/>
-&nbsp;&nbsp;<a class="el" href="XMP__Const_8h.html#a80155586fa275b28773c9b203f52cabaa05acd568597f72b4812b432ea6cf606a">kXMPFiles_OpenRepairFile</a> = 0x00000100
+&nbsp;&nbsp;<a class="el" href="XMP__Const_8h.html#a80155586fa275b28773c9b203f52cabaa05acd568597f72b4812b432ea6cf606a">kXMPFiles_OpenRepairFile</a> = 0x00000100,
+<br/>
+&nbsp;&nbsp;<a class="el" href="XMP__Const_8h.html#a80155586fa275b28773c9b203f52cabaaf5f2ebd401758a14dc52c5ee403303b5">kXMPFiles_OptimizeFileLayout</a> = 0x00000200
<br/>
}</td></tr>
<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><p>Option bit flags for <code><a class="el" href="classTXMPFiles.html#afcd21cfe5d6f13c648c5541e161919cb" title="OpenFile() opens a file for metadata access.">TXMPFiles::OpenFile()</a></code>. </p>
@@ -2101,6 +2105,9 @@ typedef XMP_Bool(*&nbsp;</td><td class="memItemRight" valign="bottom"><b>XMPFile
<tr><td valign="top"><em><a class="anchor" id="a80155586fa275b28773c9b203f52cabaa05acd568597f72b4812b432ea6cf606a"></a><!-- doxytag: member="kXMPFiles_OpenRepairFile" ref="a80155586fa275b28773c9b203f52cabaa05acd568597f72b4812b432ea6cf606a" args="" -->kXMPFiles_OpenRepairFile</em>&nbsp;</td><td>
<p>Attempt to repair a file opened for update, default is to not open (throw an exception). </p>
</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="a80155586fa275b28773c9b203f52cabaaf5f2ebd401758a14dc52c5ee403303b5"></a><!-- doxytag: member="kXMPFiles_OptimizeFileLayout" ref="a80155586fa275b28773c9b203f52cabaaf5f2ebd401758a14dc52c5ee403303b5" args="" -->kXMPFiles_OptimizeFileLayout</em>&nbsp;</td><td>
+<p>When updating a file, spend the effort necessary to optimize file layout. </p>
+</td></tr>
</table>
</dd>
</dl>
@@ -2503,6 +2510,9 @@ typedef XMP_Bool(*&nbsp;</td><td class="memItemRight" valign="bottom"><b>XMPFile
<tr><td valign="top"><em><a class="anchor" id="a61dadd085c1777f559549e05962b2c9ea9fb498d749d939e2ba9adf555a75b856"></a><!-- doxytag: member="kXMP_OmitXMPMetaElement" ref="a61dadd085c1777f559549e05962b2c9ea9fb498d749d939e2ba9adf555a75b856" args="" -->kXMP_OmitXMPMetaElement</em>&nbsp;</td><td>
<p>Omit the x:xmpmeta element surrounding the rdf:RDF element. </p>
</td></tr>
+<tr><td valign="top"><em><a class="anchor" id="a61dadd085c1777f559549e05962b2c9ea23054ea4ab89dfd802f14cb389e18745"></a><!-- doxytag: member="kXMP_IncludeRDFHash" ref="a61dadd085c1777f559549e05962b2c9ea23054ea4ab89dfd802f14cb389e18745" args="" -->kXMP_IncludeRDFHash</em>&nbsp;</td><td>
+<p>Include a rdf Hash and Merged flag in x:xmpmeta element. </p>
+</td></tr>
<tr><td valign="top"><em><a class="anchor" id="a61dadd085c1777f559549e05962b2c9eaeb79571cac99ee97feefb0347b1c1845"></a><!-- doxytag: member="kXMP_EncodingMask" ref="a61dadd085c1777f559549e05962b2c9eaeb79571cac99ee97feefb0347b1c1845" args="" -->kXMP_EncodingMask</em>&nbsp;</td><td>
<p>Bit-flag mask for encoding-type bits. </p>
</td></tr>
@@ -2658,6 +2668,6 @@ typedef XMP_Bool(*&nbsp;</td><td class="memItemRight" valign="bottom"><b>XMPFile
</div>
</div>
<hr size="1"><address style="text-align: right;"><small>
-XMP-Toolkit-SDK-CC201306 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
+XMP-Toolkit-SDK-CC201411-17 documentation generated by&nbsp;<a href="http://www.doxygen.org/index.html">doxygen</a> 1.6.3</small></address>
</body>
</html>
diff --git a/docs/API/XMP__Const_8h_source.html b/docs/API/XMP__Const_8h_source.html
index 9e13de8..b0ce7ef 100644
--- a/docs/API/XMP__Const_8h_source.html
+++ b/docs/API/XMP__Const_8h_source.html
@@ -1,6 +1,6 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
-<title>XMP-Toolkit-SDK-CC201306: XMP_Const.h Source File</title>
+<title>XMP-Toolkit-SDK-CC201411-17: XMP_Const.h Source File</title>
<link href="xmp.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
@@ -164,758 +164,781 @@ window.onload = initDynSections;
<a name="l00103"></a>00103 <span class="preprocessor">#define ConvertXMP_BoolToBool(a) (a) != kXMP_Bool_False</span>
<a name="l00104"></a>00104 <span class="preprocessor"></span><span class="preprocessor">#define ConvertBoolToXMP_Bool(a) (a) ? !kXMP_Bool_False : kXMP_Bool_False</span>
<a name="l00105"></a>00105 <span class="preprocessor"></span>
-<a name="l00108"></a><a class="code" href="XMP__Const_8h.html#a549d5e2cbcb58302d3df840a0205283e">00108</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>__XMPMeta__ * <a class="code" href="XMP__Const_8h.html#a549d5e2cbcb58302d3df840a0205283e">XMPMetaRef</a>;
-<a name="l00109"></a>00109
-<a name="l00112"></a><a class="code" href="XMP__Const_8h.html#a6ade57a30fb1e40d6aa9695c440fc3d2">00112</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>__XMPIterator__ * <a class="code" href="XMP__Const_8h.html#a6ade57a30fb1e40d6aa9695c440fc3d2">XMPIteratorRef</a>;
-<a name="l00113"></a>00113
-<a name="l00116"></a><a class="code" href="XMP__Const_8h.html#ab516453dd7d906e911f8951983cde5f1">00116</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>__XMPDocOps__ * <a class="code" href="XMP__Const_8h.html#ab516453dd7d906e911f8951983cde5f1">XMPDocOpsRef</a>;
-<a name="l00117"></a>00117
-<a name="l00120"></a><a class="code" href="XMP__Const_8h.html#aa4bca98ad67d7a62c60cb13dbbab0f25">00120</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>__XMPFiles__ * <a class="code" href="XMP__Const_8h.html#aa4bca98ad67d7a62c60cb13dbbab0f25">XMPFilesRef</a>;
-<a name="l00121"></a>00121
-<a name="l00122"></a>00122 <span class="comment">// =================================================================================================</span>
+<a name="l00106"></a>00106 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Uns8 Min_XMP_Uns8 = ( (XMP_Uns8) 0x00 );
+<a name="l00107"></a>00107 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Uns8 Max_XMP_Uns8 = ( (XMP_Uns8) 0xFF );
+<a name="l00108"></a>00108 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Uns16 Min_XMP_Uns16 = ( (XMP_Uns16) 0x00 );
+<a name="l00109"></a>00109 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Uns16 Max_XMP_Uns16 = ( (XMP_Uns16) 0xFFFF );
+<a name="l00110"></a>00110 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Uns32 Min_XMP_Uns32 = ( (XMP_Uns32) 0x00 );
+<a name="l00111"></a>00111 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Uns32 Max_XMP_Uns32 = ( (XMP_Uns32) 0xFFFFFFFF );
+<a name="l00112"></a>00112 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Uns64 Min_XMP_Uns64 = ( (XMP_Uns64) 0x00 );
+<a name="l00113"></a>00113 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Uns64 Max_XMP_Uns64 = ( (XMP_Uns64) 0xFFFFFFFFFFFFFFFFLL );
+<a name="l00114"></a>00114
+<a name="l00115"></a>00115 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Int8 Min_XMP_Int8 = ( (XMP_Int8) 0x80 );
+<a name="l00116"></a>00116 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Int8 Max_XMP_Int8 = ( (XMP_Int8) 0x7F );
+<a name="l00117"></a>00117 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Int16 Min_XMP_Int16 = ( (XMP_Int16) 0x8000 );
+<a name="l00118"></a>00118 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Int16 Max_XMP_Int16 = ( (XMP_Int16) 0x7FFF );
+<a name="l00119"></a>00119 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Int32 Min_XMP_Int32 = ( (XMP_Int32) 0x80000000 );
+<a name="l00120"></a>00120 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Int32 Max_XMP_Int32 = ( (XMP_Int32) 0x7FFFFFFF );
+<a name="l00121"></a>00121 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Int64 Min_XMP_Int64 = ( (XMP_Int64) 0x8000000000000000LL );
+<a name="l00122"></a>00122 <span class="keyword">static</span> <span class="keyword">const</span> XMP_Int64 Max_XMP_Int64 = ( (XMP_Int64) 0x7FFFFFFFFFFFFFFFLL );
<a name="l00123"></a>00123
-<a name="l00126"></a>00126
-<a name="l00130"></a>00130
-<a name="l00134"></a>00134
-<a name="l00138"></a>00138
+<a name="l00124"></a>00124
+<a name="l00127"></a><a class="code" href="XMP__Const_8h.html#a549d5e2cbcb58302d3df840a0205283e">00127</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>__XMPMeta__ * <a class="code" href="XMP__Const_8h.html#a549d5e2cbcb58302d3df840a0205283e">XMPMetaRef</a>;
+<a name="l00128"></a>00128
+<a name="l00131"></a><a class="code" href="XMP__Const_8h.html#a6ade57a30fb1e40d6aa9695c440fc3d2">00131</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>__XMPIterator__ * <a class="code" href="XMP__Const_8h.html#a6ade57a30fb1e40d6aa9695c440fc3d2">XMPIteratorRef</a>;
+<a name="l00132"></a>00132
+<a name="l00135"></a><a class="code" href="XMP__Const_8h.html#ab516453dd7d906e911f8951983cde5f1">00135</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>__XMPDocOps__ * <a class="code" href="XMP__Const_8h.html#ab516453dd7d906e911f8951983cde5f1">XMPDocOpsRef</a>;
+<a name="l00136"></a>00136
+<a name="l00139"></a><a class="code" href="XMP__Const_8h.html#aa4bca98ad67d7a62c60cb13dbbab0f25">00139</a> <span class="keyword">typedef</span> <span class="keyword">struct </span>__XMPFiles__ * <a class="code" href="XMP__Const_8h.html#aa4bca98ad67d7a62c60cb13dbbab0f25">XMPFilesRef</a>;
+<a name="l00140"></a>00140
+<a name="l00141"></a>00141 <span class="comment">// =================================================================================================</span>
+<a name="l00142"></a>00142
<a name="l00145"></a>00145
-<a name="l00146"></a><a class="code" href="XMP__Const_8h.html#ad439e3ceeb4590d310f6125aa12c6df6">00146</a> <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="XMP__Const_8h.html#ad439e3ceeb4590d310f6125aa12c6df6" title="The type for input string parameters. A const char *, a null-terminated UTF-8 string...">XMP_StringPtr</a>; <span class="comment">// Points to a null terminated UTF-8 string.</span>
-<a name="l00147"></a><a class="code" href="XMP__Const_8h.html#a9f7dcc184f901c713274edfdac5bcc9a">00147</a> <span class="keyword">typedef</span> XMP_Uns32 <a class="code" href="XMP__Const_8h.html#a9f7dcc184f901c713274edfdac5bcc9a" title="The type for string length parameters. A 32-bit unsigned integer, as big as will...">XMP_StringLen</a>;
-<a name="l00148"></a><a class="code" href="XMP__Const_8h.html#a00e9d9a76c144421105a4c2742203315">00148</a> <span class="keyword">typedef</span> XMP_Int32 <a class="code" href="XMP__Const_8h.html#a00e9d9a76c144421105a4c2742203315" title="The type for offsets and indices. A 32-bit signed integer. It is signed to allow...">XMP_Index</a>; <span class="comment">// Signed, sometimes -1 is handy.</span>
-<a name="l00149"></a><a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8">00149</a> <span class="keyword">typedef</span> XMP_Uns32 <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a>; <span class="comment">// Used as 32 individual bits.</span>
-<a name="l00150"></a>00150
-<a name="l00155"></a>00155
-<a name="l00160"></a>00160
-<a name="l00161"></a><a class="code" href="XMP__Const_8h.html#a4c39e0131b0e3d7db66e1cfa82b67141">00161</a> <span class="preprocessor">#define kXMP_TrueStr &quot;True&quot; // Serialized XMP spellings, not for the type bool.</span>
-<a name="l00162"></a><a class="code" href="XMP__Const_8h.html#a2dc55b533ed63ed7ff0c3be16a97e278">00162</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_FalseStr &quot;False&quot;</span>
-<a name="l00163"></a>00163 <span class="preprocessor"></span>
-<a name="l00166"></a>00166 <span class="keyword">enum</span> {
-<a name="l00168"></a><a class="code" href="XMP__Const_8h.html#a06fc87d81c62e9abb8790b6e5713c55bacf4bfe01497bd0d88c2af337e4bac39e">00168</a> <a class="code" href="XMP__Const_8h.html#a06fc87d81c62e9abb8790b6e5713c55bacf4bfe01497bd0d88c2af337e4bac39e" title="The part or parts have definitely changed.">kXMPTS_Yes</a> = 1,
-<a name="l00170"></a><a class="code" href="XMP__Const_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba2a88f4d4589bf413377283843f70bc90">00170</a> <a class="code" href="XMP__Const_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba2a88f4d4589bf413377283843f70bc90" title="The part or parts have definitely not changed.">kXMPTS_No</a> = 0,
-<a name="l00172"></a><a class="code" href="XMP__Const_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba7a73219cd125bb21e294ba474112a584">00172</a> <a class="code" href="XMP__Const_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba7a73219cd125bb21e294ba474112a584" title="The part or parts might, or might not, have changed.">kXMPTS_Maybe</a> = -1
-<a name="l00173"></a>00173 };
-<a name="l00174"></a>00174 <span class="keyword">typedef</span> XMP_Int8 XMP_TriState;
-<a name="l00175"></a>00175
-<a name="l00177"></a>00177
-<a name="l00178"></a>00178 <span class="comment">// =================================================================================================</span>
+<a name="l00149"></a>00149
+<a name="l00153"></a>00153
+<a name="l00157"></a>00157
+<a name="l00164"></a>00164
+<a name="l00165"></a><a class="code" href="XMP__Const_8h.html#ad439e3ceeb4590d310f6125aa12c6df6">00165</a> <span class="keyword">typedef</span> <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="XMP__Const_8h.html#ad439e3ceeb4590d310f6125aa12c6df6" title="The type for input string parameters. A const char *, a null-terminated UTF-8 string...">XMP_StringPtr</a>; <span class="comment">// Points to a null terminated UTF-8 string.</span>
+<a name="l00166"></a><a class="code" href="XMP__Const_8h.html#a9f7dcc184f901c713274edfdac5bcc9a">00166</a> <span class="keyword">typedef</span> XMP_Uns32 <a class="code" href="XMP__Const_8h.html#a9f7dcc184f901c713274edfdac5bcc9a" title="The type for string length parameters. A 32-bit unsigned integer, as big as will...">XMP_StringLen</a>;
+<a name="l00167"></a><a class="code" href="XMP__Const_8h.html#a00e9d9a76c144421105a4c2742203315">00167</a> <span class="keyword">typedef</span> XMP_Int32 <a class="code" href="XMP__Const_8h.html#a00e9d9a76c144421105a4c2742203315" title="The type for offsets and indices. A 32-bit signed integer. It is signed to allow...">XMP_Index</a>; <span class="comment">// Signed, sometimes -1 is handy.</span>
+<a name="l00168"></a><a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8">00168</a> <span class="keyword">typedef</span> XMP_Uns32 <a class="code" href="XMP__Const_8h.html#aeb865118433be92d88e5f49ed11487c8" title="The type for a collection of 32 flag bits. Individual flags are defined as enum value...">XMP_OptionBits</a>; <span class="comment">// Used as 32 individual bits.</span>
+<a name="l00169"></a>00169
+<a name="l00174"></a>00174
<a name="l00179"></a>00179
-<a name="l00199"></a>00199
-<a name="l00200"></a><a class="code" href="structXMP__DateTime.html">00200</a> <span class="keyword">struct </span><a class="code" href="structXMP__DateTime.html" title="The expanded type for a date and time.">XMP_DateTime</a> {
-<a name="l00201"></a>00201
-<a name="l00203"></a><a class="code" href="structXMP__DateTime.html#a2db713deacfd5a5cb2deea660ca2ccad">00203</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#a2db713deacfd5a5cb2deea660ca2ccad" title="The year, can be negative.">year</a>;
-<a name="l00204"></a>00204
-<a name="l00206"></a><a class="code" href="structXMP__DateTime.html#ab4b71c1a54879d7da1b4135e23d5446f">00206</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#ab4b71c1a54879d7da1b4135e23d5446f" title="The month in the range 1..12.">month</a>;
-<a name="l00207"></a>00207
-<a name="l00209"></a><a class="code" href="structXMP__DateTime.html#a58496718277eea9dc5e3e19d80a69094">00209</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#a58496718277eea9dc5e3e19d80a69094" title="The day of the month in the range 1..31.">day</a>;
-<a name="l00210"></a>00210
-<a name="l00212"></a><a class="code" href="structXMP__DateTime.html#abc79cdca8cfa5df6583279e3f3e70e9f">00212</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#abc79cdca8cfa5df6583279e3f3e70e9f" title="The hour in the range 0..23.">hour</a>;
-<a name="l00213"></a>00213
-<a name="l00215"></a><a class="code" href="structXMP__DateTime.html#ae84965f3296a9c106d1f6c88aa6a7bdf">00215</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#ae84965f3296a9c106d1f6c88aa6a7bdf" title="The minute in the range 0..59.">minute</a>;
-<a name="l00216"></a>00216
-<a name="l00218"></a><a class="code" href="structXMP__DateTime.html#a675313c70a7e05b7ca50d21300b7d81b">00218</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#a675313c70a7e05b7ca50d21300b7d81b" title="The second in the range 0..59.">second</a>;
-<a name="l00219"></a>00219
-<a name="l00221"></a><a class="code" href="structXMP__DateTime.html#a62e0f39edef2a82749feed46b16572e8">00221</a> XMP_Bool <a class="code" href="structXMP__DateTime.html#a62e0f39edef2a82749feed46b16572e8" title="Is the date portion meaningful?">hasDate</a>;
-<a name="l00222"></a>00222
-<a name="l00224"></a><a class="code" href="structXMP__DateTime.html#a2c7f3d493a78f6b3fc7978992308d268">00224</a> XMP_Bool <a class="code" href="structXMP__DateTime.html#a2c7f3d493a78f6b3fc7978992308d268" title="Is the time portion meaningful?">hasTime</a>;
-<a name="l00225"></a>00225
-<a name="l00227"></a><a class="code" href="structXMP__DateTime.html#a1dd34cdab96f55c120b3289db32bdd1e">00227</a> XMP_Bool <a class="code" href="structXMP__DateTime.html#a1dd34cdab96f55c120b3289db32bdd1e" title="Is the time zone meaningful?">hasTimeZone</a>;
-<a name="l00228"></a>00228
-<a name="l00231"></a><a class="code" href="structXMP__DateTime.html#a2b26282b9f1ab9920a8f05008c776ddb">00231</a> XMP_Int8 <a class="code" href="structXMP__DateTime.html#a2b26282b9f1ab9920a8f05008c776ddb">tzSign</a>;
+<a name="l00180"></a><a class="code" href="XMP__Const_8h.html#a4c39e0131b0e3d7db66e1cfa82b67141">00180</a> <span class="preprocessor">#define kXMP_TrueStr &quot;True&quot; // Serialized XMP spellings, not for the type bool.</span>
+<a name="l00181"></a><a class="code" href="XMP__Const_8h.html#a2dc55b533ed63ed7ff0c3be16a97e278">00181</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_FalseStr &quot;False&quot;</span>
+<a name="l00182"></a>00182 <span class="preprocessor"></span>
+<a name="l00185"></a>00185 <span class="keyword">enum</span> {
+<a name="l00187"></a><a class="code" href="XMP__Const_8h.html#a06fc87d81c62e9abb8790b6e5713c55bacf4bfe01497bd0d88c2af337e4bac39e">00187</a> <a class="code" href="XMP__Const_8h.html#a06fc87d81c62e9abb8790b6e5713c55bacf4bfe01497bd0d88c2af337e4bac39e" title="The part or parts have definitely changed.">kXMPTS_Yes</a> = 1,
+<a name="l00189"></a><a class="code" href="XMP__Const_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba2a88f4d4589bf413377283843f70bc90">00189</a> <a class="code" href="XMP__Const_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba2a88f4d4589bf413377283843f70bc90" title="The part or parts have definitely not changed.">kXMPTS_No</a> = 0,
+<a name="l00191"></a><a class="code" href="XMP__Const_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba7a73219cd125bb21e294ba474112a584">00191</a> <a class="code" href="XMP__Const_8h.html#a06fc87d81c62e9abb8790b6e5713c55ba7a73219cd125bb21e294ba474112a584" title="The part or parts might, or might not, have changed.">kXMPTS_Maybe</a> = -1
+<a name="l00192"></a>00192 };
+<a name="l00193"></a>00193 <span class="keyword">typedef</span> XMP_Int8 XMP_TriState;
+<a name="l00194"></a>00194
+<a name="l00196"></a>00196
+<a name="l00197"></a>00197 <span class="comment">// =================================================================================================</span>
+<a name="l00198"></a>00198
+<a name="l00218"></a>00218
+<a name="l00219"></a><a class="code" href="structXMP__DateTime.html">00219</a> <span class="keyword">struct </span><a class="code" href="structXMP__DateTime.html" title="The expanded type for a date and time.">XMP_DateTime</a> {
+<a name="l00220"></a>00220
+<a name="l00222"></a><a class="code" href="structXMP__DateTime.html#a2db713deacfd5a5cb2deea660ca2ccad">00222</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#a2db713deacfd5a5cb2deea660ca2ccad" title="The year, can be negative.">year</a>;
+<a name="l00223"></a>00223
+<a name="l00225"></a><a class="code" href="structXMP__DateTime.html#ab4b71c1a54879d7da1b4135e23d5446f">00225</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#ab4b71c1a54879d7da1b4135e23d5446f" title="The month in the range 1..12.">month</a>;
+<a name="l00226"></a>00226
+<a name="l00228"></a><a class="code" href="structXMP__DateTime.html#a58496718277eea9dc5e3e19d80a69094">00228</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#a58496718277eea9dc5e3e19d80a69094" title="The day of the month in the range 1..31.">day</a>;
+<a name="l00229"></a>00229
+<a name="l00231"></a><a class="code" href="structXMP__DateTime.html#abc79cdca8cfa5df6583279e3f3e70e9f">00231</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#abc79cdca8cfa5df6583279e3f3e70e9f" title="The hour in the range 0..23.">hour</a>;
<a name="l00232"></a>00232
-<a name="l00234"></a><a class="code" href="structXMP__DateTime.html#a6045133feeef41ac1f78c4664ab13db4">00234</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#a6045133feeef41ac1f78c4664ab13db4" title="The time zone hour in the range 0..23.">tzHour</a>;
+<a name="l00234"></a><a class="code" href="structXMP__DateTime.html#ae84965f3296a9c106d1f6c88aa6a7bdf">00234</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#ae84965f3296a9c106d1f6c88aa6a7bdf" title="The minute in the range 0..59.">minute</a>;
<a name="l00235"></a>00235
-<a name="l00237"></a><a class="code" href="structXMP__DateTime.html#a45baa70f30a3dc9f88819886cfb91aa1">00237</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#a45baa70f30a3dc9f88819886cfb91aa1" title="The time zone minute in the range 0..59.">tzMinute</a>;
+<a name="l00237"></a><a class="code" href="structXMP__DateTime.html#a675313c70a7e05b7ca50d21300b7d81b">00237</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#a675313c70a7e05b7ca50d21300b7d81b" title="The second in the range 0..59.">second</a>;
<a name="l00238"></a>00238
-<a name="l00240"></a><a class="code" href="structXMP__DateTime.html#a190c2a19f01e90997ec2973aec37712c">00240</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#a190c2a19f01e90997ec2973aec37712c" title="Nanoseconds within a second, often left as zero.">nanoSecond</a>;
+<a name="l00240"></a><a class="code" href="structXMP__DateTime.html#a62e0f39edef2a82749feed46b16572e8">00240</a> XMP_Bool <a class="code" href="structXMP__DateTime.html#a62e0f39edef2a82749feed46b16572e8" title="Is the date portion meaningful?">hasDate</a>;
<a name="l00241"></a>00241
-<a name="l00242"></a>00242 <span class="preprocessor"> #if __cplusplus</span>
-<a name="l00243"></a>00243 <span class="preprocessor"></span> <a class="code" href="structXMP__DateTime.html" title="The expanded type for a date and time.">XMP_DateTime</a>() : <a class="code" href="structXMP__DateTime.html#a2db713deacfd5a5cb2deea660ca2ccad" title="The year, can be negative.">year</a>(0), <a class="code" href="structXMP__DateTime.html#ab4b71c1a54879d7da1b4135e23d5446f" title="The month in the range 1..12.">month</a>(0), <a class="code" href="structXMP__DateTime.html#a58496718277eea9dc5e3e19d80a69094" title="The day of the month in the range 1..31.">day</a>(0), <a class="code" href="structXMP__DateTime.html#abc79cdca8cfa5df6583279e3f3e70e9f" title="The hour in the range 0..23.">hour</a>(0), <a class="code" href="structXMP__DateTime.html#ae84965f3296a9c106d1f6c88aa6a7bdf" title="The minute in the range 0..59.">minute</a>(0), <a class="code" href="structXMP__DateTime.html#a675313c70a7e05b7ca50d21300b7d81b" title="The second in the range 0..59.">second</a>(0), <a class="code" href="structXMP__DateTime.html#a190c2a19f01e90997ec2973aec37712c" title="Nanoseconds within a second, often left as zero.">nanoSecond</a>(0),
-<a name="l00244"></a>00244 <a class="code" href="structXMP__DateTime.html#a2b26282b9f1ab9920a8f05008c776ddb">tzSign</a>(0), <a class="code" href="structXMP__DateTime.html#a6045133feeef41ac1f78c4664ab13db4" title="The time zone hour in the range 0..23.">tzHour</a>(0), <a class="code" href="structXMP__DateTime.html#a45baa70f30a3dc9f88819886cfb91aa1" title="The time zone minute in the range 0..59.">tzMinute</a>(0), <a class="code" href="structXMP__DateTime.html#a62e0f39edef2a82749feed46b16572e8" title="Is the date portion meaningful?">hasDate</a>(false), <a class="code" href="structXMP__DateTime.html#a2c7f3d493a78f6b3fc7978992308d268" title="Is the time portion meaningful?">hasTime</a>(false), <a class="code" href="structXMP__DateTime.html#a1dd34cdab96f55c120b3289db32bdd1e" title="Is the time zone meaningful?">hasTimeZone</a>(false) {};
-<a name="l00245"></a>00245 <span class="preprocessor"> #endif</span>
-<a name="l00246"></a>00246 <span class="preprocessor"></span>
-<a name="l00247"></a>00247 };
-<a name="l00248"></a>00248
-<a name="l00250"></a>00250 <span class="keyword">enum</span> {
-<a name="l00252"></a><a class="code" href="XMP__Const_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a511551ce156d5fd96c26ad464b837801">00252</a> <a class="code" href="XMP__Const_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a511551ce156d5fd96c26ad464b837801" title="Time zone is west of UTC.">kXMP_TimeWestOfUTC</a> = -1,
-<a name="l00254"></a><a class="code" href="XMP__Const_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a3f41be55491204982acb39c9f6c7ad13">00254</a> <a class="code" href="XMP__Const_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a3f41be55491204982acb39c9f6c7ad13" title="UTC time.">kXMP_TimeIsUTC</a> = 0,
-<a name="l00256"></a><a class="code" href="XMP__Const_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a68851b70cc1d2346fa21bc0b0ae6cfec">00256</a> <a class="code" href="XMP__Const_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a68851b70cc1d2346fa21bc0b0ae6cfec" title="Time zone is east of UTC.">kXMP_TimeEastOfUTC</a> = +1
-<a name="l00257"></a>00257 };
-<a name="l00258"></a>00258
-<a name="l00259"></a>00259 <span class="preprocessor">#define XMPDateTime_IsDateOnly(dt) ((dt).hasDate &amp; (! (dt).hasTime))</span>
-<a name="l00260"></a>00260 <span class="preprocessor"></span><span class="preprocessor">#define XMPDateTime_IsTimeOnly(dt) ((dt).hasTime &amp; (! (dt).hasDate))</span>
-<a name="l00261"></a>00261 <span class="preprocessor"></span>
-<a name="l00262"></a>00262 <span class="preprocessor">#define XMPDateTime_ClearTimeZone(dt) { (dt).hasTimeZone = (dt).tzSign = (dt).tzHour = (dt).tzMinute = 0; }</span>
-<a name="l00263"></a>00263 <span class="preprocessor"></span>
-<a name="l00264"></a>00264 <span class="comment">// =================================================================================================</span>
-<a name="l00265"></a>00265 <span class="comment">// Standard namespace URI constants</span>
-<a name="l00266"></a>00266 <span class="comment">// ================================</span>
+<a name="l00243"></a><a class="code" href="structXMP__DateTime.html#a2c7f3d493a78f6b3fc7978992308d268">00243</a> XMP_Bool <a class="code" href="structXMP__DateTime.html#a2c7f3d493a78f6b3fc7978992308d268" title="Is the time portion meaningful?">hasTime</a>;
+<a name="l00244"></a>00244
+<a name="l00246"></a><a class="code" href="structXMP__DateTime.html#a1dd34cdab96f55c120b3289db32bdd1e">00246</a> XMP_Bool <a class="code" href="structXMP__DateTime.html#a1dd34cdab96f55c120b3289db32bdd1e" title="Is the time zone meaningful?">hasTimeZone</a>;
+<a name="l00247"></a>00247
+<a name="l00250"></a><a class="code" href="structXMP__DateTime.html#a2b26282b9f1ab9920a8f05008c776ddb">00250</a> XMP_Int8 <a class="code" href="structXMP__DateTime.html#a2b26282b9f1ab9920a8f05008c776ddb">tzSign</a>;
+<a name="l00251"></a>00251
+<a name="l00253"></a><a class="code" href="structXMP__DateTime.html#a6045133feeef41ac1f78c4664ab13db4">00253</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#a6045133feeef41ac1f78c4664ab13db4" title="The time zone hour in the range 0..23.">tzHour</a>;
+<a name="l00254"></a>00254
+<a name="l00256"></a><a class="code" href="structXMP__DateTime.html#a45baa70f30a3dc9f88819886cfb91aa1">00256</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#a45baa70f30a3dc9f88819886cfb91aa1" title="The time zone minute in the range 0..59.">tzMinute</a>;
+<a name="l00257"></a>00257
+<a name="l00259"></a><a class="code" href="structXMP__DateTime.html#a190c2a19f01e90997ec2973aec37712c">00259</a> XMP_Int32 <a class="code" href="structXMP__DateTime.html#a190c2a19f01e90997ec2973aec37712c" title="Nanoseconds within a second, often left as zero.">nanoSecond</a>;
+<a name="l00260"></a>00260
+<a name="l00261"></a>00261 <span class="preprocessor"> #if __cplusplus</span>
+<a name="l00262"></a>00262 <span class="preprocessor"></span> <a class="code" href="structXMP__DateTime.html" title="The expanded type for a date and time.">XMP_DateTime</a>() : <a class="code" href="structXMP__DateTime.html#a2db713deacfd5a5cb2deea660ca2ccad" title="The year, can be negative.">year</a>(0), <a class="code" href="structXMP__DateTime.html#ab4b71c1a54879d7da1b4135e23d5446f" title="The month in the range 1..12.">month</a>(0), <a class="code" href="structXMP__DateTime.html#a58496718277eea9dc5e3e19d80a69094" title="The day of the month in the range 1..31.">day</a>(0), <a class="code" href="structXMP__DateTime.html#abc79cdca8cfa5df6583279e3f3e70e9f" title="The hour in the range 0..23.">hour</a>(0), <a class="code" href="structXMP__DateTime.html#ae84965f3296a9c106d1f6c88aa6a7bdf" title="The minute in the range 0..59.">minute</a>(0), <a class="code" href="structXMP__DateTime.html#a675313c70a7e05b7ca50d21300b7d81b" title="The second in the range 0..59.">second</a>(0),
+<a name="l00263"></a>00263 <a class="code" href="structXMP__DateTime.html#a62e0f39edef2a82749feed46b16572e8" title="Is the date portion meaningful?">hasDate</a>(false),<a class="code" href="structXMP__DateTime.html#a2c7f3d493a78f6b3fc7978992308d268" title="Is the time portion meaningful?">hasTime</a>(false), <a class="code" href="structXMP__DateTime.html#a1dd34cdab96f55c120b3289db32bdd1e" title="Is the time zone meaningful?">hasTimeZone</a>(false), <a class="code" href="structXMP__DateTime.html#a2b26282b9f1ab9920a8f05008c776ddb">tzSign</a>(0), <a class="code" href="structXMP__DateTime.html#a6045133feeef41ac1f78c4664ab13db4" title="The time zone hour in the range 0..23.">tzHour</a>(0), <a class="code" href="structXMP__DateTime.html#a45baa70f30a3dc9f88819886cfb91aa1" title="The time zone minute in the range 0..59.">tzMinute</a>(0), <a class="code" href="structXMP__DateTime.html#a190c2a19f01e90997ec2973aec37712c" title="Nanoseconds within a second, often left as zero.">nanoSecond</a>(0){};
+<a name="l00264"></a>00264 <span class="preprocessor"> #endif</span>
+<a name="l00265"></a>00265 <span class="preprocessor"></span>
+<a name="l00266"></a>00266 };
<a name="l00267"></a>00267
-<a name="l00302"></a>00302
-<a name="l00303"></a><a class="code" href="XMP__Const_8h.html#a030875c9dc0861c9251a3374ca14a376">00303</a> <span class="preprocessor">#define kXMP_NS_XMP &quot;http://ns.adobe.com/xap/1.0/&quot;</span>
-<a name="l00304"></a>00304 <span class="preprocessor"></span>
-<a name="l00305"></a><a class="code" href="XMP__Const_8h.html#ae52d761e5a4fc8c8499215d2f3d82b90">00305</a> <span class="preprocessor">#define kXMP_NS_XMP_Rights &quot;http://ns.adobe.com/xap/1.0/rights/&quot;</span>
-<a name="l00306"></a><a class="code" href="XMP__Const_8h.html#ac67379a9ffa425d0d7976a51c4f2f754">00306</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_MM &quot;http://ns.adobe.com/xap/1.0/mm/&quot;</span>
-<a name="l00307"></a><a class="code" href="XMP__Const_8h.html#a308e156c325618acb2172e550929ebee">00307</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_BJ &quot;http://ns.adobe.com/xap/1.0/bj/&quot;</span>
-<a name="l00308"></a>00308 <span class="preprocessor"></span>
-<a name="l00309"></a><a class="code" href="XMP__Const_8h.html#a0bcb67d0dd0922504e3da7ca5c40c82a">00309</a> <span class="preprocessor">#define kXMP_NS_PDF &quot;http://ns.adobe.com/pdf/1.3/&quot;</span>
-<a name="l00310"></a><a class="code" href="XMP__Const_8h.html#aa1a6f38ebfcdb281c5bf2809859167c7">00310</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_Photoshop &quot;http://ns.adobe.com/photoshop/1.0/&quot;</span>
-<a name="l00311"></a>00311 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PSAlbum &quot;http://ns.adobe.com/album/1.0/&quot;</span>
-<a name="l00312"></a><a class="code" href="XMP__Const_8h.html#ad12182e1df1652f56b5eec60c1fcdd8f">00312</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_EXIF &quot;http://ns.adobe.com/exif/1.0/&quot;</span>
-<a name="l00313"></a>00313 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_EXIF_Aux &quot;http://ns.adobe.com/exif/1.0/aux/&quot;</span>
-<a name="l00314"></a><a class="code" href="XMP__Const_8h.html#a673355818b7b9224e8fec0fbc60ba00c">00314</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_TIFF &quot;http://ns.adobe.com/tiff/1.0/&quot;</span>
-<a name="l00315"></a>00315 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PNG &quot;http://ns.adobe.com/png/1.0/&quot;</span>
-<a name="l00316"></a>00316 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_SWF &quot;http://ns.adobe.com/swf/1.0/&quot;</span>
-<a name="l00317"></a>00317 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_JPEG &quot;http://ns.adobe.com/jpeg/1.0/&quot;</span>
-<a name="l00318"></a>00318 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_JP2K &quot;http://ns.adobe.com/jp2k/1.0/&quot;</span>
-<a name="l00319"></a>00319 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_CameraRaw &quot;http://ns.adobe.com/camera-raw-settings/1.0/&quot;</span>
-<a name="l00320"></a>00320 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_DM &quot;http://ns.adobe.com/xmp/1.0/DynamicMedia/&quot;</span>
-<a name="l00321"></a>00321 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_Script &quot;http://ns.adobe.com/xmp/1.0/Script/&quot;</span>
-<a name="l00322"></a>00322 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_ASF &quot;http://ns.adobe.com/asf/1.0/&quot;</span>
-<a name="l00323"></a>00323 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_WAV &quot;http://ns.adobe.com/xmp/wav/1.0/&quot;</span>
-<a name="l00324"></a>00324 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_BWF &quot;http://ns.adobe.com/bwf/bext/1.0/&quot;</span>
-<a name="l00325"></a>00325 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_AEScart &quot;http://ns.adobe.com/aes/cart/&quot;</span>
-<a name="l00326"></a>00326 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_RIFFINFO &quot;http://ns.adobe.com/riff/info/&quot;</span>
+<a name="l00269"></a>00269 <span class="keyword">enum</span> {
+<a name="l00271"></a><a class="code" href="XMP__Const_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a511551ce156d5fd96c26ad464b837801">00271</a> <a class="code" href="XMP__Const_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a511551ce156d5fd96c26ad464b837801" title="Time zone is west of UTC.">kXMP_TimeWestOfUTC</a> = -1,
+<a name="l00273"></a><a class="code" href="XMP__Const_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a3f41be55491204982acb39c9f6c7ad13">00273</a> <a class="code" href="XMP__Const_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a3f41be55491204982acb39c9f6c7ad13" title="UTC time.">kXMP_TimeIsUTC</a> = 0,
+<a name="l00275"></a><a class="code" href="XMP__Const_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a68851b70cc1d2346fa21bc0b0ae6cfec">00275</a> <a class="code" href="XMP__Const_8h.html#adf764cbdea00d65edcd07bb9953ad2b7a68851b70cc1d2346fa21bc0b0ae6cfec" title="Time zone is east of UTC.">kXMP_TimeEastOfUTC</a> = +1
+<a name="l00276"></a>00276 };
+<a name="l00277"></a>00277
+<a name="l00278"></a>00278 <span class="preprocessor">#define XMPDateTime_IsDateOnly(dt) ((dt).hasDate &amp; (! (dt).hasTime))</span>
+<a name="l00279"></a>00279 <span class="preprocessor"></span><span class="preprocessor">#define XMPDateTime_IsTimeOnly(dt) ((dt).hasTime &amp; (! (dt).hasDate))</span>
+<a name="l00280"></a>00280 <span class="preprocessor"></span>
+<a name="l00281"></a>00281 <span class="preprocessor">#define XMPDateTime_ClearTimeZone(dt) { (dt).hasTimeZone = (dt).tzSign = (dt).tzHour = (dt).tzMinute = 0; }</span>
+<a name="l00282"></a>00282 <span class="preprocessor"></span>
+<a name="l00283"></a>00283 <span class="comment">// =================================================================================================</span>
+<a name="l00284"></a>00284 <span class="comment">// Standard namespace URI constants</span>
+<a name="l00285"></a>00285 <span class="comment">// ================================</span>
+<a name="l00286"></a>00286
+<a name="l00321"></a>00321
+<a name="l00322"></a><a class="code" href="XMP__Const_8h.html#a030875c9dc0861c9251a3374ca14a376">00322</a> <span class="preprocessor">#define kXMP_NS_XMP &quot;http://ns.adobe.com/xap/1.0/&quot;</span>
+<a name="l00323"></a>00323 <span class="preprocessor"></span>
+<a name="l00324"></a><a class="code" href="XMP__Const_8h.html#ae52d761e5a4fc8c8499215d2f3d82b90">00324</a> <span class="preprocessor">#define kXMP_NS_XMP_Rights &quot;http://ns.adobe.com/xap/1.0/rights/&quot;</span>
+<a name="l00325"></a><a class="code" href="XMP__Const_8h.html#ac67379a9ffa425d0d7976a51c4f2f754">00325</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_MM &quot;http://ns.adobe.com/xap/1.0/mm/&quot;</span>
+<a name="l00326"></a><a class="code" href="XMP__Const_8h.html#a308e156c325618acb2172e550929ebee">00326</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_BJ &quot;http://ns.adobe.com/xap/1.0/bj/&quot;</span>
<a name="l00327"></a>00327 <span class="preprocessor"></span>
-<a name="l00328"></a>00328 <span class="preprocessor">#define kXMP_NS_XMP_Note &quot;http://ns.adobe.com/xmp/note/&quot;</span>
-<a name="l00329"></a>00329 <span class="preprocessor"></span>
-<a name="l00330"></a>00330 <span class="preprocessor">#define kXMP_NS_AdobeStockPhoto &quot;http://ns.adobe.com/StockPhoto/1.0/&quot;</span>
-<a name="l00331"></a>00331 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_CreatorAtom &quot;http://ns.adobe.com/creatorAtom/1.0/&quot;</span>
-<a name="l00332"></a>00332 <span class="preprocessor"></span>
-<a name="l00333"></a>00333 <span class="preprocessor">#define kXMP_NS_ExifEX &quot;http://cipa.jp/exif/1.0/&quot;</span>
-<a name="l00334"></a>00334 <span class="preprocessor"></span>
-<a name="l00360"></a>00360
-<a name="l00361"></a><a class="code" href="XMP__Const_8h.html#ab466db52a4b85cecfa04710682c1e671">00361</a> <span class="preprocessor">#define kXMP_NS_XMP_IdentifierQual &quot;http://ns.adobe.com/xmp/Identifier/qual/1.0/&quot;</span>
-<a name="l00362"></a><a class="code" href="XMP__Const_8h.html#a9618e013619aa92ebc808b62243d2ba8">00362</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_Dimensions &quot;http://ns.adobe.com/xap/1.0/sType/Dimensions#&quot;</span>
-<a name="l00363"></a>00363 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_Text &quot;http://ns.adobe.com/xap/1.0/t/&quot;</span>
-<a name="l00364"></a>00364 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_PagedFile &quot;http://ns.adobe.com/xap/1.0/t/pg/&quot;</span>
-<a name="l00365"></a>00365 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_Graphics &quot;http://ns.adobe.com/xap/1.0/g/&quot;</span>
-<a name="l00366"></a><a class="code" href="XMP__Const_8h.html#a935641acc7d01e782ad7a457a7ff338b">00366</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_Image &quot;http://ns.adobe.com/xap/1.0/g/img/&quot;</span>
-<a name="l00367"></a>00367 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_Font &quot;http://ns.adobe.com/xap/1.0/sType/Font#&quot;</span>
-<a name="l00368"></a><a class="code" href="XMP__Const_8h.html#a861613273127156050b456eee11f6b0a">00368</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_ResourceEvent &quot;http://ns.adobe.com/xap/1.0/sType/ResourceEvent#&quot;</span>
-<a name="l00369"></a><a class="code" href="XMP__Const_8h.html#a9bf51f2653400645f7b5087e8c4e1c77">00369</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_ResourceRef &quot;http://ns.adobe.com/xap/1.0/sType/ResourceRef#&quot;</span>
-<a name="l00370"></a><a class="code" href="XMP__Const_8h.html#ab4923bed71ab29c6aa88debe8816c0a2">00370</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_ST_Version &quot;http://ns.adobe.com/xap/1.0/sType/Version#&quot;</span>
-<a name="l00371"></a><a class="code" href="XMP__Const_8h.html#ac7dc4d65bcbba2862e410cc8cfdff6f6">00371</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_ST_Job &quot;http://ns.adobe.com/xap/1.0/sType/Job#&quot;</span>
-<a name="l00372"></a>00372 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_ManifestItem &quot;http://ns.adobe.com/xap/1.0/sType/ManifestItem#&quot;</span>
-<a name="l00373"></a>00373 <span class="preprocessor"></span>
-<a name="l00374"></a>00374 <span class="comment">// Deprecated XML namespace constants</span>
-<a name="l00375"></a><a class="code" href="XMP__Const_8h.html#a0a2d9c5f7beb27553214a7ad1df4f27e">00375</a> <span class="preprocessor">#define kXMP_NS_XMP_T &quot;http://ns.adobe.com/xap/1.0/t/&quot;</span>
-<a name="l00376"></a><a class="code" href="XMP__Const_8h.html#a39afb495ffb24bb3082493c6811e65d0">00376</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_T_PG &quot;http://ns.adobe.com/xap/1.0/t/pg/&quot;</span>
-<a name="l00377"></a>00377 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_G_IMG &quot;http://ns.adobe.com/xap/1.0/g/img/&quot;</span>
-<a name="l00378"></a>00378 <span class="preprocessor"></span>
-<a name="l00398"></a>00398
-<a name="l00399"></a><a class="code" href="XMP__Const_8h.html#a44453f0d0a1dd295d41722c2387b36fa">00399</a> <span class="preprocessor">#define kXMP_NS_DC &quot;http://purl.org/dc/elements/1.1/&quot;</span>
-<a name="l00400"></a>00400 <span class="preprocessor"></span>
-<a name="l00401"></a><a class="code" href="XMP__Const_8h.html#ab794d3d798daf75a963398347dcbb79b">00401</a> <span class="preprocessor">#define kXMP_NS_IPTCCore &quot;http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/&quot;</span>
-<a name="l00402"></a><a class="code" href="XMP__Const_8h.html#a12ca045d4c12992ec8f6c1003523de20">00402</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_IPTCExt &quot;http://iptc.org/std/Iptc4xmpExt/2008-02-29/&quot;</span>
-<a name="l00403"></a>00403 <span class="preprocessor"></span>
-<a name="l00404"></a>00404 <span class="preprocessor">#define kXMP_NS_DICOM &quot;http://ns.adobe.com/DICOM/&quot;</span>
-<a name="l00405"></a>00405 <span class="preprocessor"></span>
-<a name="l00406"></a>00406 <span class="preprocessor">#define kXMP_NS_PLUS &quot;http://ns.useplus.org/ldf/xmp/1.0/&quot;</span>
-<a name="l00407"></a>00407 <span class="preprocessor"></span>
-<a name="l00408"></a>00408 <span class="preprocessor">#define kXMP_NS_PDFA_Schema &quot;http://www.aiim.org/pdfa/ns/schema#&quot;</span>
-<a name="l00409"></a>00409 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PDFA_Property &quot;http://www.aiim.org/pdfa/ns/property#&quot;</span>
-<a name="l00410"></a>00410 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PDFA_Type &quot;http://www.aiim.org/pdfa/ns/type#&quot;</span>
-<a name="l00411"></a>00411 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PDFA_Field &quot;http://www.aiim.org/pdfa/ns/field#&quot;</span>
-<a name="l00412"></a>00412 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PDFA_ID &quot;http://www.aiim.org/pdfa/ns/id/&quot;</span>
-<a name="l00413"></a>00413 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PDFA_Extension &quot;http://www.aiim.org/pdfa/ns/extension/&quot;</span>
-<a name="l00414"></a>00414 <span class="preprocessor"></span>
-<a name="l00415"></a>00415 <span class="preprocessor">#define kXMP_NS_PDFX &quot;http://ns.adobe.com/pdfx/1.3/&quot;</span>
-<a name="l00416"></a>00416 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PDFX_ID &quot;http://www.npes.org/pdfx/ns/id/&quot;</span>
-<a name="l00417"></a>00417 <span class="preprocessor"></span>
-<a name="l00418"></a><a class="code" href="XMP__Const_8h.html#a276fac0f70893607afa3f09030ad84c7">00418</a> <span class="preprocessor">#define kXMP_NS_RDF &quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;</span>
-<a name="l00419"></a><a class="code" href="XMP__Const_8h.html#a97564c70460d1f235c8a41b8ac40cfe9">00419</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XML &quot;http://www.w3.org/XML/1998/namespace&quot;</span>
-<a name="l00420"></a>00420 <span class="preprocessor"></span>
-<a name="l00421"></a>00421 <span class="comment">// =================================================================================================</span>
-<a name="l00422"></a>00422 <span class="comment">// Enums and macros used for option bits</span>
-<a name="l00423"></a>00423 <span class="comment">// =====================================</span>
-<a name="l00424"></a>00424
-<a name="l00438"></a>00438
-<a name="l00439"></a><a class="code" href="XMP__Const_8h.html#a9549b9a138a896257b5a70176d125317">00439</a> <span class="preprocessor">#define kXMP_ArrayLastItem ((XMP_Index)(-1L))</span>
-<a name="l00440"></a><a class="code" href="XMP__Const_8h.html#a8283c9596c03b6d626d5a2b7a90e23ab">00440</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_UseNullTermination ((XMP_StringLen)(~0UL))</span>
-<a name="l00441"></a><a class="code" href="XMP__Const_8h.html#aff1df9f3cf050f8b8d3a574db3c3326b">00441</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NoOptions ((XMP_OptionBits)0UL)</span>
-<a name="l00442"></a>00442 <span class="preprocessor"></span>
-<a name="l00475"></a>00475
-<a name="l00476"></a><a class="code" href="XMP__Const_8h.html#a69c4d1b80c4dd581366e0c60209ef612">00476</a> <span class="preprocessor">#define XMP_SetOption(var,opt) var |= (opt)</span>
-<a name="l00477"></a><a class="code" href="XMP__Const_8h.html#a10c3c9b1b6e266b0b4eb6abe7b03b7d8">00477</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_ClearOption(var,opt) var &amp;= ~(opt)</span>
-<a name="l00478"></a><a class="code" href="XMP__Const_8h.html#aa31596e850cb6b208f5920833d67b9f1">00478</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_TestOption(var,opt) (((var) &amp; (opt)) != 0)</span>
-<a name="l00479"></a><a class="code" href="XMP__Const_8h.html#aba3edaa921326c7916adb0b70b1bcfb4">00479</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_OptionIsSet(var,opt) (((var) &amp; (opt)) != 0)</span>
-<a name="l00480"></a><a class="code" href="XMP__Const_8h.html#a1d41f53bd1d5c88fad8322ce15e39516">00480</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_OptionIsClear(var,opt) (((var) &amp; (opt)) == 0)</span>
-<a name="l00481"></a>00481 <span class="preprocessor"></span>
-<a name="l00534"></a>00534
-<a name="l00535"></a><a class="code" href="XMP__Const_8h.html#a510b75338bd488ddd8d9bd4e326806f9">00535</a> <span class="preprocessor">#define XMP_PropIsSimple(opt) (((opt) &amp; kXMP_PropCompositeMask) == 0)</span>
-<a name="l00536"></a><a class="code" href="XMP__Const_8h.html#aebea8c35e09da7db613e27d0e3ce945f">00536</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_PropIsStruct(opt) (((opt) &amp; kXMP_PropValueIsStruct) != 0)</span>
-<a name="l00537"></a><a class="code" href="XMP__Const_8h.html#a98ae521b621cfa3611211e3922a0fce8">00537</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_PropIsArray(opt) (((opt) &amp; kXMP_PropValueIsArray) != 0)</span>
-<a name="l00538"></a>00538 <span class="preprocessor"></span>
-<a name="l00539"></a><a class="code" href="XMP__Const_8h.html#a8d763b3d36c7067cd7bccd32d4066b43">00539</a> <span class="preprocessor">#define XMP_ArrayIsUnordered(opt) (((opt) &amp; kXMP_PropArrayIsOrdered) == 0)</span>
-<a name="l00540"></a><a class="code" href="XMP__Const_8h.html#a72c7077f3ff3e39804a899533867327d">00540</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_ArrayIsOrdered(opt) (((opt) &amp; kXMP_PropArrayIsOrdered) != 0)</span>
-<a name="l00541"></a><a class="code" href="XMP__Const_8h.html#a86bc34c4e64dec75618c348163a88720">00541</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_ArrayIsAlternate(opt) (((opt) &amp; kXMP_PropArrayIsAlternate) != 0)</span>
-<a name="l00542"></a><a class="code" href="XMP__Const_8h.html#abbef21da7bce1491f780586c3e01cd9e">00542</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_ArrayIsAltText(opt) (((opt) &amp; kXMP_PropArrayIsAltText) != 0)</span>
-<a name="l00543"></a>00543 <span class="preprocessor"></span>
-<a name="l00544"></a><a class="code" href="XMP__Const_8h.html#a10828aa191aa666aa1166c27beead2a6">00544</a> <span class="preprocessor">#define XMP_PropHasQualifiers(opt) (((opt) &amp; kXMP_PropHasQualifiers) != 0)</span>
-<a name="l00545"></a><a class="code" href="XMP__Const_8h.html#a8d1b4da6b3cb3a67bf4f8e79352eeeaa">00545</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_PropIsQualifier(opt) (((opt) &amp; kXMP_PropIsQualifier) != 0)</span>
-<a name="l00546"></a><a class="code" href="XMP__Const_8h.html#a7dc82df90f45b0d746b67d8fdc529c83">00546</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_PropHasLang(opt) (((opt) &amp; kXMP_PropHasLang) != 0)</span>
-<a name="l00547"></a>00547 <span class="preprocessor"></span>
-<a name="l00548"></a><a class="code" href="XMP__Const_8h.html#a12870d8442720ce5230791abc26f9597">00548</a> <span class="preprocessor">#define XMP_NodeIsSchema(opt) (((opt) &amp; kXMP_SchemaNode) != 0)</span>
-<a name="l00549"></a><a class="code" href="XMP__Const_8h.html#a193b1414fa5312da2aa1d833b85612d0">00549</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_PropIsAlias(opt) (((opt) &amp; kXMP_PropIsAlias) != 0)</span>
-<a name="l00550"></a>00550 <span class="preprocessor"></span>
-<a name="l00551"></a>00551 <span class="comment">// -------------------------------------------------------------------------------------------------</span>
-<a name="l00552"></a>00552
-<a name="l00554"></a>00554 <span class="keyword">enum</span> {
-<a name="l00555"></a>00555
-<a name="l00557"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aab51f87b5c48f47f5cefb9e03293dafb">00557</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aab51f87b5c48f47f5cefb9e03293dafb" title="The XML string form of the property value is a URI, use rdf:resource attribute. DISCOURAGED...">kXMP_PropValueIsURI</a> = 0x00000002UL,
-<a name="l00558"></a>00558
-<a name="l00559"></a>00559 <span class="comment">// ------------------------------------------------------</span>
-<a name="l00560"></a>00560 <span class="comment">// Options relating to qualifiers attached to a property.</span>
-<a name="l00561"></a>00561
-<a name="l00563"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a8e34a33a2eed56499d4f6f62da25d159">00563</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a8e34a33a2eed56499d4f6f62da25d159" title="The property has qualifiers, includes rdf:type and xml:lang.">kXMP_PropHasQualifiers</a> = 0x00000010UL,
-<a name="l00564"></a>00564
-<a name="l00569"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a30146ed5209f5c3eb4eeb1fd8e4fb9fe">00569</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a30146ed5209f5c3eb4eeb1fd8e4fb9fe">kXMP_PropIsQualifier</a> = 0x00000020UL,
-<a name="l00570"></a>00570
-<a name="l00572"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a3fa5ed87edc731bfb3817f58ba70a217">00572</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a3fa5ed87edc731bfb3817f58ba70a217" title="Implies kXMP_PropHasQualifiers, property has xml:lang.">kXMP_PropHasLang</a> = 0x00000040UL,
-<a name="l00573"></a>00573
-<a name="l00575"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aeff16fdf167afc73db25b30b529bd9d5">00575</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aeff16fdf167afc73db25b30b529bd9d5" title="Implies kXMP_PropHasQualifiers, property has rdf:type.">kXMP_PropHasType</a> = 0x00000080UL,
-<a name="l00576"></a>00576
-<a name="l00577"></a>00577 <span class="comment">// --------------------------------------------</span>
-<a name="l00578"></a>00578 <span class="comment">// Options relating to the data structure form.</span>
-<a name="l00579"></a>00579
-<a name="l00581"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a90d8e49a828a7e18c64be36a73076a7e">00581</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a90d8e49a828a7e18c64be36a73076a7e" title="The value is a structure with nested fields.">kXMP_PropValueIsStruct</a> = 0x00000100UL,
-<a name="l00582"></a>00582
-<a name="l00585"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a9b7706e0f0716ac7546bdc24ffedd0bc">00585</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a9b7706e0f0716ac7546bdc24ffedd0bc">kXMP_PropValueIsArray</a> = 0x00000200UL,
-<a name="l00586"></a>00586
-<a name="l00588"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a0d70c23394c0676657c89de5491192c0">00588</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a0d70c23394c0676657c89de5491192c0" title="The item order does not matter.">kXMP_PropArrayIsUnordered</a> = <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a9b7706e0f0716ac7546bdc24ffedd0bc">kXMP_PropValueIsArray</a>,
+<a name="l00328"></a><a class="code" href="XMP__Const_8h.html#a0bcb67d0dd0922504e3da7ca5c40c82a">00328</a> <span class="preprocessor">#define kXMP_NS_PDF &quot;http://ns.adobe.com/pdf/1.3/&quot;</span>
+<a name="l00329"></a><a class="code" href="XMP__Const_8h.html#aa1a6f38ebfcdb281c5bf2809859167c7">00329</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_Photoshop &quot;http://ns.adobe.com/photoshop/1.0/&quot;</span>
+<a name="l00330"></a>00330 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PSAlbum &quot;http://ns.adobe.com/album/1.0/&quot;</span>
+<a name="l00331"></a><a class="code" href="XMP__Const_8h.html#ad12182e1df1652f56b5eec60c1fcdd8f">00331</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_EXIF &quot;http://ns.adobe.com/exif/1.0/&quot;</span>
+<a name="l00332"></a>00332 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_EXIF_Aux &quot;http://ns.adobe.com/exif/1.0/aux/&quot;</span>
+<a name="l00333"></a><a class="code" href="XMP__Const_8h.html#a673355818b7b9224e8fec0fbc60ba00c">00333</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_TIFF &quot;http://ns.adobe.com/tiff/1.0/&quot;</span>
+<a name="l00334"></a>00334 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PNG &quot;http://ns.adobe.com/png/1.0/&quot;</span>
+<a name="l00335"></a>00335 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_SWF &quot;http://ns.adobe.com/swf/1.0/&quot;</span>
+<a name="l00336"></a>00336 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_JPEG &quot;http://ns.adobe.com/jpeg/1.0/&quot;</span>
+<a name="l00337"></a>00337 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_JP2K &quot;http://ns.adobe.com/jp2k/1.0/&quot;</span>
+<a name="l00338"></a>00338 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_CameraRaw &quot;http://ns.adobe.com/camera-raw-settings/1.0/&quot;</span>
+<a name="l00339"></a>00339 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_DM &quot;http://ns.adobe.com/xmp/1.0/DynamicMedia/&quot;</span>
+<a name="l00340"></a>00340 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_Script &quot;http://ns.adobe.com/xmp/1.0/Script/&quot;</span>
+<a name="l00341"></a>00341 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_ASF &quot;http://ns.adobe.com/asf/1.0/&quot;</span>
+<a name="l00342"></a>00342 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_WAV &quot;http://ns.adobe.com/xmp/wav/1.0/&quot;</span>
+<a name="l00343"></a>00343 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_BWF &quot;http://ns.adobe.com/bwf/bext/1.0/&quot;</span>
+<a name="l00344"></a>00344 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_AEScart &quot;http://ns.adobe.com/aes/cart/&quot;</span>
+<a name="l00345"></a>00345 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_RIFFINFO &quot;http://ns.adobe.com/riff/info/&quot;</span>
+<a name="l00346"></a>00346 <span class="preprocessor"></span>
+<a name="l00347"></a>00347 <span class="preprocessor">#define kXMP_NS_XMP_Note &quot;http://ns.adobe.com/xmp/note/&quot;</span>
+<a name="l00348"></a>00348 <span class="preprocessor"></span>
+<a name="l00349"></a>00349 <span class="preprocessor">#define kXMP_NS_AdobeStockPhoto &quot;http://ns.adobe.com/StockPhoto/1.0/&quot;</span>
+<a name="l00350"></a>00350 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_CreatorAtom &quot;http://ns.adobe.com/creatorAtom/1.0/&quot;</span>
+<a name="l00351"></a>00351 <span class="preprocessor"></span>
+<a name="l00352"></a>00352 <span class="preprocessor">#define kXMP_NS_ExifEX &quot;http://cipa.jp/exif/1.0/&quot;</span>
+<a name="l00353"></a>00353 <span class="preprocessor"></span>
+<a name="l00379"></a>00379
+<a name="l00380"></a><a class="code" href="XMP__Const_8h.html#ab466db52a4b85cecfa04710682c1e671">00380</a> <span class="preprocessor">#define kXMP_NS_XMP_IdentifierQual &quot;http://ns.adobe.com/xmp/Identifier/qual/1.0/&quot;</span>
+<a name="l00381"></a><a class="code" href="XMP__Const_8h.html#a9618e013619aa92ebc808b62243d2ba8">00381</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_Dimensions &quot;http://ns.adobe.com/xap/1.0/sType/Dimensions#&quot;</span>
+<a name="l00382"></a>00382 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_Text &quot;http://ns.adobe.com/xap/1.0/t/&quot;</span>
+<a name="l00383"></a>00383 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_PagedFile &quot;http://ns.adobe.com/xap/1.0/t/pg/&quot;</span>
+<a name="l00384"></a>00384 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_Graphics &quot;http://ns.adobe.com/xap/1.0/g/&quot;</span>
+<a name="l00385"></a><a class="code" href="XMP__Const_8h.html#a935641acc7d01e782ad7a457a7ff338b">00385</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_Image &quot;http://ns.adobe.com/xap/1.0/g/img/&quot;</span>
+<a name="l00386"></a>00386 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_Font &quot;http://ns.adobe.com/xap/1.0/sType/Font#&quot;</span>
+<a name="l00387"></a><a class="code" href="XMP__Const_8h.html#a861613273127156050b456eee11f6b0a">00387</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_ResourceEvent &quot;http://ns.adobe.com/xap/1.0/sType/ResourceEvent#&quot;</span>
+<a name="l00388"></a><a class="code" href="XMP__Const_8h.html#a9bf51f2653400645f7b5087e8c4e1c77">00388</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_ResourceRef &quot;http://ns.adobe.com/xap/1.0/sType/ResourceRef#&quot;</span>
+<a name="l00389"></a><a class="code" href="XMP__Const_8h.html#ab4923bed71ab29c6aa88debe8816c0a2">00389</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_ST_Version &quot;http://ns.adobe.com/xap/1.0/sType/Version#&quot;</span>
+<a name="l00390"></a><a class="code" href="XMP__Const_8h.html#ac7dc4d65bcbba2862e410cc8cfdff6f6">00390</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_ST_Job &quot;http://ns.adobe.com/xap/1.0/sType/Job#&quot;</span>
+<a name="l00391"></a>00391 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_ManifestItem &quot;http://ns.adobe.com/xap/1.0/sType/ManifestItem#&quot;</span>
+<a name="l00392"></a>00392 <span class="preprocessor"></span>
+<a name="l00393"></a>00393 <span class="comment">// Deprecated XML namespace constants</span>
+<a name="l00394"></a><a class="code" href="XMP__Const_8h.html#a0a2d9c5f7beb27553214a7ad1df4f27e">00394</a> <span class="preprocessor">#define kXMP_NS_XMP_T &quot;http://ns.adobe.com/xap/1.0/t/&quot;</span>
+<a name="l00395"></a><a class="code" href="XMP__Const_8h.html#a39afb495ffb24bb3082493c6811e65d0">00395</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_T_PG &quot;http://ns.adobe.com/xap/1.0/t/pg/&quot;</span>
+<a name="l00396"></a>00396 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XMP_G_IMG &quot;http://ns.adobe.com/xap/1.0/g/img/&quot;</span>
+<a name="l00397"></a>00397 <span class="preprocessor"></span>
+<a name="l00417"></a>00417
+<a name="l00418"></a><a class="code" href="XMP__Const_8h.html#a44453f0d0a1dd295d41722c2387b36fa">00418</a> <span class="preprocessor">#define kXMP_NS_DC &quot;http://purl.org/dc/elements/1.1/&quot;</span>
+<a name="l00419"></a>00419 <span class="preprocessor"></span>
+<a name="l00420"></a><a class="code" href="XMP__Const_8h.html#ab794d3d798daf75a963398347dcbb79b">00420</a> <span class="preprocessor">#define kXMP_NS_IPTCCore &quot;http://iptc.org/std/Iptc4xmpCore/1.0/xmlns/&quot;</span>
+<a name="l00421"></a><a class="code" href="XMP__Const_8h.html#a12ca045d4c12992ec8f6c1003523de20">00421</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_IPTCExt &quot;http://iptc.org/std/Iptc4xmpExt/2008-02-29/&quot;</span>
+<a name="l00422"></a>00422 <span class="preprocessor"></span>
+<a name="l00423"></a>00423 <span class="preprocessor">#define kXMP_NS_DICOM &quot;http://ns.adobe.com/DICOM/&quot;</span>
+<a name="l00424"></a>00424 <span class="preprocessor"></span>
+<a name="l00425"></a>00425 <span class="preprocessor">#define kXMP_NS_PLUS &quot;http://ns.useplus.org/ldf/xmp/1.0/&quot;</span>
+<a name="l00426"></a>00426 <span class="preprocessor"></span>
+<a name="l00427"></a>00427 <span class="preprocessor">#define kXMP_NS_PDFA_Schema &quot;http://www.aiim.org/pdfa/ns/schema#&quot;</span>
+<a name="l00428"></a>00428 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PDFA_Property &quot;http://www.aiim.org/pdfa/ns/property#&quot;</span>
+<a name="l00429"></a>00429 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PDFA_Type &quot;http://www.aiim.org/pdfa/ns/type#&quot;</span>
+<a name="l00430"></a>00430 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PDFA_Field &quot;http://www.aiim.org/pdfa/ns/field#&quot;</span>
+<a name="l00431"></a>00431 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PDFA_ID &quot;http://www.aiim.org/pdfa/ns/id/&quot;</span>
+<a name="l00432"></a>00432 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PDFA_Extension &quot;http://www.aiim.org/pdfa/ns/extension/&quot;</span>
+<a name="l00433"></a>00433 <span class="preprocessor"></span>
+<a name="l00434"></a>00434 <span class="preprocessor">#define kXMP_NS_PDFX &quot;http://ns.adobe.com/pdfx/1.3/&quot;</span>
+<a name="l00435"></a>00435 <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_PDFX_ID &quot;http://www.npes.org/pdfx/ns/id/&quot;</span>
+<a name="l00436"></a>00436 <span class="preprocessor"></span>
+<a name="l00437"></a><a class="code" href="XMP__Const_8h.html#a276fac0f70893607afa3f09030ad84c7">00437</a> <span class="preprocessor">#define kXMP_NS_RDF &quot;http://www.w3.org/1999/02/22-rdf-syntax-ns#&quot;</span>
+<a name="l00438"></a><a class="code" href="XMP__Const_8h.html#a97564c70460d1f235c8a41b8ac40cfe9">00438</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NS_XML &quot;http://www.w3.org/XML/1998/namespace&quot;</span>
+<a name="l00439"></a>00439 <span class="preprocessor"></span>
+<a name="l00440"></a>00440 <span class="comment">// =================================================================================================</span>
+<a name="l00441"></a>00441 <span class="comment">// Enums and macros used for option bits</span>
+<a name="l00442"></a>00442 <span class="comment">// =====================================</span>
+<a name="l00443"></a>00443
+<a name="l00457"></a>00457
+<a name="l00458"></a><a class="code" href="XMP__Const_8h.html#a9549b9a138a896257b5a70176d125317">00458</a> <span class="preprocessor">#define kXMP_ArrayLastItem ((XMP_Index)(-1L))</span>
+<a name="l00459"></a><a class="code" href="XMP__Const_8h.html#a8283c9596c03b6d626d5a2b7a90e23ab">00459</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_UseNullTermination ((XMP_StringLen)(~0UL))</span>
+<a name="l00460"></a><a class="code" href="XMP__Const_8h.html#aff1df9f3cf050f8b8d3a574db3c3326b">00460</a> <span class="preprocessor"></span><span class="preprocessor">#define kXMP_NoOptions ((XMP_OptionBits)0UL)</span>
+<a name="l00461"></a>00461 <span class="preprocessor"></span>
+<a name="l00494"></a>00494
+<a name="l00495"></a><a class="code" href="XMP__Const_8h.html#a69c4d1b80c4dd581366e0c60209ef612">00495</a> <span class="preprocessor">#define XMP_SetOption(var,opt) var |= (opt)</span>
+<a name="l00496"></a><a class="code" href="XMP__Const_8h.html#a10c3c9b1b6e266b0b4eb6abe7b03b7d8">00496</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_ClearOption(var,opt) var &amp;= ~(opt)</span>
+<a name="l00497"></a><a class="code" href="XMP__Const_8h.html#aa31596e850cb6b208f5920833d67b9f1">00497</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_TestOption(var,opt) (((var) &amp; (opt)) != 0)</span>
+<a name="l00498"></a><a class="code" href="XMP__Const_8h.html#aba3edaa921326c7916adb0b70b1bcfb4">00498</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_OptionIsSet(var,opt) (((var) &amp; (opt)) != 0)</span>
+<a name="l00499"></a><a class="code" href="XMP__Const_8h.html#a1d41f53bd1d5c88fad8322ce15e39516">00499</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_OptionIsClear(var,opt) (((var) &amp; (opt)) == 0)</span>
+<a name="l00500"></a>00500 <span class="preprocessor"></span>
+<a name="l00553"></a>00553
+<a name="l00554"></a><a class="code" href="XMP__Const_8h.html#a510b75338bd488ddd8d9bd4e326806f9">00554</a> <span class="preprocessor">#define XMP_PropIsSimple(opt) (((opt) &amp; kXMP_PropCompositeMask) == 0)</span>
+<a name="l00555"></a><a class="code" href="XMP__Const_8h.html#aebea8c35e09da7db613e27d0e3ce945f">00555</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_PropIsStruct(opt) (((opt) &amp; kXMP_PropValueIsStruct) != 0)</span>
+<a name="l00556"></a><a class="code" href="XMP__Const_8h.html#a98ae521b621cfa3611211e3922a0fce8">00556</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_PropIsArray(opt) (((opt) &amp; kXMP_PropValueIsArray) != 0)</span>
+<a name="l00557"></a>00557 <span class="preprocessor"></span>
+<a name="l00558"></a><a class="code" href="XMP__Const_8h.html#a8d763b3d36c7067cd7bccd32d4066b43">00558</a> <span class="preprocessor">#define XMP_ArrayIsUnordered(opt) (((opt) &amp; kXMP_PropArrayIsOrdered) == 0)</span>
+<a name="l00559"></a><a class="code" href="XMP__Const_8h.html#a72c7077f3ff3e39804a899533867327d">00559</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_ArrayIsOrdered(opt) (((opt) &amp; kXMP_PropArrayIsOrdered) != 0)</span>
+<a name="l00560"></a><a class="code" href="XMP__Const_8h.html#a86bc34c4e64dec75618c348163a88720">00560</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_ArrayIsAlternate(opt) (((opt) &amp; kXMP_PropArrayIsAlternate) != 0)</span>
+<a name="l00561"></a><a class="code" href="XMP__Const_8h.html#abbef21da7bce1491f780586c3e01cd9e">00561</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_ArrayIsAltText(opt) (((opt) &amp; kXMP_PropArrayIsAltText) != 0)</span>
+<a name="l00562"></a>00562 <span class="preprocessor"></span>
+<a name="l00563"></a><a class="code" href="XMP__Const_8h.html#a10828aa191aa666aa1166c27beead2a6">00563</a> <span class="preprocessor">#define XMP_PropHasQualifiers(opt) (((opt) &amp; kXMP_PropHasQualifiers) != 0)</span>
+<a name="l00564"></a><a class="code" href="XMP__Const_8h.html#a8d1b4da6b3cb3a67bf4f8e79352eeeaa">00564</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_PropIsQualifier(opt) (((opt) &amp; kXMP_PropIsQualifier) != 0)</span>
+<a name="l00565"></a><a class="code" href="XMP__Const_8h.html#a7dc82df90f45b0d746b67d8fdc529c83">00565</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_PropHasLang(opt) (((opt) &amp; kXMP_PropHasLang) != 0)</span>
+<a name="l00566"></a>00566 <span class="preprocessor"></span>
+<a name="l00567"></a><a class="code" href="XMP__Const_8h.html#a12870d8442720ce5230791abc26f9597">00567</a> <span class="preprocessor">#define XMP_NodeIsSchema(opt) (((opt) &amp; kXMP_SchemaNode) != 0)</span>
+<a name="l00568"></a><a class="code" href="XMP__Const_8h.html#a193b1414fa5312da2aa1d833b85612d0">00568</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_PropIsAlias(opt) (((opt) &amp; kXMP_PropIsAlias) != 0)</span>
+<a name="l00569"></a>00569 <span class="preprocessor"></span>
+<a name="l00570"></a>00570 <span class="comment">// -------------------------------------------------------------------------------------------------</span>
+<a name="l00571"></a>00571
+<a name="l00573"></a>00573 <span class="keyword">enum</span> {
+<a name="l00574"></a>00574
+<a name="l00576"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aab51f87b5c48f47f5cefb9e03293dafb">00576</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aab51f87b5c48f47f5cefb9e03293dafb" title="The XML string form of the property value is a URI, use rdf:resource attribute. DISCOURAGED...">kXMP_PropValueIsURI</a> = 0x00000002UL,
+<a name="l00577"></a>00577
+<a name="l00578"></a>00578 <span class="comment">// ------------------------------------------------------</span>
+<a name="l00579"></a>00579 <span class="comment">// Options relating to qualifiers attached to a property.</span>
+<a name="l00580"></a>00580
+<a name="l00582"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a8e34a33a2eed56499d4f6f62da25d159">00582</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a8e34a33a2eed56499d4f6f62da25d159" title="The property has qualifiers, includes rdf:type and xml:lang.">kXMP_PropHasQualifiers</a> = 0x00000010UL,
+<a name="l00583"></a>00583
+<a name="l00588"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a30146ed5209f5c3eb4eeb1fd8e4fb9fe">00588</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a30146ed5209f5c3eb4eeb1fd8e4fb9fe">kXMP_PropIsQualifier</a> = 0x00000020UL,
<a name="l00589"></a>00589
-<a name="l00591"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5af1cdb3b0a3e852ec55e747a1686aba04">00591</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5af1cdb3b0a3e852ec55e747a1686aba04" title="Implies kXMP_PropValueIsArray, item order matters. It is serialized using an rdf:Seq...">kXMP_PropArrayIsOrdered</a> = 0x00000400UL,
+<a name="l00591"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a3fa5ed87edc731bfb3817f58ba70a217">00591</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a3fa5ed87edc731bfb3817f58ba70a217" title="Implies kXMP_PropHasQualifiers, property has xml:lang.">kXMP_PropHasLang</a> = 0x00000040UL,
<a name="l00592"></a>00592
-<a name="l00594"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a2596b1f0ea4600270c99102c86b5f1f1">00594</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a2596b1f0ea4600270c99102c86b5f1f1" title="Implies kXMP_PropArrayIsOrdered, items are alternates. It is serialized using an...">kXMP_PropArrayIsAlternate</a> = 0x00000800UL,
+<a name="l00594"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aeff16fdf167afc73db25b30b529bd9d5">00594</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aeff16fdf167afc73db25b30b529bd9d5" title="Implies kXMP_PropHasQualifiers, property has rdf:type.">kXMP_PropHasType</a> = 0x00000080UL,
<a name="l00595"></a>00595
-<a name="l00596"></a>00596 <span class="comment">// ------------------------------------</span>
-<a name="l00597"></a>00597 <span class="comment">// Additional struct and array options.</span>
+<a name="l00596"></a>00596 <span class="comment">// --------------------------------------------</span>
+<a name="l00597"></a>00597 <span class="comment">// Options relating to the data structure form.</span>
<a name="l00598"></a>00598
-<a name="l00601"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aba253f67a6cf44b7438a3f96b516846d">00601</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aba253f67a6cf44b7438a3f96b516846d">kXMP_PropArrayIsAltText</a> = 0x00001000UL,
-<a name="l00602"></a>00602
-<a name="l00603"></a>00603 <span class="comment">// kXMP_InsertBeforeItem = 0x00004000UL, ! Used by SetXyz functions.</span>
-<a name="l00604"></a>00604 <span class="comment">// kXMP_InsertAfterItem = 0x00008000UL, ! Used by SetXyz functions.</span>
+<a name="l00600"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a90d8e49a828a7e18c64be36a73076a7e">00600</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a90d8e49a828a7e18c64be36a73076a7e" title="The value is a structure with nested fields.">kXMP_PropValueIsStruct</a> = 0x00000100UL,
+<a name="l00601"></a>00601
+<a name="l00604"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a9b7706e0f0716ac7546bdc24ffedd0bc">00604</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a9b7706e0f0716ac7546bdc24ffedd0bc">kXMP_PropValueIsArray</a> = 0x00000200UL,
<a name="l00605"></a>00605
-<a name="l00606"></a>00606 <span class="comment">// ----------------------------</span>
-<a name="l00607"></a>00607 <span class="comment">// Other miscellaneous options.</span>
+<a name="l00607"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a0d70c23394c0676657c89de5491192c0">00607</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a0d70c23394c0676657c89de5491192c0" title="The item order does not matter.">kXMP_PropArrayIsUnordered</a> = <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a9b7706e0f0716ac7546bdc24ffedd0bc">kXMP_PropValueIsArray</a>,
<a name="l00608"></a>00608
-<a name="l00611"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5ab975c19fb5c50f732a1a0d84dadb7c37">00611</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5ab975c19fb5c50f732a1a0d84dadb7c37">kXMP_PropIsAlias</a> = 0x00010000UL,
-<a name="l00612"></a>00612
-<a name="l00615"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a1f819ef281d1f52c4c12d5d02f49d3f0">00615</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a1f819ef281d1f52c4c12d5d02f49d3f0">kXMP_PropHasAliases</a> = 0x00020000UL,
-<a name="l00616"></a>00616
-<a name="l00618"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a48097c6ea309f240965d77ab564a5464">00618</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a48097c6ea309f240965d77ab564a5464" title="The value of this property is &amp;quot;owned&amp;quot; by the application, and should not...">kXMP_PropIsInternal</a> = 0x00040000UL,
-<a name="l00619"></a>00619
-<a name="l00621"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a81dcd06251771a0ddee6c1e36128c65c">00621</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a81dcd06251771a0ddee6c1e36128c65c" title="The value of this property is not derived from the document content.">kXMP_PropIsStable</a> = 0x00100000UL,
-<a name="l00622"></a>00622
-<a name="l00624"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a0d898ea7f6b3db513bb24f8a6a285877">00624</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a0d898ea7f6b3db513bb24f8a6a285877" title="The value of this property is derived from the document content.">kXMP_PropIsDerived</a> = 0x00200000UL,
-<a name="l00625"></a>00625
-<a name="l00626"></a>00626 <span class="comment">// kXMPUtil_AllowCommas = 0x10000000UL, ! Used by TXMPUtils::CatenateArrayItems and ::SeparateArrayItems.</span>
-<a name="l00627"></a>00627 <span class="comment">// kXMP_DeleteExisting = 0x20000000UL, ! Used by TXMPMeta::SetXyz functions to delete any pre-existing property.</span>
-<a name="l00628"></a>00628 <span class="comment">// kXMP_SchemaNode = 0x80000000UL, ! Returned by iterators - #define to avoid warnings</span>
-<a name="l00629"></a>00629
-<a name="l00630"></a>00630 <span class="comment">// ------------------------------</span>
-<a name="l00631"></a>00631 <span class="comment">// Masks that are multiple flags.</span>
-<a name="l00632"></a>00632
-<a name="l00634"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a6b5b5f4b869994b7390edc9589745e9f">00634</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a6b5b5f4b869994b7390edc9589745e9f" title="Property type bit-flag mask for all array types.">kXMP_PropArrayFormMask</a> = <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a9b7706e0f0716ac7546bdc24ffedd0bc">kXMP_PropValueIsArray</a> | <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5af1cdb3b0a3e852ec55e747a1686aba04" title="Implies kXMP_PropValueIsArray, item order matters. It is serialized using an rdf:Seq...">kXMP_PropArrayIsOrdered</a> | <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a2596b1f0ea4600270c99102c86b5f1f1" title="Implies kXMP_PropArrayIsOrdered, items are alternates. It is serialized using an...">kXMP_PropArrayIsAlternate</a> | <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aba253f67a6cf44b7438a3f96b516846d">kXMP_PropArrayIsAltText</a>,
+<a name="l00610"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5af1cdb3b0a3e852ec55e747a1686aba04">00610</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5af1cdb3b0a3e852ec55e747a1686aba04" title="Implies kXMP_PropValueIsArray, item order matters. It is serialized using an rdf:Seq...">kXMP_PropArrayIsOrdered</a> = 0x00000400UL,
+<a name="l00611"></a>00611
+<a name="l00613"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a2596b1f0ea4600270c99102c86b5f1f1">00613</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a2596b1f0ea4600270c99102c86b5f1f1" title="Implies kXMP_PropArrayIsOrdered, items are alternates. It is serialized using an...">kXMP_PropArrayIsAlternate</a> = 0x00000800UL,
+<a name="l00614"></a>00614
+<a name="l00615"></a>00615 <span class="comment">// ------------------------------------</span>
+<a name="l00616"></a>00616 <span class="comment">// Additional struct and array options.</span>
+<a name="l00617"></a>00617
+<a name="l00620"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aba253f67a6cf44b7438a3f96b516846d">00620</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aba253f67a6cf44b7438a3f96b516846d">kXMP_PropArrayIsAltText</a> = 0x00001000UL,
+<a name="l00621"></a>00621
+<a name="l00622"></a>00622 <span class="comment">// kXMP_InsertBeforeItem = 0x00004000UL, ! Used by SetXyz functions.</span>
+<a name="l00623"></a>00623 <span class="comment">// kXMP_InsertAfterItem = 0x00008000UL, ! Used by SetXyz functions.</span>
+<a name="l00624"></a>00624
+<a name="l00625"></a>00625 <span class="comment">// ----------------------------</span>
+<a name="l00626"></a>00626 <span class="comment">// Other miscellaneous options.</span>
+<a name="l00627"></a>00627
+<a name="l00630"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5ab975c19fb5c50f732a1a0d84dadb7c37">00630</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5ab975c19fb5c50f732a1a0d84dadb7c37">kXMP_PropIsAlias</a> = 0x00010000UL,
+<a name="l00631"></a>00631
+<a name="l00634"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a1f819ef281d1f52c4c12d5d02f49d3f0">00634</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a1f819ef281d1f52c4c12d5d02f49d3f0">kXMP_PropHasAliases</a> = 0x00020000UL,
<a name="l00635"></a>00635
-<a name="l00637"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a60a9f26fb66c2e65cf40d9bc44968956">00637</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a60a9f26fb66c2e65cf40d9bc44968956" title="Property type bit-flag mask for composite types (array and struct).">kXMP_PropCompositeMask</a> = <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a90d8e49a828a7e18c64be36a73076a7e" title="The value is a structure with nested fields.">kXMP_PropValueIsStruct</a> | <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a6b5b5f4b869994b7390edc9589745e9f" title="Property type bit-flag mask for all array types.">kXMP_PropArrayFormMask</a>,
+<a name="l00637"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a48097c6ea309f240965d77ab564a5464">00637</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a48097c6ea309f240965d77ab564a5464" title="The value of this property is &amp;quot;owned&amp;quot; by the application, and should not...">kXMP_PropIsInternal</a> = 0x00040000UL,
<a name="l00638"></a>00638
-<a name="l00640"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5ae154b58429b257b18963ba3503e67974">00640</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5ae154b58429b257b18963ba3503e67974" title="Mask for bits that are reserved for transient use by the implementation.">kXMP_ImplReservedMask</a> = 0x70000000L
+<a name="l00640"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a81dcd06251771a0ddee6c1e36128c65c">00640</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a81dcd06251771a0ddee6c1e36128c65c" title="The value of this property is not derived from the document content.">kXMP_PropIsStable</a> = 0x00100000UL,
<a name="l00641"></a>00641
-<a name="l00642"></a>00642 };
-<a name="l00643"></a>00643
-<a name="l00644"></a>00644 <span class="preprocessor">#define kXMP_SchemaNode ((XMP_OptionBits)0x80000000UL)</span>
-<a name="l00645"></a>00645 <span class="preprocessor"></span>
-<a name="l00654"></a>00654 <span class="keyword">enum</span> {
-<a name="l00655"></a>00655
-<a name="l00657"></a><a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04a873411f673fc2a6337083fd024df727f">00657</a> <a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04a873411f673fc2a6337083fd024df727f" title="Option for array item location: Insert a new item before the given index.">kXMP_InsertBeforeItem</a> = 0x00004000UL,
-<a name="l00658"></a>00658
-<a name="l00660"></a><a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04a98cedd5fa29d47abb2ac8903ac7f5a05">00660</a> <a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04a98cedd5fa29d47abb2ac8903ac7f5a05" title="Option for array item location: Insert a new item after the given index.">kXMP_InsertAfterItem</a> = 0x00008000UL,
-<a name="l00661"></a>00661
-<a name="l00663"></a><a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04addd07b4a38b25ab3841e28a9cb169d1c">00663</a> <a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04addd07b4a38b25ab3841e28a9cb169d1c" title="Delete any pre-existing property.">kXMP_DeleteExisting</a> = 0x20000000UL,
-<a name="l00664"></a>00664
-<a name="l00666"></a><a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04ad1b42a8a4c479d9bfaf406b79f2e1465">00666</a> <a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04ad1b42a8a4c479d9bfaf406b79f2e1465" title="Bit-flag mask for property-value option bits.">kXMP_PropValueOptionsMask</a> = <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aab51f87b5c48f47f5cefb9e03293dafb" title="The XML string form of the property value is a URI, use rdf:resource attribute. DISCOURAGED...">kXMP_PropValueIsURI</a>,
-<a name="l00667"></a>00667
-<a name="l00669"></a><a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04aef8c1934a17b0e5d8f0b20a7e89df0df">00669</a> <a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04aef8c1934a17b0e5d8f0b20a7e89df0df" title="Bit-flag mask for array-item location bits.">kXMP_PropArrayLocationMask</a> = <a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04a873411f673fc2a6337083fd024df727f" title="Option for array item location: Insert a new item before the given index.">kXMP_InsertBeforeItem</a> | <a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04a98cedd5fa29d47abb2ac8903ac7f5a05" title="Option for array item location: Insert a new item after the given index.">kXMP_InsertAfterItem</a>
-<a name="l00670"></a>00670
-<a name="l00671"></a>00671 };
-<a name="l00672"></a>00672
-<a name="l00673"></a>00673 <span class="comment">// -------------------------------------------------------------------------------------------------</span>
+<a name="l00643"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a0d898ea7f6b3db513bb24f8a6a285877">00643</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a0d898ea7f6b3db513bb24f8a6a285877" title="The value of this property is derived from the document content.">kXMP_PropIsDerived</a> = 0x00200000UL,
+<a name="l00644"></a>00644
+<a name="l00645"></a>00645 <span class="comment">// kXMPUtil_AllowCommas = 0x10000000UL, ! Used by TXMPUtils::CatenateArrayItems and ::SeparateArrayItems.</span>
+<a name="l00646"></a>00646 <span class="comment">// kXMP_DeleteExisting = 0x20000000UL, ! Used by TXMPMeta::SetXyz functions to delete any pre-existing property.</span>
+<a name="l00647"></a>00647 <span class="comment">// kXMP_SchemaNode = 0x80000000UL, ! Returned by iterators - #define to avoid warnings</span>
+<a name="l00648"></a>00648
+<a name="l00649"></a>00649 <span class="comment">// ------------------------------</span>
+<a name="l00650"></a>00650 <span class="comment">// Masks that are multiple flags.</span>
+<a name="l00651"></a>00651
+<a name="l00653"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a6b5b5f4b869994b7390edc9589745e9f">00653</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a6b5b5f4b869994b7390edc9589745e9f" title="Property type bit-flag mask for all array types.">kXMP_PropArrayFormMask</a> = <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a9b7706e0f0716ac7546bdc24ffedd0bc">kXMP_PropValueIsArray</a> | <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5af1cdb3b0a3e852ec55e747a1686aba04" title="Implies kXMP_PropValueIsArray, item order matters. It is serialized using an rdf:Seq...">kXMP_PropArrayIsOrdered</a> | <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a2596b1f0ea4600270c99102c86b5f1f1" title="Implies kXMP_PropArrayIsOrdered, items are alternates. It is serialized using an...">kXMP_PropArrayIsAlternate</a> | <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aba253f67a6cf44b7438a3f96b516846d">kXMP_PropArrayIsAltText</a>,
+<a name="l00654"></a>00654
+<a name="l00656"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a60a9f26fb66c2e65cf40d9bc44968956">00656</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a60a9f26fb66c2e65cf40d9bc44968956" title="Property type bit-flag mask for composite types (array and struct).">kXMP_PropCompositeMask</a> = <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a90d8e49a828a7e18c64be36a73076a7e" title="The value is a structure with nested fields.">kXMP_PropValueIsStruct</a> | <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5a6b5b5f4b869994b7390edc9589745e9f" title="Property type bit-flag mask for all array types.">kXMP_PropArrayFormMask</a>,
+<a name="l00657"></a>00657
+<a name="l00659"></a><a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5ae154b58429b257b18963ba3503e67974">00659</a> <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5ae154b58429b257b18963ba3503e67974" title="Mask for bits that are reserved for transient use by the implementation.">kXMP_ImplReservedMask</a> = 0x70000000L
+<a name="l00660"></a>00660
+<a name="l00661"></a>00661 };
+<a name="l00662"></a>00662
+<a name="l00663"></a>00663 <span class="preprocessor">#define kXMP_SchemaNode ((XMP_OptionBits)0x80000000UL)</span>
+<a name="l00664"></a>00664 <span class="preprocessor"></span>
+<a name="l00673"></a>00673 <span class="keyword">enum</span> {
<a name="l00674"></a>00674
-<a name="l00676"></a>00676 <span class="keyword">enum</span> {
+<a name="l00676"></a><a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04a873411f673fc2a6337083fd024df727f">00676</a> <a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04a873411f673fc2a6337083fd024df727f" title="Option for array item location: Insert a new item before the given index.">kXMP_InsertBeforeItem</a> = 0x00004000UL,
<a name="l00677"></a>00677
-<a name="l00679"></a><a class="code" href="XMP__Const_8h.html#adc29c2ff13d900c2f185ee95427fb06ca1e533852436acf75f594a4fb50a64400">00679</a> <a class="code" href="XMP__Const_8h.html#adc29c2ff13d900c2f185ee95427fb06ca1e533852436acf75f594a4fb50a64400" title="Require a surrounding x:xmpmeta element.">kXMP_RequireXMPMeta</a> = 0x0001UL,
+<a name="l00679"></a><a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04a98cedd5fa29d47abb2ac8903ac7f5a05">00679</a> <a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04a98cedd5fa29d47abb2ac8903ac7f5a05" title="Option for array item location: Insert a new item after the given index.">kXMP_InsertAfterItem</a> = 0x00008000UL,
<a name="l00680"></a>00680
-<a name="l00682"></a><a class="code" href="XMP__Const_8h.html#adc29c2ff13d900c2f185ee95427fb06ca79b36427b7bf0c0a1ed010a44dec2d3e">00682</a> <a class="code" href="XMP__Const_8h.html#adc29c2ff13d900c2f185ee95427fb06ca79b36427b7bf0c0a1ed010a44dec2d3e" title="This is the not last input buffer for this parse stream.">kXMP_ParseMoreBuffers</a> = 0x0002UL,
+<a name="l00682"></a><a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04addd07b4a38b25ab3841e28a9cb169d1c">00682</a> <a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04addd07b4a38b25ab3841e28a9cb169d1c" title="Delete any pre-existing property.">kXMP_DeleteExisting</a> = 0x20000000UL,
<a name="l00683"></a>00683
-<a name="l00685"></a><a class="code" href="XMP__Const_8h.html#adc29c2ff13d900c2f185ee95427fb06ca7107906eab0e1fa6f9f2dc6254ad88b1">00685</a> <a class="code" href="XMP__Const_8h.html#adc29c2ff13d900c2f185ee95427fb06ca7107906eab0e1fa6f9f2dc6254ad88b1" title="Do not reconcile alias differences, throw an exception.">kXMP_StrictAliasing</a> = 0x0004UL
+<a name="l00685"></a><a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04ad1b42a8a4c479d9bfaf406b79f2e1465">00685</a> <a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04ad1b42a8a4c479d9bfaf406b79f2e1465" title="Bit-flag mask for property-value option bits.">kXMP_PropValueOptionsMask</a> = <a class="code" href="XMP__Const_8h.html#a99fb83031ce9923c84392b4e92f956b5aab51f87b5c48f47f5cefb9e03293dafb" title="The XML string form of the property value is a URI, use rdf:resource attribute. DISCOURAGED...">kXMP_PropValueIsURI</a>,
<a name="l00686"></a>00686
-<a name="l00687"></a>00687 };
-<a name="l00688"></a>00688
-<a name="l00690"></a>00690 <span class="keyword">enum</span> {
+<a name="l00688"></a><a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04aef8c1934a17b0e5d8f0b20a7e89df0df">00688</a> <a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04aef8c1934a17b0e5d8f0b20a7e89df0df" title="Bit-flag mask for array-item location bits.">kXMP_PropArrayLocationMask</a> = <a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04a873411f673fc2a6337083fd024df727f" title="Option for array item location: Insert a new item before the given index.">kXMP_InsertBeforeItem</a> | <a class="code" href="XMP__Const_8h.html#abc6126af1d45847bc59afa0aa3216b04a98cedd5fa29d47abb2ac8903ac7f5a05" title="Option for array item location: Insert a new item after the given index.">kXMP_InsertAfterItem</a>
+<a name="l00689"></a>00689
+<a name="l00690"></a>00690 };
<a name="l00691"></a>00691
-<a name="l00692"></a>00692 <span class="comment">// *** Option to remove empty struct/array, or leaf with empty value?</span>
+<a name="l00692"></a>00692 <span class="comment">// -------------------------------------------------------------------------------------------------</span>
<a name="l00693"></a>00693
-<a name="l00695"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eadbb9e4c7ee139da0dd4126ddea794c76">00695</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eadbb9e4c7ee139da0dd4126ddea794c76" title="Omit the XML packet wrapper.">kXMP_OmitPacketWrapper</a> = 0x0010UL,
+<a name="l00695"></a>00695 <span class="keyword">enum</span> {
<a name="l00696"></a>00696
-<a name="l00698"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea238c792322c5bd5f9e4db3165e01f9d6">00698</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea238c792322c5bd5f9e4db3165e01f9d6" title="Default is a writeable packet.">kXMP_ReadOnlyPacket</a> = 0x0020UL,
+<a name="l00698"></a><a class="code" href="XMP__Const_8h.html#adc29c2ff13d900c2f185ee95427fb06ca1e533852436acf75f594a4fb50a64400">00698</a> <a class="code" href="XMP__Const_8h.html#adc29c2ff13d900c2f185ee95427fb06ca1e533852436acf75f594a4fb50a64400" title="Require a surrounding x:xmpmeta element.">kXMP_RequireXMPMeta</a> = 0x0001UL,
<a name="l00699"></a>00699
-<a name="l00701"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea041dc6b7b8684be7112ae40f5f259ebb">00701</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea041dc6b7b8684be7112ae40f5f259ebb" title="Use a compact form of RDF.">kXMP_UseCompactFormat</a> = 0x0040UL,
+<a name="l00701"></a><a class="code" href="XMP__Const_8h.html#adc29c2ff13d900c2f185ee95427fb06ca79b36427b7bf0c0a1ed010a44dec2d3e">00701</a> <a class="code" href="XMP__Const_8h.html#adc29c2ff13d900c2f185ee95427fb06ca79b36427b7bf0c0a1ed010a44dec2d3e" title="This is the not last input buffer for this parse stream.">kXMP_ParseMoreBuffers</a> = 0x0002UL,
<a name="l00702"></a>00702
-<a name="l00704"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea15e3fb0e64614c574ed554f2f72c0a5d">00704</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea15e3fb0e64614c574ed554f2f72c0a5d" title="Use a canonical form of RDF.">kXMP_UseCanonicalFormat</a> = 0x0080UL,
+<a name="l00704"></a><a class="code" href="XMP__Const_8h.html#adc29c2ff13d900c2f185ee95427fb06ca7107906eab0e1fa6f9f2dc6254ad88b1">00704</a> <a class="code" href="XMP__Const_8h.html#adc29c2ff13d900c2f185ee95427fb06ca7107906eab0e1fa6f9f2dc6254ad88b1" title="Do not reconcile alias differences, throw an exception.">kXMP_StrictAliasing</a> = 0x0004UL
<a name="l00705"></a>00705
-<a name="l00707"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea0b659b3b544c7a5a076fbd3132cd7f7a">00707</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea0b659b3b544c7a5a076fbd3132cd7f7a" title="Include a padding allowance for a thumbnail image.">kXMP_IncludeThumbnailPad</a> = 0x0100UL,
-<a name="l00708"></a>00708
-<a name="l00710"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eadb35599da481cc22ea6342b7b4de6bc6">00710</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eadb35599da481cc22ea6342b7b4de6bc6" title="The padding parameter is the overall packet length.">kXMP_ExactPacketLength</a> = 0x0200UL,
-<a name="l00711"></a>00711
-<a name="l00713"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea79230f1d70d2625f7650db6ff5b1ea29">00713</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea79230f1d70d2625f7650db6ff5b1ea29" title="Omit all formatting whitespace.">kXMP_OmitAllFormatting</a> = 0x0800UL,
-<a name="l00714"></a>00714
-<a name="l00716"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea9fb498d749d939e2ba9adf555a75b856">00716</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea9fb498d749d939e2ba9adf555a75b856" title="Omit the x:xmpmeta element surrounding the rdf:RDF element.">kXMP_OmitXMPMetaElement</a> = 0x1000UL,
-<a name="l00717"></a>00717
-<a name="l00718"></a>00718 _XMP_LittleEndian_Bit = 0x0001UL, <span class="comment">// ! Don&#39;t use directly, see the combined values below!</span>
-<a name="l00719"></a>00719 _XMP_UTF16_Bit = 0x0002UL,
-<a name="l00720"></a>00720 _XMP_UTF32_Bit = 0x0004UL,
+<a name="l00706"></a>00706 };
+<a name="l00707"></a>00707
+<a name="l00709"></a>00709 <span class="keyword">enum</span> {
+<a name="l00710"></a>00710
+<a name="l00711"></a>00711 <span class="comment">// *** Option to remove empty struct/array, or leaf with empty value?</span>
+<a name="l00712"></a>00712
+<a name="l00714"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eadbb9e4c7ee139da0dd4126ddea794c76">00714</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eadbb9e4c7ee139da0dd4126ddea794c76" title="Omit the XML packet wrapper.">kXMP_OmitPacketWrapper</a> = 0x0010UL,
+<a name="l00715"></a>00715
+<a name="l00717"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea238c792322c5bd5f9e4db3165e01f9d6">00717</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea238c792322c5bd5f9e4db3165e01f9d6" title="Default is a writeable packet.">kXMP_ReadOnlyPacket</a> = 0x0020UL,
+<a name="l00718"></a>00718
+<a name="l00720"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea041dc6b7b8684be7112ae40f5f259ebb">00720</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea041dc6b7b8684be7112ae40f5f259ebb" title="Use a compact form of RDF.">kXMP_UseCompactFormat</a> = 0x0040UL,
<a name="l00721"></a>00721
-<a name="l00723"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eaeb79571cac99ee97feefb0347b1c1845">00723</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eaeb79571cac99ee97feefb0347b1c1845" title="Bit-flag mask for encoding-type bits.">kXMP_EncodingMask</a> = 0x0007UL,
+<a name="l00723"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea15e3fb0e64614c574ed554f2f72c0a5d">00723</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea15e3fb0e64614c574ed554f2f72c0a5d" title="Use a canonical form of RDF.">kXMP_UseCanonicalFormat</a> = 0x0080UL,
<a name="l00724"></a>00724
-<a name="l00726"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eadc8f241694f5a758e5ee3f6db69d02ab">00726</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eadc8f241694f5a758e5ee3f6db69d02ab" title="Use UTF8 encoding.">kXMP_EncodeUTF8</a> = 0UL,
+<a name="l00726"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea0b659b3b544c7a5a076fbd3132cd7f7a">00726</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea0b659b3b544c7a5a076fbd3132cd7f7a" title="Include a padding allowance for a thumbnail image.">kXMP_IncludeThumbnailPad</a> = 0x0100UL,
<a name="l00727"></a>00727
-<a name="l00729"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea310e4cbf639e783163778566b439f01d">00729</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea310e4cbf639e783163778566b439f01d" title="Use UTF16 big-endian encoding.">kXMP_EncodeUTF16Big</a> = _XMP_UTF16_Bit,
+<a name="l00729"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eadb35599da481cc22ea6342b7b4de6bc6">00729</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eadb35599da481cc22ea6342b7b4de6bc6" title="The padding parameter is the overall packet length.">kXMP_ExactPacketLength</a> = 0x0200UL,
<a name="l00730"></a>00730
-<a name="l00732"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eafc6417e382c98a2d507830de62fd4830">00732</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eafc6417e382c98a2d507830de62fd4830" title="Use UTF16 little-endian encoding.">kXMP_EncodeUTF16Little</a> = _XMP_UTF16_Bit | _XMP_LittleEndian_Bit,
+<a name="l00732"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea79230f1d70d2625f7650db6ff5b1ea29">00732</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea79230f1d70d2625f7650db6ff5b1ea29" title="Omit all formatting whitespace.">kXMP_OmitAllFormatting</a> = 0x0800UL,
<a name="l00733"></a>00733
-<a name="l00735"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea793e99d9ea83f0aadd5b4193a95ea713">00735</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea793e99d9ea83f0aadd5b4193a95ea713" title="Use UTF32 big-endian encoding.">kXMP_EncodeUTF32Big</a> = _XMP_UTF32_Bit,
-<a name="l00736"></a>00736
-<a name="l00738"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eae0137d98ea990fa23d292489031ba09e">00738</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eae0137d98ea990fa23d292489031ba09e" title="Use UTF13 little-endian encoding.">kXMP_EncodeUTF32Little</a> = _XMP_UTF32_Bit | _XMP_LittleEndian_Bit
+<a name="l00735"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea9fb498d749d939e2ba9adf555a75b856">00735</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea9fb498d749d939e2ba9adf555a75b856" title="Omit the x:xmpmeta element surrounding the rdf:RDF element.">kXMP_OmitXMPMetaElement</a> = 0x1000UL,
+<a name="l00736"></a>00736
+<a name="l00738"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea23054ea4ab89dfd802f14cb389e18745">00738</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea23054ea4ab89dfd802f14cb389e18745" title="Include a rdf Hash and Merged flag in x:xmpmeta element.">kXMP_IncludeRDFHash</a> = 0x2000UL,
<a name="l00739"></a>00739
-<a name="l00740"></a>00740 };
-<a name="l00741"></a>00741
-<a name="l00742"></a>00742 <span class="comment">// -------------------------------------------------------------------------------------------------</span>
+<a name="l00740"></a>00740 _XMP_LittleEndian_Bit = 0x0001UL, <span class="comment">// ! Don&#39;t use directly, see the combined values below!</span>
+<a name="l00741"></a>00741 _XMP_UTF16_Bit = 0x0002UL,
+<a name="l00742"></a>00742 _XMP_UTF32_Bit = 0x0004UL,
<a name="l00743"></a>00743
-<a name="l00745"></a>00745 <span class="keyword">enum</span> {
+<a name="l00745"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eaeb79571cac99ee97feefb0347b1c1845">00745</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eaeb79571cac99ee97feefb0347b1c1845" title="Bit-flag mask for encoding-type bits.">kXMP_EncodingMask</a> = 0x0007UL,
<a name="l00746"></a>00746
-<a name="l00748"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a93f77b837d89759af3a721712c13f044">00748</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a93f77b837d89759af3a721712c13f044" title="The low 8 bits are an enum of what data structure to iterate.">kXMP_IterClassMask</a> = 0x00FFUL,
+<a name="l00748"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eadc8f241694f5a758e5ee3f6db69d02ab">00748</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eadc8f241694f5a758e5ee3f6db69d02ab" title="Use UTF8 encoding.">kXMP_EncodeUTF8</a> = 0UL,
<a name="l00749"></a>00749
-<a name="l00751"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635aa0643c076a3b3737ff88ed20f16afd2b">00751</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635aa0643c076a3b3737ff88ed20f16afd2b" title="Iterate the property tree of a TXMPMeta object.">kXMP_IterProperties</a> = 0x0000UL,
+<a name="l00751"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea310e4cbf639e783163778566b439f01d">00751</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea310e4cbf639e783163778566b439f01d" title="Use UTF16 big-endian encoding.">kXMP_EncodeUTF16Big</a> = _XMP_UTF16_Bit,
<a name="l00752"></a>00752
-<a name="l00754"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a3333450505cd3712320aeac895e541b9">00754</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a3333450505cd3712320aeac895e541b9" title="Iterate the global alias table.">kXMP_IterAliases</a> = 0x0001UL,
+<a name="l00754"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eafc6417e382c98a2d507830de62fd4830">00754</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eafc6417e382c98a2d507830de62fd4830" title="Use UTF16 little-endian encoding.">kXMP_EncodeUTF16Little</a> = _XMP_UTF16_Bit | _XMP_LittleEndian_Bit,
<a name="l00755"></a>00755
-<a name="l00757"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635aa325d9ffba68a934f0a0a0f6ecfc2f7b">00757</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635aa325d9ffba68a934f0a0a0f6ecfc2f7b" title="Iterate the global namespace table.">kXMP_IterNamespaces</a> = 0x0002UL,
+<a name="l00757"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea793e99d9ea83f0aadd5b4193a95ea713">00757</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9ea793e99d9ea83f0aadd5b4193a95ea713" title="Use UTF32 big-endian encoding.">kXMP_EncodeUTF32Big</a> = _XMP_UTF32_Bit,
<a name="l00758"></a>00758
-<a name="l00760"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635ab26e1a38d1d0343fcc5bdaab1b60e3ed">00760</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635ab26e1a38d1d0343fcc5bdaab1b60e3ed" title="Just do the immediate children of the root, default is subtree.">kXMP_IterJustChildren</a> = 0x0100UL,
+<a name="l00760"></a><a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eae0137d98ea990fa23d292489031ba09e">00760</a> <a class="code" href="XMP__Const_8h.html#a61dadd085c1777f559549e05962b2c9eae0137d98ea990fa23d292489031ba09e" title="Use UTF13 little-endian encoding.">kXMP_EncodeUTF32Little</a> = _XMP_UTF32_Bit | _XMP_LittleEndian_Bit
<a name="l00761"></a>00761
-<a name="l00763"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a4589f99b5b4a55e785e3baf4fe1d9b19">00763</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a4589f99b5b4a55e785e3baf4fe1d9b19" title="Just do the leaf nodes, default is all nodes in the subtree.">kXMP_IterJustLeafNodes</a> = 0x0200UL,
-<a name="l00764"></a>00764
-<a name="l00766"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635acf22e638f4144bcec8207b2ab69bb344">00766</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635acf22e638f4144bcec8207b2ab69bb344" title="Return just the leaf part of the path, default is the full path.">kXMP_IterJustLeafName</a> = 0x0400UL,
-<a name="l00767"></a>00767
-<a name="l00769"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a1b91947105ae68c48c5d5e36aa70d101">00769</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a1b91947105ae68c48c5d5e36aa70d101" title="Omit all qualifiers.">kXMP_IterOmitQualifiers</a> = 0x1000UL
-<a name="l00770"></a>00770
-<a name="l00771"></a>00771 };
-<a name="l00772"></a>00772
-<a name="l00774"></a>00774 <span class="keyword">enum</span> {
-<a name="l00775"></a>00775
-<a name="l00777"></a><a class="code" href="XMP__Const_8h.html#a0411cd49bb5b71852cecd93bcbf0ca2dab0b540cd3841f411471a827f833c606e">00777</a> <a class="code" href="XMP__Const_8h.html#a0411cd49bb5b71852cecd93bcbf0ca2dab0b540cd3841f411471a827f833c606e" title="Skip the subtree below the current node.">kXMP_IterSkipSubtree</a> = 0x0001UL,
-<a name="l00778"></a>00778
-<a name="l00780"></a><a class="code" href="XMP__Const_8h.html#a0411cd49bb5b71852cecd93bcbf0ca2da2537b4b8db838f85b47988b198cd2a12">00780</a> <a class="code" href="XMP__Const_8h.html#a0411cd49bb5b71852cecd93bcbf0ca2da2537b4b8db838f85b47988b198cd2a12" title="Skip the subtree below and remaining siblings of the current node.">kXMP_IterSkipSiblings</a> = 0x0002UL
-<a name="l00781"></a>00781
-<a name="l00782"></a>00782 };
+<a name="l00762"></a>00762 };
+<a name="l00763"></a>00763
+<a name="l00764"></a>00764 <span class="comment">// -------------------------------------------------------------------------------------------------</span>
+<a name="l00765"></a>00765
+<a name="l00767"></a>00767 <span class="keyword">enum</span> {
+<a name="l00768"></a>00768
+<a name="l00770"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a93f77b837d89759af3a721712c13f044">00770</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a93f77b837d89759af3a721712c13f044" title="The low 8 bits are an enum of what data structure to iterate.">kXMP_IterClassMask</a> = 0x00FFUL,
+<a name="l00771"></a>00771
+<a name="l00773"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635aa0643c076a3b3737ff88ed20f16afd2b">00773</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635aa0643c076a3b3737ff88ed20f16afd2b" title="Iterate the property tree of a TXMPMeta object.">kXMP_IterProperties</a> = 0x0000UL,
+<a name="l00774"></a>00774
+<a name="l00776"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a3333450505cd3712320aeac895e541b9">00776</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a3333450505cd3712320aeac895e541b9" title="Iterate the global alias table.">kXMP_IterAliases</a> = 0x0001UL,
+<a name="l00777"></a>00777
+<a name="l00779"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635aa325d9ffba68a934f0a0a0f6ecfc2f7b">00779</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635aa325d9ffba68a934f0a0a0f6ecfc2f7b" title="Iterate the global namespace table.">kXMP_IterNamespaces</a> = 0x0002UL,
+<a name="l00780"></a>00780
+<a name="l00782"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635ab26e1a38d1d0343fcc5bdaab1b60e3ed">00782</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635ab26e1a38d1d0343fcc5bdaab1b60e3ed" title="Just do the immediate children of the root, default is subtree.">kXMP_IterJustChildren</a> = 0x0100UL,
<a name="l00783"></a>00783
-<a name="l00784"></a>00784 <span class="comment">// -------------------------------------------------------------------------------------------------</span>
-<a name="l00785"></a>00785
-<a name="l00792"></a>00792 <span class="keyword">enum</span> {
-<a name="l00793"></a>00793
-<a name="l00795"></a><a class="code" href="XMP__Const_8h.html#abed82baf7f470b522273a3e37c24c600ad6d41710c689f16d19ac26dc9f5cc506">00795</a> <a class="code" href="XMP__Const_8h.html#abed82baf7f470b522273a3e37c24c600ad6d41710c689f16d19ac26dc9f5cc506" title="Allow commas in item values, default is separator.">kXMPUtil_AllowCommas</a> = 0x10000000UL
-<a name="l00796"></a>00796
-<a name="l00797"></a>00797 };
-<a name="l00798"></a>00798
-<a name="l00800"></a>00800 <span class="keyword">enum</span> {
-<a name="l00801"></a>00801
-<a name="l00803"></a><a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a872d2b769e775e281984cc63e28714ea">00803</a> <a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a872d2b769e775e281984cc63e28714ea" title="Do all properties, default is just external properties.">kXMPTemplate_IncludeInternalProperties</a> = 0x0001UL,
-<a name="l00804"></a>00804
-<a name="l00806"></a><a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57aae2e0fe43295736a15f0bb76ffe02544">00806</a> <a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57aae2e0fe43295736a15f0bb76ffe02544" title="Perform a Replace operation, add new properties and modify existing ones.">kXMPTemplate_ReplaceExistingProperties</a> = 0x0002UL,
+<a name="l00785"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a4589f99b5b4a55e785e3baf4fe1d9b19">00785</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a4589f99b5b4a55e785e3baf4fe1d9b19" title="Just do the leaf nodes, default is all nodes in the subtree.">kXMP_IterJustLeafNodes</a> = 0x0200UL,
+<a name="l00786"></a>00786
+<a name="l00788"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635acf22e638f4144bcec8207b2ab69bb344">00788</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635acf22e638f4144bcec8207b2ab69bb344" title="Return just the leaf part of the path, default is the full path.">kXMP_IterJustLeafName</a> = 0x0400UL,
+<a name="l00789"></a>00789
+<a name="l00791"></a><a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a1b91947105ae68c48c5d5e36aa70d101">00791</a> <a class="code" href="XMP__Const_8h.html#a726ca809ffd3d67ab4b8476646f26635a1b91947105ae68c48c5d5e36aa70d101" title="Omit all qualifiers.">kXMP_IterOmitQualifiers</a> = 0x1000UL
+<a name="l00792"></a>00792
+<a name="l00793"></a>00793 };
+<a name="l00794"></a>00794
+<a name="l00796"></a>00796 <span class="keyword">enum</span> {
+<a name="l00797"></a>00797
+<a name="l00799"></a><a class="code" href="XMP__Const_8h.html#a0411cd49bb5b71852cecd93bcbf0ca2dab0b540cd3841f411471a827f833c606e">00799</a> <a class="code" href="XMP__Const_8h.html#a0411cd49bb5b71852cecd93bcbf0ca2dab0b540cd3841f411471a827f833c606e" title="Skip the subtree below the current node.">kXMP_IterSkipSubtree</a> = 0x0001UL,
+<a name="l00800"></a>00800
+<a name="l00802"></a><a class="code" href="XMP__Const_8h.html#a0411cd49bb5b71852cecd93bcbf0ca2da2537b4b8db838f85b47988b198cd2a12">00802</a> <a class="code" href="XMP__Const_8h.html#a0411cd49bb5b71852cecd93bcbf0ca2da2537b4b8db838f85b47988b198cd2a12" title="Skip the subtree below and remaining siblings of the current node.">kXMP_IterSkipSiblings</a> = 0x0002UL
+<a name="l00803"></a>00803
+<a name="l00804"></a>00804 };
+<a name="l00805"></a>00805
+<a name="l00806"></a>00806 <span class="comment">// -------------------------------------------------------------------------------------------------</span>
<a name="l00807"></a>00807
-<a name="l00809"></a><a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a81e1b6fd067fc9ad62bc803c98701bd5">00809</a> <a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a81e1b6fd067fc9ad62bc803c98701bd5" title="Similar to Replace, also delete if the template has an empty value.">kXMPTemplate_ReplaceWithDeleteEmpty</a> = 0x0004UL,
-<a name="l00810"></a>00810
-<a name="l00812"></a><a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a145c259f83048b811c7b35bc3b339c42">00812</a> <a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a145c259f83048b811c7b35bc3b339c42" title="Perform an Add operation, add properties if they don&amp;#39;t already exist.">kXMPTemplate_AddNewProperties</a> = 0x0008UL,
-<a name="l00813"></a>00813
-<a name="l00815"></a><a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a9dac536fe6ee25de76d45bf6615abd46">00815</a> <a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a9dac536fe6ee25de76d45bf6615abd46" title="Perform a Clear operation, keep named properties and delete everything else.">kXMPTemplate_ClearUnnamedProperties</a> = 0x0010UL
-<a name="l00816"></a>00816
-<a name="l00817"></a>00817 };
+<a name="l00814"></a>00814 <span class="keyword">enum</span> {
+<a name="l00815"></a>00815
+<a name="l00817"></a><a class="code" href="XMP__Const_8h.html#abed82baf7f470b522273a3e37c24c600ad6d41710c689f16d19ac26dc9f5cc506">00817</a> <a class="code" href="XMP__Const_8h.html#abed82baf7f470b522273a3e37c24c600ad6d41710c689f16d19ac26dc9f5cc506" title="Allow commas in item values, default is separator.">kXMPUtil_AllowCommas</a> = 0x10000000UL
<a name="l00818"></a>00818
-<a name="l00820"></a>00820 <span class="keyword">enum</span> {
-<a name="l00821"></a>00821
-<a name="l00823"></a><a class="code" href="XMP__Const_8h.html#a385c44f6fb256e5716a2302a5b940388a8ddfb0572b7602a52e533d92d8b1e9fb">00823</a> <a class="code" href="XMP__Const_8h.html#a385c44f6fb256e5716a2302a5b940388a8ddfb0572b7602a52e533d92d8b1e9fb" title="Do all properties, default is just external properties.">kXMPUtil_DoAllProperties</a> = 0x0001UL,
-<a name="l00824"></a>00824
-<a name="l00826"></a><a class="code" href="XMP__Const_8h.html#a385c44f6fb256e5716a2302a5b940388adab4dad658d2d218c5b1e7d829b12962">00826</a> <a class="code" href="XMP__Const_8h.html#a385c44f6fb256e5716a2302a5b940388adab4dad658d2d218c5b1e7d829b12962" title="Replace existing values, default is to leave them.">kXMPUtil_ReplaceOldValues</a> = 0x0002UL,
-<a name="l00827"></a>00827
-<a name="l00829"></a><a class="code" href="XMP__Const_8h.html#a385c44f6fb256e5716a2302a5b940388a97753b4c5afda9c55e807e41377d86d9">00829</a> <a class="code" href="XMP__Const_8h.html#a385c44f6fb256e5716a2302a5b940388a97753b4c5afda9c55e807e41377d86d9" title="Delete properties if the new value is empty.">kXMPUtil_DeleteEmptyValues</a> = 0x0004UL,
-<a name="l00830"></a>00830
-<a name="l00832"></a><a class="code" href="XMP__Const_8h.html#a385c44f6fb256e5716a2302a5b940388a843589b878f53d42d59258f945ad770b">00832</a> <a class="code" href="XMP__Const_8h.html#a385c44f6fb256e5716a2302a5b940388a843589b878f53d42d59258f945ad770b" title="Include aliases, default is just actual properties.">kXMPUtil_IncludeAliases</a> = 0x0800UL
-<a name="l00833"></a>00833
-<a name="l00834"></a>00834 };
+<a name="l00819"></a>00819 };
+<a name="l00820"></a>00820
+<a name="l00822"></a>00822 <span class="keyword">enum</span> {
+<a name="l00823"></a>00823
+<a name="l00825"></a><a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a872d2b769e775e281984cc63e28714ea">00825</a> <a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a872d2b769e775e281984cc63e28714ea" title="Do all properties, default is just external properties.">kXMPTemplate_IncludeInternalProperties</a> = 0x0001UL,
+<a name="l00826"></a>00826
+<a name="l00828"></a><a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57aae2e0fe43295736a15f0bb76ffe02544">00828</a> <a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57aae2e0fe43295736a15f0bb76ffe02544" title="Perform a Replace operation, add new properties and modify existing ones.">kXMPTemplate_ReplaceExistingProperties</a> = 0x0002UL,
+<a name="l00829"></a>00829
+<a name="l00831"></a><a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a81e1b6fd067fc9ad62bc803c98701bd5">00831</a> <a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a81e1b6fd067fc9ad62bc803c98701bd5" title="Similar to Replace, also delete if the template has an empty value.">kXMPTemplate_ReplaceWithDeleteEmpty</a> = 0x0004UL,
+<a name="l00832"></a>00832
+<a name="l00834"></a><a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a145c259f83048b811c7b35bc3b339c42">00834</a> <a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a145c259f83048b811c7b35bc3b339c42" title="Perform an Add operation, add properties if they don&amp;#39;t already exist.">kXMPTemplate_AddNewProperties</a> = 0x0008UL,
<a name="l00835"></a>00835
-<a name="l00836"></a>00836 <span class="comment">// =================================================================================================</span>
-<a name="l00837"></a>00837 <span class="comment">// Types and Constants for XMPFiles</span>
-<a name="l00838"></a>00838 <span class="comment">// ================================</span>
-<a name="l00839"></a>00839
-<a name="l00841"></a><a class="code" href="XMP__Const_8h.html#a84d76d32dd4ef90e5a90cf759b7e563f">00841</a> <span class="keyword">enum</span> <a class="code" href="XMP__Const_8h.html#a84d76d32dd4ef90e5a90cf759b7e563f" title="Seek mode constants for use with XMP_IO and inside XMPFiles library code.">SeekMode</a> { kXMP_SeekFromStart, kXMP_SeekFromCurrent, kXMP_SeekFromEnd };
-<a name="l00842"></a>00842
-<a name="l00844"></a>00844 <span class="keyword">enum</span> {
-<a name="l00845"></a>00845
-<a name="l00846"></a>00846 <span class="comment">// ! Hex used to avoid gcc warnings. Leave the constants so the text reads big endian. There</span>
-<a name="l00847"></a>00847 <span class="comment">// ! seems to be no decent way on UNIX to determine the target endianness at compile time.</span>
-<a name="l00848"></a>00848 <span class="comment">// ! Forcing it on the client isn&#39;t acceptable.</span>
+<a name="l00837"></a><a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a9dac536fe6ee25de76d45bf6615abd46">00837</a> <a class="code" href="XMP__Const_8h.html#ab04a0655cd1e3bcac5e8f48c18df1a57a9dac536fe6ee25de76d45bf6615abd46" title="Perform a Clear operation, keep named properties and delete everything else.">kXMPTemplate_ClearUnnamedProperties</a> = 0x0010UL
+<a name="l00838"></a>00838
+<a name="l00839"></a>00839 };
+<a name="l00840"></a>00840
+<a name="l00842"></a>00842 <span class="keyword">enum</span> {
+<a name="l00843"></a>00843
+<a name="l00845"></a><a class="code" href="XMP__Const_8h.html#a385c44f6fb256e5716a2302a5b940388a8ddfb0572b7602a52e533d92d8b1e9fb">00845</a> <a class="code" href="XMP__Const_8h.html#a385c44f6fb256e5716a2302a5b940388a8ddfb0572b7602a52e533d92d8b1e9fb" title="Do all properties, default is just external properties.">kXMPUtil_DoAllProperties</a> = 0x0001UL,
+<a name="l00846"></a>00846
+<a name="l00848"></a><a class="code" href="XMP__Const_8h.html#a385c44f6fb256e5716a2302a5b940388adab4dad658d2d218c5b1e7d829b12962">00848</a> <a class="code" href="XMP__Const_8h.html#a385c44f6fb256e5716a2302a5b940388adab4dad658d2d218c5b1e7d829b12962" title="Replace existing values, default is to leave them.">kXMPUtil_ReplaceOldValues</a> = 0x0002UL,
<a name="l00849"></a>00849
-<a name="l00850"></a>00850 <span class="comment">// --------------------</span>
-<a name="l00851"></a>00851 <span class="comment">// Public file formats.</span>
+<a name="l00851"></a><a class="code" href="XMP__Const_8h.html#a385c44f6fb256e5716a2302a5b940388a97753b4c5afda9c55e807e41377d86d9">00851</a> <a class="code" href="XMP__Const_8h.html#a385c44f6fb256e5716a2302a5b940388a97753b4c5afda9c55e807e41377d86d9" title="Delete properties if the new value is empty.">kXMPUtil_DeleteEmptyValues</a> = 0x0004UL,
<a name="l00852"></a>00852
-<a name="l00854"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da17ab6d429c1550eb3cc16d2e544b78eb">00854</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da17ab6d429c1550eb3cc16d2e544b78eb" title="Public file format constant: &amp;#39;PDF &amp;#39;.">kXMP_PDFFile</a> = 0x50444620UL,
-<a name="l00856"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da52c90935ee28a0875a49843d463cad70">00856</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da52c90935ee28a0875a49843d463cad70" title="Public file format constant: &amp;#39;PS &amp;#39;, general PostScript following DSC conventions...">kXMP_PostScriptFile</a> = 0x50532020UL,
-<a name="l00858"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dad947e6da0c4d923195d93e0c53a79c4e">00858</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dad947e6da0c4d923195d93e0c53a79c4e" title="Public file format constant: &amp;#39;EPS &amp;#39;, encapsulated PostScript.">kXMP_EPSFile</a> = 0x45505320UL,
-<a name="l00859"></a>00859
-<a name="l00861"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dad752b2d3e1139e0745223a9385ef6487">00861</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dad752b2d3e1139e0745223a9385ef6487" title="Public file format constant: &amp;#39;JPEG&amp;#39;.">kXMP_JPEGFile</a> = 0x4A504547UL,
-<a name="l00863"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da78b8fa38aaa2067e3e1baa0dcaa7571d">00863</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da78b8fa38aaa2067e3e1baa0dcaa7571d" title="Public file format constant: &amp;#39;JPX &amp;#39;, JPEG 2000, ISO 15444-1.">kXMP_JPEG2KFile</a> = 0x4A505820UL,
-<a name="l00865"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dadc0edf25d933c2a21b25449692c3ba08">00865</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dadc0edf25d933c2a21b25449692c3ba08" title="Public file format constant: &amp;#39;TIFF&amp;#39;.">kXMP_TIFFFile</a> = 0x54494646UL,
-<a name="l00867"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da851d2f4525d705cd2dcabb540d0ddc06">00867</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da851d2f4525d705cd2dcabb540d0ddc06" title="Public file format constant: &amp;#39;GIF &amp;#39;.">kXMP_GIFFile</a> = 0x47494620UL,
-<a name="l00869"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dac989381d37de320495e4d13f9ecc6371">00869</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dac989381d37de320495e4d13f9ecc6371" title="Public file format constant: &amp;#39;PNG &amp;#39;.">kXMP_PNGFile</a> = 0x504E4720UL,
-<a name="l00870"></a>00870
-<a name="l00872"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da564a8095f65d951f451e16eb56650597">00872</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da564a8095f65d951f451e16eb56650597" title="Public file format constant: &amp;#39;SWF &amp;#39;.">kXMP_SWFFile</a> = 0x53574620UL,
-<a name="l00874"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dab1eeba00d1d92e313acfe68cd054daf9">00874</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dab1eeba00d1d92e313acfe68cd054daf9" title="Public file format constant: &amp;#39;FLA &amp;#39;.">kXMP_FLAFile</a> = 0x464C4120UL,
-<a name="l00876"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da455bc501088bbd8061fe3ea386a5066f">00876</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da455bc501088bbd8061fe3ea386a5066f" title="Public file format constant: &amp;#39;FLV &amp;#39;.">kXMP_FLVFile</a> = 0x464C5620UL,
-<a name="l00877"></a>00877
-<a name="l00879"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035daebdb172c8a75b4ead2eff2d26ed3dc37">00879</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035daebdb172c8a75b4ead2eff2d26ed3dc37" title="Public file format constant: &amp;#39;MOV &amp;#39;, Quicktime.">kXMP_MOVFile</a> = 0x4D4F5620UL,
-<a name="l00881"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dae3a6333624e5c292caf14ad849a5e26e">00881</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dae3a6333624e5c292caf14ad849a5e26e" title="Public file format constant: &amp;#39;AVI &amp;#39;.">kXMP_AVIFile</a> = 0x41564920UL,
-<a name="l00883"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dad2935ea79b4f9253891e3a68a002c5bb">00883</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dad2935ea79b4f9253891e3a68a002c5bb" title="Public file format constant: &amp;#39;CIN &amp;#39;, Cineon.">kXMP_CINFile</a> = 0x43494E20UL,
-<a name="l00885"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dacc1fcd4e52423c0dd2966a2e92352fb8">00885</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dacc1fcd4e52423c0dd2966a2e92352fb8" title="Public file format constant: &amp;#39;WAV &amp;#39;.">kXMP_WAVFile</a> = 0x57415620UL,
-<a name="l00887"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035daf3ee34ed2bc26dec0e2d572eeb0de89b">00887</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035daf3ee34ed2bc26dec0e2d572eeb0de89b" title="Public file format constant: &amp;#39;MP3 &amp;#39;.">kXMP_MP3File</a> = 0x4D503320UL,
-<a name="l00889"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da42cb8767d9cf16eaeb7aec68a4f224e9">00889</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da42cb8767d9cf16eaeb7aec68a4f224e9" title="Public file format constant: &amp;#39;SES &amp;#39;, Audition session.">kXMP_SESFile</a> = 0x53455320UL,
-<a name="l00891"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da6c949ee85f42eaaed035591338be6789">00891</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da6c949ee85f42eaaed035591338be6789" title="Public file format constant: &amp;#39;CEL &amp;#39;, Audition loop.">kXMP_CELFile</a> = 0x43454C20UL,
-<a name="l00893"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da043afdc1db730db9ac03c505140c61c8">00893</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da043afdc1db730db9ac03c505140c61c8" title="Public file format constant: &amp;#39;MPEG&amp;#39;.">kXMP_MPEGFile</a> = 0x4D504547UL,
-<a name="l00895"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dab58eaebed494530072ad990ac7a9807a">00895</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dab58eaebed494530072ad990ac7a9807a" title="Public file format constant: &amp;#39;MP2 &amp;#39;.">kXMP_MPEG2File</a> = 0x4D503220UL,
-<a name="l00897"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da89e6282c3f0c8966d788500f5d8eaa91">00897</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da89e6282c3f0c8966d788500f5d8eaa91" title="Public file format constant: &amp;#39;MP4 &amp;#39;, ISO 14494-12 and -14.">kXMP_MPEG4File</a> = 0x4D503420UL,
-<a name="l00899"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da4b3477bdc53fae1511104fc54f88d134">00899</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da4b3477bdc53fae1511104fc54f88d134" title="Public file format constant: &amp;#39;MXF &amp;#39;.">kXMP_MXFFile</a> = 0x4D584620UL,
-<a name="l00901"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da78c62f7c10b16b1a862d93f6226a4622">00901</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da78c62f7c10b16b1a862d93f6226a4622" title="Public file format constant: &amp;#39;WMAV&amp;#39;, Windows Media Audio and Video.">kXMP_WMAVFile</a> = 0x574D4156UL,
-<a name="l00903"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035daf093d01e7e9cc55a7d1e204498521fc3">00903</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035daf093d01e7e9cc55a7d1e204498521fc3" title="Public file format constant: &amp;#39;AIFF&amp;#39;.">kXMP_AIFFFile</a> = 0x41494646UL,
-<a name="l00905"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035daab032aa36aec082c6b3a8300548346f5">00905</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035daab032aa36aec082c6b3a8300548346f5" title="Public file format constant: &amp;#39;RED &amp;#39;, RED file format.">kXMP_REDFile</a> = 0x52454420UL,
-<a name="l00907"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dabad9584845edf66f2f8fc3c336977e34">00907</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dabad9584845edf66f2f8fc3c336977e34" title="Public file format constant: &amp;#39;P2 &amp;#39;, a collection not really a single file...">kXMP_P2File</a> = 0x50322020UL,
-<a name="l00909"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da5f78caa0871695cc92e058e4f4b2dd57">00909</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da5f78caa0871695cc92e058e4f4b2dd57" title="Public file format constant: &amp;#39;XDCF&amp;#39;, a collection not really a single file...">kXMP_XDCAM_FAMFile</a> = 0x58444346UL,
-<a name="l00911"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da64fe7908df6341e13d9d8c8199cdf852">00911</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da64fe7908df6341e13d9d8c8199cdf852" title="Public file format constant: &amp;#39;XDCS&amp;#39;, a collection not really a single file...">kXMP_XDCAM_SAMFile</a> = 0x58444353UL,
-<a name="l00913"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da45bf9b21d5ffed3594fbd585c47cc4fc">00913</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da45bf9b21d5ffed3594fbd585c47cc4fc" title="Public file format constant: &amp;#39;XDCX&amp;#39;, a collection not really a single file...">kXMP_XDCAM_EXFile</a> = 0x58444358UL,
-<a name="l00915"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dafc5ff976e78df2d79d651de818b011f2">00915</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dafc5ff976e78df2d79d651de818b011f2" title="Public file format constant: &amp;#39;AVHD&amp;#39;, a collection not really a single file...">kXMP_AVCHDFile</a> = 0x41564844UL,
-<a name="l00917"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035daa0edb070c11f87c3dad9f8f7a83b9b5e">00917</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035daa0edb070c11f87c3dad9f8f7a83b9b5e" title="Public file format constant: &amp;#39;SHDV&amp;#39;, a collection not really a single file...">kXMP_SonyHDVFile</a> = 0x53484456UL,
-<a name="l00919"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dafa11d905db1236494e555956cb2f90ef">00919</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dafa11d905db1236494e555956cb2f90ef" title="Public file format constant: &amp;#39;CNXF&amp;#39;, a collection not really a single file...">kXMP_CanonXFFile</a> = 0x434E5846UL,
-<a name="l00920"></a>00920
-<a name="l00922"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da542634e6051139c44fd7b92d08c64760">00922</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da542634e6051139c44fd7b92d08c64760" title="Public file format constant: &amp;#39;HTML&amp;#39;.">kXMP_HTMLFile</a> = 0x48544D4CUL,
-<a name="l00924"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dad217b996403fa13caef3d6e978023124">00924</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dad217b996403fa13caef3d6e978023124" title="Public file format constant: &amp;#39;XML &amp;#39;.">kXMP_XMLFile</a> = 0x584D4C20UL,
-<a name="l00926"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da27051cd824d3ae7bb59e3af7a7908ffd">00926</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da27051cd824d3ae7bb59e3af7a7908ffd" title="Public file format constant: &amp;#39;text&amp;#39;.">kXMP_TextFile</a> = 0x74657874UL,
-<a name="l00927"></a>00927
-<a name="l00928"></a>00928 <span class="comment">// -------------------------------</span>
-<a name="l00929"></a>00929 <span class="comment">// Adobe application file formats.</span>
-<a name="l00930"></a>00930
-<a name="l00932"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da22b478a9d0d52d12e8e4a1181024eb1c">00932</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da22b478a9d0d52d12e8e4a1181024eb1c" title="Adobe application file format constant: &amp;#39;PSD &amp;#39;.">kXMP_PhotoshopFile</a> = 0x50534420UL,
-<a name="l00934"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da82935c41c6222ff4cca954278f18e554">00934</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da82935c41c6222ff4cca954278f18e554" title="Adobe application file format constant: &amp;#39;AI &amp;#39;.">kXMP_IllustratorFile</a> = 0x41492020UL,
-<a name="l00936"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da79cbf96ecc4ac3e0ebfb2d182bc75e60">00936</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da79cbf96ecc4ac3e0ebfb2d182bc75e60" title="Adobe application file format constant: &amp;#39;INDD&amp;#39;.">kXMP_InDesignFile</a> = 0x494E4444UL,
-<a name="l00938"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da5fb9e99541bbb2d8e375d0cc9fd92a2e">00938</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da5fb9e99541bbb2d8e375d0cc9fd92a2e" title="Adobe application file format constant: &amp;#39;AEP &amp;#39;.">kXMP_AEProjectFile</a> = 0x41455020UL,
-<a name="l00940"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dada5b138722448c4d4595fe760668c3df">00940</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dada5b138722448c4d4595fe760668c3df" title="Adobe application file format constant: &amp;#39;AET &amp;#39;, After Effects Project Template...">kXMP_AEProjTemplateFile</a> = 0x41455420UL,
-<a name="l00942"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dafd8d3d1c8c84bc6ab773f1298b3938f0">00942</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dafd8d3d1c8c84bc6ab773f1298b3938f0" title="Adobe application file format constant: &amp;#39;FFX &amp;#39;.">kXMP_AEFilterPresetFile</a> = 0x46465820UL,
-<a name="l00944"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dae28efb65bde55f3f8ddfd1fd8a168e2a">00944</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035dae28efb65bde55f3f8ddfd1fd8a168e2a" title="Adobe application file format constant: &amp;#39;NCOR&amp;#39;.">kXMP_EncoreProjectFile</a> = 0x4E434F52UL,
-<a name="l00946"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035daeff4f68cd5162370f7bf938a868e280d">00946</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035daeff4f68cd5162370f7bf938a868e280d" title="Adobe application file format constant: &amp;#39;PRPJ&amp;#39;.">kXMP_PremiereProjectFile</a> = 0x5052504AUL,
-<a name="l00948"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da1ad712bbd349dc899ca1e71971032b0a">00948</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da1ad712bbd349dc899ca1e71971032b0a" title="Adobe application file format constant: &amp;#39;PRTL&amp;#39;.">kXMP_PremiereTitleFile</a> = 0x5052544CUL,
-<a name="l00950"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da96804f7b8ce83786051c4dac4930aa96">00950</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da96804f7b8ce83786051c4dac4930aa96" title="Adobe application file format constant: &amp;#39;UCF &amp;#39;, Universal Container Format...">kXMP_UCFFile</a> = 0x55434620UL,
-<a name="l00951"></a>00951
-<a name="l00952"></a>00952 <span class="comment">// -------</span>
-<a name="l00953"></a>00953 <span class="comment">// Others.</span>
-<a name="l00954"></a>00954
-<a name="l00956"></a><a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da2845f95eaaaf492f5011bff05a398719">00956</a> <a class="code" href="XMP__Const_8h.html#abc5c98fcc1211af2b80116dd6e0a035da2845f95eaaaf492f5011bff05a398719" title="Unknown file format constant: &amp;#39; &amp;#39;.">kXMP_UnknownFile</a> = 0x20202020UL
-<a name="l00957"></a>00957
-<a name="l00958"></a>00958 };
-<a name="l00959"></a>00959
-<a name="l00961"></a><a class="code" href="XMP__Const_8h.html#a300d9a9189cb4ddb6970d05389f5c28e">00961</a> <span class="keyword">typedef</span> XMP_Uns32 <a class="code" href="XMP__Const_8h.html#a300d9a9189cb4ddb6970d05389f5c28e" title="Type for file format identification constants. See kXMP_PDFFile and following.">XMP_FileFormat</a>;
-<a name="l00962"></a>00962
-<a name="l00963"></a>00963 <span class="comment">// -------------------------------------------------------------------------------------------------</span>
-<a name="l00964"></a>00964
-<a name="l00966"></a>00966 <span class="keyword">enum</span> {
-<a name="l00967"></a>00967 kXMP_CharLittleEndianMask = 1,
-<a name="l00968"></a>00968 kXMP_Char16BitMask = 2,
-<a name="l00969"></a>00969 kXMP_Char32BitMask = 4
-<a name="l00970"></a>00970 };
-<a name="l00971"></a>00971
-<a name="l00973"></a>00973 <span class="keyword">enum</span> {
-<a name="l00975"></a><a class="code" href="XMP__Const_8h.html#a05589fbab0657f08285ebdfe93f5ec9eaf5b20dd9abbef29169a362b265049637">00975</a> <a class="code" href="XMP__Const_8h.html#a05589fbab0657f08285ebdfe93f5ec9eaf5b20dd9abbef29169a362b265049637" title="8-bit">kXMP_Char8Bit</a> = 0,
-<a name="l00977"></a><a class="code" href="XMP__Const_8h.html#a05589fbab0657f08285ebdfe93f5ec9ea0966bca9b241646f6a730f96c5c14a2d">00977</a> <a class="code" href="XMP__Const_8h.html#a05589fbab0657f08285ebdfe93f5ec9ea0966bca9b241646f6a730f96c5c14a2d" title="16-bit big-endian">kXMP_Char16BitBig</a> = kXMP_Char16BitMask,
-<a name="l00979"></a><a class="code" href="XMP__Const_8h.html#a05589fbab0657f08285ebdfe93f5ec9ea19b97b941d6586031190025225ee0eaa">00979</a> <a class="code" href="XMP__Const_8h.html#a05589fbab0657f08285ebdfe93f5ec9ea19b97b941d6586031190025225ee0eaa" title="16-bit little-endian">kXMP_Char16BitLittle</a> = kXMP_Char16BitMask | kXMP_CharLittleEndianMask,
-<a name="l00981"></a><a class="code" href="XMP__Const_8h.html#a05589fbab0657f08285ebdfe93f5ec9ea87f8231aec6dd125baf77c9f3f918fbc">00981</a> <a class="code" href="XMP__Const_8h.html#a05589fbab0657f08285ebdfe93f5ec9ea87f8231aec6dd125baf77c9f3f918fbc" title="32-bit big-endian">kXMP_Char32BitBig</a> = kXMP_Char32BitMask,
-<a name="l00983"></a><a class="code" href="XMP__Const_8h.html#a05589fbab0657f08285ebdfe93f5ec9ea859e7aa88e7dfd3f55ad2b6445a4708e">00983</a> <a class="code" href="XMP__Const_8h.html#a05589fbab0657f08285ebdfe93f5ec9ea859e7aa88e7dfd3f55ad2b6445a4708e" title="32-bit little-endian">kXMP_Char32BitLittle</a> = kXMP_Char32BitMask | kXMP_CharLittleEndianMask,
-<a name="l00985"></a><a class="code" href="XMP__Const_8h.html#a05589fbab0657f08285ebdfe93f5ec9ea6c37f0724299a9c88e2f622d3246d63b">00985</a> <a class="code" href="XMP__Const_8h.html#a05589fbab0657f08285ebdfe93f5ec9ea6c37f0724299a9c88e2f622d3246d63b" title="Variable or not-yet-known cases.">kXMP_CharUnknown</a> = 1
-<a name="l00986"></a>00986 };
-<a name="l00987"></a>00987
-<a name="l01020"></a>01020
-<a name="l01021"></a><a class="code" href="XMP__Const_8h.html#aa7596216164335f926cb91d600cddf99">01021</a> <span class="preprocessor">#define XMP_CharFormIs16Bit(f) ( ((int)(f) &amp; kXMP_Char16BitMask) != 0 )</span>
-<a name="l01022"></a><a class="code" href="XMP__Const_8h.html#a1e99ef08266943f52f5c649ab2836ddf">01022</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_CharFormIs32Bit(f) ( ((int)(f) &amp; kXMP_Char32BitMask) != 0 )</span>
-<a name="l01023"></a><a class="code" href="XMP__Const_8h.html#aba2539629b8d238fc56a1901dd07ebca">01023</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_CharFormIsBigEndian(f) ( ((int)(f) &amp; kXMP_CharLittleEndianMask) == 0 )</span>
-<a name="l01024"></a><a class="code" href="XMP__Const_8h.html#a906ec1cd2fb1631c1b5ad9ccdf9c0a6b">01024</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_CharFormIsLittleEndian(f) ( ((int)(f) &amp; kXMP_CharLittleEndianMask) != 0 )</span>
-<a name="l01025"></a><a class="code" href="XMP__Const_8h.html#a85bbf023b1b799c3c20176aa289d32b0">01025</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_GetCharSize(f) ( ((int)(f)&amp;6) == 0 ? 1 : (int)(f)&amp;6 )</span>
-<a name="l01026"></a><a class="code" href="XMP__Const_8h.html#a8f522964919b742b4138c79611997bae">01026</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_CharToSerializeForm(cf) ( (XMP_OptionBits)(cf) )</span>
-<a name="l01027"></a><a class="code" href="XMP__Const_8h.html#a93e7900e6c9fb4057dfd685b5201057d">01027</a> <span class="preprocessor"></span><span class="preprocessor">#define XMP_CharFromSerializeForm(sf) ( (XMP_Uns8)(sf) )</span>
-<a name="l01028"></a>01028 <span class="preprocessor"></span>
-<a name="l01031"></a><a class="code" href="XMP__Const_8h.html#a6a9b77b60c63781a8776f10880856bf4">01031</a> <span class="preprocessor">#define kXMPFiles_UnknownOffset ((XMP_Int64)-1)</span>
-<a name="l01032"></a>01032 <span class="preprocessor"></span>
-<a name="l01035"></a><a class="code" href="XMP__Const_8h.html#ae0901aabcf619f17cff03f08e5ed3658">01035</a> <span class="preprocessor">#define kXMPFiles_UnknownLength ((XMP_Int32)-1)</span>
-<a name="l01036"></a>01036 <span class="preprocessor"></span>
-<a name="l01038"></a><a class="code" href="structXMP__PacketInfo.html">01038</a> <span class="keyword">struct </span><a class="code" href="structXMP__PacketInfo.html" title="XMP packet description.">XMP_PacketInfo</a> {
-<a name="l01039"></a>01039
-<a name="l01041"></a><a class="code" href="structXMP__PacketInfo.html#a20f65fcfd0f3658ab93ff441a9d61d2c">01041</a> XMP_Int64 <a class="code" href="structXMP__PacketInfo.html#a20f65fcfd0f3658ab93ff441a9d61d2c" title="Packet offset in the file in bytes, -1 if unknown.">offset</a>;
-<a name="l01043"></a><a class="code" href="structXMP__PacketInfo.html#af526c582b66e24553f2d4b11eb714a44">01043</a> XMP_Int32 <a class="code" href="structXMP__PacketInfo.html#af526c582b66e24553f2d4b11eb714a44" title="Packet length in the file in bytes, -1 if unknown.">length</a>;
-<a name="l01045"></a><a class="code" href="structXMP__PacketInfo.html#af4f99e6a5b36b05fdf4a519421875256">01045</a> XMP_Int32 <a class="code" href="structXMP__PacketInfo.html#af4f99e6a5b36b05fdf4a519421875256" title="Packet padding size in bytes, zero if unknown.">padSize</a>; <span class="comment">// Zero if unknown.</span>
-<a name="l01046"></a>01046
-<a name="l01048"></a><a class="code" href="structXMP__PacketInfo.html#a039ce6665fe8e08d922a46f266799f75">01048</a> XMP_Uns8 <a class="code" href="structXMP__PacketInfo.html#a039ce6665fe8e08d922a46f266799f75" title="Character format using the values kXMP_Char8Bit, kXMP_Char16BitBig, etc.">charForm</a>;
-<a name="l01050"></a><a class="code" href="structXMP__PacketInfo.html#a66845c1d5f3f9f36a1543a7322bd7bd1">01050</a> XMP_Bool <a class="code" href="structXMP__PacketInfo.html#a66845c1d5f3f9f36a1543a7322bd7bd1" title="True if there is a packet wrapper and the trailer says writeable by dumb packet scanners...">writeable</a>;
-<a name="l01052"></a><a class="code" href="structXMP__PacketInfo.html#a6725d8ab8b4eedddaac950d2b1b00a7f">01052</a> XMP_Bool <a class="code" href="structXMP__PacketInfo.html#a6725d8ab8b4eedddaac950d2b1b00a7f" title="True if there is a packet wrapper, the &amp;quot;&amp;lt;?xpacket...&amp;gt;&amp;quot; XML processing...">hasWrapper</a>;
-<a name="l01053"></a>01053
-<a name="l01055"></a><a class="code" href="structXMP__PacketInfo.html#a83ec12161a36451fef05d88cc754104e">01055</a> XMP_Uns8 <a class="code" href="structXMP__PacketInfo.html#a83ec12161a36451fef05d88cc754104e" title="Padding to make the struct&amp;#39;s size be a multiple 4.">pad</a>;
-<a name="l01056"></a>01056
-<a name="l01058"></a><a class="code" href="structXMP__PacketInfo.html#a2ae03a1b3d03fa9ebc829105037155a8">01058</a> <a class="code" href="structXMP__PacketInfo.html#a2ae03a1b3d03fa9ebc829105037155a8" title="Default constructor.">XMP_PacketInfo</a>() : <a class="code" href="structXMP__PacketInfo.html#a20f65fcfd0f3658ab93ff441a9d61d2c" title="Packet offset in the file in bytes, -1 if unknown.">offset</a>(<a class="code" href="XMP__Const_8h.html#a6a9b77b60c63781a8776f10880856bf4" title="Constant for an unknown packet offset within a file.">kXMPFiles_UnknownOffset</a>), <a class="code" href="structXMP__PacketInfo.html#af526c582b66e24553f2d4b11eb714a44" title="Packet length in the file in bytes, -1 if unknown.">length</a>(<a class="code" href="XMP__Const_8h.html#ae0901aabcf619f17cff03f08e5ed3658" title="Constant for an unknown packet length within a file.">kXMPFiles_UnknownLength</a>),
-<a name="l01059"></a>01059 <a class="code" href="structXMP__PacketInfo.html#af4f99e6a5b36b05fdf4a519421875256" title="Packet padding size in bytes, zero if unknown.">padSize</a>(0), <a class="code" href="structXMP__PacketInfo.html#a039ce6665fe8e08d922a46f266799f75" title="Character format using the values kXMP_Char8Bit, kXMP_Char16BitBig, etc.">charForm</a>(0), <a class="code" href="