Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Source/ThirdParty/c2pa-rs"]
path = Source/ThirdParty/c2pa-rs
url = https://github.com/contentauth/c2pa-rs.git
5 changes: 5 additions & 0 deletions Project/GNU/CLI/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ bwfmetaedit_SOURCES = \
../../../Source/Riff/Riff_Chunks_WAVE_adtl_note.cpp \
../../../Source/Riff/Riff_Chunks_WAVE_adtl_ltxt.cpp \
../../../Source/Riff/Riff_Chunks_WAVE_CSET.cpp \
../../../Source/Riff/Riff_Chunks_WAVE_C2PA.cpp \
../../../Source/Riff/Riff_Handler.cpp \
../../../Source/TinyXml2/tinyxml2.cpp \
../../../Source/ZenLib/Conf.cpp \
Expand All @@ -50,6 +51,10 @@ bwfmetaedit_SOURCES = \
../../../Source/ZenLib/ZtringListList.cpp \
../../../Source/ZenLib/ZtringListListF.cpp

if ENABLE_C2PA
bwfmetaedit_SOURCES += ../../../Source/Riff/Riff_C2PA_Helpers.cpp
endif

#bwfmetaedit_LDFLAGS = -no-undefined -version-info 0:0:0
AM_CXXFLAGS = -std=c++11

Expand Down
23 changes: 21 additions & 2 deletions Project/GNU/CLI/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,18 @@ dnl #########################################################################
dnl -------------------------------------------------------------------------
dnl Arguments - Enable
dnl
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable full debug]), , enable_debug=no)
AC_ARG_ENABLE(gprof, AC_HELP_STRING([--enable-gprof], [Enable gprof log]), , enable_gprof=no)
AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [Enable full debug]), , enable_debug=no)
AC_ARG_ENABLE(gprof, AC_HELP_STRING([--enable-gprof], [Enable gprof log]), , enable_gprof=no)
AC_ARG_ENABLE(universal_binary, AC_HELP_STRING([--enable-universal_binary], [Create Mac x84_64/arm64 Universal binary]), , enable_universal_binary=no)
AC_ARG_ENABLE(unicode, AS_HELP_STRING([--disable-unicode], [Disable unicode]), , enable_unicode=yes)
AC_ARG_ENABLE(arch-ppc, AC_HELP_STRING([--with-arch-ppc], [Create Mac PPC Universal binary]), , enable_arch_ppc=no)
AC_ARG_ENABLE(arch-i386, AC_HELP_STRING([--with-arch-i386], [Create Mac i386 Universal binary]), , enable_arch_i386=no)
AC_ARG_ENABLE(arch-x86_64, AC_HELP_STRING([--enable-arch-x86_64], [Create Mac x86_64 architecture]), , enable_arch_x86_64=no)
AC_ARG_ENABLE(arch-arm64, AC_HELP_STRING([--enable-arch-arm64], [Create Mac arm64 architecture]), , enable_arch_arm64=no)
AC_ARG_ENABLE(large_files, AC_HELP_STRING([--disable-large_files], [Disable large files support]), , enable_large_files=yes)
AC_ARG_ENABLE(c2pa, AC_HELP_STRING([--enable-c2pa], [Enable C2PA validation and signing]), , enable_c2pa=no)

AM_CONDITIONAL([ENABLE_C2PA], [test "$enable_c2pa" != "no"])

dnl -------------------------------------------------------------------------
dnl Arguments - With
Expand Down Expand Up @@ -155,6 +158,22 @@ if test "x$with_macosx_version_min" != xno ; then
LDFLAGS="-mmacosx-version-min=$with_macosx_version_min $LDFLAGS"
fi

dnl #########################################################################
dnl ### Libraries
dnl #########################################################################

dnl -------------------------------------------------------------------------
dnl c2pa
dnl
if test "$enable_c2pa" = "yes"; then
CXXFLAGS="-DENABLE_C2PA $CXXFLAGS"
if test "x$host_os" = "xdarwin"; then
LIBS="$srcdir/../../../Source/ThirdParty/c2pa-rs/target/release/libc2pa_c.dylib $LIBS"
else
LIBS="$srcdir/../../../Source/ThirdParty/c2pa-rs/target/release/libc2pa_c.so $LIBS"
fi
fi

