No-op: whitespace.
authorCarl Hetherington <cth@carlh.net>
Wed, 24 Jun 2015 13:13:37 +0000 (14:13 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 24 Jun 2015 13:13:37 +0000 (14:13 +0100)
110 files changed:
src/asset.cc
src/asset.h
src/asset_writer.cc
src/certificate_chain.cc
src/certificate_chain.h
src/certificates.cc
src/certificates.h
src/colour_conversion.cc
src/colour_conversion.h
src/colour_matrix.h
src/cpl.cc
src/cpl.h
src/data.h
src/dcp.h
src/dcp_time.cc
src/dcp_time.h
src/decrypted_kdm.cc
src/decrypted_kdm_key.h
src/encrypted_kdm.cc
src/encrypted_kdm.h
src/exceptions.cc
src/exceptions.h
src/font_asset.h
src/font_node.cc
src/font_node.h
src/interop_load_font_node.cc
src/interop_load_font_node.h
src/interop_subtitle_asset.cc
src/interop_subtitle_asset.h
src/key.cc
src/load_font_node.h
src/local_time.cc
src/local_time.h
src/metadata.h
src/modified_gamma_transfer_function.h
src/mono_picture_asset.cc
src/mono_picture_asset.h
src/mono_picture_asset_writer.h
src/mxf.cc
src/mxf.h
src/object.h
src/openjpeg_image.cc
src/picture_asset.cc
src/picture_asset.h
src/picture_asset_writer.h
src/picture_asset_writer_common.cc
src/reel.cc
src/reel.h
src/reel_asset.h
src/reel_mono_picture_asset.h
src/reel_mxf.h
src/reel_picture_asset.cc
src/reel_picture_asset.h
src/reel_sound_asset.h
src/reel_stereo_picture_asset.h
src/reel_subtitle_asset.h
src/ref.h
src/rgb_xyz.cc
src/rgb_xyz.h
src/signer.cc
src/signer.h
src/smpte_load_font_node.cc
src/smpte_load_font_node.h
src/smpte_subtitle_asset.cc
src/smpte_subtitle_asset.h
src/sound_asset.cc
src/sound_asset.h
src/sound_asset_writer.cc
src/sound_asset_writer.h
src/stereo_picture_asset.cc
src/stereo_picture_asset.h
src/stereo_picture_asset_writer.cc
src/stereo_picture_asset_writer.h
src/stereo_picture_frame.cc
src/stereo_picture_frame.h
src/subtitle_asset.cc
src/subtitle_asset.h
src/subtitle_node.cc
src/subtitle_node.h
src/subtitle_string.cc
src/subtitle_string.h
src/text_node.cc
src/text_node.h
src/transfer_function.cc
src/types.cc
src/types.h
src/util.cc
src/util.h
src/version.h
src/xml.h
test/certificates_test.cc
test/colour_test.cc
test/cpl_sar_test.cc
test/dcp_test.cc
test/decryption_test.cc
test/encryption_test.cc
test/kdm_test.cc
test/local_time_test.cc
test/read_interop_subtitle_test.cc
test/recovery_test.cc
test/rewrite_subs.cc
test/rgb_xyz_test.cc
test/round_trip_test.cc
test/test.cc
test/util_test.cc
test/write_subtitle_test.cc
tools/common.cc
tools/dcpdiff.cc
tools/dcpdumpsub.cc
tools/dcpinfo.cc

index 5760c905cb97727db6c08aabfab7f45963d367e1..3d3978311465df43916321aa885f4dbae56114dc 100644 (file)
@@ -53,7 +53,7 @@ void
 Asset::write_to_pkl (xmlpp::Node* node, Standard standard) const
 {
        DCP_ASSERT (!_file.empty ());
-       
+
        xmlpp::Node* asset = node->add_child ("Asset");
        asset->add_child("Id")->add_child_text ("urn:uuid:" + _id);
        asset->add_child("AnnotationText")->add_child_text (_id);
@@ -76,11 +76,11 @@ Asset::write_to_assetmap (xmlpp::Node* node, boost::filesystem::path root) const
                boost::filesystem::canonical (root),
                boost::filesystem::canonical (_file)
                );
-       
+
        if (!path) {
                throw MiscError (String::compose ("Asset %1 is not within the directory %2", _file, root));
        }
-       
+
        chunk->add_child("Path")->add_child_text (path.get().string ());
        chunk->add_child("VolumeIndex")->add_child_text ("1");
        chunk->add_child("Offset")->add_child_text ("0");
@@ -91,7 +91,7 @@ string
 Asset::hash (function<void (float)> progress) const
 {
        DCP_ASSERT (!_file.empty ());
-               
+
        if (_hash.empty ()) {
                _hash = make_digest (_file, progress);
        }
@@ -122,4 +122,4 @@ Asset::set_file (boost::filesystem::path file) const
        _file = boost::filesystem::absolute (file);
        _hash.clear ();
 }
-       
+
index 7c6aab95ec0b39201bf91438aa1ef4183b1ec7d3..12fe265749c9f8859f06e6bbd872db1ee67a2599 100644 (file)
@@ -19,7 +19,7 @@
 
 /** @file  src/asset.h
  *  @brief Asset class.
- */ 
+ */
 
 #ifndef LIBDCP_ASSET_H
 #define LIBDCP_ASSET_H
index eb55feafbfb43f933e26fa9b2d03cbd173769b8f..4611b38a4c10cccf7dc11e65097c3e5c1007747a 100644 (file)
@@ -45,9 +45,9 @@ AssetWriter::AssetWriter (MXF* mxf, boost::filesystem::path file)
                if (ASDCP_FAILURE (_encryption_context->InitKey (mxf->key()->value ()))) {
                        throw MiscError ("could not set up encryption context");
                }
-               
+
                uint8_t cbc_buffer[ASDCP::CBC_BLOCK_SIZE];
-               
+
                Kumu::FortunaRNG rng;
                if (ASDCP_FAILURE (_encryption_context->SetIVec (rng.FillRandom (cbc_buffer, ASDCP::CBC_BLOCK_SIZE)))) {
                        throw MiscError ("could not set up CBC initialization vector");
index 4f92d8d9983ccd7e7a5d19cfdf33f9028dc9b324..22754f4e339403c0228a0ccc736633941b5a1117 100644 (file)
@@ -125,7 +125,7 @@ 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 = dcp::base64_decode (pub, buffer, 1024);
 
@@ -149,9 +149,9 @@ public_key_digest (boost::filesystem::path private_key, boost::filesystem::path
        string dig = Kumu::base64encode (digest, SHA_DIGEST_LENGTH, digest_base64, 64);
 #ifdef LIBDCP_WINDOWS
        boost::replace_all (dig, "/", "\\/");
-#else  
+#else
        boost::replace_all (dig, "/", "\\\\/");
-#endif 
+#endif
        return dig;
 }
 
@@ -167,7 +167,7 @@ dcp::make_certificate_chain (
 {
        boost::filesystem::path directory = boost::filesystem::temp_directory_path() / boost::filesystem::unique_path ();
        boost::filesystem::create_directories (directory);
-       
+
        boost::filesystem::path const cwd = boost::filesystem::current_path ();
        boost::filesystem::current_path (directory);
 
@@ -221,7 +221,7 @@ dcp::make_certificate_chain (
                  << "OU = Organization unit\n"
                  << "CN = Entity and dnQualifier\n";
        }
-               
+
        string const inter_subject = "/O=" + organisation +
                "/OU=" + organisational_unit +
                "/CN=" + intermediate_common_name +
@@ -234,7 +234,7 @@ dcp::make_certificate_chain (
                command (s.str().c_str());
        }
 
-       
+
        command (
                quoted_openssl +
                " x509 -req -sha256 -days 3649 -CA ca.self-signed.pem -CAkey ca.key -set_serial 6"
index e074f8fd531c5dd43523ef8a7c5ddc5ba3c25f98..dcb9c1418e07b6d1443f7afe04ad218b97b9e26f 100644 (file)
@@ -41,5 +41,5 @@ boost::filesystem::path make_certificate_chain (
        std::string intermediate_common_name = ".smpte-430-2.INTERMEDIATE.NOT_FOR_PRODUCTION",
        std::string leaf_common_name = "CS.smpte-430-2.LEAF.NOT_FOR_PRODUCTION"
        );
-       
+
 }
index 1c0ef98431e2571714845cc1f1385eb23758da20..cc443746351dd33fb9344bdcc5aeeedbbf00943d 100644 (file)
@@ -46,7 +46,7 @@ Certificate::Certificate (X509* c)
        : _certificate (c)
        , _public_key (0)
 {
-       
+
 }
 
 /** Load an X509 certificate from a string.
@@ -109,7 +109,7 @@ Certificate::operator= (Certificate const & other)
        _certificate = 0;
        RSA_free (_public_key);
        _public_key = 0;
-       
+
        read_string (other.certificate (true));
 
        return *this;
@@ -123,12 +123,12 @@ string
 Certificate::certificate (bool with_begin_end) const
 {
        DCP_ASSERT (_certificate);
-       
+
        BIO* bio = BIO_new (BIO_s_mem ());
        if (!bio) {
                throw MiscError ("could not create memory BIO");
        }
-       
+
        PEM_write_bio_X509 (bio, _certificate);
 
        string s;
@@ -144,7 +144,7 @@ Certificate::certificate (bool with_begin_end) const
                boost::replace_all (s, "-----BEGIN CERTIFICATE-----\n", "");
                boost::replace_all (s, "\n-----END CERTIFICATE-----\n", "");
        }
-       
+
        return s;
 }
 
@@ -177,7 +177,7 @@ Certificate::get_name_part (X509_NAME* n, int nid)
        DCP_ASSERT (p != -1);
        return asn_to_utf8 (X509_NAME_ENTRY_get_data (X509_NAME_get_entry (n, p)));
 }
-       
+
 string
 Certificate::name_for_xml (X509_NAME* name)
 {
@@ -225,11 +225,11 @@ Certificate::serial () const
 
        ASN1_INTEGER* s = X509_get_serialNumber (_certificate);
        DCP_ASSERT (s);
-       
+
        BIGNUM* b = ASN1_INTEGER_to_BN (s, 0);
        char* c = BN_bn2dec (b);
        BN_free (b);
-       
+
        string st (c);
        OPENSSL_free (c);
 
@@ -240,7 +240,7 @@ string
 Certificate::thumbprint () const
 {
        DCP_ASSERT (_certificate);
-       
+
        uint8_t buffer[8192];
        uint8_t* p = buffer;
        i2d_X509_CINF (_certificate->cert_info, &p);
index ebc4cc53560d42a7e6916a1a511ad4ec8028fab1..0cc52396241a0224bd50cfb47a57ae41035d8330 100644 (file)
@@ -74,7 +74,7 @@ public:
 
 private:
        void read_string (std::string);
-       
+
        static std::string name_for_xml (X509_NAME *);
        static std::string asn_to_utf8 (ASN1_STRING *);
        static std::string get_name_part (X509_NAME *, int);
@@ -103,7 +103,7 @@ public:
        Certificate leaf () const;
 
        typedef std::list<Certificate> List;
-       
+
        List leaf_to_root () const;
        List root_to_leaf () const;
 
index fc1c9db89845fa9ca0fe7041a3ac765e12a6076c..1fbed166c9b2b5fdfc0df6a5ec44395d9c76c70d 100644 (file)
@@ -116,7 +116,7 @@ ColourConversion::ColourConversion (
        , _adjusted_white (adjusted_white)
        , _out (out)
 {
-       
+
 }
 
 bool
@@ -189,7 +189,7 @@ ColourConversion::xyz_to_rgb () const
 
        /* backsubstitute to get the inverse */
        lu_substitute (A, pm, xyz_to_rgb);
-       
+
        return xyz_to_rgb;
 }
 
index 1f824c81329f22e4e72fa95edd627f2f129d520d..1e293f7884d6b03ab8b1b45f965958d7b7dc4b56 100644 (file)
@@ -48,7 +48,7 @@ class ColourConversion
 public:
        ColourConversion ()
        {}
-       
+
        ColourConversion (
                boost::shared_ptr<const TransferFunction> in,
                YUVToRGB yuv_to_rgb,
@@ -87,7 +87,7 @@ public:
        boost::optional<Chromaticity> adjusted_white () const {
                return _adjusted_white;
        }
-       
+
        boost::shared_ptr<const TransferFunction> out () const {
                return _out;
        }
@@ -123,7 +123,7 @@ public:
        void unset_adjusted_white () {
                _adjusted_white = boost::optional<Chromaticity> ();
        }
-       
+
        void set_out (boost::shared_ptr<const TransferFunction> f) {
                _out = f;
        }
index fd89ed3ac8fd7ae8686b972e36086d3441371e48..d4f6459105a6abe693b48f8fa7c96affbe07f417 100644 (file)
@@ -24,6 +24,6 @@ namespace colour_matrix {
 extern double const xyz_to_rgb[3][3];
 extern double const rgb_to_xyz[3][3];
 
-}      
+}
 
 }
index b11452d935a9468736b3b86cbfc119c312f605a8..766b91c315660d858880dac57aa57414b5d4aa95 100644 (file)
@@ -120,7 +120,7 @@ CPL::write_xml (boost::filesystem::path file, Standard standard, shared_ptr<cons
        if (signer) {
                root->set_namespace_declaration ("http://www.w3.org/2000/09/xmldsig#", "dsig");
        }
-       
+
        root->add_child("Id")->add_child_text ("urn:uuid:" + _id);
        root->add_child("AnnotationText")->add_child_text (_annotation_text);
        root->add_child("IssueDate")->add_child_text (_metadata.issue_date);
@@ -170,7 +170,7 @@ CPL::reel_assets () const
 
        return c;
 }
-       
+
 bool
 CPL::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note) const
 {
@@ -178,7 +178,7 @@ CPL::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler not
        if (!other_cpl) {
                return false;
        }
-       
+
        if (_annotation_text != other_cpl->_annotation_text && !opt.cpl_annotation_texts_can_differ) {
                stringstream s;
                s << "CPL: annotation texts differ: " << _annotation_text << " vs " << other_cpl->_annotation_text << "\n";
@@ -195,10 +195,10 @@ CPL::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler not
                note (DCP_ERROR, String::compose ("CPL: reel counts differ (%1 vs %2)", _reels.size(), other_cpl->_reels.size()));
                return false;
        }
-       
+
        list<shared_ptr<Reel> >::const_iterator a = _reels.begin ();
        list<shared_ptr<Reel> >::const_iterator b = other_cpl->_reels.begin ();
-       
+
        while (a != _reels.end ()) {
                if (!(*a)->equals (*b, opt, note)) {
                        return false;
@@ -255,4 +255,4 @@ CPL::pkl_type (Standard standard) const
                DCP_ASSERT (false);
        }
 }
-       
+
index 4993bcd5a6a5e5bc7cd2685f40071f17fb314224..932e6b765b3752fa33b319483e67e361e0d46921 100644 (file)
--- a/src/cpl.h
+++ b/src/cpl.h
 #include <list>
 
 namespace dcp {
-       
+
 class ReelAsset;
 class Reel;
 class XMLMetadata;
 class MXFMetadata;
 class Signer;
 class DecryptedKDM;
-       
+
 /** @class CPL
  *  @brief A Composition Playlist.
  */
@@ -67,7 +67,7 @@ public:
        std::string annotation_text () const {
                return _annotation_text;
        }
-       
+
        /** @return contents of the &lt;ContentTitleText&gt; node */
        std::string content_title_text () const {
                return _content_title_text;
@@ -82,7 +82,7 @@ public:
        void set_content_version_label_text (std::string text) {
                _content_version_label_text = text;
        }
-       
+
        /** @return the type of the content, used by media servers
         *  to categorise things (e.g. feature, trailer, etc.)
         */
index d1f52b3b0bc51ba7599f86b2531ada643f7a2d67..d169c5c5abe6acffeaaa64bfc31eb06aa29364f1 100644 (file)
 #include <boost/shared_array.hpp>
 
 namespace dcp {
-       
+
 class Data
 {
 public:
        Data () {}
-       
+
        Data (boost::shared_array<uint8_t> data_, boost::uintmax_t size_)
                : data (data_)
                , size (size_)
        {}
-       
+
        boost::shared_array<uint8_t> data;
        boost::uintmax_t size;
 };
index 03f0a8027ce9aa0fa00941cdfed781c2a44b8956..ed5e5e3e0f00d8aac3557850513df63dde7c894f 100644 (file)
--- a/src/dcp.h
+++ b/src/dcp.h
@@ -41,7 +41,7 @@ namespace xmlpp {
 namespace dcp
 {
 
-class Content; 
+class Content;
 class Reel;
 class CPL;
 class XMLMetadata;
@@ -53,7 +53,7 @@ class DCPReadError;
 /** @class DCP
  *  @brief A class to create or read a DCP.
  */
-       
+
 class DCP : public boost::noncopyable
 {
 public:
@@ -67,7 +67,7 @@ public:
        DCP (boost::filesystem::path directory);
 
        typedef std::list<boost::shared_ptr<DCPReadError> > ReadErrors;
-       
+
        /** Read the DCP's structure into this object.
         *  @param keep_going true to try to keep going in the face of (some) errors.
         *  @param errors List of errors that will be added to if keep_going is true.
@@ -108,7 +108,7 @@ private:
                XMLMetadata metadata,
                boost::shared_ptr<const Signer> signer
                ) const;
-       
+
        void write_volindex (Standard standard) const;
 
        /** Write the ASSETMAP file.
index 43c1ee4962615d01a9005a9fc288849cff95b4db..8101bed1e38b164983a19afa3a987bb53aa7e259 100644 (file)
@@ -59,7 +59,7 @@ Time::set (double seconds, int tcr_)
 {
        s = floor (seconds);
        tcr = tcr_;
-       
+
        e = int (round ((seconds - s) * tcr));
 
        if (s >= 60) {
@@ -86,7 +86,7 @@ Time::Time (string time, int tcr_)
        if (b.size() != 4) {
                boost::throw_exception (DCPReadError ("unrecognised time specification"));
        }
-       
+
        h = raw_convert<int> (b[0]);
        m = raw_convert<int> (b[1]);
        s = raw_convert<int> (b[2]);
@@ -218,7 +218,7 @@ dcp::operator- (Time a, Time b)
        } else {
                r.tcr = a.tcr;
        }
-       
+
        r.e = a.e - b.e;
        if (r.e < 0) {
                r.e += r.tcr;
index 88a4d8a10b75ac3d606478d7a56b546c0284bda3..1221fb328a33168f2aa73a22e2201f960e30e441 100644 (file)
@@ -87,7 +87,7 @@ extern bool operator< (Time const & a, Time const & b);
 extern bool operator> (Time const & a, Time const & b);
 extern bool operator>= (Time const & a, Time const & b);
 extern std::ostream & operator<< (std::ostream & s, Time const & t);
-extern Time operator+ (Time a, Time b);        
+extern Time operator+ (Time a, Time b);
 extern Time operator- (Time a, Time b);
 extern float operator/ (Time a, Time const & b);
 
index 9661281d3aeb882a4f98e2f4680580e820f1b412..9a9a16947103c7cc0c0b968c4a7ad3b12a96247b 100644 (file)
@@ -77,7 +77,7 @@ static string
 get_uuid (unsigned char ** p)
 {
        stringstream g;
-       
+
        for (int i = 0; i < 16; ++i) {
                g << setw(2) << setfill('0') << hex << static_cast<int> (**p);
                (*p)++;
@@ -109,7 +109,7 @@ DecryptedKDM::DecryptedKDM (EncryptedKDM const & kdm, string private_key)
        if (!bio) {
                throw MiscError ("could not create memory BIO");
        }
-       
+
        RSA* rsa = PEM_read_bio_RSAPrivateKey (bio, 0, 0, 0);
        if (!rsa) {
                throw FileError ("could not read RSA private key file", private_key, errno);
@@ -174,8 +174,8 @@ DecryptedKDM::DecryptedKDM (EncryptedKDM const & kdm, string private_key)
                }
                default:
                        DCP_ASSERT (false);
-               }               
-               
+               }
+
                delete[] decrypted;
        }
 
@@ -229,14 +229,14 @@ DecryptedKDM::encrypt (shared_ptr<const Signer> signer, Certificate recipient, F
 
                base64_decode (signer->certificates().leaf().thumbprint (), p, 20);
                p += 20;
-               
+
                put_uuid (&p, i.cpl_id ());
                put (&p, i.type ());
                put_uuid (&p, i.id ());
                put (&p, _not_valid_before.as_string ());
                put (&p, _not_valid_after.as_string ());
                put (&p, i.key().value(), ASDCP::KeyLen);
-               
+
                /* Encrypt using the projector's public key */
                RSA* rsa = recipient.public_key ();
                unsigned char encrypted[RSA_size(rsa)];
@@ -244,7 +244,7 @@ DecryptedKDM::encrypt (shared_ptr<const Signer> signer, Certificate recipient, F
                if (encrypted_len == -1) {
                        throw MiscError (String::compose ("Could not encrypt KDM (%1)", ERR_error_string (ERR_get_error(), 0)));
                }
-               
+
                /* Lazy overallocation */
                char out[encrypted_len * 2];
                Kumu::base64encode (encrypted, encrypted_len, out, encrypted_len * 2);
@@ -256,7 +256,7 @@ DecryptedKDM::encrypt (shared_ptr<const Signer> signer, Certificate recipient, F
                        }
                        lines << out[i];
                }
-               
+
                keys.push_back (lines.str ());
        }
 
index 2a06199c573a99ead385795943da1e9017ac73a4..70ee6ad8c7e909e693d0d2de897768034bdf8b5c 100644 (file)
@@ -57,7 +57,7 @@ public:
                return _cpl_id;
        }
 
-private:       
+private:
        std::string _type;
        std::string _id;
        Key _key;
index 4d41a0664d927bd981e3ff16e2f2a035b59c9c8c..fe96250fb759f3658a9ef0a016fee058bf7124fe 100644 (file)
@@ -35,19 +35,19 @@ using namespace dcp;
 
 namespace dcp {
 
-/** Namespace for classes used to hold our data; they are internal to this .cc file */ 
+/** Namespace for classes used to hold our data; they are internal to this .cc file */
 namespace data {
 
 class Signer
 {
 public:
        Signer () {}
-       
+
        Signer (shared_ptr<const cxml::Node> node)
                : x509_issuer_name (node->string_child ("X509IssuerName"))
                , x509_serial_number (node->string_child ("X509SerialNumber"))
        {
-               
+
        }
 
        void as_xml (xmlpp::Element* node) const
@@ -55,7 +55,7 @@ public:
                node->add_child("X509IssuerName", "ds")->add_child_text (x509_issuer_name);
                node->add_child("X509SerialNumber", "ds")->add_child_text (x509_serial_number);
        }
-       
+
        string x509_issuer_name;
        string x509_serial_number;
 };
@@ -64,7 +64,7 @@ class X509Data
 {
 public:
        X509Data () {}
-       
+
        X509Data (boost::shared_ptr<const cxml::Node> node)
                : x509_issuer_serial (Signer (node->node_child ("X509IssuerSerial")))
                , x509_certificate (node->string_child ("X509Certificate"))
@@ -77,16 +77,16 @@ public:
                x509_issuer_serial.as_xml (node->add_child ("X509IssuerSerial", "ds"));
                node->add_child("X509Certificate", "ds")->add_child_text (x509_certificate);
        }
-       
+
        Signer x509_issuer_serial;
        std::string x509_certificate;
 };
-       
+
 class Reference
 {
 public:
        Reference () {}
-       
+
        Reference (string u)
                : uri (u)
        {}
@@ -97,14 +97,14 @@ public:
        {
 
        }
-       
+
        void as_xml (xmlpp::Element* node) const
        {
                node->set_attribute ("URI", uri);
                node->add_child("DigestMethod", "ds")->set_attribute ("Algorithm", "http://www.w3.org/2001/04/xmlenc#sha256");
                node->add_child("DigestValue", "ds")->add_child_text (digest_value);
        }
-       
+
        string uri;
        string digest_value;
 };
@@ -140,16 +140,16 @@ public:
                node->add_child ("SignatureMethod", "ds")->set_attribute (
                        "Algorithm", "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256"
                        );
-               
+
                authenticated_public.as_xml (node->add_child ("Reference", "ds"));
                authenticated_private.as_xml (node->add_child ("Reference", "ds"));
        }
-               
+
 private:
        Reference authenticated_public;
        Reference authenticated_private;
 };
-       
+
 class Signature
 {
 public:
@@ -169,7 +169,7 @@ public:
        {
                signed_info.as_xml (node->add_child ("SignedInfo", "ds"));
                node->add_child("SignatureValue", "ds")->add_child_text (signature_value);
-               
+
                xmlpp::Element* key_info_node = node->add_child ("KeyInfo", "ds");
                for (std::list<X509Data>::const_iterator i = x509_data.begin(); i != x509_data.end(); ++i) {
                        i->as_xml (key_info_node->add_child ("X509Data", "ds"));
@@ -185,7 +185,7 @@ class AuthenticatedPrivate
 {
 public:
        AuthenticatedPrivate () {}
-       
+
        AuthenticatedPrivate (shared_ptr<const cxml::Node> node)
        {
                list<shared_ptr<cxml::Node> > encrypted_key_nodes = node->node_children ("EncryptedKey");
@@ -208,7 +208,7 @@ public:
                        cipher_data->add_child("CipherValue", "enc")->add_child_text (*i);
                }
        }
-       
+
        list<string> encrypted_key;
 };
 
@@ -216,7 +216,7 @@ class TypedKeyId
 {
 public:
        TypedKeyId () {}
-       
+
        TypedKeyId (shared_ptr<const cxml::Node> node)
                : key_type (node->string_child ("KeyType"))
                , key_id (node->string_child ("KeyId").substr (9))
@@ -243,7 +243,7 @@ class KeyIdList
 {
 public:
        KeyIdList () {}
-       
+
        KeyIdList (shared_ptr<const cxml::Node> node)
        {
                list<shared_ptr<cxml::Node> > typed_key_id_nodes = node->node_children ("TypedKeyId");
@@ -266,7 +266,7 @@ class AuthorizedDeviceInfo
 {
 public:
        AuthorizedDeviceInfo () {}
-       
+
        AuthorizedDeviceInfo (shared_ptr<const cxml::Node> node)
                : device_list_identifier (node->string_child ("DeviceListIdentifier").substr (9))
                , device_list_description (node->string_child ("DeviceListDescription"))
@@ -293,7 +293,7 @@ class X509IssuerSerial
 {
 public:
        X509IssuerSerial () {}
-       
+
        X509IssuerSerial (shared_ptr<const cxml::Node> node)
                : x509_issuer_name (node->string_child ("X509IssuerName"))
                , x509_serial_number (node->string_child ("X509SerialNumber"))
@@ -315,7 +315,7 @@ class Recipient
 {
 public:
        Recipient () {}
-       
+
        Recipient (shared_ptr<const cxml::Node> node)
                : x509_issuer_serial (node->node_child ("X509IssuerSerial"))
                , x509_subject_name (node->string_child ("X509SubjectName"))
@@ -328,7 +328,7 @@ public:
                x509_issuer_serial.as_xml (node->add_child ("X509IssuerSerial"));
                node->add_child("X509SubjectName")->add_child_text (x509_subject_name);
        }
-       
+
        X509IssuerSerial x509_issuer_serial;
        string x509_subject_name;
 };
@@ -337,7 +337,7 @@ class KDMRequiredExtensions
 {
 public:
        KDMRequiredExtensions () {}
-       
+
        KDMRequiredExtensions (shared_ptr<const cxml::Node> node)
                : recipient (node->node_child ("Recipient"))
                , composition_playlist_id (node->string_child ("CompositionPlaylistId").substr (9))
@@ -353,7 +353,7 @@ public:
        void as_xml (xmlpp::Element* node) const
        {
                node->set_attribute ("xmlns", "http://www.smpte-ra.org/schemas/430-1/2006/KDM");
-               
+
                recipient.as_xml (node->add_child ("Recipient"));
                node->add_child("CompositionPlaylistId")->add_child_text ("urn:uuid:" + composition_playlist_id);
                if (content_authenticator) {
@@ -364,12 +364,12 @@ public:
                node->add_child("ContentKeysNotValidAfter")->add_child_text (not_valid_after.as_string ());
                authorized_device_info.as_xml (node->add_child ("AuthorizedDeviceInfo"));
                key_id_list.as_xml (node->add_child ("KeyIdList"));
-               
+
                xmlpp::Element* forensic_mark_flag_list = node->add_child ("ForensicMarkFlagList");
                forensic_mark_flag_list->add_child("ForensicMarkFlag")->add_child_text ("http://www.smpte-ra.org/430-1/2006/KDM#mrkflg-picture-disable");
                forensic_mark_flag_list->add_child("ForensicMarkFlag")->add_child_text ("http://www.smpte-ra.org/430-1/2006/KDM#mrkflg-audio-disable");
        }
-       
+
        Recipient recipient;
        string composition_playlist_id;
        boost::optional<string> content_authenticator;
@@ -384,7 +384,7 @@ class RequiredExtensions
 {
 public:
        RequiredExtensions () {}
-       
+
        RequiredExtensions (shared_ptr<const cxml::Node> node)
                : kdm_required_extensions (node->node_child ("KDMRequiredExtensions"))
        {
@@ -395,7 +395,7 @@ public:
        {
                kdm_required_extensions.as_xml (node->add_child ("KDMRequiredExtensions"));
        }
-       
+
        KDMRequiredExtensions kdm_required_extensions;
 };
 
@@ -406,7 +406,7 @@ public:
                : message_id (make_uuid ())
                , issue_date (LocalTime().as_string ())
        {}
-       
+
        AuthenticatedPublic (shared_ptr<const cxml::Node> node)
                : message_id (node->string_child ("MessageId").substr (9))
                , annotation_text (node->string_child ("AnnotationText"))
@@ -420,7 +420,7 @@ public:
        void as_xml (xmlpp::Element* node, map<string, xmlpp::Attribute *>& references) const
        {
                references["ID_AuthenticatedPublic"] = node->set_attribute ("Id", "ID_AuthenticatedPublic");
-               
+
                node->add_child("MessageId")->add_child_text ("urn:uuid:" + message_id);
                node->add_child("MessageType")->add_child_text ("http://www.smpte-ra.org/430-1/2006/KDM#kdm-key-type");
                node->add_child("AnnotationText")->add_child_text (annotation_text);
@@ -449,13 +449,13 @@ public:
        {
 
        }
-       
+
        EncryptedKDMData (shared_ptr<const cxml::Node> node)
                : authenticated_public (node->node_child ("AuthenticatedPublic"))
                , authenticated_private (node->node_child ("AuthenticatedPrivate"))
                , signature (node->node_child ("Signature"))
        {
-               
+
        }
 
        shared_ptr<xmlpp::Document> as_xml () const
@@ -506,7 +506,7 @@ EncryptedKDM::EncryptedKDM (
        : _data (new data::EncryptedKDMData)
 {
        /* Fill our XML-ish description in with the juicy bits that the caller has given */
-       
+
        data::AuthenticatedPublic& aup = _data->authenticated_public;
        aup.signer.x509_issuer_name = signer->certificates().leaf().issuer ();
        aup.signer.x509_serial_number = signer->certificates().leaf().serial ();
@@ -589,7 +589,7 @@ EncryptedKDM::as_xml (boost::filesystem::path path) const
        fwrite (x.c_str(), 1, x.length(), f);
        fclose (f);
 }
-       
+
 string
 EncryptedKDM::as_xml () const
 {
index f89ba5962c2e00f80b9824c9de8600da7e6940a6..dc98e1f122edc782496f5b08ceee3f577aab4184 100644 (file)
@@ -39,7 +39,7 @@ namespace data {
        class EncryptedKDMData;
 }
 
-class Signer;  
+class Signer;
 class Certificate;
 
 /** @class EncryptedKDM
@@ -70,7 +70,7 @@ public:
         *  keys (also key id, CPL id etc.)
         */
        std::list<std::string> keys () const;
-       
+
 private:
 
        friend class DecryptedKDM;
@@ -88,7 +88,7 @@ private:
                std::list<std::pair<std::string, std::string> > key_ids,
                std::list<std::string> keys
                );
-       
+
        data::EncryptedKDMData* _data;
 };
 
index 4045021c953680b1f896e6814432be1c449a83fa..e1eaa52ee476dd33d5a81d4d635f6ba362f137c8 100644 (file)
@@ -65,7 +65,7 @@ MissingAssetError::MissingAssetError (boost::filesystem::path path, AssetType ty
        case UNKNOWN:
                break;
        }
-       
+
        _message = String::compose ("Missing asset %1%2", path.string(), type_name);
 }
 
index e613c980d037c872d52177b24499d77a6b1c2cba..01ac9ccc25669be404b2b1ed60eea7a659b63889 100644 (file)
@@ -39,7 +39,7 @@ public:
        StringError (std::string message)
                : _message (message)
        {}
-                           
+
        ~StringError () throw () {}
 
        /** @return error message */
@@ -86,7 +86,7 @@ public:
                : FileError (message, filename, number)
        {}
 };
-       
+
 /** @class MiscError
  *  @brief A miscellaneous exception
  */
@@ -124,7 +124,7 @@ public:
                MAIN_SUBTITLE, //< main subtitle is missing
                UNKNOWN        //< something is missing but we don't know what
        };
-       
+
        MissingAssetError (boost::filesystem::path, AssetType = UNKNOWN);
        ~MissingAssetError () throw () {}
 
index 13333777461e10773fbc8cc22654733d3e64eb04..d099932251d661992fe54795a206bb0ed25f7a67 100644 (file)
@@ -32,7 +32,7 @@ class FontAsset : public Asset
 {
 public:
        FontAsset (boost::filesystem::path file);
-       
+
 private:
        std::string pkl_type (Standard standard) const;
 };
index 963eb0d81849f33481afe3fb012bfb50f0698d3f..c3141d86fece465c1a775ab6727c4c91eceb94de 100644 (file)
@@ -34,7 +34,7 @@ using namespace dcp;
 FontNode::FontNode (cxml::ConstNodePtr node, int tcr)
 {
        text = node->content ();
-       
+
        id = node->optional_string_attribute ("Id");
        size = node->optional_number_attribute<int64_t> ("Size").get_value_or (0);
        aspect_adjust = node->optional_number_attribute<float> ("AspectAdjust");
@@ -61,7 +61,7 @@ FontNode::FontNode (cxml::ConstNodePtr node, int tcr)
        BOOST_FOREACH (cxml::NodePtr& i, f) {
                font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, tcr)));
        }
-       
+
        list<cxml::NodePtr> t = node->node_children ("Text");
        BOOST_FOREACH (cxml::NodePtr& i, t) {
                text_nodes.push_back (shared_ptr<TextNode> (new TextNode (i, tcr)));
index 60005218e7b86c34b183a87c5af54b3205ae16a6..92dd6b218367d936f8502c9013d2d0711bfad7fa 100644 (file)
@@ -39,7 +39,7 @@ public:
        FontNode ()
                : size (0)
        {}
-       
+
        FontNode (cxml::ConstNodePtr node, int tcr);
        FontNode (std::list<boost::shared_ptr<FontNode> > const & font_nodes);
 
@@ -51,7 +51,7 @@ public:
        boost::optional<Colour> colour;
        boost::optional<Effect> effect;
        boost::optional<Colour> effect_colour;
-       
+
        std::list<boost::shared_ptr<SubtitleNode> > subtitle_nodes;
        std::list<boost::shared_ptr<FontNode> > font_nodes;
        std::list<boost::shared_ptr<TextNode> > text_nodes;
index 7c15f4014074049d10a7c828d06c6a9da5d59633..6bd865c990c35f0638686c62db99e9f73d06ebb2 100644 (file)
@@ -39,7 +39,7 @@ InteropLoadFontNode::InteropLoadFontNode (cxml::ConstNodePtr node)
                x = node->optional_string_attribute ("ID");
        }
        id = x.get_value_or ("");
-       
+
        uri = node->string_attribute ("URI");
 }
 
index 5afe8693d7a46d2cce35104a18024d2343a6ce42..f21a03aa14f9db76fd4ce799053dacdf0831ce44 100644 (file)
@@ -23,7 +23,7 @@
 #include <boost/optional.hpp>
 
 namespace dcp {
-       
+
 class InteropLoadFontNode : public LoadFontNode
 {
 public:
index e329158e62231830501b5da813aa3eb74b3d9717..ffa7d50b96695d3e258f04c26d24c9305431a6e4 100644 (file)
@@ -63,7 +63,7 @@ InteropSubtitleAsset::InteropSubtitleAsset (boost::filesystem::path file)
 
 InteropSubtitleAsset::InteropSubtitleAsset ()
 {
-       
+
 }
 
 Glib::ustring
@@ -102,7 +102,7 @@ InteropSubtitleAsset::equals (shared_ptr<const Asset> other_asset, EqualityOptio
        if (!SubtitleAsset::equals (other_asset, options, note)) {
                return false;
        }
-       
+
        shared_ptr<const InteropSubtitleAsset> other = dynamic_pointer_cast<const InteropSubtitleAsset> (other_asset);
        if (!other) {
                return false;
@@ -150,7 +150,7 @@ InteropSubtitleAsset::write (boost::filesystem::path p) const
        if (!f) {
                throw FileError ("Could not open file for writing", p, -1);
        }
-       
+
        Glib::ustring const s = xml_as_string ();
        fwrite (s.c_str(), 1, s.bytes(), f);
        fclose (f);
index 4d2c2893196964a2e2f7bd238d691d546970af2d..41ed83b3d55503283bb232058545c05a023daa0b 100644 (file)
@@ -48,7 +48,7 @@ public:
        std::list<boost::shared_ptr<LoadFontNode> > load_font_nodes () const;
 
        void add_font (std::string id, boost::filesystem::path file);
-       
+
        Glib::ustring xml_as_string () const;
        void write (boost::filesystem::path path) const;
        void resolve_fonts (std::list<boost::shared_ptr<Object> > objects);
@@ -92,7 +92,7 @@ public:
        }
 
 protected:
-       
+
        std::string pkl_type (Standard) const {
                return "text/xml";
        }
index 43e59dfc6de756a078731c5cf87687d8bcb614ea..46b09efbb99ab50471e16af8d022dadc5cf9458e 100644 (file)
@@ -72,7 +72,7 @@ Key::operator= (Key const & other)
        if (this == &other) {
                return *this;
        }
-       
+
        memcpy (_value, other._value, ASDCP::KeyLen);
        return *this;
 }
@@ -81,7 +81,7 @@ string
 Key::hex () const
 {
        stringstream g;
-       
+
        for (unsigned int i = 0; i < ASDCP::KeyLen; ++i) {
                g << setw(2) << setfill('0') << std::hex << static_cast<int> (_value[i]);
        }
index 3ff704972e2b3255c7604f9fbc5e2c74ce9b8a9b..6f916ef05731127d87af5a7669dcb6d76e521ba2 100644 (file)
@@ -37,7 +37,7 @@ public:
        {}
 
        virtual ~LoadFontNode () {}
-       
+
        std::string id;
 };
 
index 09729543c160c3b9fbb352b63cd2e1e857a7064a..b8feb849a91f02c3bc79146e6a1ab7b86beaf00e 100644 (file)
@@ -84,7 +84,7 @@ LocalTime::LocalTime (string s)
 {
        /* 2013-01-05T18:06:59+04:00 or 2013-01-05T18:06:59.123+04:00 */
         /* 0123456789012345678901234 or 01234567890123456789012345678 */
-       
+
        if (s.length() < 25) {
                throw TimeFormatError (s);
        }
index 5112307c76a26cca369b28cc923641170e7ee424..4a7f3cd8a14001fdaf866cd2c4496452b1ba04d6 100644 (file)
@@ -53,7 +53,7 @@ public:
 
        bool operator== (LocalTime const & other) const;
        bool operator!= (LocalTime const & other) const;
-       
+
 private:
        friend class ::local_time_test;
 
index 734e58b9862f87f12f3581caa14f43e669840725..8bab79fefacf3ead50148d69b70e8dd67355b023 100644 (file)
@@ -59,7 +59,7 @@ public:
        XMLMetadata ();
 
        void set_issue_date_now ();
-       
+
        std::string issuer;
        std::string creator;
        std::string issue_date;
index 2a7a7b59ba4b443be7fa52259e9309320f8dac23..e8875d4b7c742b87f2016ffa22e2584815c3107b 100644 (file)
@@ -52,10 +52,10 @@ public:
        }
 
        bool about_equal (boost::shared_ptr<const TransferFunction>, double epsilon) const;
-       
+
 protected:
        double * make_lut (int bit_depth, bool inverse) const;
-       
+
 private:
        double _power;
        double _threshold;
index 19210ce8ccbfc1a5c9dd42d8185f34e9020308f5..91ab0d8a21ac10f095447ee89a168e27b0f7476a 100644 (file)
@@ -40,14 +40,14 @@ MonoPictureAsset::MonoPictureAsset (boost::filesystem::path file)
        if (ASDCP_FAILURE (r)) {
                boost::throw_exception (MXFFileError ("could not open MXF file for reading", file.string(), r));
        }
-       
+
        ASDCP::JP2K::PictureDescriptor desc;
        if (ASDCP_FAILURE (reader.FillPictureDescriptor (desc))) {
                boost::throw_exception (DCPReadError ("could not read video MXF information"));
        }
 
        read_picture_descriptor (desc);
-       
+
        ASDCP::WriterInfo info;
        if (ASDCP_FAILURE (reader.FillWriterInfo (info))) {
                boost::throw_exception (DCPReadError ("could not read video MXF information"));
@@ -59,7 +59,7 @@ MonoPictureAsset::MonoPictureAsset (boost::filesystem::path file)
 MonoPictureAsset::MonoPictureAsset (Fraction edit_rate)
        : PictureAsset (edit_rate)
 {
-       
+
 }
 
 shared_ptr<const MonoPictureFrame>
@@ -80,13 +80,13 @@ MonoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, No
        if (ASDCP_FAILURE (r)) {
                boost::throw_exception (MXFFileError ("could not open MXF file for reading", _file.string(), r));
        }
-       
+
        ASDCP::JP2K::MXFReader reader_B;
        r = reader_B.OpenRead (other->file().string().c_str());
        if (ASDCP_FAILURE (r)) {
                boost::throw_exception (MXFFileError ("could not open MXF file for reading", other->file().string(), r));
        }
-       
+
        ASDCP::JP2K::PictureDescriptor desc_A;
        if (ASDCP_FAILURE (reader_A.FillPictureDescriptor (desc_A))) {
                boost::throw_exception (DCPReadError ("could not read video MXF information"));
@@ -95,7 +95,7 @@ MonoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, No
        if (ASDCP_FAILURE (reader_B.FillPictureDescriptor (desc_B))) {
                boost::throw_exception (DCPReadError ("could not read video MXF information"));
        }
-       
+
        if (!descriptor_equals (desc_A, desc_B, note)) {
                return false;
        }
@@ -107,11 +107,11 @@ MonoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, No
                if (i >= other_picture->intrinsic_duration()) {
                        return false;
                }
-               
+
                note (DCP_PROGRESS, String::compose ("Comparing video frame %1 of %2", i, _intrinsic_duration));
                shared_ptr<const MonoPictureFrame> frame_A = get_frame (i);
                shared_ptr<const MonoPictureFrame> frame_B = other_picture->get_frame (i);
-               
+
                if (!frame_buffer_equals (
                            i, opt, note,
                            frame_A->j2k_data(), frame_A->j2k_size(),
index fc1e4f9c3a2961222e80643c0293e1a5af23f01f..a10eada00f1261548ce83e6d4e92c8ea21f9a789 100644 (file)
@@ -24,7 +24,7 @@
 
 namespace dcp {
 
-class MonoPictureAssetWriter;  
+class MonoPictureAssetWriter;
 
 /** @class MonoPictureAsset
  *  @brief A 2D (monoscopic) picture asset.
@@ -50,13 +50,13 @@ public:
                EqualityOptions opt,
                NoteHandler note
                ) const;
-       
+
        boost::shared_ptr<const MonoPictureFrame> get_frame (int n) const;
 
 private:
        std::string cpl_node_name () const;
 };
 
-}      
+}
 
 #endif
index 6478c9bfe909958002d6cfe74cb85a757efd5a22..817824542a4a4f4772127dabe7fe1e33269b51d4 100644 (file)
@@ -59,7 +59,7 @@ private:
        /* do this with an opaque pointer so we don't have to include
           ASDCP headers
        */
-          
+
        struct ASDCPState;
        boost::shared_ptr<ASDCPState> _state;
 };
index 5d90d60e683cd66aa4b4aaead7648092c8201691..1c493901e72c47102799c059a17a55dda38f047e 100644 (file)
@@ -94,7 +94,7 @@ MXF::set_key (Key key)
                /* No key ID so far; we now need one */
                _key_id = make_uuid ();
        }
-       
+
        _decryption_context = new ASDCP::AESDecContext;
        if (ASDCP_FAILURE (_decryption_context->InitKey (_key->value ()))) {
                throw MiscError ("could not set up decryption context");
@@ -112,7 +112,7 @@ MXF::read_writer_info (ASDCP::WriterInfo const & info)
        }
 
        _metadata.read (info);
-       
+
        Kumu::bin2UUIDhex (info.AssetUUID, ASDCP::UUIDlen, buffer, sizeof (buffer));
        return buffer;
 }
index 9f008314e8a16d53ae973722f4d4d6f924ca81c3..b4efd14f9e1aebf24cbffa8c41af20f795076199 100644 (file)
--- a/src/mxf.h
+++ b/src/mxf.h
@@ -39,7 +39,7 @@ namespace dcp
 {
 
 class MXFMetadata;
-class PictureAssetWriter;      
+class PictureAssetWriter;
 
 /** @class MXF
  *  @brief Parent for classes which represent MXF files.
@@ -85,7 +85,7 @@ public:
        MXFMetadata metadata () const {
                return _metadata;
        }
-       
+
 protected:
        template <class P, class Q>
        friend void start (PictureAssetWriter* writer, boost::shared_ptr<P> state, Standard standard, Q* mxf, uint8_t* data, int size);
index 70cbe9996be1ec652df85cb6d97cb5f25e6a1c76..303e46d33c2793c77e5ce9833e4a0f8c76d79d3c 100644 (file)
@@ -48,11 +48,11 @@ public:
 
 protected:
        friend class ::write_subtitle_test;
-       
+
        /** ID */
        std::string _id;
 };
-       
+
 }
 
 #endif
index d8bb0fcbfb9e170b1cf9de3b3299a35efb489977..4d5b12e2864edd3cf75df2db132412fe4fc20070 100644 (file)
@@ -40,7 +40,7 @@ OpenJPEGImage::OpenJPEGImage (opj_image_t* image)
 OpenJPEGImage::OpenJPEGImage (Size size)
 {
        opj_image_cmptparm_t cmptparm[3];
-       
+
        for (int i = 0; i < 3; ++i) {
                cmptparm[i].dx = 1;
                cmptparm[i].dy = 1;
index e9eff5b09c50a7c190b356fb9ed7a3d0d7fb309e..625a0dd78394aa49d8d373583c46d248653b9088 100644 (file)
@@ -96,7 +96,7 @@ PictureAsset::descriptor_equals (
 //             a.CodingStyleDefault != b.CodingStyleDefault ||
 //             a.QuantizationDefault != b.QuantizationDefault
                ) {
-               
+
                note (DCP_ERROR, "video MXF picture descriptors differ");
                return false;
        }
@@ -104,7 +104,7 @@ PictureAsset::descriptor_equals (
        if (a.ContainerDuration != b.ContainerDuration) {
                note (DCP_ERROR, "video container durations differ");
        }
-       
+
 //             for (unsigned int j = 0; j < ASDCP::JP2K::MaxComponents; ++j) {
 //                     if (a.ImageComponents[j] != b.ImageComponents[j]) {
 //                             notes.pack_start ("video MXF picture descriptors differ");
@@ -125,24 +125,24 @@ PictureAsset::frame_buffer_equals (
                /* Easy result; the J2K data is identical */
                return true;
        }
-               
+
        /* Decompress the images to bitmaps */
        shared_ptr<OpenJPEGImage> image_A = decompress_j2k (const_cast<uint8_t*> (data_A), size_A, 0);
        shared_ptr<OpenJPEGImage> image_B = decompress_j2k (const_cast<uint8_t*> (data_B), size_B, 0);
-       
+
        /* Compare them */
-       
+
        vector<int> abs_diffs (image_A->size().width * image_A->size().height * 3);
        int d = 0;
        int max_diff = 0;
-       
+
        for (int c = 0; c < 3; ++c) {
-               
+
                if (image_A->size() != image_B->size()) {
                        note (DCP_ERROR, String::compose ("image sizes for frame %1 differ", frame));
                        return false;
                }
-               
+
                int const pixels = image_A->size().width * image_A->size().height;
                for (int j = 0; j < pixels; ++j) {
                        int const t = abs (image_A->data(c)[j] - image_B->data(c)[j]);
@@ -150,29 +150,29 @@ PictureAsset::frame_buffer_equals (
                        max_diff = max (max_diff, t);
                }
        }
-               
+
        uint64_t total = 0;
        for (vector<int>::iterator j = abs_diffs.begin(); j != abs_diffs.end(); ++j) {
                total += *j;
        }
-       
+
        double const mean = double (total) / abs_diffs.size ();
-       
+
        uint64_t total_squared_deviation = 0;
        for (vector<int>::iterator j = abs_diffs.begin(); j != abs_diffs.end(); ++j) {
                total_squared_deviation += pow (*j - mean, 2);
        }
-       
+
        double const std_dev = sqrt (double (total_squared_deviation) / abs_diffs.size());
-       
+
        note (DCP_NOTE, String::compose ("mean difference %1, deviation %2", mean, std_dev));
-       
+
        if (mean > opt.max_mean_pixel_error) {
                note (
                        DCP_ERROR,
                        String::compose ("mean %1 out of range %2 in frame %3", mean, opt.max_mean_pixel_error, frame)
                        );
-               
+
                return false;
        }
 
@@ -181,7 +181,7 @@ PictureAsset::frame_buffer_equals (
                        DCP_ERROR,
                        String::compose ("standard deviation %1 out of range %2 in frame %3", std_dev, opt.max_std_dev_pixel_error, frame)
                        );
-               
+
                return false;
        }
 
index 51b69e7c906daba81d5d8da88c7c838618a8822c..2c3917a491c5549670ba3e539a4aef6656f40337 100644 (file)
@@ -38,7 +38,7 @@ namespace ASDCP {
 namespace dcp
 {
 
-class MonoPictureFrame;        
+class MonoPictureFrame;
 class StereoPictureFrame;
 class PictureAssetWriter;
 
@@ -119,7 +119,7 @@ protected:
 private:
        std::string pkl_type (Standard standard) const;
 };
-       
+
 
 }
 
index 48832e430b39eee77d9854e602e3bc1eaa209f1f..e263d479f1bb67435f59afefeae06655d4deb668 100644 (file)
@@ -35,7 +35,7 @@
 
 namespace dcp {
 
-class PictureAsset;    
+class PictureAsset;
 
 /** @class FrameInfo
  *  @brief Information about a single frame (either a monoscopic frame or a left *or* right eye stereoscopic frame)
@@ -46,7 +46,7 @@ struct FrameInfo
                : offset (0)
                , size (0)
        {}
-                 
+
        FrameInfo (uint64_t o, uint64_t s, std::string h)
                : offset (o)
                , size (s)
index 0696bc4862df40e4975226f01c9ec799f99354e7..43b843855fcbd8c3a9447a8f0591da18ea20b305 100644 (file)
@@ -26,7 +26,7 @@ struct ASDCPStateBase
        ASDCPStateBase ()
                : frame_buffer (4 * Kumu::Megabyte)
        {}
-       
+
        ASDCP::JP2K::CodestreamParser j2k_parser;
        ASDCP::JP2K::FrameBuffer frame_buffer;
        ASDCP::WriterInfo writer_info;
@@ -39,7 +39,7 @@ template <class P, class Q>
 void dcp::start (PictureAssetWriter* writer, shared_ptr<P> state, Standard standard, Q* asset, uint8_t* data, int size)
 {
        asset->set_file (writer->_file);
-       
+
        if (ASDCP_FAILURE (state->j2k_parser.OpenReadFrame (data, size, state->frame_buffer))) {
                boost::throw_exception (MiscError ("could not parse J2K frame"));
        }
@@ -49,9 +49,9 @@ void dcp::start (PictureAssetWriter* writer, shared_ptr<P> state, Standard stand
 
        asset->set_size (Size (state->picture_descriptor.StoredWidth, state->picture_descriptor.StoredHeight));
        asset->set_screen_aspect_ratio (Fraction (state->picture_descriptor.AspectRatio.Numerator, state->picture_descriptor.AspectRatio.Denominator));
-       
+
        asset->fill_writer_info (&state->writer_info, asset->id(), standard);
-       
+
        Kumu::Result_t r = state->mxf_writer.OpenWrite (
                asset->file().string().c_str(),
                state->writer_info,
index 4d92d3450703dbeda6f619f052196de5cf60df10..3c3c78925bc1681fa870a669d635dd100731a738 100644 (file)
@@ -49,17 +49,17 @@ Reel::Reel (boost::shared_ptr<const cxml::Node> node)
        if (main_picture) {
                _main_picture.reset (new ReelMonoPictureAsset (main_picture));
        }
-       
+
        shared_ptr<cxml::Node> main_stereoscopic_picture = asset_list->optional_node_child ("MainStereoscopicPicture");
        if (main_stereoscopic_picture) {
                _main_picture.reset (new ReelStereoPictureAsset (main_stereoscopic_picture));
        }
-       
+
        shared_ptr<cxml::Node> main_sound = asset_list->optional_node_child ("MainSound");
        if (main_sound) {
                _main_sound.reset (new ReelSoundAsset (main_sound));
        }
-       
+
        shared_ptr<cxml::Node> main_subtitle = asset_list->optional_node_child ("MainSubtitle");
        if (main_subtitle) {
                _main_subtitle.reset (new ReelSubtitleAsset (main_subtitle));
@@ -75,7 +75,7 @@ Reel::write_to_cpl (xmlpp::Element* node, Standard standard) const
        xmlpp::Element* reel = node->add_child ("Reel");
        reel->add_child("Id")->add_child_text ("urn:uuid:" + make_uuid());
        xmlpp::Element* asset_list = reel->add_child ("AssetList");
-       
+
        if (_main_picture && dynamic_pointer_cast<ReelMonoPictureAsset> (_main_picture)) {
                /* Mono pictures come before other stuff... */
                _main_picture->write_to_cpl (asset_list, standard);
@@ -94,7 +94,7 @@ Reel::write_to_cpl (xmlpp::Element* node, Standard standard) const
                _main_picture->write_to_cpl (asset_list, standard);
        }
 }
-       
+
 bool
 Reel::equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, NoteHandler note) const
 {
@@ -102,7 +102,7 @@ Reel::equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, NoteHand
                note (DCP_ERROR, "Reel: assets differ");
                return false;
        }
-       
+
        if (_main_picture && !_main_picture->equals (other->_main_picture, opt, note)) {
                return false;
        }
@@ -111,7 +111,7 @@ Reel::equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, NoteHand
                note (DCP_ERROR, "Reel: assets differ");
                return false;
        }
-       
+
        if (_main_sound && !_main_sound->equals (other->_main_sound, opt, note)) {
                return false;
        }
@@ -120,7 +120,7 @@ Reel::equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, NoteHand
                note (DCP_ERROR, "Reel: assets differ");
                return false;
        }
-       
+
        if (_main_subtitle && !_main_subtitle->equals (other->_main_subtitle, opt, note)) {
                return false;
        }
index 278a0f916a23000c78e423c6a5a13b9909148af4..010322c2a37a0ae87748de2f2acb0a1b0670b523 100644 (file)
@@ -41,12 +41,12 @@ class ReelSoundAsset;
 class ReelSubtitleAsset;
 class Content;
 
-/** @brief A reel within a DCP; the part which actually refers to picture, sound and subtitle data */  
+/** @brief A reel within a DCP; the part which actually refers to picture, sound and subtitle data */
 class Reel : public Object
 {
 public:
        Reel () {}
-       
+
        Reel (
                boost::shared_ptr<ReelPictureAsset> picture,
                boost::shared_ptr<ReelSoundAsset> sound,
@@ -58,7 +58,7 @@ public:
        {}
 
        Reel (boost::shared_ptr<const cxml::Node>);
-       
+
        boost::shared_ptr<ReelPictureAsset> main_picture () const {
                return _main_picture;
        }
@@ -66,7 +66,7 @@ public:
        boost::shared_ptr<ReelSoundAsset> main_sound () const {
                return _main_sound;
        }
-       
+
        boost::shared_ptr<ReelSubtitleAsset> main_subtitle () const {
                return _main_subtitle;
        }
index e9704acd57d43cead8c88f314714ab7958e57ea0..371a8f3ea8c1bcd2f621af44acc86d257247cf79 100644 (file)
@@ -67,7 +67,7 @@ public:
        Ref<Asset>& asset_ref () {
                return _asset_ref;
        }
-       
+
        int64_t entry_point () const {
                return _entry_point;
        }
index 5fcb31c8caa570210d11ce28a57d0de3e6db9eb5..544502335a656baa14746c15c7baeb085f560f1f 100644 (file)
@@ -28,7 +28,7 @@
 
 namespace dcp {
 
-class MonoPictureAsset;        
+class MonoPictureAsset;
 
 /** @class ReelMonoPictureAsset
  *  @brief Part of a Reel's description which refers to a monoscopic picture asset.
index 5e8aa84eacf5a2e72f3b0078a6af2f0839172be4..6989a81f321cd17466c11b8838f8753023a6873f 100644 (file)
@@ -46,7 +46,7 @@ public:
 
        /** @return the 4-character key type for this MXF (MDIK, MDAK, etc.) */
        virtual std::string key_type () const = 0;
-       
+
        /** @return true if a KeyId is specified for this asset, implying
         *  that its content is encrypted.
         */
index 7099d7d2f7dfa4be7c4f26c873a52d09ff56687d..ccb4bd5672b1397b5760322b05c87eb544e5fa9d 100644 (file)
@@ -49,7 +49,7 @@ ReelPictureAsset::ReelPictureAsset (shared_ptr<PictureAsset> asset, int64_t entr
        , _frame_rate (asset->frame_rate ())
        , _screen_aspect_ratio (asset->screen_aspect_ratio ())
 {
-       
+
 }
 
 ReelPictureAsset::ReelPictureAsset (shared_ptr<const cxml::Node> node)
@@ -77,7 +77,7 @@ ReelPictureAsset::write_to_cpl (xmlpp::Node* node, Standard standard) const
 
        /* Find <MainPicture> */
        xmlpp::Node* mp = find_child (node, cpl_node_name ());
-       
+
        mp->add_child ("FrameRate")->add_child_text (String::compose ("%1 %2", _frame_rate.numerator, _frame_rate.denominator));
        if (standard == INTEROP) {
                stringstream s;
@@ -108,7 +108,7 @@ ReelPictureAsset::equals (shared_ptr<const ReelAsset> other, EqualityOptions opt
        if (!ReelAsset::equals (other, opt, note)) {
                return false;
        }
-       
+
        shared_ptr<const ReelPictureAsset> rpa = dynamic_pointer_cast<const ReelPictureAsset> (other);
        if (!rpa) {
                return false;
index 4feafeb07251f150dd69232ac3c78b9135e47a2b..637c96354d197f723eaaf336a96273d1b57c6bae 100644 (file)
@@ -62,7 +62,7 @@ public:
 
 private:
        std::string key_type () const;
-       
+
        Fraction _frame_rate;
        Fraction _screen_aspect_ratio;
 };
index 9767307a787a097a925ac97e3b0d04055c2f9a93..8f39e8a094c8f474f55f1033b98711a607e1ef18 100644 (file)
@@ -49,7 +49,7 @@ public:
        boost::shared_ptr<const SoundAsset> asset () const {
                return boost::dynamic_pointer_cast<const SoundAsset> (_asset_ref.object ());
        }
-       
+
 private:
        std::string key_type () const;
        std::string cpl_node_name () const;
index 07d31a03a1e3ff7dcab895f2e8bd8955e859e91e..72b225bcc9c7f6ef3cd68fe6b82679d81e0dfab2 100644 (file)
@@ -28,7 +28,7 @@
 
 namespace dcp {
 
-class StereoPictureAsset;      
+class StereoPictureAsset;
 
 /** @class ReelStereoPictureAsset
  *  @brief Part of a Reel's description which refers to a stereoscopic picture asset.
index 55881f7ea44c6c7468ffb13846d0bc16b82da9ae..876b35114c76fb5ca9eadf96972a011a4f78acb1 100644 (file)
@@ -44,7 +44,7 @@ public:
                return boost::dynamic_pointer_cast<SubtitleAsset> (_asset_ref.object ());
        }
 
-private:       
+private:
        std::string cpl_node_name () const;
 };
 
index 287d50814a8f8ec4405c8151b4734286030436c3..8194e5855f7ee3833e76b645036d4d19a0c9d333 100644 (file)
--- a/src/ref.h
+++ b/src/ref.h
@@ -91,7 +91,7 @@ public:
                if (!_object) {
                        throw UnresolvedRefError (_id);
                }
-               
+
                return _object;
        }
 
@@ -102,7 +102,7 @@ public:
                if (!_object) {
                        throw UnresolvedRefError (_id);
                }
-               
+
                return _object.get ();
        }
 
index 50c3bf7e99a5cf16856c19cc2be3f42cbd78e173..2c67e62f6734f092885c721f8ef0ff2d1d9adfd4 100644 (file)
@@ -62,11 +62,11 @@ dcp::xyz_to_rgba (
        struct {
                double x, y, z;
        } s;
-       
+
        struct {
                double r, g, b;
        } d;
-       
+
        int* xyz_x = xyz_image->data (0);
        int* xyz_y = xyz_image->data (1);
        int* xyz_z = xyz_image->data (2);
@@ -77,13 +77,13 @@ dcp::xyz_to_rgba (
 
        int const height = xyz_image->size().height;
        int const width = xyz_image->size().width;
-       
+
        for (int y = 0; y < height; ++y) {
                uint8_t* argb_line = argb;
                for (int x = 0; x < width; ++x) {
 
                        DCP_ASSERT (*xyz_x >= 0 && *xyz_y >= 0 && *xyz_z >= 0 && *xyz_x < 4096 && *xyz_y < 4096 && *xyz_z < 4096);
-                       
+
                        /* In gamma LUT */
                        s.x = lut_in[*xyz_x++];
                        s.y = lut_in[*xyz_y++];
@@ -98,16 +98,16 @@ dcp::xyz_to_rgba (
                        d.r = ((s.x * matrix(0, 0)) + (s.y * matrix(0, 1)) + (s.z * matrix(0, 2)));
                        d.g = ((s.x * matrix(1, 0)) + (s.y * matrix(1, 1)) + (s.z * matrix(1, 2)));
                        d.b = ((s.x * matrix(2, 0)) + (s.y * matrix(2, 1)) + (s.z * matrix(2, 2)));
-                       
+
                        d.r = min (d.r, 1.0);
                        d.r = max (d.r, 0.0);
-                       
+
                        d.g = min (d.g, 1.0);
                        d.g = max (d.g, 0.0);
-                       
+
                        d.b = min (d.b, 1.0);
                        d.b = max (d.b, 0.0);
-                       
+
                        /* Out gamma LUT */
                        *argb_line++ = lut_out[int(rint(d.b * max_colour))] * 0xff;
                        *argb_line++ = lut_out[int(rint(d.g * max_colour))] * 0xff;
@@ -141,7 +141,7 @@ dcp::xyz_to_rgb (
        struct {
                double x, y, z;
        } s;
-       
+
        struct {
                double r, g, b;
        } d;
@@ -183,7 +183,7 @@ dcp::xyz_to_rgb (
                                }
                                cz = max (min (cz, 4095), 0);
                        }
-                       
+
                        /* In gamma LUT */
                        s.x = lut_in[cx];
                        s.y = lut_in[cy];
@@ -198,13 +198,13 @@ dcp::xyz_to_rgb (
                        d.r = ((s.x * matrix(0, 0)) + (s.y * matrix(0, 1)) + (s.z * matrix(0, 2)));
                        d.g = ((s.x * matrix(1, 0)) + (s.y * matrix(1, 1)) + (s.z * matrix(1, 2)));
                        d.b = ((s.x * matrix(2, 0)) + (s.y * matrix(2, 1)) + (s.z * matrix(2, 2)));
-                       
+
                        d.r = min (d.r, 1.0);
                        d.r = max (d.r, 0.0);
-                       
+
                        d.g = min (d.g, 1.0);
                        d.g = max (d.g, 0.0);
-                       
+
                        d.b = min (d.b, 1.0);
                        d.b = max (d.b, 0.0);
 
@@ -243,7 +243,7 @@ dcp::rgb_to_xyz (
        struct {
                double x, y, z;
        } e;
-       
+
        double const * lut_in = conversion.in()->lut (12, false);
        double const * lut_out = conversion.out()->lut (16, true);
        boost::numeric::ublas::matrix<double> const rgb_to_xyz = conversion.rgb_to_xyz ();
@@ -268,7 +268,7 @@ dcp::rgb_to_xyz (
                        e.x = ((d.x * bradford(0, 0)) + (d.y * bradford(0, 1)) + (d.z * bradford(0, 2)));
                        e.y = ((d.x * bradford(1, 0)) + (d.y * bradford(1, 1)) + (d.z * bradford(1, 2)));
                        e.z = ((d.x * bradford(2, 0)) + (d.y * bradford(2, 1)) + (d.z * bradford(2, 2)));
-                       
+
                        /* DCI companding */
                        e.x = e.x * DCI_COEFFICIENT * 65535;
                        e.y = e.y * DCI_COEFFICIENT * 65535;
@@ -279,7 +279,7 @@ dcp::rgb_to_xyz (
                        if (e.x < 0 || e.y < 0 || e.z < 0 || e.x > 65535 || e.y > 65535 || e.z > 65535) {
                                ++clamped;
                        }
-                       
+
                        e.x = max (0.0, e.x);
                        e.y = max (0.0, e.y);
                        e.z = max (0.0, e.z);
@@ -324,6 +324,6 @@ dcp::xyz_to_xyz (uint8_t const * xyz_16, dcp::Size size, int stride)
                        ++jn;
                }
        }
-       
+
        return xyz_12;
 }
index 40aaf7623a160cd588263f034278931a0f5cfd24..7bd1cd8eeddce6449362f04aa8fe60d98915a8db 100644 (file)
 
 namespace dcp {
 
-class ARGBImage;       
+class ARGBImage;
 class OpenJPEGImage;
 class Image;
 class ColourConversion;
-       
+
 extern void xyz_to_rgba (
        boost::shared_ptr<const OpenJPEGImage>,
        ColourConversion const & conversion,
        uint8_t* rgba
        );
-       
+
 extern void xyz_to_rgb (
        boost::shared_ptr<const OpenJPEGImage>,
        ColourConversion const & conversion,
@@ -42,7 +42,7 @@ extern void xyz_to_rgb (
        int stride,
        boost::optional<NoteHandler> note = boost::optional<NoteHandler> ()
        );
-       
+
 extern boost::shared_ptr<OpenJPEGImage> rgb_to_xyz (
        uint8_t const * rgb,
        dcp::Size size,
@@ -50,7 +50,7 @@ extern boost::shared_ptr<OpenJPEGImage> rgb_to_xyz (
        ColourConversion const & conversion,
        boost::optional<NoteHandler> note = boost::optional<NoteHandler> ()
        );
-       
+
 extern boost::shared_ptr<OpenJPEGImage> xyz_to_xyz (uint8_t const * xyz, dcp::Size size, int stride);
-       
+
 }
index f6cc76ac4edbfdd9e84d7d34d362cd2e0a34af33..c04ac1223abfaf4cd4dd273ea97b23399b86da7a 100644 (file)
@@ -84,7 +84,7 @@ void
 Signer::sign (xmlpp::Element* parent, Standard standard) const
 {
        /* <Signer> */
-       
+
        xmlpp::Element* signer = parent->add_child("Signer");
        xmlpp::Element* data = signer->add_child("X509Data", "dsig");
        xmlpp::Element* serial_element = data->add_child("X509IssuerSerial", "dsig");
@@ -93,18 +93,18 @@ Signer::sign (xmlpp::Element* parent, Standard standard) const
        data->add_child("X509SubjectName", "dsig")->add_child_text (_certificates.leaf().subject());
 
        /* <Signature> */
-       
+
        xmlpp::Element* signature = parent->add_child("Signature", "dsig");
-       
+
        xmlpp::Element* signed_info = signature->add_child ("SignedInfo", "dsig");
        signed_info->add_child("CanonicalizationMethod", "dsig")->set_attribute ("Algorithm", "http://www.w3.org/TR/2001/REC-xml-c14n-20010315");
-       
+
        if (standard == INTEROP) {
                signed_info->add_child("SignatureMethod", "dsig")->set_attribute("Algorithm", "http://www.w3.org/2000/09/xmldsig#rsa-sha1");
        } else {
                signed_info->add_child("SignatureMethod", "dsig")->set_attribute("Algorithm", "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256");
        }
-       
+
        xmlpp::Element* reference = signed_info->add_child("Reference", "dsig");
        reference->set_attribute ("URI", "");
 
@@ -138,13 +138,13 @@ Signer::add_signature_value (xmlpp::Node* parent, string ns) const
        CertificateChain::List c = _certificates.leaf_to_root ();
        for (CertificateChain::List::iterator i = c.begin(); i != c.end(); ++i) {
                xmlpp::Element* data = key_info->add_child("X509Data", ns);
-               
+
                {
                        xmlpp::Element* serial = data->add_child("X509IssuerSerial", ns);
                        serial->add_child("X509IssuerName", ns)->add_child_text (i->issuer ());
                        serial->add_child("X509SerialNumber", ns)->add_child_text (i->serial ());
                }
-               
+
                data->add_child("X509Certificate", ns)->add_child_text (i->certificate());
        }
 
@@ -156,7 +156,7 @@ Signer::add_signature_value (xmlpp::Node* parent, string ns) const
        signature_context->signKey = xmlSecCryptoAppKeyLoadMemory (
                reinterpret_cast<const unsigned char *> (_key.c_str()), _key.size(), xmlSecKeyDataFormatPem, 0, 0, 0
                );
-       
+
        if (signature_context->signKey == 0) {
                throw FileError ("could not load private key file", _key, 0);
        }
@@ -185,7 +185,7 @@ Signer::valid () const
        if (!bio) {
                throw MiscError ("could not create memory BIO");
        }
-       
+
        RSA* private_key = PEM_read_bio_RSAPrivateKey (bio, 0, 0, 0);
        RSA* public_key = _certificates.leaf().public_key ();
        bool const valid = !BN_cmp (private_key->n, public_key->n);
index 1d53d5baf2eefec241dcec1645ec04f739cf8c49..97cfa6d14c096402837e4d74d781f589bb783c63 100644 (file)
@@ -51,7 +51,7 @@ public:
                std::string intermediate_common_name,
                std::string leaf_common_name
                );
-       
+
        /** @param c Certificate chain to sign with.
         *  @param k Key to sign with as a PEM-format string.
         */
@@ -70,7 +70,7 @@ public:
        CertificateChain& certificates () {
                return _certificates;
        }
-       
+
        std::string key () const {
                return _key;
        }
@@ -80,10 +80,10 @@ public:
        }
 
        bool valid () const;
-       
-private:       
+
+private:
        void create (boost::filesystem::path directory);
-       
+
        /** Certificate chain to sign with */
        CertificateChain _certificates;
        /** Key to sign with as a PEM-format string */
index b3ae3ff86639cab897d11b48aa99570c808ee13b..3efd2d58d46a46eb44276f3e3724ce3c6fb08db8 100644 (file)
@@ -35,7 +35,7 @@ SMPTELoadFontNode::SMPTELoadFontNode (shared_ptr<const cxml::Node> node)
        : LoadFontNode (node->string_attribute ("ID"))
        , urn (node->content().substr (9))
 {
-       
+
 }
 
 bool
index 5d02fb1badb0d96ee649fedb4f1ddd3fa29add53..823b2d8dbc9de43111a58679904b496cbb4b0382 100644 (file)
@@ -30,7 +30,7 @@ namespace cxml {
 }
 
 namespace dcp {
-       
+
 /** @class SMPTELoadFontNode
  *  @brief Parser for LoadFont nodes from SMPTE subtitle XML.
  */
@@ -46,5 +46,5 @@ public:
 
 bool operator== (SMPTELoadFontNode const & a, SMPTELoadFontNode const & b);
 bool operator!= (SMPTELoadFontNode const & a, SMPTELoadFontNode const & b);
-       
+
 }
index e426ae22efd94365c9f78edda4e671a9fdb056bf..8ea68362116243a218b7a23a3ef0b4a8128bfdcb 100644 (file)
@@ -52,7 +52,7 @@ SMPTESubtitleAsset::SMPTESubtitleAsset ()
        : _edit_rate (24, 1)
        , _time_code_rate (24)
 {
-       
+
 }
 
 /** Construct a SMPTESubtitleAsset by reading an MXF file.
@@ -68,14 +68,14 @@ SMPTESubtitleAsset::SMPTESubtitleAsset (boost::filesystem::path file)
        }
 
        /* Read the subtitle XML */
-       
+
        string s;
        reader.ReadTimedTextResource (s, 0, 0);
        stringstream t;
        t << s;
        shared_ptr<cxml::Document> xml (new cxml::Document ("SubtitleReel"));
        xml->read_stream (t);
-       
+
        ASDCP::WriterInfo info;
        reader.FillWriterInfo (info);
        _id = read_writer_info (info);
@@ -112,7 +112,7 @@ SMPTESubtitleAsset::SMPTESubtitleAsset (boost::filesystem::path file)
        BOOST_FOREACH (cxml::NodePtr& i, f) {
                font_nodes.push_back (shared_ptr<FontNode> (new FontNode (i, _time_code_rate)));
        }
-       
+
        parse_subtitles (xml, font_nodes);
 
        /* Read fonts */
@@ -148,8 +148,8 @@ SMPTESubtitleAsset::SMPTESubtitleAsset (boost::filesystem::path file)
                        }
                }
        }
-       
-       
+
+
 }
 
 list<shared_ptr<LoadFontNode> >
@@ -199,9 +199,9 @@ SMPTESubtitleAsset::xml_as_string () const
                load_font->add_child_text (i->urn);
                load_font->set_attribute ("ID", i->id);
        }
-       
+
        subtitles_as_xml (root->add_child ("SubtitleList", "dcst"), _time_code_rate, "dcst");
-       
+
        return doc.write_to_string_formatted ("UTF-8");
 }
 
@@ -211,7 +211,7 @@ SMPTESubtitleAsset::write (boost::filesystem::path p) const
 {
        ASDCP::WriterInfo writer_info;
        fill_writer_info (&writer_info, _id, SMPTE);
-       
+
        ASDCP::TimedText::TimedTextDescriptor descriptor;
        descriptor.EditRate = ASDCP::Rational (_edit_rate.numerator, _edit_rate.denominator);
        descriptor.EncodingName = "UTF-8";
@@ -227,7 +227,7 @@ SMPTESubtitleAsset::write (boost::filesystem::path p) const
                        descriptor.ResourceList.push_back (res);
                }
        }
-       
+
        descriptor.NamespaceName = "dcst";
        memcpy (descriptor.AssetID, writer_info.AssetUUID, ASDCP::UUIDlen);
        descriptor.ContainerDuration = latest_subtitle_out().as_editable_units (_edit_rate.numerator / _edit_rate.denominator);
@@ -297,7 +297,7 @@ SMPTESubtitleAsset::equals (shared_ptr<const Asset> other_asset, EqualityOptions
                note (DCP_ERROR, "Subtitle content title texts differ");
                return false;
        }
-       
+
        if (_language != other->_language) {
                note (DCP_ERROR, "Subtitle languages differ");
                return false;
@@ -307,7 +307,7 @@ SMPTESubtitleAsset::equals (shared_ptr<const Asset> other_asset, EqualityOptions
                note (DCP_ERROR, "Subtitle annotation texts differ");
                return false;
        }
-       
+
        if (_issue_date != other->_issue_date) {
                if (options.issue_dates_can_differ) {
                        note (DCP_NOTE, "Subtitle issue dates differ");
@@ -316,12 +316,12 @@ SMPTESubtitleAsset::equals (shared_ptr<const Asset> other_asset, EqualityOptions
                        return false;
                }
        }
-       
+
        if (_reel_number != other->_reel_number) {
                note (DCP_ERROR, "Subtitle reel numbers differ");
                return false;
        }
-       
+
        if (_edit_rate != other->_edit_rate) {
                note (DCP_ERROR, "Subtitle edit rates differ");
                return false;
@@ -331,7 +331,7 @@ SMPTESubtitleAsset::equals (shared_ptr<const Asset> other_asset, EqualityOptions
                note (DCP_ERROR, "Subtitle time code rates differ");
                return false;
        }
-       
+
        if (_start_time != other->_start_time) {
                note (DCP_ERROR, "Subtitle start times differ");
                return false;
index a01ef775ae77e4be7a72542db4424e185991e9d3..444c53e6c4a3395dbf74be5e8d982dc807992159 100644 (file)
@@ -37,7 +37,7 @@ class SMPTESubtitleAsset : public SubtitleAsset, public MXF
 {
 public:
        SMPTESubtitleAsset ();
-       
+
        /** @param file File name
         */
        SMPTESubtitleAsset (boost::filesystem::path file);
@@ -47,7 +47,7 @@ public:
                EqualityOptions,
                NoteHandler note
                ) const;
-       
+
        std::list<boost::shared_ptr<LoadFontNode> > load_font_nodes () const;
 
        Glib::ustring xml_as_string () const;
@@ -111,15 +111,15 @@ public:
        boost::optional<Time> start_time () const {
                return _start_time;
        }
-       
+
        static bool valid_mxf (boost::filesystem::path);
 
 protected:
-       
+
        std::string pkl_type (Standard) const {
                return "application/mxf";
        }
-       
+
 private:
        std::string _content_title_text;
        boost::optional<std::string> _language;
@@ -129,7 +129,7 @@ private:
        Fraction _edit_rate;
        int _time_code_rate;
        boost::optional<Time> _start_time;
-       
+
        std::list<boost::shared_ptr<SMPTELoadFontNode> > _load_font_nodes;
 };
 
index 3d23b426b73126c81f5ad351c171b95bda636603..f95b860f7da2bd0efaab38e72ca1a06a7be9cee5 100644 (file)
@@ -103,7 +103,7 @@ SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHand
        if (ASDCP_FAILURE (reader_B.FillAudioDescriptor (desc_B))) {
                boost::throw_exception (DCPReadError ("could not read audio MXF information"));
        }
-       
+
        if (
                desc_A.EditRate != desc_B.EditRate ||
                desc_A.AudioSamplingRate != desc_B.AudioSamplingRate ||
@@ -116,28 +116,28 @@ SoundAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt, NoteHand
                desc_A.ContainerDuration != desc_B.ContainerDuration
 //             desc_A.ChannelFormat != desc_B.ChannelFormat ||
                ) {
-               
+
                note (DCP_ERROR, "audio MXF picture descriptors differ");
                return false;
        }
-       
+
        ASDCP::PCM::FrameBuffer buffer_A (1 * Kumu::Megabyte);
        ASDCP::PCM::FrameBuffer buffer_B (1 * Kumu::Megabyte);
-       
+
        for (int i = 0; i < _intrinsic_duration; ++i) {
                if (ASDCP_FAILURE (reader_A.ReadFrame (i, buffer_A))) {
                        boost::throw_exception (DCPReadError ("could not read audio frame"));
                }
-               
+
                if (ASDCP_FAILURE (reader_B.ReadFrame (i, buffer_B))) {
                        boost::throw_exception (DCPReadError ("could not read audio frame"));
                }
-               
+
                if (buffer_A.Size() != buffer_B.Size()) {
                        note (DCP_ERROR, String::compose ("sizes of audio data for frame %1 differ", i));
                        return false;
                }
-               
+
                if (memcmp (buffer_A.RoData(), buffer_B.RoData(), buffer_A.Size()) != 0) {
                        for (uint32_t i = 0; i < buffer_A.Size(); ++i) {
                                int const d = abs (buffer_A.RoData()[i] - buffer_B.RoData()[i]);
index 5a7dc21493aeb919dd8b917313e3223185a16856..968f7dded8033ee474f308199bb60afefba8b6d5 100644 (file)
@@ -44,7 +44,7 @@ public:
        SoundAsset (Fraction edit_rate, int sampling_rate, int channels);
 
        boost::shared_ptr<SoundAssetWriter> start_write (boost::filesystem::path file, Standard standard);
-       
+
        bool equals (
                boost::shared_ptr<const Asset> other,
                EqualityOptions opt,
@@ -70,10 +70,10 @@ public:
        int64_t intrinsic_duration () const {
                return _intrinsic_duration;
        }
-       
+
 private:
        friend class SoundAssetWriter;
-       
+
        std::string pkl_type (Standard standard) const;
 
        Fraction _edit_rate;
index 8d302ed3ebebc1fc67313958c6aee498446b3082..4a27639e31738fe8eaa89e1e34c45835b6ff6119 100644 (file)
@@ -50,13 +50,13 @@ SoundAssetWriter::SoundAssetWriter (SoundAsset* asset, boost::filesystem::path f
        _state->audio_desc.AvgBps = _sound_asset->sampling_rate() * _state->audio_desc.BlockAlign;
        _state->audio_desc.LinkedTrackID = 0;
        _state->audio_desc.ChannelFormat = ASDCP::PCM::CF_NONE;
-       
+
        _state->frame_buffer.Capacity (ASDCP::PCM::CalcFrameBufferSize (_state->audio_desc));
        _state->frame_buffer.Size (ASDCP::PCM::CalcFrameBufferSize (_state->audio_desc));
        memset (_state->frame_buffer.Data(), 0, _state->frame_buffer.Capacity());
-       
+
        _sound_asset->fill_writer_info (&_state->writer_info, _sound_asset->id(), standard);
-       
+
        Kumu::Result_t r = _state->mxf_writer.OpenWrite (file.string().c_str(), _state->writer_info, _state->audio_desc);
        if (ASDCP_FAILURE (r)) {
                boost::throw_exception (FileError ("could not open audio MXF for writing", file.string(), r));
@@ -69,7 +69,7 @@ void
 SoundAssetWriter::write (float const * const * data, int frames)
 {
        DCP_ASSERT (!_finalized);
-       
+
        for (int i = 0; i < frames; ++i) {
 
                byte_t* out = _state->frame_buffer.Data() + _frame_buffer_offset;
@@ -111,7 +111,7 @@ SoundAssetWriter::finalize ()
        if (_frame_buffer_offset > 0) {
                write_current_frame ();
        }
-       
+
        if (ASDCP_FAILURE (_state->mxf_writer.Finalize())) {
                boost::throw_exception (MiscError ("could not finalise audio MXF"));
        }
index 8c54b618e8e93279f487cf6a220f70aa146ce1b2..3516efcbd4fc23d08d6d6b4388b41f77393dca12 100644 (file)
@@ -56,7 +56,7 @@ private:
        /* do this with an opaque pointer so we don't have to include
           ASDCP headers
        */
-          
+
        struct ASDCPState;
        boost::shared_ptr<ASDCPState> _state;
 
index 452c3675f5194b1f09c2410b2997f74289fb5437..76c353f1732e0a4b272c62c61d05802943ade113 100644 (file)
@@ -39,7 +39,7 @@ StereoPictureAsset::StereoPictureAsset (boost::filesystem::path file)
        if (ASDCP_FAILURE (r)) {
                boost::throw_exception (MXFFileError ("could not open MXF file for reading", file.string(), r));
        }
-       
+
        ASDCP::JP2K::PictureDescriptor desc;
        if (ASDCP_FAILURE (reader.FillPictureDescriptor (desc))) {
                boost::throw_exception (DCPReadError ("could not read video MXF information"));
@@ -82,13 +82,13 @@ StereoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt,
        if (ASDCP_FAILURE (r)) {
                boost::throw_exception (MXFFileError ("could not open MXF file for reading", file().string(), r));
        }
-       
+
        ASDCP::JP2K::MXFSReader reader_B;
        r = reader_B.OpenRead (other->file().string().c_str());
        if (ASDCP_FAILURE (r)) {
                boost::throw_exception (MXFFileError ("could not open MXF file for reading", file().string(), r));
        }
-       
+
        ASDCP::JP2K::PictureDescriptor desc_A;
        if (ASDCP_FAILURE (reader_A.FillPictureDescriptor (desc_A))) {
                boost::throw_exception (DCPReadError ("could not read video MXF information"));
@@ -97,11 +97,11 @@ StereoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt,
        if (ASDCP_FAILURE (reader_B.FillPictureDescriptor (desc_B))) {
                boost::throw_exception (DCPReadError ("could not read video MXF information"));
        }
-       
+
        if (!descriptor_equals (desc_A, desc_B, note)) {
                return false;
        }
-       
+
        shared_ptr<const StereoPictureAsset> other_picture = dynamic_pointer_cast<const StereoPictureAsset> (other);
        DCP_ASSERT (other_picture);
 
@@ -118,7 +118,7 @@ StereoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt,
                        note (DCP_ERROR, e.what ());
                        return false;
                }
-               
+
                if (!frame_buffer_equals (
                            i, opt, note,
                            frame_A->left_j2k_data(), frame_A->left_j2k_size(),
@@ -126,7 +126,7 @@ StereoPictureAsset::equals (shared_ptr<const Asset> other, EqualityOptions opt,
                            )) {
                        return false;
                }
-               
+
                if (!frame_buffer_equals (
                            i, opt, note,
                            frame_A->right_j2k_data(), frame_A->right_j2k_size(),
index 2fe893de90ade58549f7ed72f924e3061621e7db..533be75844472d4862c3ea3c9f758112c7af50f7 100644 (file)
@@ -23,8 +23,8 @@
 #include "picture_asset.h"
 
 namespace dcp {
-       
-/** A 3D (stereoscopic) picture asset */       
+
+/** A 3D (stereoscopic) picture asset */
 class StereoPictureAsset : public PictureAsset
 {
 public:
@@ -39,7 +39,7 @@ public:
                EqualityOptions opt,
                NoteHandler note
                ) const;
-       
+
        boost::shared_ptr<const StereoPictureFrame> get_frame (int n) const;
 };
 
index be265d1e7c8ec3e442599ea369e030131becf80a..f17e3d2f0f9be3b063c04524d539118d4ac82596 100644 (file)
@@ -89,7 +89,7 @@ StereoPictureAssetWriter::write (uint8_t* data, int size)
        if (_next_eye == EYE_LEFT) {
                ++_frames_written;
        }
-                       
+
        return FrameInfo (before_offset, _state->mxf_writer.Tell() - before_offset, hash);
 }
 
index bd41b45ee379844c0cbfb44a664ea180c69862c6..f45aac3cd4c9d9d86f11d137b4663cb19342c4fa 100644 (file)
@@ -57,7 +57,7 @@ private:
        /* do this with an opaque pointer so we don't have to include
           ASDCP headers
        */
-          
+
        struct ASDCPState;
        boost::shared_ptr<ASDCPState> _state;
 
index 70e802d10372eb0a582432cff099227c42fc101f..dd17361375dd35bee0f45b3504cb5bb7829b6ec3 100644 (file)
@@ -77,7 +77,7 @@ StereoPictureFrame::xyz_image (Eye eye, int reduce) const
        case RIGHT:
                return decompress_j2k (const_cast<uint8_t*> (_buffer->Right.RoData()), _buffer->Right.Size(), reduce);
        }
-       
+
        return shared_ptr<OpenJPEGImage> ();
 }
 
index e10167aa8609ad046714fb78d95769ed15a50c64..5be764fe6ccc0b9f6d7f2f5e1a97f6f30468d297 100644 (file)
@@ -34,7 +34,7 @@ namespace dcp {
 
 class OpenJPEGImage;
 
-/** A single frame of a 3D (stereoscopic) picture asset */     
+/** A single frame of a 3D (stereoscopic) picture asset */
 class StereoPictureFrame : public boost::noncopyable
 {
 public:
@@ -47,7 +47,7 @@ public:
        uint8_t const * left_j2k_data () const;
        uint8_t* left_j2k_data ();
        int left_j2k_size () const;
-       
+
        uint8_t const * right_j2k_data () const;
        uint8_t* right_j2k_data ();
        int right_j2k_size () const;
index 92da00bf44d08b1e45dc3bc4da099e0223ab5581..8d492727c720b3dc6bd788c177d3cae8834cf4b2 100644 (file)
@@ -83,10 +83,10 @@ SubtitleAsset::examine_font_nodes (
                        examine_font_nodes (xml, (*j)->font_nodes, parse_state);
                        parse_state.subtitle_nodes.pop_back ();
                }
-       
+
                examine_font_nodes (xml, (*i)->font_nodes, parse_state);
                examine_text_nodes (xml, (*i)->text_nodes, parse_state);
-               
+
                parse_state.font_nodes.pop_back ();
        }
 }
@@ -112,14 +112,14 @@ SubtitleAsset::maybe_add_subtitle (string text, ParseState const & parse_state)
        if (empty_or_white_space (text)) {
                return;
        }
-       
+
        if (parse_state.text_nodes.empty() || parse_state.subtitle_nodes.empty ()) {
                return;
        }
 
        DCP_ASSERT (!parse_state.text_nodes.empty ());
        DCP_ASSERT (!parse_state.subtitle_nodes.empty ());
-       
+
        dcp::FontNode effective_font (parse_state.font_nodes);
        dcp::TextNode effective_text (*parse_state.text_nodes.back ());
        dcp::SubtitleNode effective_subtitle (*parse_state.subtitle_nodes.back ());
@@ -184,7 +184,7 @@ SubtitleAsset::equals (shared_ptr<const Asset> other_asset, EqualityOptions opti
        if (!Asset::equals (other_asset, options, note)) {
                return false;
        }
-       
+
        shared_ptr<const SubtitleAsset> other = dynamic_pointer_cast<const SubtitleAsset> (other_asset);
        if (!other) {
                return false;
@@ -302,7 +302,7 @@ SubtitleAsset::subtitles_as_xml (xmlpp::Element* root, int time_code_rate, strin
                if (i->h_position() > ALIGN_EPSILON) {
                        text->set_attribute ("HPosition", raw_convert<string> (i->h_position() * 100, 6));
                }
-               text->set_attribute ("VAlign", valign_to_string (i->v_align()));                
+               text->set_attribute ("VAlign", valign_to_string (i->v_align()));
                text->set_attribute ("VPosition", raw_convert<string> (i->v_position() * 100, 6));
                text->add_child_text (i->text());
        }
@@ -320,7 +320,7 @@ SubtitleAsset::add_font_data (string id, boost::filesystem::path file)
        shared_array<uint8_t> data (new uint8_t[size]);
        size_t const read = fread (data.get(), 1, size, f);
        fclose (f);
-       
+
        if (read != size) {
                throw FileError ("could not read font file", file, -1);
        }
index c28f64462589683e07052722cccebfbda07de3e8..cc27f958edee5b28303973c0caf65858282c9be5 100644 (file)
@@ -37,7 +37,7 @@ struct smpte_dcp_font_test;
 namespace dcp
 {
 
-class SubtitleString;  
+class SubtitleString;
 class FontNode;
 class TextNode;
 class SubtitleNode;
@@ -82,7 +82,7 @@ public:
 protected:
        friend struct ::interop_dcp_font_test;
        friend struct ::smpte_dcp_font_test;
-       
+
        void parse_subtitles (boost::shared_ptr<cxml::Document> xml, std::list<boost::shared_ptr<FontNode> > font_nodes);
        void subtitles_as_xml (xmlpp::Element* root, int time_code_rate, std::string xmlns) const;
        void add_font_data (std::string id, boost::filesystem::path file);
@@ -93,11 +93,11 @@ protected:
        class FileData : public Data {
        public:
                FileData () {}
-               
+
                FileData (boost::shared_array<uint8_t> data_, boost::uintmax_t size_)
                        : Data (data_, size_)
                {}
-               
+
                /** .ttf file that this data was last written to */
                mutable boost::optional<boost::filesystem::path> file;
        };
@@ -107,7 +107,7 @@ protected:
         *  For SMPTE, the string is the font's URN from the subtitle file.
         */
        std::map<std::string, FileData> _fonts;
-       
+
 private:
        /** @struct ParseState
         *  @brief  A struct to hold state when parsing a subtitle XML file.
@@ -119,13 +119,13 @@ private:
        };
 
        void maybe_add_subtitle (std::string text, ParseState const & parse_state);
-       
+
        void examine_font_nodes (
                boost::shared_ptr<const cxml::Node> xml,
                std::list<boost::shared_ptr<FontNode> > const & font_nodes,
                ParseState& parse_state
                );
-       
+
        void examine_text_nodes (
                boost::shared_ptr<const cxml::Node> xml,
                std::list<boost::shared_ptr<TextNode> > const & text_nodes,
index 574763306c9c5b845e6ab91eb021dac0f9aeffd2..f53878b6453e565fe04d3de21b454317dbdcff80 100644 (file)
@@ -45,7 +45,7 @@ SubtitleNode::SubtitleNode (boost::shared_ptr<const cxml::Node> node, int tcr)
        for (list<cxml::NodePtr>::iterator i = t.begin(); i != t.end(); ++i) {
                text_nodes.push_back (shared_ptr<TextNode> (new TextNode (*i, tcr)));
        }
-       
+
        fade_up_time = fade_time (node, "FadeUpTime", tcr);
        fade_down_time = fade_time (node, "FadeDownTime", tcr);
 }
@@ -55,7 +55,7 @@ SubtitleNode::fade_time (shared_ptr<const cxml::Node> node, string name, int tcr
 {
        string const u = node->optional_string_attribute (name).get_value_or ("");
        Time t;
-       
+
        if (u.empty ()) {
                t = Time (0, 0, 0, 20, 250);
        } else if (u.find (":") != string::npos) {
index d615557a6b1b334333719cddd1eaf82540a53cd2..401897042508ad59dedf6fd6859131389a936590 100644 (file)
@@ -31,7 +31,7 @@ namespace cxml {
 
 namespace dcp {
 
-class FontNode;        
+class FontNode;
 class TextNode;
 
 class SubtitleNode
index cf0ddf41623b4ac4277a6b019f8419ad96d998d7..d565d453ae2eb91f4d3ffbe90aa50898e2b29b16 100644 (file)
@@ -72,7 +72,7 @@ SubtitleString::size_in_pixels (int screen_height) const
           height is 11 inches, so a 72pt font would be 1/11th of the screen
           height.
        */
-       
+
        return _size * screen_height / (11 * 72);
 }
 
@@ -111,7 +111,7 @@ dcp::operator<< (ostream& s, SubtitleString const & sub)
        } else {
                s << "non-italic";
        }
-       
+
        s << ", size " << sub.size() << ", aspect " << sub.aspect_adjust() << ", colour " << sub.colour()
          << ", vpos " << sub.v_position() << ", valign " << ((int) sub.v_align())
          << ", hpos " << sub.h_position() << ", halign " << ((int) sub.h_align())
index 20cc1fe3fb0f2716fcfabbc0d06b9ceeed04cc7a..2dfdbe0a04b20358ffb1048493df748917e84487 100644 (file)
@@ -158,7 +158,7 @@ private:
        Colour _colour;
        /** Size in points as if the screen height is 11 inches, so a 72pt font
         *  would be 1/11th of the screen height.
-        */ 
+        */
        int _size;
        float _aspect_adjust;
        Time _in;
index 6332e1f5af3e46547813e72ec4eccf31927707a5..666e58460c52970e4576efcafd2054305686792e 100644 (file)
@@ -52,7 +52,7 @@ TextNode::TextNode (boost::shared_ptr<const cxml::Node> node, int tcr)
        if (hp) {
                h_position = hp.get () / 100;
        }
-       
+
        optional<string> ha = node->optional_string_attribute ("HAlign");
        if (!ha) {
                ha = node->optional_string_attribute ("Halign");
@@ -60,7 +60,7 @@ TextNode::TextNode (boost::shared_ptr<const cxml::Node> node, int tcr)
        if (ha) {
                h_align = string_to_halign (ha.get ());
        }
-       
+
        optional<float> vp = node->optional_number_attribute<float> ("VPosition");
        if (!vp) {
                vp = node->optional_number_attribute<float> ("Vposition");
@@ -68,7 +68,7 @@ TextNode::TextNode (boost::shared_ptr<const cxml::Node> node, int tcr)
        if (vp) {
                v_position = vp.get () / 100;
        }
-       
+
        optional<string> va = node->optional_string_attribute ("VAlign");
        if (!va) {
                va = node->optional_string_attribute ("Valign");
index 7cd73bb9acaf7ee0a54d7772d20aee946f645ac2..1affd83f22e2ff94a4e6bbd6cdf86ff898147803 100644 (file)
@@ -47,7 +47,7 @@ public:
                , v_position (0)
                , v_align (VALIGN_TOP)
        {}
-       
+
        TextNode (boost::shared_ptr<const cxml::Node> node, int tcr);
 
        float h_position;
index bf9b0f2bdb061f18dc5ac530558a04b1fa0de2b0..bdd7ae9f6d1753bbc914e818b9805024f116c356 100644 (file)
@@ -42,7 +42,7 @@ double const *
 TransferFunction::lut (int bit_depth, bool inverse) const
 {
        boost::mutex::scoped_lock lm (_mutex);
-       
+
        map<pair<int, bool>, double*>::const_iterator i = _luts.find (make_pair (bit_depth, inverse));
        if (i != _luts.end ()) {
                return i->second;
index f32d90bdd73b9cae51550797b2b645cdf7ac801d..687e90f81fa21f3b9d56195e892bd63fbe4bd6fb 100644 (file)
@@ -200,7 +200,7 @@ dcp::string_to_halign (string s)
        } else if (s == "right") {
                return HALIGN_RIGHT;
        }
-       
+
        boost::throw_exception (DCPReadError ("unknown subtitle halign type"));
 }
 
@@ -229,6 +229,6 @@ dcp::string_to_valign (string s)
        } else if (s == "bottom") {
                return VALIGN_BOTTOM;
        }
-       
+
        boost::throw_exception (DCPReadError ("unknown subtitle valign type"));
 }
index bfcc5a3f6e4fb0ce63b8730c64fa36abd92fb7b9..1cd116c99633cd71ac2eae45e0caa63bdf01857b 100644 (file)
@@ -49,7 +49,7 @@ struct Size
        float ratio () const {
                return float (width) / height;
        }
-       
+
        int width;
        int height;
 };
@@ -147,7 +147,7 @@ public:
 
 extern bool operator== (Fraction const & a, Fraction const & b);
 extern bool operator!= (Fraction const & a, Fraction const & b);
-extern std::ostream& operator<< (std::ostream& s, Fraction const & f); 
+extern std::ostream& operator<< (std::ostream& s, Fraction const & f);
 
 /** @struct EqualityOptions
  *  @brief  A class to describe what "equality" means for a particular test.
@@ -158,7 +158,7 @@ extern std::ostream& operator<< (std::ostream& s, Fraction const & f);
 struct EqualityOptions
 {
        /** Construct an EqualityOptions where nothing at all can differ */
-       EqualityOptions () 
+       EqualityOptions ()
                : max_mean_pixel_error (0)
                , max_std_dev_pixel_error (0)
                , max_audio_sample_error (0)
index cfaeafbef8e6b6bacc337fd927d2d225d063fa89..139118ca427e660a2d4c35b4ecc98ca0d7f0e6dd 100644 (file)
@@ -89,7 +89,7 @@ dcp::make_digest (boost::filesystem::path filename, function<void (float)> progr
        if (ASDCP_FAILURE (r)) {
                boost::throw_exception (FileError ("could not open file to compute digest", filename, r));
        }
-       
+
        SHA_CTX sha;
        SHA1_Init (&sha);
 
@@ -101,13 +101,13 @@ dcp::make_digest (boost::filesystem::path filename, function<void (float)> progr
        while (1) {
                ui32_t read = 0;
                Kumu::Result_t r = reader.Read (read_buffer.Data(), read_buffer.Capacity(), &read);
-               
+
                if (r == Kumu::RESULT_ENDOFFILE) {
                        break;
                } else if (ASDCP_FAILURE (r)) {
                        boost::throw_exception (FileError ("could not read file to compute digest", filename, r));
                }
-               
+
                SHA1_Update (&sha, read_buffer.Data(), read);
 
                if (progress) {
@@ -166,7 +166,7 @@ dcp::ContentKind
 dcp::content_kind_from_string (string kind)
 {
        transform (kind.begin(), kind.end(), kind.begin(), ::tolower);
-       
+
        if (kind == "feature") {
                return FEATURE;
        } else if (kind == "short") {
@@ -214,12 +214,12 @@ dcp::decompress_j2k (uint8_t* data, int64_t size, int reduce)
                0x20,
                0x20
        };
-       
+
        OPJ_CODEC_FORMAT format = CODEC_J2K;
        if (size >= int (sizeof (jp2_magic)) && memcmp (data, jp2_magic, sizeof (jp2_magic)) == 0) {
                format = CODEC_JP2;
        }
-       
+
        opj_dinfo_t* decoder = opj_create_decompress (format);
        if (!decoder) {
                boost::throw_exception (DCPReadError ("could not create JPEG2000 decompresser"));
@@ -280,7 +280,7 @@ dcp::init ()
        if (xmlSecCryptoDLLoadLibrary(BAD_CAST XMLSEC_CRYPTO) < 0) {
                throw MiscError ("unable to load default xmlsec-crypto library");
        }
-#endif 
+#endif
 
        if (xmlSecCryptoAppInit(0) < 0) {
                throw MiscError ("could not initialise crypto");
@@ -332,7 +332,7 @@ dcp::base64_decode (string const & in, unsigned char* out, int out_length)
                        *p++ = in[i];
                }
        }
-               
+
        BIO* bmem = BIO_new_mem_buf (in_buffer, p - in_buffer);
        bmem = BIO_push (b64, bmem);
        int const N = BIO_read (bmem, out, out_length);
@@ -401,9 +401,9 @@ dcp::file_to_string (boost::filesystem::path p, uintmax_t max_length)
        if (len > max_length) {
                throw MiscError ("Unexpectedly long file");
        }
-       
+
        char* c = new char[len + 1];
-                          
+
        FILE* f = fopen_boost (p, "r");
        if (!f) {
                return "";
index 52a5dcde87e1ba24a030ced1a87a8dfaf93c0de7..97ef2c55cd0c12780089abbda82747c9e4ce48da 100644 (file)
@@ -44,7 +44,7 @@ class ARGBImage;
 class CertificateChain;
 class GammaLUT;
 class OpenJPEGImage;
-       
+
 extern bool operator== (Size const & a, Size const & b);
 extern bool operator!= (Size const & a, Size const & b);
 extern std::ostream& operator<< (std::ostream& s, Size const & a);
@@ -84,7 +84,7 @@ list_of_type (std::list<boost::shared_ptr<F> > const & from)
 
        return out;
 }
-       
+
 }
 
 #endif
index 9b6dc65ff633d423be9cd38f0ff3c5edc7c1ba80..bd5013821cdf742f09de56d51b8e7dbe68adbdc3 100644 (file)
@@ -4,5 +4,5 @@ namespace dcp {
 extern char const * version;
 extern char const * git_commit;
 extern bool built_with_debug;
-       
+
 }
index b89d8ccdfb7db41b28d6c72f638c4537a1ac7992..f21edb4cb1da539764b4764b045172d540329deb 100644 (file)
--- a/src/xml.h
+++ b/src/xml.h
@@ -44,7 +44,7 @@ template <class T>
 boost::shared_ptr<T> type_child (boost::shared_ptr<const cxml::Node> node, std::string name) {
        return boost::shared_ptr<T> (new T (node->node_child (name)));
 }
-       
+
 template <class T>
 boost::shared_ptr<T>
 optional_type_child (boost::shared_ptr<const cxml::Node> node, std::string name)
@@ -70,7 +70,7 @@ type_children (boost::shared_ptr<const cxml::Node> node, std::string name)
 {
        return type_children<T> (*node.get(), name);
 }
-       
+
 template <class T>
 std::list<boost::shared_ptr<T> >
 type_grand_children (cxml::Node const & node, std::string name, std::string sub)
@@ -85,7 +85,7 @@ type_grand_children (boost::shared_ptr<const cxml::Node> node, std::string name,
 {
        return type_grand_children<T> (*node.get(), name, sub);
 }
-       
+
 }
 
 #endif
index 374dbc13413b787b7dd827f4ceab87c40533e1b6..d355ad5560b973d428f0d3a1bcf16ccab2b8f0a4 100644 (file)
@@ -41,7 +41,7 @@ BOOST_AUTO_TEST_CASE (certificates)
 
        /* Leaf */
        BOOST_CHECK_EQUAL (*i, c.leaf ());
-       
+
        BOOST_CHECK_EQUAL (
                c.leaf().issuer(),
                "dnQualifier=6eat8r33US71avuQEojmH\\+bjk84=,CN=.smpte-430-2.INTERMEDIATE.NOT_FOR_PRODUCTION,OU=example.org,O=example.org"
@@ -51,7 +51,7 @@ BOOST_AUTO_TEST_CASE (certificates)
                c.leaf().subject(),
                "dnQualifier=QFVlym7fuql6bPOnY38aaO1ZPW4=,CN=CS.smpte-430-2.LEAF.NOT_FOR_PRODUCTION,OU=example.org,O=example.org"
                );
-       
+
        ++i;
 
        /* Intermediate */
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE (certificates)
                i->subject(),
                "dnQualifier=6eat8r33US71avuQEojmH\\+bjk84=,CN=.smpte-430-2.INTERMEDIATE.NOT_FOR_PRODUCTION,OU=example.org,O=example.org"
                );
-       
+
        ++i;
 
        /* Root */
@@ -98,7 +98,7 @@ BOOST_AUTO_TEST_CASE (certificates_validation)
        dcp::CertificateChain good2;
        good2.add (dcp::Certificate (dcp::file_to_string ("test/ref/crypt/ca.self-signed.pem")));
        BOOST_CHECK (good2.valid ());
-       
+
        dcp::CertificateChain bad1;
        bad1.add (dcp::Certificate (dcp::file_to_string ("test/ref/crypt/intermediate.signed.pem")));
        bad1.add (dcp::Certificate (dcp::file_to_string ("test/ref/crypt/leaf.signed.pem")));
index cebe95ab45eb212c0935355a8883771964f972e9..7169c1771075995a3d555666e13e62619363c0c1 100644 (file)
@@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE (colour)
        BOOST_CHECK_EQUAL (z.g, 0);
        BOOST_CHECK_EQUAL (z.b, 0);
        BOOST_CHECK_EQUAL (z.to_argb_string(), "FF000000");
-       
+
        dcp::Colour c ("FFFF0000");
 
        BOOST_CHECK_EQUAL (c.r, 255);
index cafa589fe5e178b91e2e58099bb7a30f7f47fb57..92e38a00899f206eeeff3b4989ec478cc9009e61 100644 (file)
@@ -42,7 +42,7 @@ BOOST_AUTO_TEST_CASE (cpl_sar)
                xmlpp::Document doc;
                xmlpp::Element* el = doc.create_root_node ("Test");
                pa->write_to_cpl (el, dcp::INTEROP);
-               
+
                cxml::Node node (el);
                BOOST_CHECK_EQUAL (node.node_child("MainPicture")->string_child ("ScreenAspectRatio"), "1.85");
        }
@@ -52,7 +52,7 @@ BOOST_AUTO_TEST_CASE (cpl_sar)
                xmlpp::Document doc;
                xmlpp::Element* el = doc.create_root_node ("Test");
                pa->write_to_cpl (el, dcp::INTEROP);
-               
+
                cxml::Node node (el);
                BOOST_CHECK_EQUAL (node.node_child("MainPicture")->string_child ("ScreenAspectRatio"), "2.39");
        }
index 0338e1f808de947845de8a1f8b2697cd6497dec5..4a6cb42981bba0cc5b8355697ee1f1d24844010a 100644 (file)
@@ -89,9 +89,9 @@ BOOST_AUTO_TEST_CASE (dcp_test1)
                        break;
                }
        }
-       
+
        sound_writer->finalize ();
-       
+
        cpl->add (shared_ptr<dcp::Reel> (
                          new dcp::Reel (
                                  shared_ptr<dcp::ReelMonoPictureAsset> (new dcp::ReelMonoPictureAsset (mp, 0)),
@@ -99,7 +99,7 @@ BOOST_AUTO_TEST_CASE (dcp_test1)
                                  shared_ptr<dcp::ReelSubtitleAsset> ()
                                  )
                          ));
-                 
+
        d.add (cpl);
 
        d.write_xml (dcp::SMPTE, xml_meta);
@@ -161,9 +161,9 @@ BOOST_AUTO_TEST_CASE (dcp_test2)
                        break;
                }
        }
-       
+
        sound_writer->finalize ();
-       
+
        cpl->add (shared_ptr<dcp::Reel> (
                          new dcp::Reel (
                                  shared_ptr<dcp::ReelStereoPictureAsset> (new dcp::ReelStereoPictureAsset (mp, 0)),
@@ -171,7 +171,7 @@ BOOST_AUTO_TEST_CASE (dcp_test2)
                                  shared_ptr<dcp::ReelSubtitleAsset> ()
                                  )
                          ));
-                 
+
        d.add (cpl);
 
        d.write_xml (dcp::SMPTE, xml_meta);
@@ -192,7 +192,7 @@ BOOST_AUTO_TEST_CASE (dcp_test3)
        A.read ();
        dcp::DCP B ("test/ref/DCP/dcp_test1");
        B.read ();
-       
+
        BOOST_CHECK (A.equals (B, dcp::EqualityOptions(), boost::bind (&note, _1, _2)));
 }
 
@@ -203,7 +203,7 @@ BOOST_AUTO_TEST_CASE (dcp_test4)
        A.read ();
        dcp::DCP B ("test/ref/DCP/dcp_test2");
        B.read ();
-       
+
        BOOST_CHECK (!A.equals (B, dcp::EqualityOptions(), boost::bind (&note, _1, _2)));
 }
 
index 16b2c469a8f85721b8cdd478ba6ccd763f9f985a..2f0bb420610ff4d8170d85d7f6dbf2d930a6dbf1 100644 (file)
@@ -75,7 +75,7 @@ BOOST_AUTO_TEST_CASE (decryption_test)
                        ),
                dcp::file_to_string ("test/data/private.key")
                );
-       
+
        encrypted.add (kdm);
 
        pair<uint8_t *, dcp::Size> plaintext_frame = get_frame (plaintext);
@@ -84,7 +84,7 @@ BOOST_AUTO_TEST_CASE (decryption_test)
        /* Check that plaintext and encrypted are the same */
 
        BOOST_CHECK_EQUAL (plaintext_frame.second, encrypted_frame.second);
-       
+
        BOOST_CHECK_EQUAL (
                memcmp (
                        plaintext_frame.first,
index 10ba13a9fc1f4fbd36c7bd1d9cd83c0487c01461..c176f208da2272550d2415c888d56223dda481a7 100644 (file)
@@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE (encryption_test)
 {
        boost::filesystem::remove_all ("build/test/signer");
        boost::filesystem::create_directory ("build/test/signer");
-       
+
        Kumu::libdcp_test = true;
 
        dcp::MXFMetadata mxf_metadata;
@@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE (encryption_test)
        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/encryption_test");
        boost::filesystem::create_directories ("build/test/DCP/encryption_test");
        dcp::DCP d ("build/test/DCP/encryption_test");
@@ -81,7 +81,7 @@ BOOST_AUTO_TEST_CASE (encryption_test)
        shared_ptr<dcp::CPL> cpl (new dcp::CPL ("A Test DCP", dcp::FEATURE));
 
        dcp::Key key;
-       
+
        shared_ptr<dcp::MonoPictureAsset> mp (new dcp::MonoPictureAsset (dcp::Fraction (24, 1)));
        mp->set_metadata (mxf_metadata);
        mp->set_key (key);
@@ -97,7 +97,7 @@ BOOST_AUTO_TEST_CASE (encryption_test)
        ms->set_metadata (mxf_metadata);
        ms->set_key (key);
        shared_ptr<dcp::SoundAssetWriter> sound_writer = ms->start_write ("build/test/DCP/encryption_test/audio.mxf", dcp::SMPTE);
-       
+
        SF_INFO info;
        info.format = 0;
        SNDFILE* sndfile = sf_open ("test/data/1s_24-bit_48k_silence.wav", SFM_READ, &info);
@@ -112,8 +112,8 @@ BOOST_AUTO_TEST_CASE (encryption_test)
                        break;
                }
        }
-       
-       sound_writer->finalize ();      
+
+       sound_writer->finalize ();
 
        cpl->add (shared_ptr<dcp::Reel> (new dcp::Reel (
                                                 shared_ptr<dcp::ReelMonoPictureAsset> (new dcp::ReelMonoPictureAsset (mp, 0)),
@@ -123,7 +123,7 @@ BOOST_AUTO_TEST_CASE (encryption_test)
        cpl->set_content_version_id ("urn:uri:81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00");
        cpl->set_content_version_label_text ("81fb54df-e1bf-4647-8788-ea7ba154375b_2012-07-17T04:45:18+00:00");
        cpl->set_metadata (xml_metadata);
-       
+
        d.add (cpl);
 
        d.write_xml (dcp::SMPTE, xml_metadata, signer);
@@ -139,18 +139,18 @@ BOOST_AUTO_TEST_CASE (encryption_test)
                );
 
        kdm.encrypt (signer, signer->certificates().leaf(), dcp::MODIFIED_TRANSITIONAL_1).as_xml ("build/test/encryption_test.kdm.xml");
-       
+
        int r = system (
                "xmllint --path schema --nonet --noout --schema schema/SMPTE-430-1-2006-Amd-1-2009-KDM.xsd build/test/encryption_test.kdm.xml "
                "> build/test/xmllint.log 2>&1 < /dev/null"
                );
 
-#ifdef LIBDCP_POSIX    
+#ifdef LIBDCP_POSIX
        BOOST_CHECK_EQUAL (WEXITSTATUS (r), 0);
 #else
        BOOST_CHECK_EQUAL (r, 0);
-#endif 
-               
+#endif
+
        r = system ("xmlsec1 verify "
                "--pubkey-cert-pem test/ref/crypt/leaf.signed.pem "
                "--trusted-pem test/ref/crypt/intermediate.signed.pem "
@@ -158,10 +158,10 @@ BOOST_AUTO_TEST_CASE (encryption_test)
                "--id-attr:Id http://www.smpte-ra.org/schemas/430-3/2006/ETM:AuthenticatedPublic "
                "--id-attr:Id http://www.smpte-ra.org/schemas/430-3/2006/ETM:AuthenticatedPrivate "
                    "build/test/encryption_test.kdm.xml > build/test/xmlsec1.log 2>&1 < /dev/null");
-       
-#ifdef LIBDCP_POSIX    
+
+#ifdef LIBDCP_POSIX
        BOOST_CHECK_EQUAL (WEXITSTATUS (r), 0);
 #else
        BOOST_CHECK_EQUAL (r, 0);
-#endif 
+#endif
 }
index 4051a44ada972639bddb78883903cd37a9705b15..d6d4a2b6bee1491bbd96d2a8f06072c8944d3254 100644 (file)
@@ -38,7 +38,7 @@ BOOST_AUTO_TEST_CASE (kdm_test)
                );
 
        list<dcp::DecryptedKDMKey> keys = kdm.keys ();
-       
+
        BOOST_CHECK_EQUAL (keys.size(), 2);
 
        BOOST_CHECK_EQUAL (keys.front().cpl_id(), "eece17de-77e8-4a55-9347-b6bab5724b9f");
@@ -66,9 +66,9 @@ BOOST_AUTO_TEST_CASE (kdm_passthrough_test)
                "xmldiff -c test/data/kdm_TONEPLATES-SMPTE-ENC_.smpte-430-2.ROOT.NOT_FOR_PRODUCTION_20130706_20230702_CAR_OV_t1_8971c838.xml build/kdm.xml"
                );
 
-#ifdef LIBDCP_WINDOWS  
+#ifdef LIBDCP_WINDOWS
        BOOST_CHECK_EQUAL (r, 0);
-#else  
+#else
        BOOST_CHECK_EQUAL (WEXITSTATUS (r), 0);
-#endif 
+#endif
 }
index 9c682a74263df0e3457a6aefe8c88c317c0c3f18..4cd7915811417ff747ba261210611a95433505f1 100644 (file)
@@ -33,7 +33,7 @@ BOOST_AUTO_TEST_CASE (local_time_test)
        BOOST_CHECK_THROW (dcp::LocalTime ("2013!01-05T18:06:59+04:00"), dcp::TimeFormatError);
 
        /* Correctly-formatted */
-       
+
        {
                dcp::LocalTime t ("2013-01-05T18:06:59+04:00");
                BOOST_CHECK_EQUAL (t._year, 2013);
index b268d629b026cf039169c5e97df0e1daf22c45aa..aa1baeee63ab87c65d580d2c611895c90565147d 100644 (file)
@@ -64,7 +64,7 @@ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1)
                                   dcp::Time (0, 0, 0, 1, 250),
                                   dcp::Time (0, 0, 0, 1, 250)
                                   ));
-                                                        
+
        s = subs.subtitles_during (dcp::Time (0, 0, 7, 190, 250), dcp::Time (0, 0, 7, 191, 250));
        BOOST_REQUIRE_EQUAL (s.size(), 2);
        BOOST_CHECK_EQUAL (s.front(), dcp::SubtitleString (
index 566bbf21d66e1841ec413e3eed8a9692988caa40..cd7d3d921f3f8903ca00eba394f8b625b8ca4035 100644 (file)
@@ -44,8 +44,8 @@ BOOST_AUTO_TEST_CASE (recovery)
 #ifdef LIBDCP_POSIX
        /* XXX: fix this posix-only stuff */
        Kumu::ResetTestRNG ();
-#endif 
-       
+#endif
+
        boost::filesystem::remove_all ("build/test/baz");
        boost::filesystem::create_directories ("build/test/baz");
        shared_ptr<dcp::MonoPictureAsset> mp (new dcp::MonoPictureAsset (dcp::Fraction (24, 1)));
@@ -72,9 +72,9 @@ BOOST_AUTO_TEST_CASE (recovery)
                fclose (f);
        }
 
-#ifdef LIBDCP_POSIX    
+#ifdef LIBDCP_POSIX
        Kumu::ResetTestRNG ();
-#endif 
+#endif
 
        mp.reset (new dcp::MonoPictureAsset (dcp::Fraction (24, 1)));
        writer = mp->start_write ("build/test/baz/video2.mxf", dcp::SMPTE, true);
@@ -88,6 +88,6 @@ BOOST_AUTO_TEST_CASE (recovery)
        for (int i = 4; i < 24; ++i) {
                writer->write (data, size);
        }
-       
+
        writer->finalize ();
 }
index 6aa259a9989fb86b0115a3b9bc5fd169b432e42c..4cfc0c6284d64f42b35f3f4abeafafe0031d24b4 100644 (file)
@@ -41,16 +41,16 @@ main (int argc, char* argv[])
                        cerr << "Syntax: " << argv[0] << " <dcp>\n";
                        exit (EXIT_FAILURE);
                }
-               
+
                DCP* dcp = new DCP (argv[1]);
                dcp->read (true);
-               
+
                list<shared_ptr<CPL> > cpls = dcp->cpls ();
                for (list<boost::shared_ptr<CPL> >::iterator i = cpls.begin(); i != cpls.end(); ++i) {
-                       
+
                        list<shared_ptr<Reel> > reels = (*i)->reels ();
                        for (list<shared_ptr<Reel> >::iterator j = reels.begin(); j != reels.end(); ++j) {
-                               
+
                                if ((*j)->main_subtitle()) {
                                        (*j)->main_subtitle()->subtitle_asset()->write ((*j)->main_subtitle()->subtitle_asset()->file ());
                                }
@@ -68,6 +68,6 @@ main (int argc, char* argv[])
                cerr << e.what() << " when reading " << argv[1] << "\n";
                exit (EXIT_FAILURE);
        }
-       
+
        return 0;
 }
index ca1378c8484b1fcf45ff9ce74d594605bd30423f..c08d4979f77a505cefb2c24df6fd5ce1ec9eae53 100644 (file)
@@ -118,7 +118,7 @@ note_handler (dcp::NoteType n, string s)
 BOOST_AUTO_TEST_CASE (xyz_rgb_range_test)
 {
        shared_ptr<dcp::OpenJPEGImage> xyz (new dcp::OpenJPEGImage (dcp::Size (2, 2)));
-       
+
        xyz->data(0)[0] = -4;
        xyz->data(0)[1] = 6901;
        xyz->data(0)[2] = 0;
@@ -185,12 +185,12 @@ BOOST_AUTO_TEST_CASE (rgb_xyz_round_trip_test)
        scoped_array<uint8_t> back (new uint8_t[size.width * size.height * 6]);
        dcp::xyz_to_rgb (xyz, dcp::ColourConversion::srgb_to_xyz (), back.get(), size.width * 6);
 
-#if 0  
+#if 0
        uint16_t* p = reinterpret_cast<uint16_t*> (rgb.get ());
        uint16_t* q = reinterpret_cast<uint16_t*> (back.get ());
        for (int i = 0; i < (size.width * size.height); ++i) {
                /* XXX: doesn't quite work */
                // BOOST_REQUIRE_EQUAL (*p++, *q++);
        }
-#endif         
+#endif
 }
index 2d10764a38e595e93520e774902f1c3310c6037a..90671d79fd3750276b0decaecbff5759b0e19d2e 100644 (file)
@@ -111,7 +111,7 @@ BOOST_AUTO_TEST_CASE (round_trip_test)
 
        scoped_array<uint8_t> frame_A (new uint8_t[xyz_A->size().width * xyz_A->size().height * 4]);
        dcp::xyz_to_rgba (xyz_A, dcp::ColourConversion::srgb_to_xyz(), frame_A.get());
-       
+
        scoped_array<uint8_t> frame_B (new uint8_t[xyz_B->size().width * xyz_B->size().height * 4]);
        dcp::xyz_to_rgba (xyz_B, dcp::ColourConversion::srgb_to_xyz(), frame_B.get());
 
index c83c1048712176ba71afcf2d05850f1a8bc659ce..38e9c00ebbcc0623d013cdcc0d1b111c5e1885d7 100644 (file)
@@ -118,14 +118,14 @@ check_file (boost::filesystem::path ref, boost::filesystem::path check)
        BOOST_CHECK (ref_file);
        FILE* check_file = dcp::fopen_boost (check, "rb");
        BOOST_CHECK (check_file);
-       
+
        int const buffer_size = 65536;
        uint8_t* ref_buffer = new uint8_t[buffer_size];
        uint8_t* check_buffer = new uint8_t[buffer_size];
 
        stringstream error;
        error << "File " << check.string() << " differs from reference " << ref.string();
-       
+
        while (N) {
                uintmax_t this_time = min (uintmax_t (buffer_size), N);
                size_t r = fread (ref_buffer, 1, this_time, ref_file);
@@ -137,7 +137,7 @@ check_file (boost::filesystem::path ref, boost::filesystem::path check)
                if (memcmp (ref_buffer, check_buffer, this_time)) {
                        break;
                }
-               
+
                N -= this_time;
        }
 
index d7c41a6ae30dd0bde1522b5af37cc30d64593f46..eea1c799ba731b6816f544feaf64e055dbb949ba 100644 (file)
@@ -28,7 +28,7 @@ using std::string;
 BOOST_AUTO_TEST_CASE (base64_decode_test)
 {
        int const N = 256;
-       
+
        ifstream f ("test/data/base64_test");
        BOOST_CHECK (f.good ());
        string s;
@@ -79,11 +79,11 @@ BOOST_AUTO_TEST_CASE (relative_to_root_test)
        {
                boost::filesystem::path root = "a";
                root /= "b";
-               
+
                boost::filesystem::path file = "a";
                file /= "b";
                file /= "c";
-               
+
                boost::optional<boost::filesystem::path> rel = dcp::relative_to_root (root, file);
                BOOST_CHECK (rel);
                BOOST_CHECK_EQUAL (rel.get(), boost::filesystem::path ("c"));
@@ -93,21 +93,21 @@ BOOST_AUTO_TEST_CASE (relative_to_root_test)
                boost::filesystem::path root = "a";
                root /= "b";
                root /= "c";
-               
+
                boost::filesystem::path file = "a";
                file /= "b";
-               
+
                boost::optional<boost::filesystem::path> rel = dcp::relative_to_root (root, file);
                BOOST_CHECK (!rel);
        }
 
        {
                boost::filesystem::path root = "a";
-               
+
                boost::filesystem::path file = "a";
                file /= "b";
                file /= "c";
-               
+
                boost::optional<boost::filesystem::path> rel = dcp::relative_to_root (root, file);
                BOOST_CHECK (rel);
 
index 577eadec551e36ca72a5530a26d07db8ad570ddc..d2402262a35b053b6d87a67b918ef2179ba7c40a 100644 (file)
@@ -75,7 +75,7 @@ BOOST_AUTO_TEST_CASE (write_subtitle_test)
                        dcp::Time (5, 6, 7, 8, 24)
                        )
                );
-       
+
        c._id = "a6c58cff-3e1e-4b38-acec-a42224475ef6";
 
        check_xml (
index 1c0c1df8f3ea505a87a022568d201d3552283ce9..5730848cc2b2252420e7f870ceee95d96025a25c 100644 (file)
@@ -31,7 +31,7 @@ dcp::filter_errors (dcp::DCP::ReadErrors& errors, bool ignore_missing_assets)
 
                DCP::ReadErrors::iterator tmp = i;
                ++tmp;
-               
+
                if (ignore_missing_assets && dynamic_pointer_cast<MissingAssetError> (*i)) {
                        errors.erase (i);
                }
index aee8d2f9bc62fa138d1b22d84c19d5af25216fa8..a820463f725e5e2aafd0e9a69e58aa790f28a2b4 100644 (file)
@@ -109,7 +109,7 @@ main (int argc, char* argv[])
        bool keep_going = false;
        bool ignore_missing_assets = false;
        optional<string> key;
-       
+
        int option_index = 0;
        while (1) {
                static struct option long_options[] = {
index 06802320e89d928def23168f5db7f6c3a4c7d488..8cc9c90e01da59205e07d0d7f8a1dba7373d7012 100644 (file)
@@ -41,7 +41,7 @@ int
 main (int argc, char* argv[])
 {
        bool extract_fonts = true;
-       
+
        int option_index = 0;
        while (1) {
                static struct option long_options[] = {
index 32920be24f566bfaf98c264fc7d4b5a794e6c05d..bd74387b35f1272a72aad745243591bb1f448bc4 100644 (file)
@@ -82,7 +82,7 @@ main_subtitle (shared_ptr<Reel> reel, bool list_subtitles)
        if (!reel->main_subtitle()) {
                return;
        }
-       
+
        list<SubtitleString> subs = reel->main_subtitle()->subtitle_asset()->subtitles ();
        cout << "      Subtitle: " << subs.size() << " subtitles";
        shared_ptr<InteropSubtitleAsset> iop = dynamic_pointer_cast<InteropSubtitleAsset> (reel->main_subtitle()->subtitle_asset());
@@ -106,7 +106,7 @@ main (int argc, char* argv[])
        bool subtitles = false;
        bool keep_going = false;
        bool ignore_missing_assets = false;
-       
+
        int option_index = 0;
        while (1) {
                static struct option long_options[] = {
@@ -165,7 +165,7 @@ main (int argc, char* argv[])
                cerr << "Could not read DCP " << argv[optind] << "; " << e.what() << "\n";
                exit (EXIT_FAILURE);
        }
-       
+
        cout << "DCP: " << boost::filesystem::path(argv[optind]).filename().string() << "\n";
 
        dcp::filter_errors (errors, ignore_missing_assets);
@@ -177,7 +177,7 @@ main (int argc, char* argv[])
 
        for (list<shared_ptr<CPL> >::iterator i = cpls.begin(); i != cpls.end(); ++i) {
                cout << "  CPL: " << (*i)->annotation_text() << "\n";
-               
+
                list<shared_ptr<Reel> > reels = (*i)->reels ();
 
                int R = 1;