summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormsheby <msheby@cinecert.com>2008-02-20 23:42:34 +0000
committermsheby <>2008-02-20 23:42:34 +0000
commit205957669e1b4502c579227e3bf6cc1a2bf296ea (patch)
treeb087105e276a742b01fd0ac238b280940bc74c87 /src
parent06af2732e92552974e180f136a18c9a625d017d5 (diff)
Update autotools-relevant files.
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am111
-rwxr-xr-xsrc/gen-tst.sh3
-rwxr-xr-xsrc/jp2k-crypt-tst.sh33
-rwxr-xr-xsrc/jp2k-stereo-crypt-tst.sh31
-rwxr-xr-xsrc/jp2k-stereo-tst.sh22
-rwxr-xr-xsrc/jp2k-tst.sh29
-rwxr-xr-xsrc/mpeg-crypt-tst.sh27
-rwxr-xr-xsrc/mpeg-tst.sh24
-rwxr-xr-xsrc/rng-tst.sh3
-rwxr-xr-xsrc/wav-crypt-tst.sh44
-rwxr-xr-xsrc/wav-tst.sh17
11 files changed, 344 insertions, 0 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index e69de29..9581a4c 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -0,0 +1,111 @@
+## Makefile.am -- Process this file with automake to produce Makefile.in
+
+# list of all the header files that should be installed
+include_HEADERS = KM_error.h KM_fileio.h KM_log.h KM_memio.h KM_mutex.h \
+ KM_platform.h KM_prng.h KM_util.h KM_xml.h AS_DCP.h
+
+# list of the libraries to build and install
+lib_LTLIBRARIES = libkumu.la libasdcp.la
+# sources for a library
+libkumu_la_SOURCES = KM_error.h KM_fileio.cpp KM_fileio.h KM_log.cpp KM_log.h \
+ KM_memio.h KM_mutex.h KM_platform.h KM_prng.cpp KM_prng.h KM_util.cpp \
+ KM_util.h KM_xml.cpp KM_xml.h
+# linker flags (*not* including libraries to link against) for a library
+libkumu_la_LDFLAGS = -version-info 3:19:0
+# sources for a library that don't get added to a distribution
+nodist_libasdcp_la_SOURCES = Metadata_h.tt2 Metadata_cpp.tt2 \
+ mxfgen.pl MXF_def.pl ullist.pl ULList.xml dict.xml DMS_Crypto.xml
+libasdcp_la_SOURCES = MPEG2_Parser.cpp MPEG.cpp JP2K_Codestream_Parser.cpp \
+ JP2K_Sequence_Parser.cpp JP2K.cpp PCM_Parser.cpp Wav.cpp \
+ TimedText_Parser.cpp KLV.cpp Dict.cpp MXFTypes.cpp MXF.cpp \
+ Index.cpp Metadata.cpp AS_DCP.cpp AS_DCP_MXF.cpp AS_DCP_AES.cpp \
+ h__Reader.cpp h__Writer.cpp AS_DCP_MPEG2.cpp AS_DCP_JP2K.cpp \
+ AS_DCP_PCM.cpp AS_DCP_TimedText.cpp Wav.h WavFileWriter.h MXF.h Metadata.h \
+ JP2K.h AS_DCP.h AS_DCP_internal.h KLV.h MPEG.h MXFTypes.h MDD.h \
+ PCMParserList.h S12MTimecode.h MDD.cpp
+libasdcp_la_LDFLAGS = -version-info 3:19:0
+# additional libraries to link against for a library
+libasdcp_la_LIBADD = libkumu.la
+libasdcp_la_CPPFLAGS=-DASDCP_PLATFORM=\"@host@\"
+# Python extension
+if PYTHON_USE
+pyexecdir = @PYTHON_EXECDIR@
+pyexec_LTLIBRARIES = kumu.la
+kumu_la_SOURCES = kumu_python.cpp kumu_python.h
+kumu_la_CPPFLAGS = @PYTHON_CPPFLAGS@
+kumu_la_LDFLAGS = @PYTHON_LSPEC@ -avoid-version -module
+kumu_la_LIBADD = libkumu.la
+endif
+
+# list of programs to be built and installed
+bin_PROGRAMS = asdcp-test blackwave klvwalk kmfilegen kmrandgen \
+ kmuuidgen wavesplit
+
+# sources for a program
+asdcp_test_SOURCES = asdcp-test.cpp PCMParserList.cpp
+# list of libraries to link against for a program
+asdcp_test_LDADD = libasdcp.la
+kmfilegen_SOURCES = kmfilegen.cpp
+kmfilegen_LDADD = libasdcp.la
+kmrandgen_SOURCES = kmrandgen.cpp
+kmrandgen_LDADD = libasdcp.la
+kmuuidgen_SOURCES = kmuuidgen.cpp
+kmuuidgen_LDADD = libasdcp.la
+blackwave_SOURCES = blackwave.cpp
+blackwave_LDADD = libasdcp.la
+klvwalk_SOURCES = klvwalk.cpp
+klvwalk_LDADD = libasdcp.la
+wavesplit_SOURCES = wavesplit.cpp
+wavesplit_LDADD = libasdcp.la
+
+# list of programs that need to be compiled for use in test suite
+check_PROGRAMS = asdcp-mem-test path-test jp2k-test S429-5-cgi \
+ fips-186-rng-test asdcp-version
+
+# sources for a test program
+asdcp_mem_test_SOURCES = asdcp-mem-test.cpp
+# list of libraries to link against for a test program
+asdcp_mem_test_LDADD = libasdcp.la
+path_test_SOURCES = path-test.cpp
+path_test_LDADD = libkumu.la
+jp2k_test_SOURCES = jp2k-test.cpp
+jp2k_test_LDADD = libasdcp.la
+S429_5_cgi_SOURCES = S429-5-cgi.cpp
+S429_5_cgi_LDADD = libasdcp.la
+fips_186_rng_test_SOURCES = fips-186-rng-test.cpp
+fips_186_rng_test_LDADD = libasdcp.la
+asdcp_version_SOURCES = asdcp-version.cpp
+asdcp_version_LDADD = libkumu.la
+
+
+# list of test scripts to execute during "make check"
+TESTS = rng-tst.sh gen-tst.sh \
+ jp2k-tst.sh jp2k-crypt-tst.sh jp2k-stereo-tst.sh jp2k-stereo-crypt-tst.sh \
+ wav-tst.sh wav-crypt-tst.sh mpeg-tst.sh mpeg-crypt-tst.sh
+# environment variables to pass to above tests
+TESTS_ENVIRONMENT = BUILD_DIR="." TEST_FILES=../tests TEST_FILE_PREFIX=DCPd1-M1 \
+ CRYPT_KEY=70e0de21c98fbd455ad5b8042edb41a6 CRYPT_KEY_B=aa2d05475d568cd52cb3415e65cba76f \
+ JP2K_PREFIX=MM_2k_XYZ_
+
+# files to include in the distribution that automake doesn't automatically include
+EXTRA_DIST = fips-186-test-harness.pl $(TESTS)
+
+
+# source files that are themselves built
+BUILT_SOURCES = Metadata.h Metadata.cpp MDD.h MDD.cpp
+# files to be removed with "make maintainer-clean"
+MAINTAINERCLEANFILES = Metadata.h Metadata.cpp MDD.h MDD.cpp
+
+# build commands for built sources
+# dependencies: $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml
+MDD.h:
+ $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml > MDD.h
+# dependencies: $(srcdir)/ullist.pl $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml
+MDD.cpp:
+ $(srcdir)/ullist.pl -s $(srcdir)/ULList.xml $(srcdir)/dict.xml $(srcdir)/DMS_Crypto.xml > MDD.cpp
+# dependencies: $(srcdir)/Metadata_h.tt2 $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl
+Metadata.h:
+ $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl $(srcdir)/Metadata_h.tt2 > Metadata.h
+# dependencies: Metadata.h $(srcdir)/Metadata_cpp.tt2
+Metadata.cpp:
+ $(srcdir)/mxfgen.pl $(srcdir)/MXF_def.pl $(srcdir)/Metadata_cpp.tt2 > Metadata.cpp
diff --git a/src/gen-tst.sh b/src/gen-tst.sh
new file mode 100755
index 0000000..948b89b
--- /dev/null
+++ b/src/gen-tst.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+${BUILD_DIR}/asdcp-test${EXEEXT} -g
diff --git a/src/jp2k-crypt-tst.sh b/src/jp2k-crypt-tst.sh
new file mode 100755
index 0000000..b83fb73
--- /dev/null
+++ b/src/jp2k-crypt-tst.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+# crypto JPEG 2000 tests
+
+${BUILD_DIR}/asdcp-test${EXEEXT} -k ${CRYPT_KEY} \
+ -c ${TEST_FILES}/write_crypt_test_jp2k.mxf ${TEST_FILES}/${TEST_FILE_PREFIX}
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+${BUILD_DIR}/asdcp-test${EXEEXT} -i ${TEST_FILES}/write_crypt_test_jp2k.mxf
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+
+
+(${BUILD_DIR}/asdcp-test${EXEEXT} -k ${CRYPT_KEY_B} \
+ -x ${TEST_FILES}/plaintext ${TEST_FILES}/write_crypt_test_jp2k.mxf; \
+ if [ $? -eq 1 ]; then exit 0; fi; exit 1 )
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+${BUILD_DIR}/asdcp-test${EXEEXT} -m -k ${CRYPT_KEY} \
+ -x ${TEST_FILES}/plaintext/${JP2K_PREFIX} ${TEST_FILES}/write_crypt_test_jp2k.mxf
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+for file in `ls ../test/${TEST_FILE_PREFIX}`; do \
+ echo "$file"; \
+ cmp ../test/${TEST_FILE_PREFIX}/$file ../test/plaintext/$file; \
+ if [ $? -ne 0 ]; then \
+ exit 1; \
+ fi; \
+done
diff --git a/src/jp2k-stereo-crypt-tst.sh b/src/jp2k-stereo-crypt-tst.sh
new file mode 100755
index 0000000..1b5d8ae
--- /dev/null
+++ b/src/jp2k-stereo-crypt-tst.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+
+# crypto JPEG 2000 stereoscopic tests
+
+${BUILD_DIR}/asdcp-test${EXEEXT} -k ${CRYPT_KEY} \
+ -3 -c ${TEST_FILES}/write_crypt_test_jp2k.mxf \
+ ${TEST_FILES}/${TEST_FILE_PREFIX} ${TEST_FILES}/${TEST_FILE_PREFIX}
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+${BUILD_DIR}/asdcp-test${EXEEXT} -i ${TEST_FILES}/write_crypt_test_jp2k.mxf
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+
+
+(${BUILD_DIR}/asdcp-test${EXEEXT} -k ${CRYPT_KEY_B} \
+ -3 -x ${TEST_FILES}/plaintext ${TEST_FILES}/write_crypt_test_jp2k.mxf; \
+ if [ $? -eq 1 ]; then exit 0; fi; exit 1 )
+${BUILD_DIR}/asdcp-test${EXEEXT} -m -k ${CRYPT_KEY} \
+ -3 -x ${TEST_FILES}/plaintext/${JP2K_PREFIX} ${TEST_FILES}/write_crypt_test_jp2k.mxf
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+for file in `ls ../test/${TEST_FILE_PREFIX}`; do \
+ echo "$file"; \
+ cmp ../test/${TEST_FILE_PREFIX}/$file ../test/plaintext/$file; \
+ if [ $? -ne 0 ]; then \
+ exit 1; \
+ fi; \
+done
diff --git a/src/jp2k-stereo-tst.sh b/src/jp2k-stereo-tst.sh
new file mode 100755
index 0000000..9866b9a
--- /dev/null
+++ b/src/jp2k-stereo-tst.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# JPEG 2000 stereoscopic tests
+
+${BUILD_DIR}/asdcp-test${EXEEXT} -3 -c ${TEST_FILES}/write_test_jp2k.mxf \
+ ${TEST_FILES}/${TEST_FILE_PREFIX} ${TEST_FILES}/${TEST_FILE_PREFIX}
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+
+
+${BUILD_DIR}/asdcp-test${EXEEXT} -3 -x ${TEST_FILES}/extract/${JP2K_PREFIX} ${TEST_FILES}/write_test_jp2k.mxf
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+for file in `ls ${TEST_FILES}/${TEST_FILE_PREFIX}`; do \
+ echo "$file"; \
+ cmp ${TEST_FILES}/${TEST_FILE_PREFIX}/$file ${TEST_FILES}/extract/$file; \
+ if [ $? -ne 0 ]; then \
+ exit 1; \
+ fi; \
+done
diff --git a/src/jp2k-tst.sh b/src/jp2k-tst.sh
new file mode 100755
index 0000000..c29c789
--- /dev/null
+++ b/src/jp2k-tst.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+# JPEG 2000 tests
+
+mkdir -p ${TEST_FILES}/extract ${TEST_FILES}/plaintext
+
+${BUILD_DIR}/asdcp-test${EXEEXT} -c ${TEST_FILES}/write_test_jp2k.mxf ${TEST_FILES}/${TEST_FILE_PREFIX}
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+
+
+${BUILD_DIR}/asdcp-test${EXEEXT} -x ${TEST_FILES}/extract/${JP2K_PREFIX} ${TEST_FILES}/write_test_jp2k.mxf
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+for file in `ls ../test/${TEST_FILE_PREFIX}`; do \
+ echo "$file"; \
+ cmp ../test/${TEST_FILE_PREFIX}/$file ../test/extract/$file; \
+ if [ $? -ne 0 ]; then \
+ exit 1; \
+ fi; \
+done
+
+
+#${BUILD_DIR}/jp2k-test${EXEEXT} ${TEST_FILES}/${TEST_FILE_PREFIX}/MM_2k_XYZ_000000.j2c
+#if [ $? -ne 0 ]; then
+# exit 1
+#fi
diff --git a/src/mpeg-crypt-tst.sh b/src/mpeg-crypt-tst.sh
new file mode 100755
index 0000000..f11b599
--- /dev/null
+++ b/src/mpeg-crypt-tst.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# crypto MPEG tests
+
+${BUILD_DIR}/asdcp-test${EXEEXT} -k ${CRYPT_KEY} \
+ -c ${TEST_FILES}/write_crypt_test_mpeg.mxf ${TEST_FILES}/${TEST_FILE_PREFIX}.mpg
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+${BUILD_DIR}/asdcp-test${EXEEXT} -i ${TEST_FILES}/write_crypt_test_mpeg.mxf
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+
+
+(${BUILD_DIR}/asdcp-test${EXEEXT} -k ${CRYPT_KEY_B} \
+ -x ${TEST_FILES}/plaintext ${TEST_FILES}/write_crypt_test_mpeg.mxf; \
+ if [ $? -eq 1 ]; then exit 0; fi; exit 1 )
+${BUILD_DIR}/asdcp-test${EXEEXT} -m -k ${CRYPT_KEY} \
+ -x ${TEST_FILES}/plaintext ${TEST_FILES}/write_crypt_test_mpeg.mxf
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+cmp ${TEST_FILES}/${TEST_FILE_PREFIX}.mpg ${TEST_FILES}/plaintext.ves
+if [ $? -ne 0 ]; then
+ exit 1
+fi
diff --git a/src/mpeg-tst.sh b/src/mpeg-tst.sh
new file mode 100755
index 0000000..35cb060
--- /dev/null
+++ b/src/mpeg-tst.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+# MPEG tests
+
+${BUILD_DIR}/asdcp-test${EXEEXT} -c ${TEST_FILES}/write_test_mpeg.mxf ${TEST_FILES}/${TEST_FILE_PREFIX}.mpg
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+
+
+${BUILD_DIR}/asdcp-test${EXEEXT} -x ${TEST_FILES}/extract ${TEST_FILES}/write_test_mpeg.mxf
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+cmp ${TEST_FILES}/${TEST_FILE_PREFIX}.mpg ${TEST_FILES}/extract.ves
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+
+
+#${BUILD_DIR}/asdcp-test${EXEEXT} -G ${TEST_FILES}/write_test_mpeg.mxf
+#if [ $? -ne 0 ]; then
+# exit 1
+#fi
diff --git a/src/rng-tst.sh b/src/rng-tst.sh
new file mode 100755
index 0000000..12b765b
--- /dev/null
+++ b/src/rng-tst.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+${srcdir}/fips-186-test-harness.pl ${BUILD_DIR}/fips-186-rng-test${EXEEXT}
diff --git a/src/wav-crypt-tst.sh b/src/wav-crypt-tst.sh
new file mode 100755
index 0000000..3e8084f
--- /dev/null
+++ b/src/wav-crypt-tst.sh
@@ -0,0 +1,44 @@
+#!/bin/sh
+
+# crypto WAV tests
+
+${BUILD_DIR}/asdcp-test${EXEEXT} -k ${CRYPT_KEY} \
+ -c ${TEST_FILES}/write_crypt_test_wav.mxf ${TEST_FILES}/${TEST_FILE_PREFIX}.wav
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+${BUILD_DIR}/asdcp-test${EXEEXT} -i ${TEST_FILES}/write_crypt_test_wav.mxf
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+${BUILD_DIR}/asdcp-test${EXEEXT} -p 23 -k ${CRYPT_KEY} \
+ -c ${TEST_FILES}/write_crypt_test_2398_wav.mxf ${TEST_FILES}/${TEST_FILE_PREFIX}.wav
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+${BUILD_DIR}/asdcp-test${EXEEXT} -i ${TEST_FILES}/write_crypt_test_2398_wav.mxf
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+
+
+( ${BUILD_DIR}/asdcp-test${EXEEXT} -k ${CRYPT_KEY_B} \
+ -x ${TEST_FILES}/plaintext ${TEST_FILES}/write_crypt_test_wav.mxf; \
+ if [ $? -eq 1 ]; then exit 0; fi; exit 1 )
+${BUILD_DIR}/asdcp-test${EXEEXT} -m -k ${CRYPT_KEY} \
+ -x ${TEST_FILES}/plaintext ${TEST_FILES}/write_crypt_test_wav.mxf
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+cmp ${TEST_FILES}/${TEST_FILE_PREFIX}.wav ${TEST_FILES}/plaintext_1.wav
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+( ${BUILD_DIR}/asdcp-test${EXEEXT} -k ${CRYPT_KEY_B} \
+ -x ${TEST_FILES}/plaintext_2398 ${TEST_FILES}/write_crypt_test_2398_wav.mxf; \
+ if [ $? -eq 1 ]; then exit 0; fi; exit 1 )
+${BUILD_DIR}/asdcp-test${EXEEXT} -m -k ${CRYPT_KEY} \
+ -x ${TEST_FILES}/plaintext_2398 ${TEST_FILES}/write_crypt_test_2398_wav.mxf
+if [ $? -ne 0 ]; then
+ exit 1
+fi
diff --git a/src/wav-tst.sh b/src/wav-tst.sh
new file mode 100755
index 0000000..a9334eb
--- /dev/null
+++ b/src/wav-tst.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# WAV tests
+
+${BUILD_DIR}/asdcp-test${EXEEXT} -c ${TEST_FILES}/write_test_wav.mxf ${TEST_FILES}/${TEST_FILE_PREFIX}.wav
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+
+${BUILD_DIR}/asdcp-test${EXEEXT} -x ${TEST_FILES}/extract ${TEST_FILES}/write_test_wav.mxf
+if [ $? -ne 0 ]; then
+ exit 1
+fi
+cmp ${TEST_FILES}/${TEST_FILE_PREFIX}.wav ${TEST_FILES}/extract_1.wav
+if [ $? -ne 0 ]; then
+ exit 1
+fi