dnl #########################################################################
dnl ### Output
dnl #########################################################################
Expand Down
8 changes: 5 additions & 3 deletions Project/GNU/GUI/bwfmetaedit-gui.metainfo.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2016-2019 MediaArea.net <info@mediaarea.net> -->
<!-- Copyright 2016-2026 MediaArea.net <info@mediaarea.net> -->
<component type="desktop">
<id type="desktop">bwfmetaedit-gui.desktop</id>
<launchable type="desktop-id">bwfmetaedit-gui.desktop</launchable>
Expand All @@ -8,8 +8,10 @@
<name>BWF MetaEdit</name>
<summary>Embed, validate, and export BWF files metadata</summary>
<description>
<p>BWF MetaEdit was developed by the Federal Agencies Digitization Guidelines Initiative (FADGI) supported by AudioVisual Preservation Solutions.</p>
<p>This tool permits embedding, editing, and exporting of metadata in Broadcast WAVE Format (BWF) files. This tool can also enforce metadata guidelines developed by the Federal Agencies Audio-Visual Working Group, as well as recommendations and specifications from the European Broadcasting Union (EBU), Microsoft, and IBM.</p>
<strong>BWF MetaEdit</strong> is a tool that supports embedding, validating, and exporting of metadata in Broadcast WAVE Format (BWF) files. It supports the <a href=\"http://www.digitizationguidelines.gov/guidelines/digitize-embedding.html\" target=\"_blank\">FADGI Broadcast WAVE Metadata Embedding Guidelines</a>.<br>
<br>
Initially funded by the <a href=\"https://www.loc.gov/\" target=\"_blank\">Library of Congress</a> and <a href=\"http://www.digitizationguidelines.gov/\" target=\"_blank\">FADGI (Federal Agencies Digital Guidelines Initiative)</a>; previously developed by MediaArea and led by <a href=\"http://avpreserve.com/\" target=\"_blank\">AVPreserve</a>; currently developed and led by MediaArea.<br>
MediaArea provides support and binaries for all platforms.
</description>
<keywords>
<keyword>metadata</keyword>
Expand Down
5 changes: 5 additions & 0 deletions Project/MSVC2022/CLI/BWF_MetaEdit_CLI.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,8 @@
<ClCompile Include="..\..\..\Source\Riff\Riff_Chunks_WAVE_adtl_note.cpp" />
<ClCompile Include="..\..\..\Source\Riff\Riff_Chunks_WAVE_adtl_ltxt.cpp" />
<ClCompile Include="..\..\..\Source\Riff\Riff_Chunks_WAVE_CSET.cpp" />
<ClCompile Include="..\..\..\Source\Riff\Riff_Chunks_WAVE_C2PA.cpp" />
<ClCompile Include="..\..\..\Source\Riff\Riff_C2PA_Helpers.cpp" />
<ClCompile Include="..\..\..\Source\Riff\Riff_Handler.cpp" />
<ClCompile Include="..\..\..\Source\ZenLib\Conf.cpp" />
<ClCompile Include="..\..\..\Source\ZenLib\CriticalSection.cpp" />
Expand Down Expand Up @@ -238,6 +240,9 @@
<ClInclude Include="..\..\..\Source\Riff\Riff_Base.h" />
<ClInclude Include="..\..\..\Source\Riff\Riff_Chunks.h" />
<ClInclude Include="..\..\..\Source\Riff\Riff_Handler.h" />
<ClInclude Include="..\..\..\Source\Riff\Riff_C2PA_Helpers.h" />
<ClInclude Include="..\..\..\Source\ThirdParty\json\json.h" />
<ClInclude Include="..\..\..\Source\ThirdParty\c2pa\c2pa.h" />
<ClInclude Include="..\..\..\Source\ZenLib\BitStream.h" />
<ClInclude Include="..\..\..\Source\ZenLib\BitStream_Fast.h" />
<ClInclude Include="..\..\..\Source\ZenLib\BitStream_LE.h" />
Expand Down
4 changes: 4 additions & 0 deletions Project/Mac/mkdmg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,10 @@ if [ "$KIND" = "CLI" ]; then
cp "../GNU/CLI/${APPNAME_lower}" "${FILES}-Root/usr/local/bin"
codesign -f --deep --options=runtime -s "Developer ID Application: ${SIGNATURE}" --verbose "${FILES}-Root/usr/local/bin/${APPNAME_lower}"

mkdir -p "${FILES}-Root/usr/local/lib"
cp "../../Source/ThirdParty/c2pa/c2pa-rs/target/release/libc2pa_c.dylib" "${FILES}-Root/usr/local/lib"
codesign -f --deep --options=runtime -s "Developer ID Application: ${SIGNATURE}" --verbose "${FILES}-Root/usr/local/lib/libc2pa_c.dylib"

pkgbuild --root "${FILES}-Root" --identifier "net.mediaarea.${APPNAME_lower}.mac-${KIND_lower}" --sign "Developer ID Installer: ${SIGNATURE}" --version "${VERSION}" "${FILES}/${APPNAME_lower}.pkg"
codesign -f --deep --options=runtime -s "Developer ID Application: ${SIGNATURE}" --verbose "${FILES}/${APPNAME_lower}.pkg"

Expand Down
22 changes: 22 additions & 0 deletions Project/QtCreator/bwfmetaedit-gui.pro
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,7 @@ SOURCES = \
../../Source/Riff/Riff_Chunks_WAVE_adtl_note.cpp \
../../Source/Riff/Riff_Chunks_WAVE_adtl_ltxt.cpp \
../../Source/Riff/Riff_Chunks_WAVE_CSET.cpp \
../../Source/Riff/Riff_Chunks_WAVE_C2PA.cpp \
../../Source/Riff/Riff_Handler.cpp \
../../Source/TinyXml2/tinyxml2.cpp \
../../Source/ZenLib/Conf.cpp \
Expand All @@ -167,6 +168,27 @@ SOURCES = \
../../Source/ZenLib/ZtringListList.cpp \
../../Source/ZenLib/ZtringListListF.cpp

