summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2014-01-17 17:11:32 +0000
committerCarl Hetherington <cth@carlh.net>2014-01-17 17:11:32 +0000
commit41fc6e366ad3de85704c35961beaf539ab9ceb8b (patch)
tree22c68206025af06f3915650d5feece76e57cbfc0
parent394abae7986abf4438184a712f16dfbe3c2734da (diff)
namespace libdcp -> dcp.
-rw-r--r--examples/make_dcp.cc18
-rw-r--r--src/argb_frame.cc2
-rw-r--r--src/argb_frame.h2
-rw-r--r--src/asset.cc2
-rw-r--r--src/asset.h2
-rw-r--r--src/certificates.cc2
-rw-r--r--src/certificates.h2
-rw-r--r--src/colour_matrix.cc6
-rw-r--r--src/colour_matrix.h2
-rw-r--r--src/cpl.cc2
-rw-r--r--src/cpl.h2
-rw-r--r--src/dcp.cc8
-rw-r--r--src/dcp.h4
-rw-r--r--src/dcp_time.cc24
-rw-r--r--src/dcp_time.h2
-rw-r--r--src/exceptions.cc2
-rw-r--r--src/exceptions.h2
-rw-r--r--src/gamma_lut.cc2
-rw-r--r--src/gamma_lut.h2
-rw-r--r--src/image.cc2
-rw-r--r--src/image.h2
-rw-r--r--src/kdm.cc4
-rw-r--r--src/kdm.h2
-rw-r--r--src/key.cc6
-rw-r--r--src/key.h2
-rw-r--r--src/lut.h2
-rw-r--r--src/metadata.cc2
-rw-r--r--src/metadata.h2
-rw-r--r--src/mono_picture_asset.cc2
-rw-r--r--src/mono_picture_asset.h2
-rw-r--r--src/mono_picture_asset_writer.cc4
-rw-r--r--src/mono_picture_asset_writer.h2
-rw-r--r--src/mono_picture_frame.cc2
-rw-r--r--src/mono_picture_frame.h2
-rw-r--r--src/mxf_asset.cc2
-rw-r--r--src/mxf_asset.h2
-rw-r--r--src/parse/asset_map.cc2
-rw-r--r--src/parse/asset_map.h2
-rw-r--r--src/parse/cpl.cc2
-rw-r--r--src/parse/cpl.h2
-rw-r--r--src/parse/pkl.cc2
-rw-r--r--src/parse/pkl.h2
-rw-r--r--src/parse/subtitle.cc4
-rw-r--r--src/parse/subtitle.h2
-rw-r--r--src/picture_asset.cc2
-rw-r--r--src/picture_asset.h2
-rw-r--r--src/picture_asset_writer.cc2
-rw-r--r--src/picture_asset_writer.h2
-rw-r--r--src/picture_asset_writer_common.cc2
-rw-r--r--src/rec709_linearised_gamma_lut.cc2
-rw-r--r--src/rec709_linearised_gamma_lut.h2
-rw-r--r--src/reel.cc2
-rw-r--r--src/reel.h4
-rw-r--r--src/rgb_xyz.cc8
-rw-r--r--src/rgb_xyz.h2
-rw-r--r--src/signer.cc2
-rw-r--r--src/signer.h2
-rw-r--r--src/signer_chain.cc14
-rw-r--r--src/signer_chain.h2
-rw-r--r--src/sound_asset.cc2
-rw-r--r--src/sound_asset.h2
-rw-r--r--src/sound_frame.cc2
-rw-r--r--src/sound_frame.h2
-rw-r--r--src/srgb_linearised_gamma_lut.cc2
-rw-r--r--src/srgb_linearised_gamma_lut.h2
-rw-r--r--src/stereo_picture_asset.cc2
-rw-r--r--src/stereo_picture_asset.h2
-rw-r--r--src/stereo_picture_asset_writer.cc4
-rw-r--r--src/stereo_picture_asset_writer.h4
-rw-r--r--src/stereo_picture_frame.cc2
-rw-r--r--src/stereo_picture_frame.h2
-rw-r--r--src/subtitle_asset.cc28
-rw-r--r--src/subtitle_asset.h2
-rw-r--r--src/types.cc20
-rw-r--r--src/types.h2
-rw-r--r--src/util.cc34
-rw-r--r--src/util.h2
-rw-r--r--src/version.h2
-rw-r--r--src/xml.h2
-rw-r--r--src/xml/kdm_smpte.h2
-rw-r--r--src/xyz_frame.cc6
-rw-r--r--src/xyz_frame.h4
-rw-r--r--test/certificates_test.cc14
-rw-r--r--test/color_test.cc8
-rw-r--r--test/cpl_sar.cc6
-rw-r--r--test/dcp_test.cc16
-rw-r--r--test/dcp_time_test.cc22
-rw-r--r--test/decryption_test.cc24
-rw-r--r--test/encryption_test.cc34
-rw-r--r--test/error_test.cc10
-rw-r--r--test/frame_info_test.cc6
-rw-r--r--test/kdm_key_test.cc2
-rw-r--r--test/kdm_test.cc6
-rw-r--r--test/lut_test.cc6
-rw-r--r--test/read_dcp_test.cc6
-rw-r--r--test/recovery_test.cc12
-rw-r--r--test/rewrite_subs.cc2
-rw-r--r--test/round_trip_test.cc44
-rw-r--r--test/subs_in_out.cc2
-rw-r--r--test/subtitle_tests.cc444
-rw-r--r--test/test.cc4
-rw-r--r--test/test.h2
-rw-r--r--test/utc_offset_to_string_test.cc12
-rw-r--r--test/util_test.cc26
-rw-r--r--tools/dcpdiff.cc2
-rw-r--r--tools/dcpinfo.cc2
-rw-r--r--wscript6
107 files changed, 524 insertions, 524 deletions
diff --git a/examples/make_dcp.cc b/examples/make_dcp.cc
index 6aa4268b..d5852168 100644
--- a/examples/make_dcp.cc
+++ b/examples/make_dcp.cc
@@ -51,7 +51,7 @@ int
main ()
{
/* Make a DCP object. "My Film DCP" is the directory name for the DCP */
- libdcp::DCP dcp ("My Film DCP");
+ dcp::DCP dcp ("My Film DCP");
/* Now make a CPL object.
@@ -59,7 +59,7 @@ main ()
FEATURE is the type that the projector will list the DCP as.
24 is the frame rate, and the DCP will be 48 frames long (ie 2 seconds at 24 fps).
*/
- boost::shared_ptr<libdcp::CPL> cpl (new libdcp::CPL ("My Film DCP", "My Film", libdcp::FEATURE, 24, 48));
+ boost::shared_ptr<dcp::CPL> cpl (new dcp::CPL ("My Film DCP", "My Film", dcp::FEATURE, 24, 48));
/* And add the CPL to the DCP */
dcp.add_cpl (cpl);
@@ -68,8 +68,8 @@ main ()
First, create the object.
*/
- boost::shared_ptr<libdcp::MonoPictureAsset> picture_asset (
- new libdcp::MonoPictureAsset ("My Film DCP", "video.mxf")
+ boost::shared_ptr<dcp::MonoPictureAsset> picture_asset (
+ new dcp::MonoPictureAsset ("My Film DCP", "video.mxf")
);
/* Now set up its parameters; we have the frame rate, the
@@ -79,7 +79,7 @@ main ()
picture_asset->set_edit_rate (24);
picture_asset->set_intrinsic_duration (24);
- picture_asset->set_size (libdcp::Size (1998, 1080));
+ picture_asset->set_size (dcp::Size (1998, 1080));
/* Now we can create the asset itself. Here using a function (video_frame) to obtain the name of the JPEG2000 file for each frame.
The result will be an MXF file written to the directory "My Film DCP" (which should be the same as the DCP's
@@ -104,22 +104,22 @@ main ()
sound_files.push_back ("examples/sine_880_-12dB.wav");
/* Now we can create the sound asset using these files */
- boost::shared_ptr<libdcp::SoundAsset> sound_asset (new libdcp::SoundAsset ("My Film DCP", "audio.mxf"));
+ boost::shared_ptr<dcp::SoundAsset> sound_asset (new dcp::SoundAsset ("My Film DCP", "audio.mxf"));
sound_asset->set_edit_rate (24);
sound_asset->set_intrinsic_duration (48);
sound_asset->create (sound_files);
/* Now that we have the assets, we can create a Reel to put them in and add it to the CPL */
cpl->add_reel (
- boost::shared_ptr<libdcp::Reel> (
- new libdcp::Reel (picture_asset, sound_asset, boost::shared_ptr<libdcp::SubtitleAsset> ())
+ boost::shared_ptr<dcp::Reel> (
+ new dcp::Reel (picture_asset, sound_asset, boost::shared_ptr<dcp::SubtitleAsset> ())
)
);
/* Finally, we call this to write the XML description files to the DCP. After this, the DCP
is ready to ingest and play.
*/
- libdcp::XMLMetadata metadata;
+ dcp::XMLMetadata metadata;
dcp.write_xml (false, metadata);
return 0;
diff --git a/src/argb_frame.cc b/src/argb_frame.cc
index a48f80bb..79637329 100644
--- a/src/argb_frame.cc
+++ b/src/argb_frame.cc
@@ -19,7 +19,7 @@
#include "argb_frame.h"
-using namespace libdcp;
+using namespace dcp;
/** Construct an empty ARGBFrame of a given size and with
* undefined contents.
diff --git a/src/argb_frame.h b/src/argb_frame.h
index f26436cd..2ad6f69d 100644
--- a/src/argb_frame.h
+++ b/src/argb_frame.h
@@ -24,7 +24,7 @@
#include <stdint.h>
#include "util.h"
-namespace libdcp
+namespace dcp
{
/** @class ARGBFrame
diff --git a/src/asset.cc b/src/asset.cc
index 91a19e69..192daf43 100644
--- a/src/asset.cc
+++ b/src/asset.cc
@@ -34,7 +34,7 @@
using namespace std;
using namespace boost;
-using namespace libdcp;
+using namespace dcp;
Asset::Asset (boost::filesystem::path directory, boost::filesystem::path file_name)
: _directory (directory)
diff --git a/src/asset.h b/src/asset.h
index 269d5c4b..d1819ba6 100644
--- a/src/asset.h
+++ b/src/asset.h
@@ -39,7 +39,7 @@ namespace xmlpp {
class Element;
}
-namespace libdcp
+namespace dcp
{
/** @brief Parent class for assets of DCPs
diff --git a/src/certificates.cc b/src/certificates.cc
index 2f5d47fd..caa4c830 100644
--- a/src/certificates.cc
+++ b/src/certificates.cc
@@ -37,7 +37,7 @@ using std::string;
using std::stringstream;
using std::vector;
using boost::shared_ptr;
-using namespace libdcp;
+using namespace dcp;
/** @param c X509 certificate, which this object will take ownership of */
Certificate::Certificate (X509* c)
diff --git a/src/certificates.h b/src/certificates.h
index 2bf8d0db..c7d6698b 100644
--- a/src/certificates.h
+++ b/src/certificates.h
@@ -34,7 +34,7 @@ namespace xmlpp {
class Element;
}
-namespace libdcp {
+namespace dcp {
class Certificate
{
diff --git a/src/colour_matrix.cc b/src/colour_matrix.cc
index b633e384..19243d4d 100644
--- a/src/colour_matrix.cc
+++ b/src/colour_matrix.cc
@@ -23,19 +23,19 @@
EasyDCP player, I think.
*/
-double const libdcp::colour_matrix::xyz_to_rgb[3][3] = {
+double const dcp::colour_matrix::xyz_to_rgb[3][3] = {
{ 3.24096989631653, -1.5373831987381, -0.498610764741898 },
{ -0.96924364566803, 1.87596750259399, 0.0415550582110882 },
{ 0.0556300804018974, -0.203976958990097, 1.05697154998779 }
};
-double const libdcp::colour_matrix::srgb_to_xyz[3][3] = {
+double const dcp::colour_matrix::srgb_to_xyz[3][3] = {
{0.4124564, 0.3575761, 0.1804375},
{0.2126729, 0.7151522, 0.0721750},
{0.0193339, 0.1191920, 0.9503041}
};
-double const libdcp::colour_matrix::rec709_to_xyz[3][3] = {
+double const dcp::colour_matrix::rec709_to_xyz[3][3] = {
{ 0.412390799265959, 0.357584339383878, 0.180480788401834 },
{ 0.21263900587151, 0.715168678767756, 0.0721923153607337 },
{ 0.0193308187155918, 0.119194779794626, 0.950532152249661 }
diff --git a/src/colour_matrix.h b/src/colour_matrix.h
index 615e8b38..010ac3b9 100644
--- a/src/colour_matrix.h
+++ b/src/colour_matrix.h
@@ -17,7 +17,7 @@
*/
-namespace libdcp {
+namespace dcp {
namespace colour_matrix {
diff --git a/src/cpl.cc b/src/cpl.cc
index dcb730ff..2058223c 100644
--- a/src/cpl.cc
+++ b/src/cpl.cc
@@ -41,7 +41,7 @@ using std::make_pair;
using boost::shared_ptr;
using boost::lexical_cast;
using boost::optional;
-using namespace libdcp;
+using namespace dcp;
CPL::CPL (boost::filesystem::path directory, string name, ContentKind content_kind, int length, int frames_per_second)
: _directory (directory)
diff --git a/src/cpl.h b/src/cpl.h
index aadc7347..45480ec7 100644
--- a/src/cpl.h
+++ b/src/cpl.h
@@ -31,7 +31,7 @@
#include "certificates.h"
#include "key.h"
-namespace libdcp {
+namespace dcp {
namespace parse {
class AssetMap;
diff --git a/src/dcp.cc b/src/dcp.cc
index f80726fc..653dc87a 100644
--- a/src/dcp.cc
+++ b/src/dcp.cc
@@ -56,7 +56,7 @@ using std::back_inserter;
using std::make_pair;
using boost::shared_ptr;
using boost::lexical_cast;
-using namespace libdcp;
+using namespace dcp;
DCP::DCP (boost::filesystem::path directory)
: _directory (directory)
@@ -216,12 +216,12 @@ DCP::read_assets ()
boost::filesystem::path p = _directory;
p /= "ASSETMAP";
if (boost::filesystem::exists (p)) {
- asset_map.reset (new libdcp::parse::AssetMap (p.string ()));
+ asset_map.reset (new dcp::parse::AssetMap (p.string ()));
} else {
p = _directory;
p /= "ASSETMAP.xml";
if (boost::filesystem::exists (p)) {
- asset_map.reset (new libdcp::parse::AssetMap (p.string ()));
+ asset_map.reset (new dcp::parse::AssetMap (p.string ()));
} else {
boost::throw_exception (DCPReadError ("could not find AssetMap file"));
}
@@ -231,7 +231,7 @@ DCP::read_assets ()
boost::throw_exception (FileError ("could not load AssetMap file", _files.asset_map, e.number ()));
}
- for (list<shared_ptr<libdcp::parse::AssetMapAsset> >::const_iterator i = asset_map->assets.begin(); i != asset_map->assets.end(); ++i) {
+ for (list<shared_ptr<dcp::parse::AssetMapAsset> >::const_iterator i = asset_map->assets.begin(); i != asset_map->assets.end(); ++i) {
if ((*i)->chunks.size() != 1) {
boost::throw_exception (XMLError ("unsupported asset chunk count"));
}
diff --git a/src/dcp.h b/src/dcp.h
index 45ccce88..9b72ae74 100644
--- a/src/dcp.h
+++ b/src/dcp.h
@@ -37,7 +37,7 @@ namespace xmlpp {
}
/** @brief Namespace for everything in libdcp */
-namespace libdcp
+namespace dcp
{
class Asset;
@@ -110,7 +110,7 @@ public:
* supplemental.add_assets_from (original_version);
* supplemental.read ();
*/
- void add_assets_from (libdcp::DCP const &);
+ void add_assets_from (DCP const &);
bool encrypted () const;
diff --git a/src/dcp_time.cc b/src/dcp_time.cc
index 14155fdb..605c4a40 100644
--- a/src/dcp_time.cc
+++ b/src/dcp_time.cc
@@ -31,7 +31,7 @@
using namespace std;
using namespace boost;
-using namespace libdcp;
+using namespace dcp;
Time::Time (int frame, int frames_per_second)
: h (0)
@@ -85,19 +85,19 @@ Time::Time (string time)
}
bool
-libdcp::operator== (Time const & a, Time const & b)
+dcp::operator== (Time const & a, Time const & b)
{
return (a.h == b.h && a.m == b.m && a.s == b.s && a.t == b.t);
}
bool
-libdcp::operator!= (Time const & a, Time const & b)
+dcp::operator!= (Time const & a, Time const & b)
{
return !(a == b);
}
bool
-libdcp::operator<= (Time const & a, Time const & b)
+dcp::operator<= (Time const & a, Time const & b)
{
if (a.h != b.h) {
return a.h <= b.h;
@@ -119,7 +119,7 @@ libdcp::operator<= (Time const & a, Time const & b)
}
bool
-libdcp::operator< (Time const & a, Time const & b)
+dcp::operator< (Time const & a, Time const & b)
{
if (a.h != b.h) {
return a.h < b.h;
@@ -141,7 +141,7 @@ libdcp::operator< (Time const & a, Time const & b)
}
bool
-libdcp::operator> (Time const & a, Time const & b)
+dcp::operator> (Time const & a, Time const & b)
{
if (a.h != b.h) {
return a.h > b.h;
@@ -163,14 +163,14 @@ libdcp::operator> (Time const & a, Time const & b)
}
ostream &
-libdcp::operator<< (ostream& s, Time const & t)
+dcp::operator<< (ostream& s, Time const & t)
{
s << t.h << ":" << t.m << ":" << t.s << "." << t.t;
return s;
}
-libdcp::Time
-libdcp::operator+ (Time a, Time const & b)
+dcp::Time
+dcp::operator+ (Time a, Time const & b)
{
Time r;
@@ -197,8 +197,8 @@ libdcp::operator+ (Time a, Time const & b)
return r;
}
-libdcp::Time
-libdcp::operator- (Time a, Time const & b)
+dcp::Time
+dcp::operator- (Time a, Time const & b)
{
Time r;
@@ -226,7 +226,7 @@ libdcp::operator- (Time a, Time const & b)
}
float
-libdcp::operator/ (Time a, Time const & b)
+dcp::operator/ (Time a, Time const & b)
{
int64_t const at = a.h * 3600 * 250 + a.m * 60 * 250 + a.s * 250 + a.t;
int64_t const bt = b.h * 3600 * 250 + b.m * 60 * 250 + b.s * 250 + b.t;
diff --git a/src/dcp_time.h b/src/dcp_time.h
index 92cee9a0..885393c1 100644
--- a/src/dcp_time.h
+++ b/src/dcp_time.h
@@ -28,7 +28,7 @@
#include <iostream>
#include <stdint.h>
-namespace libdcp {
+namespace dcp {
/** @class Time
* @brief A representation of time within a DCP.
diff --git a/src/exceptions.cc b/src/exceptions.cc
index 6a32a33f..c3755a60 100644
--- a/src/exceptions.cc
+++ b/src/exceptions.cc
@@ -21,7 +21,7 @@
#include "compose.hpp"
using std::string;
-using namespace libdcp;
+using namespace dcp;
FileError::FileError (std::string const & message, boost::filesystem::path filename, int number)
: _message (String::compose ("%1 (error %2) (%3)", message, filename.string(), number))
diff --git a/src/exceptions.h b/src/exceptions.h
index 2070dd0f..2a7fbdda 100644
--- a/src/exceptions.h
+++ b/src/exceptions.h
@@ -26,7 +26,7 @@
* @brief Exceptions thrown by libdcp.
*/
-namespace libdcp
+namespace dcp
{
/** @brief An exception related to a file */
diff --git a/src/gamma_lut.cc b/src/gamma_lut.cc
index 80d9b902..0b8ad2fd 100644
--- a/src/gamma_lut.cc
+++ b/src/gamma_lut.cc
@@ -21,7 +21,7 @@
#include "gamma_lut.h"
#include "lut_cache.h"
-using namespace libdcp;
+using namespace dcp;
LUTCache<GammaLUT> GammaLUT::cache;
diff --git a/src/gamma_lut.h b/src/gamma_lut.h
index 32e4af02..095ad882 100644
--- a/src/gamma_lut.h
+++ b/src/gamma_lut.h
@@ -23,7 +23,7 @@
#include "lut.h"
#include "lut_cache.h"
-namespace libdcp {
+namespace dcp {
class GammaLUT : public LUT
{
diff --git a/src/image.cc b/src/image.cc
index 24174fca..2cb5a7a4 100644
--- a/src/image.cc
+++ b/src/image.cc
@@ -20,7 +20,7 @@
#include "image.h"
using boost::shared_ptr;
-using namespace libdcp;
+using namespace dcp;
Image::Image (Size s)
: _size (s)
diff --git a/src/image.h b/src/image.h
index 8b7fee09..a8786b77 100644
--- a/src/image.h
+++ b/src/image.h
@@ -19,7 +19,7 @@
#include "util.h"
-namespace libdcp {
+namespace dcp {
class Image
{
diff --git a/src/kdm.cc b/src/kdm.cc
index 4132b242..02e6ce7f 100644
--- a/src/kdm.cc
+++ b/src/kdm.cc
@@ -43,7 +43,7 @@ using std::setw;
using std::setfill;
using std::cout;
using boost::shared_ptr;
-using namespace libdcp;
+using namespace dcp;
KDM::KDM (boost::filesystem::path kdm, boost::filesystem::path private_key)
: _xml_kdm (new xml::DCinemaSecurityMessage (kdm))
@@ -383,7 +383,7 @@ KDMKey::put_uuid (uint8_t ** d, string id) const
}
bool
-libdcp::operator== (libdcp::KDMKey const & a, libdcp::KDMKey const & b)
+dcp::operator== (dcp::KDMKey const & a, dcp::KDMKey const & b)
{
if (memcmp (a._signer_thumbprint, b._signer_thumbprint, 20) != 0) {
return false;
diff --git a/src/kdm.h b/src/kdm.h
index 4e897ca8..9ee793c9 100644
--- a/src/kdm.h
+++ b/src/kdm.h
@@ -32,7 +32,7 @@
class kdm_key_test;
-namespace libdcp {
+namespace dcp {
namespace xml {
class DCinemaSecurityMessage;
diff --git a/src/key.cc b/src/key.cc
index 8cac04a3..0e04c27a 100644
--- a/src/key.cc
+++ b/src/key.cc
@@ -29,7 +29,7 @@ using std::string;
using std::stringstream;
using std::setw;
using std::setfill;
-using namespace libdcp;
+using namespace dcp;
Key::Key ()
: _value (new uint8_t[ASDCP::KeyLen])
@@ -86,13 +86,13 @@ Key::hex () const
}
bool
-libdcp::operator== (Key const & a, Key const & b)
+dcp::operator== (Key const & a, Key const & b)
{
return memcmp (a.value(), b.value(), ASDCP::KeyLen) == 0;
}
bool
-libdcp::operator!= (Key const & a, Key const & b)
+dcp::operator!= (Key const & a, Key const & b)
{
return !(a == b);
}
diff --git a/src/key.h b/src/key.h
index d0286627..be9f95f4 100644
--- a/src/key.h
+++ b/src/key.h
@@ -26,7 +26,7 @@
#include <stdint.h>
-namespace libdcp {
+namespace dcp {
/** @class Key
* @brief A key for encrypting MXFs.
diff --git a/src/lut.h b/src/lut.h
index ad291467..f56676a2 100644
--- a/src/lut.h
+++ b/src/lut.h
@@ -23,7 +23,7 @@
#include <cmath>
#include <boost/utility.hpp>
-namespace libdcp {
+namespace dcp {
class LUT : boost::noncopyable
{
diff --git a/src/metadata.cc b/src/metadata.cc
index acbc3b2e..d2357a1f 100644
--- a/src/metadata.cc
+++ b/src/metadata.cc
@@ -31,7 +31,7 @@
#include "util.h"
using namespace std;
-using namespace libdcp;
+using namespace dcp;
MXFMetadata::MXFMetadata ()
: company_name ("libdcp")
diff --git a/src/metadata.h b/src/metadata.h
index b4c0896d..0a707534 100644
--- a/src/metadata.h
+++ b/src/metadata.h
@@ -28,7 +28,7 @@
class utc_offset_to_string_test;
-namespace libdcp
+namespace dcp
{
class MXFMetadata
diff --git a/src/mono_picture_asset.cc b/src/mono_picture_asset.cc
index 0ac48d37..3163e89a 100644
--- a/src/mono_picture_asset.cc
+++ b/src/mono_picture_asset.cc
@@ -29,7 +29,7 @@ using std::vector;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using boost::lexical_cast;
-using namespace libdcp;
+using namespace dcp;
MonoPictureAsset::MonoPictureAsset (boost::filesystem::path directory, boost::filesystem::path mxf_name)
: PictureAsset (directory, mxf_name)
diff --git a/src/mono_picture_asset.h b/src/mono_picture_asset.h
index ae2df4d2..19308aaf 100644
--- a/src/mono_picture_asset.h
+++ b/src/mono_picture_asset.h
@@ -22,7 +22,7 @@
#include "picture_asset.h"
-namespace libdcp {
+namespace dcp {
/** A 2D (monoscopic) picture asset */
class MonoPictureAsset : public PictureAsset
diff --git a/src/mono_picture_asset_writer.cc b/src/mono_picture_asset_writer.cc
index 6f0ba973..87f37a2d 100644
--- a/src/mono_picture_asset_writer.cc
+++ b/src/mono_picture_asset_writer.cc
@@ -30,7 +30,7 @@ using std::ostream;
using std::string;
using boost::shared_ptr;
using boost::lexical_cast;
-using namespace libdcp;
+using namespace dcp;
struct MonoPictureAssetWriter::ASDCPState : public ASDCPStateBase
{
@@ -50,7 +50,7 @@ MonoPictureAssetWriter::MonoPictureAssetWriter (PictureAsset* asset, bool overwr
void
MonoPictureAssetWriter::start (uint8_t* data, int size)
{
- libdcp::start (this, _state, _asset, data, size);
+ dcp::start (this, _state, _asset, data, size);
}
FrameInfo
diff --git a/src/mono_picture_asset_writer.h b/src/mono_picture_asset_writer.h
index e3922623..b4da70b4 100644
--- a/src/mono_picture_asset_writer.h
+++ b/src/mono_picture_asset_writer.h
@@ -24,7 +24,7 @@
#include <boost/utility.hpp>
#include "picture_asset_writer.h"
-namespace libdcp {
+namespace dcp {
/** A helper class for writing to MonoPictureAssets progressively (i.e. writing frame-by-frame,
* rather than giving libdcp all the frames in one go).
diff --git a/src/mono_picture_frame.cc b/src/mono_picture_frame.cc
index 890967d1..964b543b 100644
--- a/src/mono_picture_frame.cc
+++ b/src/mono_picture_frame.cc
@@ -32,7 +32,7 @@
using std::string;
using boost::shared_ptr;
-using namespace libdcp;
+using namespace dcp;
/** Make a picture frame from a 2D (monoscopic) asset.
* @param mxf_path Path to the asset's MXF file.
diff --git a/src/mono_picture_frame.h b/src/mono_picture_frame.h
index 0eedfb95..44df68c9 100644
--- a/src/mono_picture_frame.h
+++ b/src/mono_picture_frame.h
@@ -29,7 +29,7 @@ namespace ASDCP {
class AESDecContext;
}
-namespace libdcp {
+namespace dcp {
class ARGBFrame;
diff --git a/src/mxf_asset.cc b/src/mxf_asset.cc
index c2428a3c..1b15f7a9 100644
--- a/src/mxf_asset.cc
+++ b/src/mxf_asset.cc
@@ -40,7 +40,7 @@ using std::pair;
using boost::shared_ptr;
using boost::lexical_cast;
using boost::dynamic_pointer_cast;
-using namespace libdcp;
+using namespace dcp;
MXFAsset::MXFAsset (boost::filesystem::path directory, boost::filesystem::path file_name)
: Asset (directory, file_name)
diff --git a/src/mxf_asset.h b/src/mxf_asset.h
index 7a645b7c..5ba70324 100644
--- a/src/mxf_asset.h
+++ b/src/mxf_asset.h
@@ -30,7 +30,7 @@ namespace ASDCP {
class AESDecContext;
}
-namespace libdcp
+namespace dcp
{
class MXFMetadata;
diff --git a/src/parse/asset_map.cc b/src/parse/asset_map.cc
index 484c2710..0b323fb3 100644
--- a/src/parse/asset_map.cc
+++ b/src/parse/asset_map.cc
@@ -29,7 +29,7 @@
using std::string;
using std::list;
using boost::shared_ptr;
-using namespace libdcp::parse;
+using namespace dcp::parse;
AssetMap::AssetMap (string file)
{
diff --git a/src/parse/asset_map.h b/src/parse/asset_map.h
index af3e8918..e3035593 100644
--- a/src/parse/asset_map.h
+++ b/src/parse/asset_map.h
@@ -25,7 +25,7 @@
#include <boost/shared_ptr.hpp>
#include <libcxml/cxml.h>
-namespace libdcp {
+namespace dcp {
namespace parse {
diff --git a/src/parse/cpl.cc b/src/parse/cpl.cc
index f6ce434c..d94fb68e 100644
--- a/src/parse/cpl.cc
+++ b/src/parse/cpl.cc
@@ -29,7 +29,7 @@
using std::string;
using std::bad_cast;
using boost::shared_ptr;
-using namespace libdcp::parse;
+using namespace dcp::parse;
CPL::CPL (string file)
{
diff --git a/src/parse/cpl.h b/src/parse/cpl.h
index 04bf9351..4889a1c4 100644
--- a/src/parse/cpl.h
+++ b/src/parse/cpl.h
@@ -26,7 +26,7 @@
#include <libcxml/cxml.h>
#include "../types.h"
-namespace libdcp {
+namespace dcp {
namespace parse {
diff --git a/src/parse/pkl.cc b/src/parse/pkl.cc
index bbf070ae..d0fa1556 100644
--- a/src/parse/pkl.cc
+++ b/src/parse/pkl.cc
@@ -26,7 +26,7 @@
using namespace std;
using namespace boost;
-using namespace libdcp::parse;
+using namespace dcp::parse;
PKL::PKL (string file)
{
diff --git a/src/parse/pkl.h b/src/parse/pkl.h
index 13d87fa1..f31eef7d 100644
--- a/src/parse/pkl.h
+++ b/src/parse/pkl.h
@@ -24,7 +24,7 @@
#include <boost/shared_ptr.hpp>
#include "../xml.h"
-namespace libdcp {
+namespace dcp {
namespace parse {
diff --git a/src/parse/subtitle.cc b/src/parse/subtitle.cc
index 612af716..3f9869b4 100644
--- a/src/parse/subtitle.cc
+++ b/src/parse/subtitle.cc
@@ -27,8 +27,8 @@ using std::list;
using boost::shared_ptr;
using boost::optional;
using boost::lexical_cast;
-using namespace libdcp;
-using namespace libdcp::parse;
+using namespace dcp;
+using namespace dcp::parse;
Font::Font (shared_ptr<const cxml::Node> node)
{
diff --git a/src/parse/subtitle.h b/src/parse/subtitle.h
index c20278a3..50c2ebc5 100644
--- a/src/parse/subtitle.h
+++ b/src/parse/subtitle.h
@@ -21,7 +21,7 @@
#include "../dcp_time.h"
#include "../types.h"
-namespace libdcp
+namespace dcp
{
namespace parse
diff --git a/src/picture_asset.cc b/src/picture_asset.cc
index b2eecee5..94ebefaa 100644
--- a/src/picture_asset.cc
+++ b/src/picture_asset.cc
@@ -50,7 +50,7 @@ using std::cout;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
using boost::lexical_cast;
-using namespace libdcp;
+using namespace dcp;
PictureAsset::PictureAsset (boost::filesystem::path directory, boost::filesystem::path mxf_name)
: MXFAsset (directory, mxf_name)
diff --git a/src/picture_asset.h b/src/picture_asset.h
index b8dab052..d9b9919b 100644
--- a/src/picture_asset.h
+++ b/src/picture_asset.h
@@ -35,7 +35,7 @@ namespace ASDCP {
}
}
-namespace libdcp
+namespace dcp
{
class MonoPictureFrame;
diff --git a/src/picture_asset_writer.cc b/src/picture_asset_writer.cc
index 92b384db..c1c9bd85 100644
--- a/src/picture_asset_writer.cc
+++ b/src/picture_asset_writer.cc
@@ -29,7 +29,7 @@ using std::istream;
using std::ostream;
using std::string;
using boost::shared_ptr;
-using namespace libdcp;
+using namespace dcp;
FrameInfo::FrameInfo (istream& s)
: offset (0)
diff --git a/src/picture_asset_writer.h b/src/picture_asset_writer.h
index 68ba086b..c6c00d87 100644
--- a/src/picture_asset_writer.h
+++ b/src/picture_asset_writer.h
@@ -25,7 +25,7 @@
#include "metadata.h"
#include "types.h"
-namespace libdcp {
+namespace dcp {
class PictureAsset;
diff --git a/src/picture_asset_writer_common.cc b/src/picture_asset_writer_common.cc
index 52848745..bb1316c7 100644
--- a/src/picture_asset_writer_common.cc
+++ b/src/picture_asset_writer_common.cc
@@ -33,7 +33,7 @@ struct ASDCPStateBase
};
template <class P, class Q>
-void libdcp::start (PictureAssetWriter* writer, shared_ptr<P> state, Q* asset, uint8_t* data, int size)
+void dcp::start (PictureAssetWriter* writer, shared_ptr<P> state, Q* asset, uint8_t* data, int size)
{
if (ASDCP_FAILURE (state->j2k_parser.OpenReadFrame (data, size, state->frame_buffer))) {
boost::throw_exception (MiscError ("could not parse J2K frame"));
diff --git a/src/rec709_linearised_gamma_lut.cc b/src/rec709_linearised_gamma_lut.cc
index f14e4472..29f39ac0 100644
--- a/src/rec709_linearised_gamma_lut.cc
+++ b/src/rec709_linearised_gamma_lut.cc
@@ -19,7 +19,7 @@
#include "rec709_linearised_gamma_lut.h"
-using namespace libdcp;
+using namespace dcp;
LUTCache<Rec709LinearisedGammaLUT> Rec709LinearisedGammaLUT::cache;
diff --git a/src/rec709_linearised_gamma_lut.h b/src/rec709_linearised_gamma_lut.h
index af0158a5..e7130ef3 100644
--- a/src/rec709_linearised_gamma_lut.h
+++ b/src/rec709_linearised_gamma_lut.h
@@ -20,7 +20,7 @@
#include "lut.h"
#include "lut_cache.h"
-namespace libdcp {
+namespace dcp {
class Rec709LinearisedGammaLUT : public LUT
{
diff --git a/src/reel.cc b/src/reel.cc
index ff51c025..7a54059e 100644
--- a/src/reel.cc
+++ b/src/reel.cc
@@ -32,7 +32,7 @@ using std::list;
using std::cout;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
-using namespace libdcp;
+using namespace dcp;
void
Reel::write_to_cpl (xmlpp::Element* node) const
diff --git a/src/reel.h b/src/reel.h
index 35302f17..666e235e 100644
--- a/src/reel.h
+++ b/src/reel.h
@@ -31,7 +31,7 @@ namespace xmlpp {
class Node;
}
-namespace libdcp {
+namespace dcp {
class PictureAsset;
class SoundAsset;
@@ -68,7 +68,7 @@ public:
bool encrypted () const;
- void set_mxf_keys (libdcp::Key);
+ void set_mxf_keys (dcp::Key);
bool equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, boost::function<void (NoteType, std::string)> notes) const;
diff --git a/src/rgb_xyz.cc b/src/rgb_xyz.cc
index dea2106c..7d30d32e 100644
--- a/src/rgb_xyz.cc
+++ b/src/rgb_xyz.cc
@@ -27,7 +27,7 @@
using std::min;
using std::max;
using boost::shared_ptr;
-using namespace libdcp;
+using namespace dcp;
#define DCI_COEFFICIENT (48.0 / 52.37)
@@ -36,7 +36,7 @@ using namespace libdcp;
* @return RGB image.
*/
shared_ptr<ARGBFrame>
-libdcp::xyz_to_rgb (shared_ptr<const XYZFrame> xyz_frame, shared_ptr<const LUT> lut_in, shared_ptr<const LUT> lut_out)
+dcp::xyz_to_rgb (shared_ptr<const XYZFrame> xyz_frame, shared_ptr<const LUT> lut_in, shared_ptr<const LUT> lut_out)
{
int const max_colour = pow (2, lut_out->bit_depth()) - 1;
@@ -99,8 +99,8 @@ libdcp::xyz_to_rgb (shared_ptr<const XYZFrame> xyz_frame, shared_ptr<const LUT>
return argb_frame;
}
-shared_ptr<libdcp::XYZFrame>
-libdcp::rgb_to_xyz (shared_ptr<const Image> rgb, shared_ptr<const LUT> lut_in, shared_ptr<const LUT> lut_out, double const colour_matrix[3][3])
+shared_ptr<dcp::XYZFrame>
+dcp::rgb_to_xyz (shared_ptr<const Image> rgb, shared_ptr<const LUT> lut_in, shared_ptr<const LUT> lut_out, double const colour_matrix[3][3])
{
assert (lut_in->bit_depth() == 12);
assert (lut_out->bit_depth() == 16);
diff --git a/src/rgb_xyz.h b/src/rgb_xyz.h
index 87959cb3..f4c8b686 100644
--- a/src/rgb_xyz.h
+++ b/src/rgb_xyz.h
@@ -19,7 +19,7 @@
#include <boost/shared_ptr.hpp>
-namespace libdcp {
+namespace dcp {
class ARGBFrame;
class XYZFrame;
diff --git a/src/signer.cc b/src/signer.cc
index 63da8d8e..ea13563f 100644
--- a/src/signer.cc
+++ b/src/signer.cc
@@ -30,7 +30,7 @@ using std::string;
using std::list;
using std::cout;
using boost::shared_ptr;
-using namespace libdcp;
+using namespace dcp;
/** @param signer_key Filename of private key to sign with */
void
diff --git a/src/signer.h b/src/signer.h
index efb8099b..7c2864fd 100644
--- a/src/signer.h
+++ b/src/signer.h
@@ -25,7 +25,7 @@ namespace xmlpp {
class Node;
}
-namespace libdcp {
+namespace dcp {
class Signer
{
diff --git a/src/signer_chain.cc b/src/signer_chain.cc
index d407286e..5f9941f9 100644
--- a/src/signer_chain.cc
+++ b/src/signer_chain.cc
@@ -76,7 +76,7 @@ static void command (string cmd)
if (code) {
stringstream s;
s << "error " << code << " in " << cmd << " within " << boost::filesystem::current_path();
- throw libdcp::MiscError (s.str());
+ throw dcp::MiscError (s.str());
}
}
@@ -101,7 +101,7 @@ public_key_digest (boost::filesystem::path private_key, boost::filesystem::path
string pub;
ifstream f (public_name.string().c_str ());
if (!f.good ()) {
- throw libdcp::MiscError ("public key not found");
+ throw dcp::MiscError ("public key not found");
}
bool read = false;
@@ -120,22 +120,22 @@ public_key_digest (boost::filesystem::path private_key, boost::filesystem::path
/* Decode the base64 of the public key */
unsigned char buffer[512];
- int const N = libdcp::base64_decode (pub, buffer, 1024);
+ int const N = dcp::base64_decode (pub, buffer, 1024);
/* Hash it with SHA1 (without the first 24 bytes, for reasons that are not entirely clear) */
SHA_CTX context;
if (!SHA1_Init (&context)) {
- throw libdcp::MiscError ("could not init SHA1 context");
+ throw dcp::MiscError ("could not init SHA1 context");
}
if (!SHA1_Update (&context, buffer + 24, N - 24)) {
- throw libdcp::MiscError ("could not update SHA1 digest");
+ throw dcp::MiscError ("could not update SHA1 digest");
}
unsigned char digest[SHA_DIGEST_LENGTH];
if (!SHA1_Final (digest, &context)) {
- throw libdcp::MiscError ("could not finish SHA1 digest");
+ throw dcp::MiscError ("could not finish SHA1 digest");
}
char digest_base64[64];
@@ -149,7 +149,7 @@ public_key_digest (boost::filesystem::path private_key, boost::filesystem::path
}
void
-libdcp::make_signer_chain (boost::filesystem::path directory, boost::filesystem::path openssl)
+dcp::make_signer_chain (boost::filesystem::path directory, boost::filesystem::path openssl)
{
boost::filesystem::path const cwd = boost::filesystem::current_path ();
diff --git a/src/signer_chain.h b/src/signer_chain.h
index 50f56ed9..034e2290 100644
--- a/src/signer_chain.h
+++ b/src/signer_chain.h
@@ -19,7 +19,7 @@
#include <boost/filesystem.hpp>
-namespace libdcp {
+namespace dcp {
/** Create a chain of certificates for signing things.
* @param directory Directory to write files to.
diff --git a/src/sound_asset.cc b/src/sound_asset.cc
index 95244b90..cc537d56 100644
--- a/src/sound_asset.cc
+++ b/src/sound_asset.cc
@@ -40,7 +40,7 @@ using std::vector;
using std::list;
using boost::shared_ptr;
using boost::lexical_cast;
-using namespace libdcp;
+using namespace dcp;
SoundAsset::SoundAsset (boost::filesystem::path directory, boost::filesystem::path mxf_name)
: MXFAsset (directory, mxf_name)
diff --git a/src/sound_asset.h b/src/sound_asset.h
index d2e49bd1..f33e5aec 100644
--- a/src/sound_asset.h
+++ b/src/sound_asset.h
@@ -28,7 +28,7 @@
#include "types.h"
#include "metadata.h"
-namespace libdcp
+namespace dcp
{
class SoundFrame;
diff --git a/src/sound_frame.cc b/src/sound_frame.cc
index 6bc52c1a..06d2b88e 100644
--- a/src/sound_frame.cc
+++ b/src/sound_frame.cc
@@ -23,7 +23,7 @@
#include "exceptions.h"
using namespace std;
-using namespace libdcp;
+using namespace dcp;
SoundFrame::SoundFrame (string mxf_path, int n, ASDCP::AESDecContext* c)
{
diff --git a/src/sound_frame.h b/src/sound_frame.h
index 154ff84b..bc46b53a 100644
--- a/src/sound_frame.h
+++ b/src/sound_frame.h
@@ -30,7 +30,7 @@ namespace ASDCP {
class AESDecContext;
}
-namespace libdcp {
+namespace dcp {
class SoundFrame
{
diff --git a/src/srgb_linearised_gamma_lut.cc b/src/srgb_linearised_gamma_lut.cc
index 0d3650f4..bab36cb1 100644
--- a/src/srgb_linearised_gamma_lut.cc
+++ b/src/srgb_linearised_gamma_lut.cc
@@ -19,7 +19,7 @@
#include "srgb_linearised_gamma_lut.h"
-using namespace libdcp;
+using namespace dcp;
LUTCache<SRGBLinearisedGammaLUT> SRGBLinearisedGammaLUT::cache;
diff --git a/src/srgb_linearised_gamma_lut.h b/src/srgb_linearised_gamma_lut.h
index 34800c66..68030610 100644
--- a/src/srgb_linearised_gamma_lut.h
+++ b/src/srgb_linearised_gamma_lut.h
@@ -20,7 +20,7 @@
#include "lut.h"
#include "lut_cache.h"
-namespace libdcp {
+namespace dcp {
class SRGBLinearisedGammaLUT : public LUT
{
diff --git a/src/stereo_picture_asset.cc b/src/stereo_picture_asset.cc
index 47a41cc2..bad80832 100644
--- a/src/stereo_picture_asset.cc
+++ b/src/stereo_picture_asset.cc
@@ -28,7 +28,7 @@ using std::pair;
using std::make_pair;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
-using namespace libdcp;
+using namespace dcp;
bool
StereoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, boost::function<void (NoteType, string)> note) const
diff --git a/src/stereo_picture_asset.h b/src/stereo_picture_asset.h
index 64cdb6b3..6ebc7239 100644
--- a/src/stereo_picture_asset.h
+++ b/src/stereo_picture_asset.h
@@ -22,7 +22,7 @@
#include "picture_asset.h"
-namespace libdcp {
+namespace dcp {
/** A 3D (stereoscopic) picture asset */
class StereoPictureAsset : public PictureAsset
diff --git a/src/stereo_picture_asset_writer.cc b/src/stereo_picture_asset_writer.cc
index 81ce7fc0..04ca0590 100644
--- a/src/stereo_picture_asset_writer.cc
+++ b/src/stereo_picture_asset_writer.cc
@@ -29,7 +29,7 @@ using std::istream;
using std::ostream;
using std::string;
using boost::shared_ptr;
-using namespace libdcp;
+using namespace dcp;
struct StereoPictureAssetWriter::ASDCPState : public ASDCPStateBase
{
@@ -47,7 +47,7 @@ StereoPictureAssetWriter::StereoPictureAssetWriter (PictureAsset* asset, bool ov
void
StereoPictureAssetWriter::start (uint8_t* data, int size)
{
- libdcp::start (this, _state, _asset, data, size);
+ dcp::start (this, _state, _asset, data, size);
}
/** Write a frame for one eye. Frames must be written left, then right, then left etc.
diff --git a/src/stereo_picture_asset_writer.h b/src/stereo_picture_asset_writer.h
index 771524c4..96572989 100644
--- a/src/stereo_picture_asset_writer.h
+++ b/src/stereo_picture_asset_writer.h
@@ -24,7 +24,7 @@
#include <boost/utility.hpp>
#include "picture_asset_writer.h"
-namespace libdcp {
+namespace dcp {
/** A helper class for writing to StereoPictureAssets progressively (i.e. writing frame-by-frame,
* rather than giving libdcp all the frames in one go).
@@ -56,7 +56,7 @@ private:
struct ASDCPState;
boost::shared_ptr<ASDCPState> _state;
- libdcp::Eye _next_eye;
+ dcp::Eye _next_eye;
};
}
diff --git a/src/stereo_picture_frame.cc b/src/stereo_picture_frame.cc
index dce1f106..8f318371 100644
--- a/src/stereo_picture_frame.cc
+++ b/src/stereo_picture_frame.cc
@@ -32,7 +32,7 @@
using std::string;
using boost::shared_ptr;
-using namespace libdcp;
+using namespace dcp;
/** Make a picture frame from a 3D (stereoscopic) asset.
* @param mxf_path Path to the asset's MXF file.
diff --git a/src/stereo_picture_frame.h b/src/stereo_picture_frame.h
index ab99ceac..40c2a441 100644
--- a/src/stereo_picture_frame.h
+++ b/src/stereo_picture_frame.h
@@ -29,7 +29,7 @@ namespace ASDCP {
class AESDecContext;
}
-namespace libdcp {
+namespace dcp {
class ARGBFrame;
diff --git a/src/subtitle_asset.cc b/src/subtitle_asset.cc
index a48a614d..d67e3625 100644
--- a/src/subtitle_asset.cc
+++ b/src/subtitle_asset.cc
@@ -34,7 +34,7 @@ using std::stringstream;
using boost::shared_ptr;
using boost::lexical_cast;
using boost::optional;
-using namespace libdcp;
+using namespace dcp;
SubtitleAsset::SubtitleAsset (string directory, string xml_file)
: Asset (directory, xml_file)
@@ -66,8 +66,8 @@ SubtitleAsset::read_xml (string xml_file)
xml->ignore_child ("LoadFont");
- list<shared_ptr<libdcp::parse::Font> > font_nodes = type_children<libdcp::parse::Font> (xml, "Font");
- _load_font_nodes = type_children<libdcp::parse::LoadFont> (xml, "LoadFont");
+ list<shared_ptr<dcp::parse::Font> > font_nodes = type_children<dcp::parse::Font> (xml, "Font");
+ _load_font_nodes = type_children<dcp::parse::LoadFont> (xml, "LoadFont");
/* Now make Subtitle objects to represent the raw XML nodes
in a sane way.
@@ -80,16 +80,16 @@ SubtitleAsset::read_xml (string xml_file)
void
SubtitleAsset::examine_font_nodes (
shared_ptr<const cxml::Node> xml,
- list<shared_ptr<libdcp::parse::Font> > const & font_nodes,
+ list<shared_ptr<dcp::parse::Font> > const & font_nodes,
ParseState& parse_state
)
{
- for (list<shared_ptr<libdcp::parse::Font> >::const_iterator i = font_nodes.begin(); i != font_nodes.end(); ++i) {
+ for (list<shared_ptr<dcp::parse::Font> >::const_iterator i = font_nodes.begin(); i != font_nodes.end(); ++i) {
parse_state.font_nodes.push_back (*i);
maybe_add_subtitle ((*i)->text, parse_state);
- for (list<shared_ptr<libdcp::parse::Subtitle> >::iterator j = (*i)->subtitle_nodes.begin(); j != (*i)->subtitle_nodes.end(); ++j) {
+ for (list<shared_ptr<dcp::parse::Subtitle> >::iterator j = (*i)->subtitle_nodes.begin(); j != (*i)->subtitle_nodes.end(); ++j) {
parse_state.subtitle_nodes.push_back (*j);
examine_text_nodes (xml, (*j)->text_nodes, parse_state);
examine_font_nodes (xml, (*j)->font_nodes, parse_state);
@@ -106,11 +106,11 @@ SubtitleAsset::examine_font_nodes (
void
SubtitleAsset::examine_text_nodes (
shared_ptr<const cxml::Node> xml,
- list<shared_ptr<libdcp::parse::Text> > const & text_nodes,
+ list<shared_ptr<dcp::parse::Text> > const & text_nodes,
ParseState& parse_state
)
{
- for (list<shared_ptr<libdcp::parse::Text> >::const_iterator i = text_nodes.begin(); i != text_nodes.end(); ++i) {
+ for (list<shared_ptr<dcp::parse::Text> >::const_iterator i = text_nodes.begin(); i != text_nodes.end(); ++i) {
parse_state.text_nodes.push_back (*i);
maybe_add_subtitle ((*i)->text, parse_state);
examine_font_nodes (xml, (*i)->font_nodes, parse_state);
@@ -132,9 +132,9 @@ SubtitleAsset::maybe_add_subtitle (string text, ParseState const & parse_state)
assert (!parse_state.text_nodes.empty ());
assert (!parse_state.subtitle_nodes.empty ());
- libdcp::parse::Font effective_font (parse_state.font_nodes);
- libdcp::parse::Text effective_text (*parse_state.text_nodes.back ());
- libdcp::parse::Subtitle effective_subtitle (*parse_state.subtitle_nodes.back ());
+ dcp::parse::Font effective_font (parse_state.font_nodes);
+ dcp::parse::Text effective_text (*parse_state.text_nodes.back ());
+ dcp::parse::Subtitle effective_subtitle (*parse_state.subtitle_nodes.back ());
_subtitles.push_back (
shared_ptr<Subtitle> (
@@ -173,7 +173,7 @@ SubtitleAsset::subtitles_at (Time t) const
std::string
SubtitleAsset::font_id_to_name (string id) const
{
- list<shared_ptr<libdcp::parse::LoadFont> >::const_iterator i = _load_font_nodes.begin();
+ list<shared_ptr<dcp::parse::LoadFont> >::const_iterator i = _load_font_nodes.begin();
while (i != _load_font_nodes.end() && (*i)->id != id) {
++i;
}
@@ -233,7 +233,7 @@ Subtitle::size_in_pixels (int screen_height) const
}
bool
-libdcp::operator== (Subtitle const & a, Subtitle const & b)
+dcp::operator== (Subtitle const & a, Subtitle const & b)
{
return (
a.font() == b.font() &&
@@ -253,7 +253,7 @@ libdcp::operator== (Subtitle const & a, Subtitle const & b)
}
ostream&
-libdcp::operator<< (ostream& s, Subtitle const & sub)
+dcp::operator<< (ostream& s, Subtitle const & sub)
{
s << "\n`" << sub.text() << "' from " << sub.in() << " to " << sub.out() << ";\n"
<< "fade up " << sub.fade_up_time() << ", fade down " << sub.fade_down_time() << ";\n"
diff --git a/src/subtitle_asset.h b/src/subtitle_asset.h
index 74ab9873..e5e2e853 100644
--- a/src/subtitle_asset.h
+++ b/src/subtitle_asset.h
@@ -24,7 +24,7 @@
#include "asset.h"
#include "dcp_time.h"
-namespace libdcp
+namespace dcp
{
namespace parse
diff --git a/src/types.cc b/src/types.cc
index 693b9ab2..113fc85f 100644
--- a/src/types.cc
+++ b/src/types.cc
@@ -7,7 +7,7 @@
#include "exceptions.h"
using namespace std;
-using namespace libdcp;
+using namespace dcp;
using namespace boost;
Fraction::Fraction (string s)
@@ -22,13 +22,13 @@ Fraction::Fraction (string s)
}
bool
-libdcp::operator== (Fraction const & a, Fraction const & b)
+dcp::operator== (Fraction const & a, Fraction const & b)
{
return (a.numerator == b.numerator && a.denominator == b.denominator);
}
bool
-libdcp::operator!= (Fraction const & a, Fraction const & b)
+dcp::operator!= (Fraction const & a, Fraction const & b)
{
return (a.numerator != b.numerator || a.denominator != b.denominator);
}
@@ -84,7 +84,7 @@ Color::to_argb_string () const
* @param b Second color to compare.
*/
bool
-libdcp::operator== (Color const & a, Color const & b)
+dcp::operator== (Color const & a, Color const & b)
{
return (a.r == b.r && a.g == b.g && a.b == b.b);
}
@@ -94,20 +94,20 @@ libdcp::operator== (Color const & a, Color const & b)
* @param b Second color to compare.
*/
bool
-libdcp::operator!= (Color const & a, Color const & b)
+dcp::operator!= (Color const & a, Color const & b)
{
return !(a == b);
}
ostream &
-libdcp::operator<< (ostream& s, Color const & c)
+dcp::operator<< (ostream& s, Color const & c)
{
s << "(" << c.r << ", " << c.g << ", " << c.b << ")";
return s;
}
string
-libdcp::effect_to_string (Effect e)
+dcp::effect_to_string (Effect e)
{
switch (e) {
case NONE:
@@ -122,7 +122,7 @@ libdcp::effect_to_string (Effect e)
}
Effect
-libdcp::string_to_effect (string s)
+dcp::string_to_effect (string s)
{
if (s == "none") {
return NONE;
@@ -136,7 +136,7 @@ libdcp::string_to_effect (string s)
}
string
-libdcp::valign_to_string (VAlign v)
+dcp::valign_to_string (VAlign v)
{
switch (v) {
case TOP:
@@ -151,7 +151,7 @@ libdcp::valign_to_string (VAlign v)
}
VAlign
-libdcp::string_to_valign (string s)
+dcp::string_to_valign (string s)
{
if (s == "top") {
return TOP;
diff --git a/src/types.h b/src/types.h
index 013c1863..021d1ecf 100644
--- a/src/types.h
+++ b/src/types.h
@@ -27,7 +27,7 @@
#include <string>
#include <boost/shared_ptr.hpp>
-namespace libdcp
+namespace dcp
{
namespace parse {
diff --git a/src/util.cc b/src/util.cc
index a668b7fc..3807b4cc 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -56,13 +56,13 @@ using std::setw;
using std::setfill;
using boost::shared_ptr;
using boost::lexical_cast;
-using namespace libdcp;
+using namespace dcp;
/** Create a UUID.
* @return UUID.
*/
string
-libdcp::make_uuid ()
+dcp::make_uuid ()
{
char buffer[64];
Kumu::UUID id;
@@ -79,7 +79,7 @@ libdcp::make_uuid ()
* @return Digest.
*/
string
-libdcp::make_digest (string filename, boost::function<void (float)>* progress)
+dcp::make_digest (string filename, boost::function<void (float)>* progress)
{
Kumu::FileReader reader;
Kumu::Result_t r = reader.OpenRead (filename.c_str ());
@@ -126,7 +126,7 @@ libdcp::make_digest (string filename, boost::function<void (float)>* progress)
* @return string.
*/
string
-libdcp::content_kind_to_string (ContentKind kind)
+dcp::content_kind_to_string (ContentKind kind)
{
switch (kind) {
case FEATURE:
@@ -159,8 +159,8 @@ libdcp::content_kind_to_string (ContentKind kind)
* @param type Content kind string.
* @return libdcp ContentKind.
*/
-libdcp::ContentKind
-libdcp::content_kind_from_string (string type)
+dcp::ContentKind
+dcp::content_kind_from_string (string type)
{
transform (type.begin(), type.end(), type.begin(), ::tolower);
@@ -198,8 +198,8 @@ libdcp::content_kind_from_string (string type)
* This is useful for scaling 4K DCP images down to 2K.
* @return XYZ image.
*/
-shared_ptr<libdcp::XYZFrame>
-libdcp::decompress_j2k (uint8_t* data, int64_t size, int reduce)
+shared_ptr<dcp::XYZFrame>
+dcp::decompress_j2k (uint8_t* data, int64_t size, int reduce)
{
opj_dinfo_t* decoder = opj_create_decompress (CODEC_J2K);
opj_dparameters_t parameters;
@@ -226,7 +226,7 @@ libdcp::decompress_j2k (uint8_t* data, int64_t size, int reduce)
* @return true if the string contains only space, newline or tab characters, or is empty.
*/
bool
-libdcp::empty_or_white_space (string s)
+dcp::empty_or_white_space (string s)
{
for (size_t i = 0; i < s.length(); ++i) {
if (s[i] != ' ' && s[i] != '\n' && s[i] != '\t') {
@@ -238,7 +238,7 @@ libdcp::empty_or_white_space (string s)
}
void
-libdcp::init ()
+dcp::init ()
{
if (xmlSecInit() < 0) {
throw MiscError ("could not initialise xmlsec");
@@ -259,12 +259,12 @@ libdcp::init ()
}
}
-bool libdcp::operator== (libdcp::Size const & a, libdcp::Size const & b)
+bool dcp::operator== (dcp::Size const & a, dcp::Size const & b)
{
return (a.width == b.width && a.height == b.height);
}
-bool libdcp::operator!= (libdcp::Size const & a, libdcp::Size const & b)
+bool dcp::operator!= (dcp::Size const & a, dcp::Size const & b)
{
return !(a == b);
}
@@ -273,7 +273,7 @@ bool libdcp::operator!= (libdcp::Size const & a, libdcp::Size const & b)
* this and the command-line base64 for some inputs. Not sure why.
*/
int
-libdcp::base64_decode (string const & in, unsigned char* out, int out_length)
+dcp::base64_decode (string const & in, unsigned char* out, int out_length)
{
BIO* b64 = BIO_new (BIO_f_base64 ());
@@ -298,7 +298,7 @@ libdcp::base64_decode (string const & in, unsigned char* out, int out_length)
}
string
-libdcp::tm_to_string (struct tm* tm)
+dcp::tm_to_string (struct tm* tm)
{
char buffer[64];
strftime (buffer, 64, "%Y-%m-%dT%H:%M:%S", tm);
@@ -320,7 +320,7 @@ libdcp::tm_to_string (struct tm* tm)
* @return string of the form e.g. -01:00.
*/
string
-libdcp::utc_offset_to_string (int b)
+dcp::utc_offset_to_string (int b)
{
bool const negative = (b < 0);
b = negative ? -b : b;
@@ -340,7 +340,7 @@ libdcp::utc_offset_to_string (int b)
}
string
-libdcp::ptime_to_string (boost::posix_time::ptime t)
+dcp::ptime_to_string (boost::posix_time::ptime t)
{
struct tm t_tm = boost::posix_time::to_tm (t);
return tm_to_string (&t_tm);
@@ -352,7 +352,7 @@ libdcp::ptime_to_string (boost::posix_time::ptime t)
with this wrapper.
*/
FILE *
-libdcp::fopen_boost (boost::filesystem::path p, string t)
+dcp::fopen_boost (boost::filesystem::path p, string t)
{
#ifdef LIBDCP_WINDOWS
wstring w (t.begin(), t.end());
diff --git a/src/util.h b/src/util.h
index 2a6aae1b..f12f0ff0 100644
--- a/src/util.h
+++ b/src/util.h
@@ -37,7 +37,7 @@ namespace xmlpp {
class Element;
}
-namespace libdcp {
+namespace dcp {
class ARGBFrame;
class CertificateChain;
diff --git a/src/version.h b/src/version.h
index 52abd13a..9b6dc65f 100644
--- a/src/version.h
+++ b/src/version.h
@@ -1,5 +1,5 @@
-namespace libdcp {
+namespace dcp {
extern char const * version;
extern char const * git_commit;
diff --git a/src/xml.h b/src/xml.h
index 5978ff7e..665cfe43 100644
--- a/src/xml.h
+++ b/src/xml.h
@@ -23,7 +23,7 @@
#include <libcxml/cxml.h>
#include "exceptions.h"
-namespace libdcp
+namespace dcp
{
template <class T>
diff --git a/src/xml/kdm_smpte.h b/src/xml/kdm_smpte.h
index 32a297f8..49281d70 100644
--- a/src/xml/kdm_smpte.h
+++ b/src/xml/kdm_smpte.h
@@ -41,7 +41,7 @@
#include <libcxml/cxml.h>
#include "../exceptions.h"
-namespace libdcp {
+namespace dcp {
namespace xml {
class Writer
diff --git a/src/xyz_frame.cc b/src/xyz_frame.cc
index f5b0ee86..e75a43bc 100644
--- a/src/xyz_frame.cc
+++ b/src/xyz_frame.cc
@@ -21,7 +21,7 @@
#include <stdexcept>
#include "xyz_frame.h"
-using namespace libdcp;
+using namespace dcp;
/** Construct an XYZFrame, taking ownership of the opj_image_t */
XYZFrame::XYZFrame (opj_image_t* image)
@@ -70,9 +70,9 @@ XYZFrame::data (int c) const
return _opj_image->comps[c].data;
}
-libdcp::Size
+dcp::Size
XYZFrame::size () const
{
/* XXX: this may not be right; x0 and y0 can presumably be non-zero */
- return libdcp::Size (_opj_image->x1, _opj_image->y1);
+ return dcp::Size (_opj_image->x1, _opj_image->y1);
}
diff --git a/src/xyz_frame.h b/src/xyz_frame.h
index a4dcb2c0..2118331c 100644
--- a/src/xyz_frame.h
+++ b/src/xyz_frame.h
@@ -20,7 +20,7 @@
#include <openjpeg.h>
#include "util.h"
-namespace libdcp {
+namespace dcp {
class XYZFrame
{
@@ -30,7 +30,7 @@ public:
~XYZFrame ();
int* data (int) const;
- libdcp::Size size () const;
+ dcp::Size size () const;
opj_image_t* opj_image () const {
return _opj_image;
diff --git a/test/certificates_test.cc b/test/certificates_test.cc
index 0a66bc66..690afa77 100644
--- a/test/certificates_test.cc
+++ b/test/certificates_test.cc
@@ -25,15 +25,15 @@ using boost::shared_ptr;
BOOST_AUTO_TEST_CASE (certificates)
{
- libdcp::CertificateChain c;
+ dcp::CertificateChain c;
- c.add (shared_ptr<libdcp::Certificate> (new libdcp::Certificate (boost::filesystem::path ("test/ref/crypt/ca.self-signed.pem"))));
- c.add (shared_ptr<libdcp::Certificate> (new libdcp::Certificate (boost::filesystem::path ("test/ref/crypt/intermediate.signed.pem"))));
- c.add (shared_ptr<libdcp::Certificate> (new libdcp::Certificate (boost::filesystem::path ("test/ref/crypt/leaf.signed.pem"))));
+ c.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (boost::filesystem::path ("test/ref/crypt/ca.self-signed.pem"))));
+ c.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (boost::filesystem::path ("test/ref/crypt/intermediate.signed.pem"))));
+ c.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (boost::filesystem::path ("test/ref/crypt/leaf.signed.pem"))));
- list<shared_ptr<libdcp::Certificate> > leaf_to_root = c.leaf_to_root ();
+ list<shared_ptr<dcp::Certificate> > leaf_to_root = c.leaf_to_root ();
- list<shared_ptr<libdcp::Certificate> >::iterator i = leaf_to_root.begin ();
+ list<shared_ptr<dcp::Certificate> >::iterator i = leaf_to_root.begin ();
/* Leaf */
BOOST_CHECK_EQUAL (*i, c.leaf ());
@@ -78,6 +78,6 @@ BOOST_AUTO_TEST_CASE (certificates)
);
/* Check that reconstruction from a string works */
- libdcp::Certificate test (c.root()->certificate (true));
+ dcp::Certificate test (c.root()->certificate (true));
BOOST_CHECK_EQUAL (test.certificate(), c.root()->certificate());
}
diff --git a/test/color_test.cc b/test/color_test.cc
index 30a96a0d..d68f59d4 100644
--- a/test/color_test.cc
+++ b/test/color_test.cc
@@ -21,24 +21,24 @@
#include "util.h"
-/* Check that libdcp::Color works */
+/* Check that dcp::Color works */
BOOST_AUTO_TEST_CASE (color)
{
- libdcp::Color c ("FFFF0000");
+ dcp::Color c ("FFFF0000");
BOOST_CHECK_EQUAL (c.r, 255);
BOOST_CHECK_EQUAL (c.g, 0);
BOOST_CHECK_EQUAL (c.b, 0);
BOOST_CHECK_EQUAL (c.to_argb_string(), "FFFF0000");
- c = libdcp::Color ("FF00FF00");
+ c = dcp::Color ("FF00FF00");
BOOST_CHECK_EQUAL (c.r, 0);
BOOST_CHECK_EQUAL (c.g, 255);
BOOST_CHECK_EQUAL (c.b, 0);
BOOST_CHECK_EQUAL (c.to_argb_string(), "FF00FF00");
- c = libdcp::Color ("FF0000FF");
+ c = dcp::Color ("FF0000FF");
BOOST_CHECK_EQUAL (c.r, 0);
BOOST_CHECK_EQUAL (c.g, 0);
diff --git a/test/cpl_sar.cc b/test/cpl_sar.cc
index c91ce287..5628363a 100644
--- a/test/cpl_sar.cc
+++ b/test/cpl_sar.cc
@@ -29,11 +29,11 @@ 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<dcp::MonoPictureAsset> mp (new dcp::MonoPictureAsset ("build/test/foo", "video.mxf"));
mp->set_interop (true);
{
- mp->set_size (libdcp::Size (1998, 1080));
+ mp->set_size (dcp::Size (1998, 1080));
xmlpp::Document doc;
xmlpp::Element* el = doc.create_root_node ("Test");
mp->write_to_cpl (el);
@@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE (cpl_sar)
}
{
- mp->set_size (libdcp::Size (2048, 858));
+ mp->set_size (dcp::Size (2048, 858));
xmlpp::Document doc;
xmlpp::Element* el = doc.create_root_node ("Test");
mp->write_to_cpl (el);
diff --git a/test/dcp_test.cc b/test/dcp_test.cc
index f70c6ce8..eccd7ad3 100644
--- a/test/dcp_test.cc
+++ b/test/dcp_test.cc
@@ -35,11 +35,11 @@ BOOST_AUTO_TEST_CASE (dcp_test)
Kumu::libdcp_test = true;
/* Some known metadata */
- libdcp::XMLMetadata xml_meta;
+ dcp::XMLMetadata xml_meta;
xml_meta.issuer = "OpenDCP 0.0.25";
xml_meta.creator = "OpenDCP 0.0.25";
xml_meta.issue_date = "2012-07-17T04:45:18+00:00";
- libdcp::MXFMetadata mxf_meta;
+ dcp::MXFMetadata mxf_meta;
mxf_meta.company_name = "OpenDCP";
mxf_meta.product_name = "OpenDCP";
mxf_meta.product_version = "0.0.25";
@@ -47,19 +47,19 @@ BOOST_AUTO_TEST_CASE (dcp_test)
/* We're making build/test/foo */
boost::filesystem::remove_all ("build/test/foo");
boost::filesystem::create_directories ("build/test/foo");
- libdcp::DCP d ("build/test/foo");
- shared_ptr<libdcp::CPL> cpl (new libdcp::CPL ("build/test/foo", "A Test DCP", libdcp::FEATURE, 24, 24));
+ dcp::DCP d ("build/test/foo");
+ shared_ptr<dcp::CPL> cpl (new dcp::CPL ("build/test/foo", "A Test DCP", dcp::FEATURE, 24, 24));
- shared_ptr<libdcp::MonoPictureAsset> mp (new libdcp::MonoPictureAsset ("build/test/foo", "video.mxf"));
+ shared_ptr<dcp::MonoPictureAsset> mp (new dcp::MonoPictureAsset ("build/test/foo", "video.mxf"));
mp->set_progress (&d.Progress);
mp->set_edit_rate (24);
mp->set_intrinsic_duration (24);
mp->set_duration (24);
- mp->set_size (libdcp::Size (32, 32));
+ mp->set_size (dcp::Size (32, 32));
mp->set_metadata (mxf_meta);
mp->create (j2c);
- shared_ptr<libdcp::SoundAsset> ms (new libdcp::SoundAsset ("build/test/foo", "audio.mxf"));
+ shared_ptr<dcp::SoundAsset> ms (new dcp::SoundAsset ("build/test/foo", "audio.mxf"));
ms->set_progress (&d.Progress);
ms->set_edit_rate (24);
ms->set_intrinsic_duration (24);
@@ -68,7 +68,7 @@ BOOST_AUTO_TEST_CASE (dcp_test)
ms->set_metadata (mxf_meta);
ms->create (wav);
- cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (mp, ms, shared_ptr<libdcp::SubtitleAsset> ())));
+ cpl->add_reel (shared_ptr<dcp::Reel> (new dcp::Reel (mp, ms, shared_ptr<dcp::SubtitleAsset> ())));
d.add_cpl (cpl);
d.write_xml (false, xml_meta);
diff --git a/test/dcp_time_test.cc b/test/dcp_time_test.cc
index 6892711e..2a5bca1b 100644
--- a/test/dcp_time_test.cc
+++ b/test/dcp_time_test.cc
@@ -20,10 +20,10 @@
#include <boost/test/unit_test.hpp>
#include "dcp_time.h"
-/** Check that libdcp::Time works */
+/** Check that dcp::Time works */
BOOST_AUTO_TEST_CASE (dcp_time)
{
- libdcp::Time t (977143, 24);
+ dcp::Time t (977143, 24);
BOOST_CHECK_EQUAL (t.t, 73);
BOOST_CHECK_EQUAL (t.s, 34);
@@ -32,10 +32,10 @@ BOOST_AUTO_TEST_CASE (dcp_time)
BOOST_CHECK_EQUAL (t.to_string(), "11:18:34:73");
BOOST_CHECK_EQUAL (t.to_ticks(), 10178573);
- libdcp::Time a (3, 2, 3, 4);
- libdcp::Time b (2, 3, 4, 5);
+ dcp::Time a (3, 2, 3, 4);
+ dcp::Time b (2, 3, 4, 5);
- libdcp::Time r = a - b;
+ dcp::Time r = a - b;
BOOST_CHECK_EQUAL (r.h, 0);
BOOST_CHECK_EQUAL (r.m, 58);
BOOST_CHECK_EQUAL (r.s, 58);
@@ -43,8 +43,8 @@ BOOST_AUTO_TEST_CASE (dcp_time)
BOOST_CHECK_EQUAL (r.to_string(), "0:58:58:249");
BOOST_CHECK_EQUAL (r.to_ticks(), 884749);
- a = libdcp::Time (1, 58, 56, 240);
- b = libdcp::Time (1, 7, 12, 120);
+ a = dcp::Time (1, 58, 56, 240);
+ b = dcp::Time (1, 7, 12, 120);
r = a + b;
BOOST_CHECK_EQUAL (r.h, 3);
BOOST_CHECK_EQUAL (r.m, 6);
@@ -53,10 +53,10 @@ BOOST_AUTO_TEST_CASE (dcp_time)
BOOST_CHECK_EQUAL (r.to_string(), "3:6:9:110");
BOOST_CHECK_EQUAL (r.to_ticks(), 2792360);
- a = libdcp::Time (24, 12, 6, 3);
- b = libdcp::Time (16, 8, 4, 2);
+ a = dcp::Time (24, 12, 6, 3);
+ b = dcp::Time (16, 8, 4, 2);
BOOST_CHECK_CLOSE (a / b, 1.5, 1e-5);
- BOOST_CHECK_EQUAL (libdcp::Time (4128391203LL).to_ticks(), 4128391203LL);
- BOOST_CHECK_EQUAL (libdcp::Time (60000).to_ticks(), 60000);
+ BOOST_CHECK_EQUAL (dcp::Time (4128391203LL).to_ticks(), 4128391203LL);
+ BOOST_CHECK_EQUAL (dcp::Time (60000).to_ticks(), 60000);
}
diff --git a/test/decryption_test.cc b/test/decryption_test.cc
index 0f5a4ef0..5fd29c6c 100644
--- a/test/decryption_test.cc
+++ b/test/decryption_test.cc
@@ -30,15 +30,15 @@
using boost::dynamic_pointer_cast;
using boost::shared_ptr;
-static shared_ptr<const libdcp::ARGBFrame>
-get_frame (libdcp::DCP const & dcp)
+static shared_ptr<const dcp::ARGBFrame>
+get_frame (dcp::DCP const & dcp)
{
- shared_ptr<const libdcp::Reel> reel = dcp.cpls().front()->reels().front ();
- shared_ptr<const libdcp::PictureAsset> picture = reel->main_picture ();
+ shared_ptr<const dcp::Reel> reel = dcp.cpls().front()->reels().front ();
+ shared_ptr<const dcp::PictureAsset> picture = reel->main_picture ();
BOOST_CHECK (picture);
- shared_ptr<const libdcp::MonoPictureAsset> mono_picture = dynamic_pointer_cast<const libdcp::MonoPictureAsset> (picture);
- shared_ptr<const libdcp::MonoPictureFrame> j2k_frame = mono_picture->get_frame (0);
+ shared_ptr<const dcp::MonoPictureAsset> mono_picture = dynamic_pointer_cast<const dcp::MonoPictureAsset> (picture);
+ shared_ptr<const dcp::MonoPictureFrame> j2k_frame = mono_picture->get_frame (0);
return j2k_frame->argb_frame ();
}
@@ -47,25 +47,25 @@ BOOST_AUTO_TEST_CASE (decryption_test)
{
boost::filesystem::path plaintext_path = test_corpus;
plaintext_path /= "TONEPLATES-SMPTE-PLAINTEXT_TST_F_XX-XX_ITL-TD_51-XX_2K_WOE_20111001_WOE_OV";
- libdcp::DCP plaintext (plaintext_path.string ());
+ dcp::DCP plaintext (plaintext_path.string ());
plaintext.read ();
BOOST_CHECK_EQUAL (plaintext.encrypted (), false);
boost::filesystem::path encrypted_path = test_corpus;
encrypted_path /= "TONEPLATES-SMPTE-ENCRYPTED_TST_F_XX-XX_ITL-TD_51-XX_2K_WOE_20111001_WOE_OV";
- libdcp::DCP encrypted (encrypted_path.string ());
+ dcp::DCP encrypted (encrypted_path.string ());
encrypted.read ();
BOOST_CHECK_EQUAL (encrypted.encrypted (), true);
- libdcp::KDM kdm (
+ dcp::KDM kdm (
"test/data/kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml",
"test/data/private.key"
);
encrypted.add_kdm (kdm);
- shared_ptr<const libdcp::ARGBFrame> plaintext_frame = get_frame (plaintext);
- shared_ptr<const libdcp::ARGBFrame> encrypted_frame = get_frame (encrypted);
+ shared_ptr<const dcp::ARGBFrame> plaintext_frame = get_frame (plaintext);
+ shared_ptr<const dcp::ARGBFrame> encrypted_frame = get_frame (encrypted);
/* Check that plaintext and encrypted are the same */
BOOST_CHECK_EQUAL (plaintext_frame->stride(), encrypted_frame->stride());
@@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE (decryption_test)
/** Load in a KDM that didn't work at first */
BOOST_AUTO_TEST_CASE (failing_kdm_test)
{
- libdcp::KDM kdm (
+ dcp::KDM kdm (
"test/data/target.pem.crt.de5d4eba-e683-41ca-bdda-aa4ad96af3f4.kdm.xml",
"test/data/private.key"
);
diff --git a/test/encryption_test.cc b/test/encryption_test.cc
index dc49562c..7cd202f2 100644
--- a/test/encryption_test.cc
+++ b/test/encryption_test.cc
@@ -40,51 +40,51 @@ BOOST_AUTO_TEST_CASE (encryption)
{
boost::filesystem::remove_all ("build/test/signer");
boost::filesystem::create_directory ("build/test/signer");
- libdcp::make_signer_chain ("build/test/signer", "openssl");
+ dcp::make_signer_chain ("build/test/signer", "openssl");
Kumu::libdcp_test = true;
- libdcp::MXFMetadata mxf_metadata;
+ dcp::MXFMetadata mxf_metadata;
mxf_metadata.company_name = "OpenDCP";
mxf_metadata.product_name = "OpenDCP";
mxf_metadata.product_version = "0.0.25";
- libdcp::XMLMetadata xml_metadata;
+ dcp::XMLMetadata xml_metadata;
xml_metadata.issuer = "OpenDCP 0.0.25";
xml_metadata.creator = "OpenDCP 0.0.25";
xml_metadata.issue_date = "2012-07-17T04:45:18+00:00";
boost::filesystem::remove_all ("build/test/DCP/bar");
boost::filesystem::create_directories ("build/test/DCP/bar");
- libdcp::DCP d ("build/test/DCP/bar");
+ dcp::DCP d ("build/test/DCP/bar");
- libdcp::CertificateChain chain;
- chain.add (shared_ptr<libdcp::Certificate> (new libdcp::Certificate (boost::filesystem::path ("build/test/signer/ca.self-signed.pem"))));
- chain.add (shared_ptr<libdcp::Certificate> (new libdcp::Certificate (boost::filesystem::path ("build/test/signer/intermediate.signed.pem"))));
- chain.add (shared_ptr<libdcp::Certificate> (new libdcp::Certificate (boost::filesystem::path ("build/test/signer/leaf.signed.pem"))));
+ dcp::CertificateChain chain;
+ chain.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (boost::filesystem::path ("build/test/signer/ca.self-signed.pem"))));
+ chain.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (boost::filesystem::path ("build/test/signer/intermediate.signed.pem"))));
+ chain.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (boost::filesystem::path ("build/test/signer/leaf.signed.pem"))));
- shared_ptr<libdcp::Signer> signer (
- new libdcp::Signer (
+ shared_ptr<dcp::Signer> signer (
+ new dcp::Signer (
chain,
"build/test/signer/leaf.key"
)
);
- shared_ptr<libdcp::CPL> cpl (new libdcp::CPL ("build/test/DCP/bar", "A Test DCP", libdcp::FEATURE, 24, 24));
+ shared_ptr<dcp::CPL> cpl (new dcp::CPL ("build/test/DCP/bar", "A Test DCP", dcp::FEATURE, 24, 24));
- libdcp::Key key;
+ dcp::Key key;
- shared_ptr<libdcp::MonoPictureAsset> mp (new libdcp::MonoPictureAsset ("build/test/DCP/bar", "video.mxf"));
+ shared_ptr<dcp::MonoPictureAsset> mp (new dcp::MonoPictureAsset ("build/test/DCP/bar", "video.mxf"));
mp->set_progress (&d.Progress);
mp->set_edit_rate (24);
mp->set_intrinsic_duration (24);
mp->set_duration (24);
- mp->set_size (libdcp::Size (32, 32));
+ mp->set_size (dcp::Size (32, 32));
mp->set_metadata (mxf_metadata);
mp->set_key (key);
mp->create (j2c);
- shared_ptr<libdcp::SoundAsset> ms (new libdcp::SoundAsset ("build/test/DCP/bar", "audio.mxf"));
+ shared_ptr<dcp::SoundAsset> ms (new dcp::SoundAsset ("build/test/DCP/bar", "audio.mxf"));
ms->set_progress (&d.Progress);
ms->set_edit_rate (24);
ms->set_intrinsic_duration (24);
@@ -94,12 +94,12 @@ BOOST_AUTO_TEST_CASE (encryption)
ms->set_key (key);
ms->create (wav);
- cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (mp, ms, shared_ptr<libdcp::SubtitleAsset> ())));
+ cpl->add_reel (shared_ptr<dcp::Reel> (new dcp::Reel (mp, ms, shared_ptr<dcp::SubtitleAsset> ())));
d.add_cpl (cpl);
d.write_xml (false, xml_metadata, signer);
- libdcp::KDM kdm (
+ dcp::KDM kdm (
cpl,
signer,
signer->certificates().leaf(),
diff --git a/test/error_test.cc b/test/error_test.cc
index eeff4f41..52d97556 100644
--- a/test/error_test.cc
+++ b/test/error_test.cc
@@ -31,17 +31,17 @@ using std::string;
BOOST_AUTO_TEST_CASE (error_test)
{
/* Create an empty DCP */
- libdcp::DCP d ("build/test/fred");
+ dcp::DCP d ("build/test/fred");
/* Random filename that does not exist */
vector<boost::filesystem::path> p;
p.push_back ("frobozz");
/* Trying to create video/audio MXFs using a non-existant file should throw an exception */
- libdcp::MonoPictureAsset pa ("build/test/fred", "video.mxf");
- BOOST_CHECK_THROW (pa.create (p), libdcp::FileError);
+ dcp::MonoPictureAsset pa ("build/test/fred", "video.mxf");
+ BOOST_CHECK_THROW (pa.create (p), dcp::FileError);
- libdcp::SoundAsset sa ("build/test/fred", "audio.mxf");
+ dcp::SoundAsset sa ("build/test/fred", "audio.mxf");
sa.set_channels (1);
- BOOST_CHECK_THROW (sa.create (p), libdcp::FileError);
+ BOOST_CHECK_THROW (sa.create (p), dcp::FileError);
}
diff --git a/test/frame_info_test.cc b/test/frame_info_test.cc
index db73d7fb..bf4181a0 100644
--- a/test/frame_info_test.cc
+++ b/test/frame_info_test.cc
@@ -26,7 +26,7 @@ using namespace std;
/* Test writing and reading of frame_info_test with fstream and stdio */
BOOST_AUTO_TEST_CASE (frame_info_test)
{
- libdcp::FrameInfo a (8589934592LL, 17179869184LL, "thisisahash");
+ dcp::FrameInfo a (8589934592LL, 17179869184LL, "thisisahash");
ofstream o1 ("build/test/frame_info1");
a.write (o1);
@@ -48,11 +48,11 @@ BOOST_AUTO_TEST_CASE (frame_info_test)
BOOST_CHECK_EQUAL (s1, s2);
ifstream l1 ("build/test/frame_info1");
- libdcp::FrameInfo b1 (l1);
+ dcp::FrameInfo b1 (l1);
FILE* l2 = fopen ("build/test/frame_info2", "r");
BOOST_CHECK (l2);
- libdcp::FrameInfo b2 (l2);
+ dcp::FrameInfo b2 (l2);
BOOST_CHECK_EQUAL (b1.offset, b2.offset);
BOOST_CHECK_EQUAL (b1.size, b2.size);
diff --git a/test/kdm_key_test.cc b/test/kdm_key_test.cc
index 05b85312..4a84fe3b 100644
--- a/test/kdm_key_test.cc
+++ b/test/kdm_key_test.cc
@@ -24,7 +24,7 @@ BOOST_AUTO_TEST_CASE (kdm_key_test)
{
uint8_t foo[138];
memset (foo, 0, 138);
- libdcp::KDMKey kkey (foo, 138);
+ dcp::KDMKey kkey (foo, 138);
uint8_t* raw = new uint8_t[16];
uint8_t* p = raw;
diff --git a/test/kdm_test.cc b/test/kdm_test.cc
index 0f0db031..f2ee9345 100644
--- a/test/kdm_test.cc
+++ b/test/kdm_test.cc
@@ -26,12 +26,12 @@ using boost::shared_ptr;
BOOST_AUTO_TEST_CASE (kdm_test)
{
- libdcp::KDM kdm (
+ dcp::KDM kdm (
"test/data/kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml",
"test/data/private.key"
);
- list<libdcp::KDMKey> keys = kdm.keys ();
+ list<dcp::KDMKey> keys = kdm.keys ();
BOOST_CHECK_EQUAL (keys.size(), 2);
@@ -51,7 +51,7 @@ BOOST_AUTO_TEST_CASE (kdm_test)
/* Check that we can read in a KDM and then write it back out again the same */
BOOST_AUTO_TEST_CASE (kdm_passthrough_test)
{
- libdcp::xml::DCinemaSecurityMessage kdm (
+ dcp::xml::DCinemaSecurityMessage kdm (
"test/data/kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml"
);
diff --git a/test/lut_test.cc b/test/lut_test.cc
index c90dff76..32dac97a 100644
--- a/test/lut_test.cc
+++ b/test/lut_test.cc
@@ -29,19 +29,19 @@
*/
BOOST_AUTO_TEST_CASE (lut_test)
{
- libdcp::SRGBLinearisedGammaLUT lut_in_srgb (12, 2.4);
+ dcp::SRGBLinearisedGammaLUT lut_in_srgb (12, 2.4);
for (int i = 0; i < 4096; ++i) {
/* Hmm; 1% isn't exactly great... */
BOOST_CHECK_CLOSE (opendcp::lut_in[0][i], lut_in_srgb.lut()[i], 1);
}
- libdcp::Rec709LinearisedGammaLUT lut_in_rec709 (12, 1 / 0.45);
+ dcp::Rec709LinearisedGammaLUT lut_in_rec709 (12, 1 / 0.45);
for (int i = 0; i < 4096; ++i) {
/* Hmm; 1% isn't exactly great... */
BOOST_CHECK_CLOSE (opendcp::lut_in[1][i], lut_in_rec709.lut()[i], 1);
}
- libdcp::GammaLUT lut_out (16, 1 / 2.6);
+ dcp::GammaLUT lut_out (16, 1 / 2.6);
for (int i = 0; i < 65536; ++i) {
BOOST_CHECK_CLOSE (opendcp::lut_out[0][i], lut_out.lut()[i] * 4096, 1);
}
diff --git a/test/read_dcp_test.cc b/test/read_dcp_test.cc
index 0a9ac119..06df7058 100644
--- a/test/read_dcp_test.cc
+++ b/test/read_dcp_test.cc
@@ -27,14 +27,14 @@ using boost::shared_ptr;
/* Read DCP that is in git and make sure that basic stuff is read in correctly */
BOOST_AUTO_TEST_CASE (read_dcp)
{
- libdcp::DCP d ("test/ref/DCP/foo");
+ dcp::DCP d ("test/ref/DCP/foo");
d.read ();
- list<shared_ptr<libdcp::CPL> > cpls = d.cpls ();
+ list<shared_ptr<dcp::CPL> > cpls = d.cpls ();
BOOST_CHECK_EQUAL (cpls.size(), 1);
BOOST_CHECK_EQUAL (cpls.front()->name(), "A Test DCP");
- BOOST_CHECK_EQUAL (cpls.front()->content_kind(), libdcp::FEATURE);
+ BOOST_CHECK_EQUAL (cpls.front()->content_kind(), dcp::FEATURE);
BOOST_CHECK_EQUAL (cpls.front()->frames_per_second(), 24);
BOOST_CHECK_EQUAL (cpls.front()->length(), 24);
}
diff --git a/test/recovery_test.cc b/test/recovery_test.cc
index 42697c37..27a4c150 100644
--- a/test/recovery_test.cc
+++ b/test/recovery_test.cc
@@ -48,14 +48,14 @@ BOOST_AUTO_TEST_CASE (recovery)
boost::filesystem::remove_all ("build/test/baz");
boost::filesystem::create_directories ("build/test/baz");
- shared_ptr<libdcp::MonoPictureAsset> mp (new libdcp::MonoPictureAsset ("build/test/baz", "video1.mxf"));
+ shared_ptr<dcp::MonoPictureAsset> mp (new dcp::MonoPictureAsset ("build/test/baz", "video1.mxf"));
mp->set_edit_rate (24);
- mp->set_size (libdcp::Size (32, 32));
- shared_ptr<libdcp::PictureAssetWriter> writer = mp->start_write (false);
+ mp->set_size (dcp::Size (32, 32));
+ shared_ptr<dcp::PictureAssetWriter> writer = mp->start_write (false);
int written_size = 0;
for (int i = 0; i < 24; ++i) {
- libdcp::FrameInfo info = writer->write (data, size);
+ dcp::FrameInfo info = writer->write (data, size);
written_size = info.size;
}
@@ -78,9 +78,9 @@ BOOST_AUTO_TEST_CASE (recovery)
Kumu::ResetTestRNG ();
#endif
- mp.reset (new libdcp::MonoPictureAsset ("build/test/baz", "video2.mxf"));
+ mp.reset (new dcp::MonoPictureAsset ("build/test/baz", "video2.mxf"));
mp->set_edit_rate (24);
- mp->set_size (libdcp::Size (32, 32));
+ mp->set_size (dcp::Size (32, 32));
writer = mp->start_write (true);
writer->write (data, size);
diff --git a/test/rewrite_subs.cc b/test/rewrite_subs.cc
index c7f8bfbd..5628ec70 100644
--- a/test/rewrite_subs.cc
+++ b/test/rewrite_subs.cc
@@ -9,7 +9,7 @@ using std::cout;
using std::cerr;
using std::list;
using boost::shared_ptr;
-using namespace libdcp;
+using namespace dcp;
int
main (int argc, char* argv[])
diff --git a/test/round_trip_test.cc b/test/round_trip_test.cc
index a6ee2097..51edf111 100644
--- a/test/round_trip_test.cc
+++ b/test/round_trip_test.cc
@@ -39,15 +39,15 @@ BOOST_AUTO_TEST_CASE (round_trip_test)
{
boost::filesystem::remove_all ("build/test/signer");
boost::filesystem::create_directory ("build/test/signer");
- libdcp::make_signer_chain ("build/test/signer", "openssl");
+ dcp::make_signer_chain ("build/test/signer", "openssl");
- libdcp::CertificateChain chain;
- chain.add (shared_ptr<libdcp::Certificate> (new libdcp::Certificate (boost::filesystem::path ("build/test/signer/ca.self-signed.pem"))));
- chain.add (shared_ptr<libdcp::Certificate> (new libdcp::Certificate (boost::filesystem::path ("build/test/signer/intermediate.signed.pem"))));
- chain.add (shared_ptr<libdcp::Certificate> (new libdcp::Certificate (boost::filesystem::path ("build/test/signer/leaf.signed.pem"))));
+ dcp::CertificateChain chain;
+ chain.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (boost::filesystem::path ("build/test/signer/ca.self-signed.pem"))));
+ chain.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (boost::filesystem::path ("build/test/signer/intermediate.signed.pem"))));
+ chain.add (shared_ptr<dcp::Certificate> (new dcp::Certificate (boost::filesystem::path ("build/test/signer/leaf.signed.pem"))));
- shared_ptr<libdcp::Signer> signer (
- new libdcp::Signer (
+ shared_ptr<dcp::Signer> signer (
+ new dcp::Signer (
chain,
"test/data/signer.key"
)
@@ -56,21 +56,21 @@ BOOST_AUTO_TEST_CASE (round_trip_test)
boost::filesystem::path work_dir = "build/test/round_trip_test";
boost::filesystem::create_directory (work_dir);
- shared_ptr<libdcp::MonoPictureAsset> asset_A (new libdcp::MonoPictureAsset (work_dir, "video.mxf"));
+ shared_ptr<dcp::MonoPictureAsset> asset_A (new dcp::MonoPictureAsset (work_dir, "video.mxf"));
asset_A->set_edit_rate (24);
asset_A->set_intrinsic_duration (24);
- asset_A->set_size (libdcp::Size (32, 32));
+ asset_A->set_size (dcp::Size (32, 32));
asset_A->create (j2c);
- libdcp::Key key;
+ dcp::Key key;
asset_A->set_key (key);
- shared_ptr<libdcp::CPL> cpl (new libdcp::CPL (work_dir, "A Test DCP", libdcp::FEATURE, 24, 24));
- cpl->add_reel (shared_ptr<libdcp::Reel> (new libdcp::Reel (asset_A, shared_ptr<libdcp::SoundAsset> (), shared_ptr<libdcp::SubtitleAsset> ())));
+ shared_ptr<dcp::CPL> cpl (new dcp::CPL (work_dir, "A Test DCP", dcp::FEATURE, 24, 24));
+ cpl->add_reel (shared_ptr<dcp::Reel> (new dcp::Reel (asset_A, shared_ptr<dcp::SoundAsset> (), shared_ptr<dcp::SubtitleAsset> ())));
/* A KDM using our certificate chain's leaf key pair */
- libdcp::KDM kdm_A (
+ dcp::KDM kdm_A (
cpl,
signer,
signer->certificates().leaf(),
@@ -85,14 +85,14 @@ BOOST_AUTO_TEST_CASE (round_trip_test)
kdm_A.as_xml (kdm_file);
/* Reload the KDM, using our private key to decrypt it */
- libdcp::KDM kdm_B (kdm_file, "build/test/signer/leaf.key");
+ dcp::KDM kdm_B (kdm_file, "build/test/signer/leaf.key");
/* Check that the decrypted KDMKeys are the same as the ones we started with */
BOOST_CHECK_EQUAL (kdm_A.keys().size(), kdm_B.keys().size());
- list<libdcp::KDMKey> keys_A = kdm_A.keys ();
- list<libdcp::KDMKey> keys_B = kdm_B.keys ();
- list<libdcp::KDMKey>::const_iterator i = keys_A.begin();
- list<libdcp::KDMKey>::const_iterator j = keys_B.begin();
+ list<dcp::KDMKey> keys_A = kdm_A.keys ();
+ list<dcp::KDMKey> keys_B = kdm_B.keys ();
+ list<dcp::KDMKey>::const_iterator i = keys_A.begin();
+ list<dcp::KDMKey>::const_iterator j = keys_B.begin();
while (i != keys_A.end ()) {
BOOST_CHECK (*i == *j);
++i;
@@ -100,14 +100,14 @@ BOOST_AUTO_TEST_CASE (round_trip_test)
}
/* Reload the picture MXF */
- shared_ptr<libdcp::MonoPictureAsset> asset_B (
- new libdcp::MonoPictureAsset (work_dir, "video.mxf")
+ shared_ptr<dcp::MonoPictureAsset> asset_B (
+ new dcp::MonoPictureAsset (work_dir, "video.mxf")
);
asset_B->set_key (kdm_B.keys().front().key());
- shared_ptr<libdcp::ARGBFrame> frame_A = asset_A->get_frame(0)->argb_frame ();
- shared_ptr<libdcp::ARGBFrame> frame_B = asset_B->get_frame(0)->argb_frame ();
+ shared_ptr<dcp::ARGBFrame> frame_A = asset_A->get_frame(0)->argb_frame ();
+ shared_ptr<dcp::ARGBFrame> frame_B = asset_B->get_frame(0)->argb_frame ();
BOOST_CHECK_EQUAL (frame_A->size().width, frame_B->size().width);
BOOST_CHECK_EQUAL (frame_A->size().height, frame_B->size().height);
BOOST_CHECK_EQUAL (memcmp (frame_A->data(), frame_B->data(), frame_A->size().width * frame_A->size().height), 0);
diff --git a/test/subs_in_out.cc b/test/subs_in_out.cc
index f0a7e96f..923cfe2e 100644
--- a/test/subs_in_out.cc
+++ b/test/subs_in_out.cc
@@ -10,7 +10,7 @@ int main (int argc, char* argv[])
exit (EXIT_FAILURE);
}
- libdcp::SubtitleAsset s ("foo", "bar", "baz");
+ dcp::SubtitleAsset s ("foo", "bar", "baz");
s.read_xml (argv[1]);
cout << s.xml_as_string ();
return 0;
diff --git a/test/subtitle_tests.cc b/test/subtitle_tests.cc
index a8fa78b7..23e5b821 100644
--- a/test/subtitle_tests.cc
+++ b/test/subtitle_tests.cc
@@ -26,398 +26,398 @@ using boost::shared_ptr;
/* Load a subtitle asset from XML and check that it is read correctly */
BOOST_AUTO_TEST_CASE (subtitles1)
{
- libdcp::SubtitleAsset subs ("test/data", "subs1.xml");
+ dcp::SubtitleAsset subs ("test/data", "subs1.xml");
BOOST_CHECK_EQUAL (subs.language(), "French");
- list<shared_ptr<libdcp::Subtitle> > s = subs.subtitles_at (libdcp::Time (0, 0, 6, 1));
+ list<shared_ptr<dcp::Subtitle> > s = subs.subtitles_at (dcp::Time (0, 0, 6, 1));
BOOST_CHECK_EQUAL (s.size(), 1);
- BOOST_CHECK_EQUAL (*(s.front().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.front().get()), dcp::Subtitle (
"Arial",
false,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
39,
- libdcp::Time (0, 0, 5, 198),
- libdcp::Time (0, 0, 7, 115),
+ dcp::Time (0, 0, 5, 198),
+ dcp::Time (0, 0, 7, 115),
15,
- libdcp::BOTTOM,
+ dcp::BOTTOM,
"My jacket was Idi Amin's",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 1),
- libdcp::Time (0, 0, 0, 1)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 1),
+ dcp::Time (0, 0, 0, 1)
));
- s = subs.subtitles_at (libdcp::Time (0, 0, 7, 190));
+ s = subs.subtitles_at (dcp::Time (0, 0, 7, 190));
BOOST_CHECK_EQUAL (s.size(), 2);
- BOOST_CHECK_EQUAL (*(s.front().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.front().get()), dcp::Subtitle (
"Arial",
true,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
39,
- libdcp::Time (0, 0, 7, 177),
- libdcp::Time (0, 0, 11, 31),
+ dcp::Time (0, 0, 7, 177),
+ dcp::Time (0, 0, 11, 31),
21,
- libdcp::BOTTOM,
+ dcp::BOTTOM,
"My corset was H.M. The Queen's",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 1),
- libdcp::Time (0, 0, 0, 1)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 1),
+ dcp::Time (0, 0, 0, 1)
));
- BOOST_CHECK_EQUAL (*(s.back().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.back().get()), dcp::Subtitle (
"Arial",
false,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
39,
- libdcp::Time (0, 0, 7, 177),
- libdcp::Time (0, 0, 11, 31),
+ dcp::Time (0, 0, 7, 177),
+ dcp::Time (0, 0, 11, 31),
15,
- libdcp::BOTTOM,
+ dcp::BOTTOM,
"My large wonderbra",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 1),
- libdcp::Time (0, 0, 0, 1)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 1),
+ dcp::Time (0, 0, 0, 1)
));
- s = subs.subtitles_at (libdcp::Time (0, 0, 11, 95));
+ s = subs.subtitles_at (dcp::Time (0, 0, 11, 95));
BOOST_CHECK_EQUAL (s.size(), 1);
- BOOST_CHECK_EQUAL (*(s.back().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.back().get()), dcp::Subtitle (
"Arial",
false,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
39,
- libdcp::Time (0, 0, 11, 94),
- libdcp::Time (0, 0, 13, 63),
+ dcp::Time (0, 0, 11, 94),
+ dcp::Time (0, 0, 13, 63),
15,
- libdcp::BOTTOM,
+ dcp::BOTTOM,
"Once belonged to the Shah",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 1),
- libdcp::Time (0, 0, 0, 1)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 1),
+ dcp::Time (0, 0, 0, 1)
));
- s = subs.subtitles_at (libdcp::Time (0, 0, 14, 42));
+ s = subs.subtitles_at (dcp::Time (0, 0, 14, 42));
BOOST_CHECK_EQUAL (s.size(), 1);
- BOOST_CHECK_EQUAL (*(s.back().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.back().get()), dcp::Subtitle (
"Arial",
false,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
39,
- libdcp::Time (0, 0, 13, 104),
- libdcp::Time (0, 0, 15, 177),
+ dcp::Time (0, 0, 13, 104),
+ dcp::Time (0, 0, 15, 177),
15,
- libdcp::BOTTOM,
+ dcp::BOTTOM,
"And these are Roy Hattersley's jeans",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 1),
- libdcp::Time (0, 0, 0, 1)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 1),
+ dcp::Time (0, 0, 0, 1)
));
}
/** And similarly for another one */
BOOST_AUTO_TEST_CASE (subtitles2)
{
- libdcp::SubtitleAsset subs ("test/data", "subs2.xml");
+ dcp::SubtitleAsset subs ("test/data", "subs2.xml");
- list<shared_ptr<libdcp::Subtitle> > s = subs.subtitles_at (libdcp::Time (0, 0, 42, 100));
+ list<shared_ptr<dcp::Subtitle> > s = subs.subtitles_at (dcp::Time (0, 0, 42, 100));
BOOST_CHECK_EQUAL (s.size(), 2);
- BOOST_CHECK_EQUAL (*(s.front().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.front().get()), dcp::Subtitle (
"Arial",
true,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 0, 41, 62),
- libdcp::Time (0, 0, 43, 52),
+ dcp::Time (0, 0, 41, 62),
+ dcp::Time (0, 0, 43, 52),
89,
- libdcp::TOP,
+ dcp::TOP,
"At afternoon tea with John Peel",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- BOOST_CHECK_EQUAL (*(s.back().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.back().get()), dcp::Subtitle (
"Arial",
true,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 0, 41, 62),
- libdcp::Time (0, 0, 43, 52),
+ dcp::Time (0, 0, 41, 62),
+ dcp::Time (0, 0, 43, 52),
95,
- libdcp::TOP,
+ dcp::TOP,
"I enquired if his accent was real",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- s = subs.subtitles_at (libdcp::Time (0, 0, 50, 50));
+ s = subs.subtitles_at (dcp::Time (0, 0, 50, 50));
BOOST_CHECK_EQUAL (s.size(), 2);
- BOOST_CHECK_EQUAL (*(s.front().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.front().get()), dcp::Subtitle (
"Arial",
true,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 0, 50, 42),
- libdcp::Time (0, 0, 52, 21),
+ dcp::Time (0, 0, 50, 42),
+ dcp::Time (0, 0, 52, 21),
89,
- libdcp::TOP,
+ dcp::TOP,
"He said \"out of the house",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- BOOST_CHECK_EQUAL (*(s.back().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.back().get()), dcp::Subtitle (
"Arial",
true,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 0, 50, 42),
- libdcp::Time (0, 0, 52, 21),
+ dcp::Time (0, 0, 50, 42),
+ dcp::Time (0, 0, 52, 21),
95,
- libdcp::TOP,
+ dcp::TOP,
"I'm incredibly scouse",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- s = subs.subtitles_at (libdcp::Time (0, 1, 2, 300));
+ s = subs.subtitles_at (dcp::Time (0, 1, 2, 300));
BOOST_CHECK_EQUAL (s.size(), 2);
- BOOST_CHECK_EQUAL (*(s.front().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.front().get()), dcp::Subtitle (
"Arial",
true,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 1, 2, 208),
- libdcp::Time (0, 1, 4, 10),
+ dcp::Time (0, 1, 2, 208),
+ dcp::Time (0, 1, 4, 10),
89,
- libdcp::TOP,
+ dcp::TOP,
"At home it depends how I feel.\"",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- BOOST_CHECK_EQUAL (*(s.back().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.back().get()), dcp::Subtitle (
"Arial",
true,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 1, 2, 208),
- libdcp::Time (0, 1, 4, 10),
+ dcp::Time (0, 1, 2, 208),
+ dcp::Time (0, 1, 4, 10),
95,
- libdcp::TOP,
+ dcp::TOP,
"I spent a long weekend in Brighton",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- s = subs.subtitles_at (libdcp::Time (0, 1, 15, 50));
+ s = subs.subtitles_at (dcp::Time (0, 1, 15, 50));
BOOST_CHECK_EQUAL (s.size(), 2);
- BOOST_CHECK_EQUAL (*(s.front().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.front().get()), dcp::Subtitle (
"Arial",
true,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 1, 15, 42),
- libdcp::Time (0, 1, 16, 42),
+ dcp::Time (0, 1, 15, 42),
+ dcp::Time (0, 1, 16, 42),
89,
- libdcp::TOP,
+ dcp::TOP,
"With the legendary Miss Enid Blyton",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- BOOST_CHECK_EQUAL (*(s.back().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.back().get()), dcp::Subtitle (
"Arial",
true,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 1, 15, 42),
- libdcp::Time (0, 1, 16, 42),
+ dcp::Time (0, 1, 15, 42),
+ dcp::Time (0, 1, 16, 42),
95,
- libdcp::TOP,
+ dcp::TOP,
"She said \"you be Noddy",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- s = subs.subtitles_at (libdcp::Time (0, 1, 27, 200));
+ s = subs.subtitles_at (dcp::Time (0, 1, 27, 200));
BOOST_CHECK_EQUAL (s.size(), 2);
- BOOST_CHECK_EQUAL (*(s.front().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.front().get()), dcp::Subtitle (
"Arial",
true,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 1, 27, 115),
- libdcp::Time (0, 1, 28, 208),
+ dcp::Time (0, 1, 27, 115),
+ dcp::Time (0, 1, 28, 208),
89,
- libdcp::TOP,
+ dcp::TOP,
"That curious creature the Sphinx",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- BOOST_CHECK_EQUAL (*(s.back().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.back().get()), dcp::Subtitle (
"Arial",
true,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 1, 27, 115),
- libdcp::Time (0, 1, 28, 208),
+ dcp::Time (0, 1, 27, 115),
+ dcp::Time (0, 1, 28, 208),
95,
- libdcp::TOP,
+ dcp::TOP,
"Is smarter than anyone thinks",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- s = subs.subtitles_at (libdcp::Time (0, 1, 42, 300));
+ s = subs.subtitles_at (dcp::Time (0, 1, 42, 300));
BOOST_CHECK_EQUAL (s.size(), 2);
- BOOST_CHECK_EQUAL (*(s.front().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.front().get()), dcp::Subtitle (
"Arial",
false,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 1, 42, 229),
- libdcp::Time (0, 1, 45, 62),
+ dcp::Time (0, 1, 42, 229),
+ dcp::Time (0, 1, 45, 62),
89,
- libdcp::TOP,
+ dcp::TOP,
"It sits there and smirks",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- BOOST_CHECK_EQUAL (*(s.back().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.back().get()), dcp::Subtitle (
"Arial",
false,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 1, 42, 229),
- libdcp::Time (0, 1, 45, 62),
+ dcp::Time (0, 1, 42, 229),
+ dcp::Time (0, 1, 45, 62),
95,
- libdcp::TOP,
+ dcp::TOP,
"And you don't think it works",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- s = subs.subtitles_at (libdcp::Time (0, 1, 45, 200));
+ s = subs.subtitles_at (dcp::Time (0, 1, 45, 200));
BOOST_CHECK_EQUAL (s.size(), 2);
- BOOST_CHECK_EQUAL (*(s.front().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.front().get()), dcp::Subtitle (
"Arial",
false,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 1, 45, 146),
- libdcp::Time (0, 1, 47, 94),
+ dcp::Time (0, 1, 45, 146),
+ dcp::Time (0, 1, 47, 94),
89,
- libdcp::TOP,
+ dcp::TOP,
"Then when you're not looking, it winks.",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- BOOST_CHECK_EQUAL (*(s.back().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.back().get()), dcp::Subtitle (
"Arial",
false,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 1, 45, 146),
- libdcp::Time (0, 1, 47, 94),
+ dcp::Time (0, 1, 45, 146),
+ dcp::Time (0, 1, 47, 94),
95,
- libdcp::TOP,
+ dcp::TOP,
"When it snows you will find Sister Sledge",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- s = subs.subtitles_at (libdcp::Time (0, 1, 47, 249));
+ s = subs.subtitles_at (dcp::Time (0, 1, 47, 249));
BOOST_CHECK_EQUAL (s.size(), 2);
- BOOST_CHECK_EQUAL (*(s.front().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.front().get()), dcp::Subtitle (
"Arial",
false,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 1, 47, 146),
- libdcp::Time (0, 1, 48, 167),
+ dcp::Time (0, 1, 47, 146),
+ dcp::Time (0, 1, 48, 167),
89,
- libdcp::TOP,
+ dcp::TOP,
"Out mooning, at night, on the ledge",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- BOOST_CHECK_EQUAL (*(s.back().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.back().get()), dcp::Subtitle (
"Arial",
false,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 1, 47, 146),
- libdcp::Time (0, 1, 48, 167),
+ dcp::Time (0, 1, 47, 146),
+ dcp::Time (0, 1, 48, 167),
95,
- libdcp::TOP,
+ dcp::TOP,
"One storey down",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- s = subs.subtitles_at (libdcp::Time (0, 2, 6, 210));
+ s = subs.subtitles_at (dcp::Time (0, 2, 6, 210));
BOOST_CHECK_EQUAL (s.size(), 2);
- BOOST_CHECK_EQUAL (*(s.front().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.front().get()), dcp::Subtitle (
"Arial",
true,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 2, 5, 208),
- libdcp::Time (0, 2, 7, 31),
+ dcp::Time (0, 2, 5, 208),
+ dcp::Time (0, 2, 7, 31),
89,
- libdcp::TOP,
+ dcp::TOP,
"HELLO",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
- BOOST_CHECK_EQUAL (*(s.back().get()), libdcp::Subtitle (
+ BOOST_CHECK_EQUAL (*(s.back().get()), dcp::Subtitle (
"Arial",
true,
- libdcp::Color (255, 255, 255),
+ dcp::Color (255, 255, 255),
42,
- libdcp::Time (0, 2, 5, 208),
- libdcp::Time (0, 2, 7, 31),
+ dcp::Time (0, 2, 5, 208),
+ dcp::Time (0, 2, 7, 31),
95,
- libdcp::TOP,
+ dcp::TOP,
"WORLD",
- libdcp::BORDER,
- libdcp::Color (0, 0, 0),
- libdcp::Time (0, 0, 0, 0),
- libdcp::Time (0, 0, 0, 0)
+ dcp::BORDER,
+ dcp::Color (0, 0, 0),
+ dcp::Time (0, 0, 0, 0),
+ dcp::Time (0, 0, 0, 0)
));
diff --git a/test/test.cc b/test/test.cc
index 72d0c7dd..f693467e 100644
--- a/test/test.cc
+++ b/test/test.cc
@@ -28,7 +28,7 @@ struct TestConfig
{
TestConfig()
{
- libdcp::init ();
+ dcp::init ();
}
};
@@ -41,7 +41,7 @@ j2c (int)
}
boost::filesystem::path
-wav (libdcp::Channel)
+wav (dcp::Channel)
{
return "test/data/1s_24-bit_48k_silence.wav";
}
diff --git a/test/test.h b/test/test.h
index d6691bc0..dc704004 100644
--- a/test/test.h
+++ b/test/test.h
@@ -18,5 +18,5 @@
*/
extern boost::filesystem::path j2c (int);
-extern boost::filesystem::path wav (libdcp::Channel);
+extern boost::filesystem::path wav (dcp::Channel);
extern std::string test_corpus;
diff --git a/test/utc_offset_to_string_test.cc b/test/utc_offset_to_string_test.cc
index af9c6533..3b4e0b46 100644
--- a/test/utc_offset_to_string_test.cc
+++ b/test/utc_offset_to_string_test.cc
@@ -21,12 +21,12 @@
#include "metadata.h"
#include "util.h"
-/** Test libdcp::utc_offset_to_string */
+/** Test dcp::utc_offset_to_string */
BOOST_AUTO_TEST_CASE (utc_offset_to_string_test)
{
- BOOST_CHECK_EQUAL (libdcp::utc_offset_to_string (30), "+00:30");
- BOOST_CHECK_EQUAL (libdcp::utc_offset_to_string (60), "+01:00");
- BOOST_CHECK_EQUAL (libdcp::utc_offset_to_string (61), "+01:01");
- BOOST_CHECK_EQUAL (libdcp::utc_offset_to_string (7 * 60), "+07:00");
- BOOST_CHECK_EQUAL (libdcp::utc_offset_to_string (-11 * 60), "-11:00");
+ BOOST_CHECK_EQUAL (dcp::utc_offset_to_string (30), "+00:30");
+ BOOST_CHECK_EQUAL (dcp::utc_offset_to_string (60), "+01:00");
+ BOOST_CHECK_EQUAL (dcp::utc_offset_to_string (61), "+01:01");
+ BOOST_CHECK_EQUAL (dcp::utc_offset_to_string (7 * 60), "+07:00");
+ BOOST_CHECK_EQUAL (dcp::utc_offset_to_string (-11 * 60), "-11:00");
}
diff --git a/test/util_test.cc b/test/util_test.cc
index f7114e90..74a3e920 100644
--- a/test/util_test.cc
+++ b/test/util_test.cc
@@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE (base64_decode_test)
}
unsigned char decoded[N];
- int const r = libdcp::base64_decode (s, decoded, N);
+ int const r = dcp::base64_decode (s, decoded, N);
BOOST_CHECK_EQUAL (r, N);
for (int i = 0; i < N; ++i) {
@@ -57,16 +57,16 @@ BOOST_AUTO_TEST_CASE (base64_decode_test)
BOOST_AUTO_TEST_CASE (content_kind_test)
{
- BOOST_CHECK_EQUAL (libdcp::content_kind_from_string ("feature"), libdcp::FEATURE);
- BOOST_CHECK_EQUAL (libdcp::content_kind_from_string ("Feature"), libdcp::FEATURE);
- BOOST_CHECK_EQUAL (libdcp::content_kind_from_string ("FeaturE"), libdcp::FEATURE);
- BOOST_CHECK_EQUAL (libdcp::content_kind_from_string ("Short"), libdcp::SHORT);
- BOOST_CHECK_EQUAL (libdcp::content_kind_from_string ("trailer"), libdcp::TRAILER);
- BOOST_CHECK_EQUAL (libdcp::content_kind_from_string ("test"), libdcp::TEST);
- BOOST_CHECK_EQUAL (libdcp::content_kind_from_string ("transitional"), libdcp::TRANSITIONAL);
- BOOST_CHECK_EQUAL (libdcp::content_kind_from_string ("rating"), libdcp::RATING);
- BOOST_CHECK_EQUAL (libdcp::content_kind_from_string ("teaser"), libdcp::TEASER);
- BOOST_CHECK_EQUAL (libdcp::content_kind_from_string ("policy"), libdcp::POLICY);
- BOOST_CHECK_EQUAL (libdcp::content_kind_from_string ("psa"), libdcp::PUBLIC_SERVICE_ANNOUNCEMENT);
- BOOST_CHECK_EQUAL (libdcp::content_kind_from_string ("advertisement"), libdcp::ADVERTISEMENT);
+ BOOST_CHECK_EQUAL (dcp::content_kind_from_string ("feature"), dcp::FEATURE);
+ BOOST_CHECK_EQUAL (dcp::content_kind_from_string ("Feature"), dcp::FEATURE);
+ BOOST_CHECK_EQUAL (dcp::content_kind_from_string ("FeaturE"), dcp::FEATURE);
+ BOOST_CHECK_EQUAL (dcp::content_kind_from_string ("Short"), dcp::SHORT);
+ BOOST_CHECK_EQUAL (dcp::content_kind_from_string ("trailer"), dcp::TRAILER);
+ BOOST_CHECK_EQUAL (dcp::content_kind_from_string ("test"), dcp::TEST);
+ BOOST_CHECK_EQUAL (dcp::content_kind_from_string ("transitional"), dcp::TRANSITIONAL);
+ BOOST_CHECK_EQUAL (dcp::content_kind_from_string ("rating"), dcp::RATING);
+ BOOST_CHECK_EQUAL (dcp::content_kind_from_string ("teaser"), dcp::TEASER);
+ BOOST_CHECK_EQUAL (dcp::content_kind_from_string ("policy"), dcp::POLICY);
+ BOOST_CHECK_EQUAL (dcp::content_kind_from_string ("psa"), dcp::PUBLIC_SERVICE_ANNOUNCEMENT);
+ BOOST_CHECK_EQUAL (dcp::content_kind_from_string ("advertisement"), dcp::ADVERTISEMENT);
}
diff --git a/tools/dcpdiff.cc b/tools/dcpdiff.cc
index b361b93a..dda7c3c3 100644
--- a/tools/dcpdiff.cc
+++ b/tools/dcpdiff.cc
@@ -6,7 +6,7 @@
using namespace std;
using namespace boost;
-using namespace libdcp;
+using namespace dcp;
static bool verbose = false;
diff --git a/tools/dcpinfo.cc b/tools/dcpinfo.cc
index 56d71f99..48926c01 100644
--- a/tools/dcpinfo.cc
+++ b/tools/dcpinfo.cc
@@ -15,7 +15,7 @@ using std::cerr;
using std::cout;
using std::list;
using boost::shared_ptr;
-using namespace libdcp;
+using namespace dcp;
static void
help (string n)
diff --git a/wscript b/wscript
index 9ac34439..75ee0760 100644
--- a/wscript
+++ b/wscript
@@ -2,7 +2,7 @@ import subprocess
import os
APPNAME = 'libdcp'
-VERSION = '0.93pre'
+VERSION = '1.00.0devel'
def options(opt):
opt.load('compiler_cxx')
@@ -140,8 +140,8 @@ def create_version_cc(bld, version):
try:
text = '#include "version.h"\n'
- text += 'char const * libdcp::git_commit = \"%s\";\n' % commit
- text += 'char const * libdcp::version = \"%s\";\n' % version
+ text += 'char const * dcp::git_commit = \"%s\";\n' % commit
+ text += 'char const * dcp::version = \"%s\";\n' % version
if bld.env.ENABLE_DEBUG:
debug_string = 'true'
else: