/*
- Copyright (C) 2014-2019 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
/*
- Copyright (C) 2012-2018 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2012-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
/*
- Copyright (C) 2015-2019 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2015-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
files in the program, then also delete it here.
*/
+
#include "atmos_asset.h"
#include "test.h"
#include <boost/test/unit_test.hpp>
#include <iostream>
+
/** Check basic read of an Atmos asset */
BOOST_AUTO_TEST_CASE (atmos_read_test)
{
/*
- Copyright (C) 2014-2020 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
files in the program, then also delete it here.
*/
-#include <boost/test/unit_test.hpp>
-#include "local_time.h"
+
#include "exceptions.h"
+#include "local_time.h"
+#include <boost/test/unit_test.hpp>
+
/** Check that dcp::LocalTime works */
BOOST_AUTO_TEST_CASE (local_time_basic_test)
}
}
+
BOOST_AUTO_TEST_CASE (local_time_add_minutes_test)
{
{
/*
- Copyright (C) 2016-2019 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2016-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
#include <boost/test/unit_test.hpp>
#include <sys/time.h>
+
void progress (float)
{
}
+
/** Check SHA1 digests */
BOOST_AUTO_TEST_CASE (make_digest_test)
{
srand (1);
int const N = 256 * 1024 * 1024;
dcp::ArrayData data (N);
- uint8_t* p = data.data();
+ auto p = data.data();
for (int i = 0; i < N; ++i) {
*p++ = rand() & 0xff;
}
data.write ("build/test/random");
/* Hash it */
- BOOST_CHECK_EQUAL (dcp::make_digest ("build/test/random", boost::bind (&progress, _1)), "GKbk/V3fcRtP5MaPdSmAGNbKkaU=");
+ BOOST_CHECK_EQUAL (dcp::make_digest("build/test/random", boost::bind(&progress, _1)), "GKbk/V3fcRtP5MaPdSmAGNbKkaU=");
}
/*
- Copyright (C) 2020 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2020-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
/* Make a CPL as a roundabout way to read the metadata we just wrote to the MXF */
- shared_ptr<dcp::ReelSoundAsset> reel_sound_asset(new dcp::ReelSoundAsset(sound_asset, 0));
- shared_ptr<dcp::Reel> reel(new dcp::Reel());
+ auto reel_sound_asset = make_shared<dcp::ReelSoundAsset>(sound_asset, 0);
+ auto reel = make_shared<dcp::Reel>();
reel->add (black_picture_asset("build/test/write_mca_descriptors_to_mxf_test", 24));
reel->add (reel_sound_asset);
/*
- Copyright (C) 2014 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2014-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
files in the program, then also delete it here.
*/
+
#include "common.h"
#include "dcp.h"
-using std::dynamic_pointer_cast;
+
using std::shared_ptr;
using std::vector;
+
void
dcp::filter_notes (vector<dcp::VerificationNote>& notes, bool ignore_missing_assets)
{
notes = filtered;
}
+
/*
- Copyright (C) 2017-2019 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2017-2021 Carl Hetherington <cth@carlh.net>
This file is part of libdcp.
files in the program, then also delete it here.
*/
-#include "encrypted_kdm.h"
+
+#include "certificate_chain.h"
#include "decrypted_kdm.h"
-#include "util.h"
+#include "encrypted_kdm.h"
#include "exceptions.h"
-#include "certificate_chain.h"
+#include "util.h"
#include <getopt.h>
-using std::string;
-using std::cout;
+
using std::cerr;
+using std::cout;
+using std::string;
using boost::optional;
+
static void
help (string n)
{
<< " -p, --private-key private key file\n";
}
+
static string
tm_to_string (struct tm t)
{
return buffer;
}
+
int
main (int argc, char* argv[])
try