contains(ENABLE_C2PA, yes|1) {
SOURCES += ../../Source/Riff/Riff_C2PA_Helpers.cpp \
../../Source/GUI/Qt/GUI_Main_xxxx_C2PADialog.cpp

HEADERS += ../../Source/ThirdParty/c2pa-rs/target/release/c2pa.h \
../../Source/ThirdParty/json/json.h \
../../Source/Riff/Riff_C2PA_Helpers.h \
../../Source/GUI/Qt/GUI_Main_xxxx_C2PADialog.h

DEFINES += ENABLE_C2PA

win32 {
LIBS += ../../Source/ThirdParty/c2pa-rs/target/release/c2pa_c.dll.lib
}
else:macx {
LIBS += ../../Source/ThirdParty/c2pa-rs/target/release/libc2pa_c.dylib
}
else {
LIBS += ../../Source/ThirdParty/c2pa-rs/target/release/libc2pa_c.so
}
}

macx {
HEADERS += ../../Source/Common/Mac_Helpers.h
Expand Down
21 changes: 20 additions & 1 deletion Source/CLI/CLI_Help.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ std::string Help()
ToDisplay<<" Reject file if:"<<std::endl;
ToDisplay<<"--reject-riff2rf64 Transformation to RF64 is requested"<<std::endl;
ToDisplay<<"--reject-overwrite Prevent overwrite of existing data(only add)"<<std::endl;
ToDisplay<<"--reject-c2pa Prevent invalidation of the C2PA signature if present"<<std::endl;
ToDisplay<<""<<std::endl;
ToDisplay<<" Accept file if:"<<std::endl;
ToDisplay<<"--accept-nopadding Padding byte is missing"<<std::endl;
Expand Down Expand Up @@ -91,7 +92,6 @@ std::string Help()
ToDisplay<<"--out-xml= specified file ('-' for current display)"<<std::endl;
ToDisplay<<""<<std::endl;
ToDisplay<<"*******************************************************************************"<<std::endl;
ToDisplay<<"*******************************************************************************"<<std::endl;
ToDisplay<<""<<std::endl;
ToDisplay<<" Extract Technical Metadata to:"<<std::endl;
ToDisplay<<"--out-tech Display technical data (disable others displays)"<<std::endl;
Expand Down Expand Up @@ -173,7 +173,26 @@ std::string Help()
ToDisplay<<"--MD5-Verify Verify MD5 for audio data"<<std::endl;
ToDisplay<<"--MD5-Embed Embed MD5 for audio data"<<std::endl;
ToDisplay<<"--MD5-Embed-Overwrite Embed MD5 for audio data - Allow overwriting"<<std::endl;
ToDisplay<<""<<std::endl;
ToDisplay<<"*******************************************************************************"<<std::endl;
#if defined(ENABLE_C2PA)
ToDisplay<<""<<std::endl;
ToDisplay<<"--out-C2PA Display C2PA crJSON manifest and validation status (disable others displays, allows only one input file)"<<std::endl;
ToDisplay<<"--out-C2PA= Save C2PA crJSON manifest in specified file ('-' for current display, allows only one input file)"<<std::endl;
ToDisplay<<"--out-C2PA-json Save C2PA crJSON manifest in filename.C2PA.json"<<std::endl;
ToDisplay<<"--C2PA-Verify Verify C2PA chunk validity and signature"<<std::endl;
ToDisplay<<"--C2PA-Sign-Manifest= Sign the file with C2PA, applied after all other modifications are written"<<std::endl;
ToDisplay<<" Argument is the path to a JSON C2PA manifest definition (claim_generator_info,"<<std::endl;
ToDisplay<<" title, assertions...); claim_generator_info, title and format default to"<<std::endl;
ToDisplay<<" BWFMetaEdit/<version>, the file name and 'audio/x-wav' if not provided"<<std::endl;
ToDisplay<<" Requires --C2PA-Sign-Certificate= and --C2PA-Sign-Key="<<std::endl;
ToDisplay<<"--C2PA-Sign-Certificate= Path to the PEM signing certificate (chain)"<<std::endl;
ToDisplay<<"--C2PA-Sign-Key= Path to the PEM private key"<<std::endl;
ToDisplay<<"--C2PA-Sign-Algorithm= Signing algorithm (e.g. es256)"<<std::endl;
ToDisplay<<"--C2PA-Sign-TA-URL= Optional RFC3161 timestamp authority URL"<<std::endl;
ToDisplay<<""<<std::endl;
ToDisplay<<"*******************************************************************************"<<std::endl;
#endif // defined(ENABLE_C2PA)
ToDisplay<<""<<std::endl;
ToDisplay<<"--remove-chunks= Remove specified items from the WAVE chunk tree (comma separated list)"<<std::endl;
ToDisplay<<" Chunk identifier must be 4 characters long and is case sensitive"<<std::endl;
Expand Down
Loading
Loading