diff options
| author | Carl Hetherington <cth@carlh.net> | 2014-10-16 16:32:26 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2014-10-16 16:32:26 +0100 |
| commit | da748cb939b586072b5cc8bba09f1c7f8b1236a3 (patch) | |
| tree | 5b5fe460ed4c2ec863198926b8873d3e97a37d00 | |
| parent | ed18fc59be461a8f08ffa8d52897f2710e0359bf (diff) | |
| parent | 190dc3381a03b5cdbe12881015d16ff18303844a (diff) | |
Merge branch 'master' into 12bit
| -rwxr-xr-x | asdcplib/src/h__Writer.cpp | 1 | ||||
| -rw-r--r-- | cscript | 6 | ||||
| -rwxr-xr-x | run/tests | 2 | ||||
| -rw-r--r-- | src/dcp_time.cc | 4 | ||||
| -rw-r--r-- | src/mxf_asset.cc | 1 | ||||
| -rw-r--r-- | src/signer.cc | 1 | ||||
| -rw-r--r-- | src/subtitle_asset.h | 4 | ||||
| -rw-r--r-- | test/cpl_sar.cc | 2 | ||||
| -rw-r--r-- | test/dcp_time_test.cc | 12 | ||||
| -rw-r--r-- | wscript | 12 |
10 files changed, 33 insertions, 12 deletions
diff --git a/asdcplib/src/h__Writer.cpp b/asdcplib/src/h__Writer.cpp index d743e300..676267ce 100755 --- a/asdcplib/src/h__Writer.cpp +++ b/asdcplib/src/h__Writer.cpp @@ -32,7 +32,6 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "AS_DCP_internal.h" #include "KLV.h" -using std::cout; using namespace ASDCP; using namespace ASDCP::MXF; @@ -1,12 +1,12 @@ import os def dependencies(target): - return (('libcxml', '7b4ecc3'), ('openjpeg-cdist', '13b69c2')) + return (('libcxml', 'v0.11.0'), ('openjpeg-cdist', '5d8bffd')) def build(target, options): - cmd = './waf configure --prefix=%s' % target.work_dir_cscript() + cmd = './waf configure --prefix=%s' % target.directory if target.platform == 'linux': - cmd += ' --static' + cmd += ' --static --disable-tests' elif target.platform == 'windows': cmd += ' --target-windows' elif target.platform == 'osx': @@ -10,7 +10,7 @@ private=../libdcp-test-private work=build/test dcpinfo=build/tools/dcpinfo -export LD_LIBRARY_PATH=build/src:build/asdcplib/src +export LD_LIBRARY_PATH=build/src:build/asdcplib/src:$LD_LIBRARY_PATH # Run the unit tests in test/ if [ "$1" == "--debug" ]; then diff --git a/src/dcp_time.cc b/src/dcp_time.cc index d597e3dc..4c16a91a 100644 --- a/src/dcp_time.cc +++ b/src/dcp_time.cc @@ -59,12 +59,12 @@ Time::set (double ss) t = (int (round (ss * 1000)) % 1000) / 4; s = floor (ss); - if (s > 60) { + if (s >= 60) { m = s / 60; s -= m * 60; } - if (m > 60) { + if (m >= 60) { h = m / 60; m -= h * 60; } diff --git a/src/mxf_asset.cc b/src/mxf_asset.cc index f16fd35b..28ac1933 100644 --- a/src/mxf_asset.cc +++ b/src/mxf_asset.cc @@ -123,6 +123,7 @@ MXFAsset::write_to_cpl (xmlpp::Element* node) const if (!_key_id.empty ()) { a->add_child("KeyId")->add_child_text ("urn:uuid:" + _key_id); } + a->add_child ("Hash")->add_child_text (digest ()); } void diff --git a/src/signer.cc b/src/signer.cc index 11cf5eb8..a6978885 100644 --- a/src/signer.cc +++ b/src/signer.cc @@ -17,6 +17,7 @@ */ +#include <iostream> #include <libxml++/libxml++.h> #include <xmlsec/xmldsig.h> #include <xmlsec/dl.h> diff --git a/src/subtitle_asset.h b/src/subtitle_asset.h index a7ec641c..3dfbe7e2 100644 --- a/src/subtitle_asset.h +++ b/src/subtitle_asset.h @@ -78,6 +78,10 @@ public: return _text; } + void set_text (std::string t) { + _text = t; + } + float v_position () const { return _v_position; } diff --git a/test/cpl_sar.cc b/test/cpl_sar.cc index c91ce287..a878e6b4 100644 --- a/test/cpl_sar.cc +++ b/test/cpl_sar.cc @@ -29,7 +29,7 @@ using boost::shared_ptr; */ BOOST_AUTO_TEST_CASE (cpl_sar) { - shared_ptr<libdcp::MonoPictureAsset> mp (new libdcp::MonoPictureAsset ("build/test/foo", "video.mxf")); + shared_ptr<libdcp::MonoPictureAsset> mp (new libdcp::MonoPictureAsset ("test/ref/DCP/foo", "video.mxf")); mp->set_interop (true); { diff --git a/test/dcp_time_test.cc b/test/dcp_time_test.cc index 6892711e..a8256998 100644 --- a/test/dcp_time_test.cc +++ b/test/dcp_time_test.cc @@ -59,4 +59,16 @@ BOOST_AUTO_TEST_CASE (dcp_time) BOOST_CHECK_EQUAL (libdcp::Time (4128391203LL).to_ticks(), 4128391203LL); BOOST_CHECK_EQUAL (libdcp::Time (60000).to_ticks(), 60000); + + a = libdcp::Time (3600 * 24, 24); + BOOST_CHECK_EQUAL (a.h, 1); + BOOST_CHECK_EQUAL (a.m, 0); + BOOST_CHECK_EQUAL (a.s, 0); + BOOST_CHECK_EQUAL (a.t, 0); + + a = libdcp::Time (60 * 24, 24); + BOOST_CHECK_EQUAL (a.h, 0); + BOOST_CHECK_EQUAL (a.m, 1); + BOOST_CHECK_EQUAL (a.s, 0); + BOOST_CHECK_EQUAL (a.t, 0); } @@ -2,7 +2,7 @@ import subprocess import os APPNAME = 'libdcp' -VERSION = '0.95.0devel' +VERSION = '0.98.0devel' def options(opt): opt.load('compiler_cxx') @@ -11,6 +11,7 @@ def options(opt): opt.add_option('--enable-debug', action='store_true', default=False, help='build with debugging information and without optimisation') opt.add_option('--static', action='store_true', default=False, help='build libdcp and in-tree dependencies statically, and link statically to openjpeg and cxml') opt.add_option('--valgrind', action='store_true', default=False, help='build with instructions to Valgrind to reduce false positives') + opt.add_option('--disable-tests', action='store_true', default=False, help='disable building of tests') def configure(conf): conf.load('compiler_cxx') @@ -21,6 +22,7 @@ def configure(conf): conf.env.STATIC = conf.options.static conf.env.OSX = conf.options.osx conf.env.ENABLE_DEBUG = conf.options.enable_debug + conf.env.DISABLE_TESTS = conf.options.disable_tests if conf.options.target_windows: conf.env.append_value('CXXFLAGS', '-DLIBDCP_WINDOWS') @@ -54,7 +56,7 @@ def configure(conf): conf.env.STLIB_CXML = ['cxml'] else: conf.check_cfg(package='libopenjpeg', args='--cflags --libs', uselib_store='OPENJPEG', mandatory=True) - conf.check_cfg(package='libcxml', atleast_version='0.08', args='--cflags --libs', uselib_store='CXML', mandatory=True) + conf.check_cfg(package='libcxml', atleast_version='0.11.0', args='--cflags --libs', uselib_store='CXML', mandatory=True) if conf.options.target_windows: boost_lib_suffix = '-mt' @@ -105,7 +107,8 @@ def configure(conf): lib = ['boost_date_time%s' % boost_lib_suffix, 'boost_system%s' % boost_lib_suffix], uselib_store = 'BOOST_DATETIME') - conf.recurse('test') + if not conf.env.DISABLE_TESTS: + conf.recurse('test') conf.recurse('asdcplib') def build(bld): @@ -124,7 +127,8 @@ def build(bld): bld.recurse('src') bld.recurse('tools') - bld.recurse('test') + if not bld.env.DISABLE_TESTS: + bld.recurse('test') bld.recurse('asdcplib') bld.recurse('examples') |
