diff options
| author | Carl Hetherington <cth@carlh.net> | 2020-12-20 14:14:07 +0100 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2021-01-08 00:35:29 +0100 |
| commit | d39880eef211a296fa8ef4712cdef5945d08527c (patch) | |
| tree | 45dce8f3e1fd599ca76677e31eee2a71c9a4fbc1 | |
| parent | 75faebaf1d74e2b52360905e94e9f5bf31c34124 (diff) | |
std::shared_ptr
148 files changed, 392 insertions, 409 deletions
diff --git a/benchmark/j2k_transcode.cc b/benchmark/j2k_transcode.cc index cd1bd52a..a5984a0d 100644 --- a/benchmark/j2k_transcode.cc +++ b/benchmark/j2k_transcode.cc @@ -43,7 +43,7 @@ using std::cout; using std::cerr; -using boost::shared_ptr; +using std::shared_ptr; class Timer { diff --git a/benchmark/rgb_to_xyz.cc b/benchmark/rgb_to_xyz.cc index 7b4400ec..8c06388f 100644 --- a/benchmark/rgb_to_xyz.cc +++ b/benchmark/rgb_to_xyz.cc @@ -38,7 +38,7 @@ #include <stdint.h> using boost::scoped_array; -using boost::shared_ptr; +using std::shared_ptr; int const trials = 256; @@ -34,10 +34,10 @@ import os import shutil -option_defaults = { 'force-cpp11': False, 'jpeg': 'oj2' } +option_defaults = { 'jpeg': 'oj2' } def dependencies(target, options): - libcxml = ('libcxml', 'c333199', {'force-cpp11': options['force-cpp11']}) + libcxml = ('libcxml', 'c336f86') if (target.platform == 'windows' and target.version == 'xp') or options['jpeg'] == 'oj1': return (libcxml, ('openjpeg', 'f166257'), ('asdcplib', 'carl')) else: @@ -60,20 +60,6 @@ def build(target, options): if target.debug: cmd += ' --enable-debug' - # Centos 7 ships with glibmm 2.50.0 which requires C++11 - # but its compiler (gcc 4.8.5) defaults to C++97. Go figure. - # I worry that this will cause ABI problems but I don't have - # a better solution. Mageia 6 pulls the same stunt except it's - # libxml++ that requires C++11 - force_cpp11 = False - if target.platform == 'linux': - if target.distro == 'centos' and target.version == '7': - force_cpp11 = True - if target.distro == 'mageia' and target.version == '6': - force_cpp11 = True - if force_cpp11 or options['force-cpp11']: - cmd += ' --force-cpp11' - target.command(cmd) target.command('./waf build install') diff --git a/examples/make_dcp.cc b/examples/make_dcp.cc index 734ae880..1705589d 100644 --- a/examples/make_dcp.cc +++ b/examples/make_dcp.cc @@ -54,10 +54,10 @@ main () per second. */ - boost::shared_ptr<dcp::MonoPictureAsset> picture_asset (new dcp::MonoPictureAsset (dcp::Fraction (24, 1), dcp::SMPTE)); + std::shared_ptr<dcp::MonoPictureAsset> picture_asset (new dcp::MonoPictureAsset (dcp::Fraction (24, 1), dcp::SMPTE)); /* Start off a write to it */ - boost::shared_ptr<dcp::PictureAssetWriter> picture_writer = picture_asset->start_write ("DCP/picture.mxf", false); + std::shared_ptr<dcp::PictureAssetWriter> picture_writer = picture_asset->start_write ("DCP/picture.mxf", false); /* Write 24 frames of the same JPEG2000 file */ dcp::File picture ("examples/help.j2c"); @@ -71,12 +71,12 @@ main () /* Now create a sound MXF. As before, create an object and a writer. When creating the object we specify the sampling rate (48kHz) and the number of channels (2). */ - boost::shared_ptr<dcp::SoundAsset> sound_asset (new dcp::SoundAsset(dcp::Fraction(24, 1), 48000, 2, dcp::LanguageTag("en-GB"), dcp::SMPTE)); + std::shared_ptr<dcp::SoundAsset> sound_asset (new dcp::SoundAsset(dcp::Fraction(24, 1), 48000, 2, dcp::LanguageTag("en-GB"), dcp::SMPTE)); /* Here we must also say which of our channels will have "real" sound data in them */ std::vector<dcp::Channel> active_channels; active_channels.push_back (dcp::LEFT); active_channels.push_back (dcp::RIGHT); - boost::shared_ptr<dcp::SoundAssetWriter> sound_writer = sound_asset->start_write ("DCP/sound.mxf", active_channels); + std::shared_ptr<dcp::SoundAssetWriter> sound_writer = sound_asset->start_write ("DCP/sound.mxf", active_channels); /* Write some sine waves */ float* audio[2]; @@ -94,16 +94,16 @@ main () sound_writer->finalize (); /* Now create a reel */ - boost::shared_ptr<dcp::Reel> reel (new dcp::Reel ()); + std::shared_ptr<dcp::Reel> reel (new dcp::Reel ()); /* Add picture and sound to it. The zeros are the `entry points', i.e. the first (video) frame from the assets that the reel should play. */ - reel->add (boost::shared_ptr<dcp::ReelPictureAsset> (new dcp::ReelMonoPictureAsset (picture_asset, 0))); - reel->add (boost::shared_ptr<dcp::ReelSoundAsset> (new dcp::ReelSoundAsset (sound_asset, 0))); + reel->add (std::shared_ptr<dcp::ReelPictureAsset> (new dcp::ReelMonoPictureAsset (picture_asset, 0))); + reel->add (std::shared_ptr<dcp::ReelSoundAsset> (new dcp::ReelSoundAsset (sound_asset, 0))); /* Make a CPL with this reel */ - boost::shared_ptr<dcp::CPL> cpl (new dcp::CPL ("My film", dcp::FEATURE)); + std::shared_ptr<dcp::CPL> cpl (new dcp::CPL ("My film", dcp::FEATURE)); cpl->add (reel); /* Write the DCP */ diff --git a/examples/read_dcp.cc b/examples/read_dcp.cc index 5b44fb51..6a36d009 100644 --- a/examples/read_dcp.cc +++ b/examples/read_dcp.cc @@ -58,39 +58,39 @@ main () } std::cout << "DCP has " << dcp.cpls().size() << " CPLs.\n"; - std::list<boost::shared_ptr<dcp::Asset> > assets = dcp.assets (); + std::list<std::shared_ptr<dcp::Asset> > assets = dcp.assets (); std::cout << "DCP has " << assets.size() << " assets.\n"; - for (std::list<boost::shared_ptr<dcp::Asset> >::const_iterator i = assets.begin(); i != assets.end(); ++i) { - if (boost::dynamic_pointer_cast<dcp::MonoPictureAsset> (*i)) { + for (std::list<std::shared_ptr<dcp::Asset> >::const_iterator i = assets.begin(); i != assets.end(); ++i) { + if (std::dynamic_pointer_cast<dcp::MonoPictureAsset> (*i)) { std::cout << "2D picture\n"; - } else if (boost::dynamic_pointer_cast<dcp::StereoPictureAsset> (*i)) { + } else if (std::dynamic_pointer_cast<dcp::StereoPictureAsset> (*i)) { std::cout << "3D picture\n"; - } else if (boost::dynamic_pointer_cast<dcp::SoundAsset> (*i)) { + } else if (std::dynamic_pointer_cast<dcp::SoundAsset> (*i)) { std::cout << "Sound\n"; - } else if (boost::dynamic_pointer_cast<dcp::SubtitleAsset> (*i)) { + } else if (std::dynamic_pointer_cast<dcp::SubtitleAsset> (*i)) { std::cout << "Subtitle\n"; - } else if (boost::dynamic_pointer_cast<dcp::CPL> (*i)) { + } else if (std::dynamic_pointer_cast<dcp::CPL> (*i)) { std::cout << "CPL\n"; } std::cout << "\t" << (*i)->file()->leaf().string() << "\n"; } /* Take the first CPL */ - boost::shared_ptr<dcp::CPL> cpl = dcp.cpls().front (); + std::shared_ptr<dcp::CPL> cpl = dcp.cpls().front (); /* Get the picture asset in the first reel */ - boost::shared_ptr<dcp::MonoPictureAsset> picture_asset = boost::dynamic_pointer_cast<dcp::MonoPictureAsset> ( + std::shared_ptr<dcp::MonoPictureAsset> picture_asset = std::dynamic_pointer_cast<dcp::MonoPictureAsset> ( cpl->reels().front()->main_picture()->asset() ); /* Get a reader for it */ - boost::shared_ptr<dcp::MonoPictureAssetReader> picture_asset_reader = picture_asset->start_read(); + std::shared_ptr<dcp::MonoPictureAssetReader> picture_asset_reader = picture_asset->start_read(); /* Get the 1000th frame of it */ - boost::shared_ptr<const dcp::MonoPictureFrame> picture_frame_j2k = picture_asset_reader->get_frame(999); + std::shared_ptr<const dcp::MonoPictureFrame> picture_frame_j2k = picture_asset_reader->get_frame(999); /* Get the frame as an XYZ image */ - boost::shared_ptr<const dcp::OpenJPEGImage> picture_image_xyz = picture_frame_j2k->xyz_image (); + std::shared_ptr<const dcp::OpenJPEGImage> picture_image_xyz = picture_frame_j2k->xyz_image (); /* Convert to ARGB */ boost::scoped_array<uint8_t> rgba (new uint8_t[picture_image_xyz->size().width * picture_image_xyz->size().height * 4]); diff --git a/src/asset.cc b/src/asset.cc index 5b64b6cc..49ec7251 100644 --- a/src/asset.cc +++ b/src/asset.cc @@ -47,7 +47,7 @@ using std::string; using boost::function; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using namespace dcp; @@ -143,7 +143,7 @@ Asset::hash (function<void (float)> progress) const } bool -Asset::equals (boost::shared_ptr<const Asset> other, EqualityOptions, NoteHandler note) const +Asset::equals (std::shared_ptr<const Asset> other, EqualityOptions, NoteHandler note) const { if (_hash != other->_hash) { note (DCP_ERROR, "Asset: hashes differ"); diff --git a/src/asset.h b/src/asset.h index e2052d8a..100303a1 100644 --- a/src/asset.h +++ b/src/asset.h @@ -67,7 +67,7 @@ public: Asset (std::string id, boost::filesystem::path file); virtual bool equals ( - boost::shared_ptr<const Asset> other, + std::shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note ) const; @@ -77,7 +77,7 @@ public: */ virtual void write_to_assetmap (xmlpp::Node* node, boost::filesystem::path root) const; - virtual void add_to_pkl (boost::shared_ptr<PKL> pkl, boost::filesystem::path root) const; + virtual void add_to_pkl (std::shared_ptr<PKL> pkl, boost::filesystem::path root) const; /** @return the most recent disk file used to read or write this asset, if there is one */ boost::optional<boost::filesystem::path> file () const { diff --git a/src/asset_factory.cc b/src/asset_factory.cc index 09c315d5..83580cbd 100644 --- a/src/asset_factory.cc +++ b/src/asset_factory.cc @@ -39,9 +39,9 @@ #include "atmos_asset.h" #include "compose.hpp" #include "asset_factory.h" -#include <boost/shared_ptr.hpp> +#include <memory> -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; shared_ptr<Asset> diff --git a/src/asset_factory.h b/src/asset_factory.h index 6567154d..7177c8cd 100644 --- a/src/asset_factory.h +++ b/src/asset_factory.h @@ -33,6 +33,6 @@ namespace dcp { -boost::shared_ptr<Asset> asset_factory (boost::filesystem::path path, bool ignore_incorrect_picture_mxf_type); +std::shared_ptr<Asset> asset_factory (boost::filesystem::path path, bool ignore_incorrect_picture_mxf_type); } diff --git a/src/asset_reader.h b/src/asset_reader.h index 714d960c..d1e0f10e 100644 --- a/src/asset_reader.h +++ b/src/asset_reader.h @@ -39,7 +39,7 @@ #include "crypto_context.h" #include <asdcp/AS_DCP.h> #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> namespace dcp { @@ -64,9 +64,9 @@ public: delete _reader; } - boost::shared_ptr<const F> get_frame (int n) const + std::shared_ptr<const F> get_frame (int n) const { - return boost::shared_ptr<const F> (new F (_reader, n, _crypto_context)); + return std::shared_ptr<const F> (new F (_reader, n, _crypto_context)); } R* reader () const { @@ -75,7 +75,7 @@ public: protected: R* _reader; - boost::shared_ptr<DecryptionContext> _crypto_context; + std::shared_ptr<DecryptionContext> _crypto_context; }; } diff --git a/src/asset_writer.h b/src/asset_writer.h index 2970b8d3..8842917a 100644 --- a/src/asset_writer.h +++ b/src/asset_writer.h @@ -78,7 +78,7 @@ protected: bool _finalized; /** true if something has been written to this asset */ bool _started; - boost::shared_ptr<EncryptionContext> _crypto_context; + std::shared_ptr<EncryptionContext> _crypto_context; }; } diff --git a/src/atmos_asset.cc b/src/atmos_asset.cc index c31ac2d6..2145d8f8 100644 --- a/src/atmos_asset.cc +++ b/src/atmos_asset.cc @@ -38,7 +38,7 @@ #include <asdcp/AS_DCP.h> using std::string; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; AtmosAsset::AtmosAsset (Fraction edit_rate, int first_frame, int max_channel_count, int max_object_count, int atmos_version) diff --git a/src/atmos_asset.h b/src/atmos_asset.h index f7794a2a..6e1894e7 100644 --- a/src/atmos_asset.h +++ b/src/atmos_asset.h @@ -48,8 +48,8 @@ public: AtmosAsset (Fraction edit_rate, int first_frame, int max_channel_count, int max_object_count, int atmos_version); explicit AtmosAsset (boost::filesystem::path file); - boost::shared_ptr<AtmosAssetWriter> start_write (boost::filesystem::path file); - boost::shared_ptr<AtmosAssetReader> start_read () const; + std::shared_ptr<AtmosAssetWriter> start_write (boost::filesystem::path file); + std::shared_ptr<AtmosAssetReader> start_read () const; static std::string static_pkl_type (Standard); std::string pkl_type (Standard s) const { diff --git a/src/atmos_asset_writer.cc b/src/atmos_asset_writer.cc index 656026b4..8431086d 100644 --- a/src/atmos_asset_writer.cc +++ b/src/atmos_asset_writer.cc @@ -41,7 +41,7 @@ using std::min; using std::max; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; struct AtmosAssetWriter::ASDCPState diff --git a/src/atmos_asset_writer.h b/src/atmos_asset_writer.h index c78174f1..c031103a 100644 --- a/src/atmos_asset_writer.h +++ b/src/atmos_asset_writer.h @@ -41,7 +41,7 @@ #include "asset_writer.h" #include "types.h" #include "atmos_frame.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/filesystem.hpp> namespace dcp { @@ -56,7 +56,7 @@ class AtmosAsset; class AtmosAssetWriter : public AssetWriter { public: - void write (boost::shared_ptr<const AtmosFrame> frame); + void write (std::shared_ptr<const AtmosFrame> frame); void write (uint8_t const * data, int size); bool finalize (); @@ -69,7 +69,7 @@ private: ASDCP headers */ struct ASDCPState; - boost::shared_ptr<ASDCPState> _state; + std::shared_ptr<ASDCPState> _state; AtmosAsset* _asset; }; diff --git a/src/colour_conversion.cc b/src/colour_conversion.cc index 16691061..de69c211 100644 --- a/src/colour_conversion.cc +++ b/src/colour_conversion.cc @@ -41,7 +41,7 @@ #include <boost/numeric/ublas/lu.hpp> #include <boost/numeric/ublas/io.hpp> -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using namespace dcp; diff --git a/src/colour_conversion.h b/src/colour_conversion.h index c6f6f529..17051bcd 100644 --- a/src/colour_conversion.h +++ b/src/colour_conversion.h @@ -39,7 +39,7 @@ #define DCP_COLOUR_CONVERSION_H #include "chromaticity.h" -#include <boost/shared_ptr.hpp> +#include <memory> #if BOOST_VERSION >= 106400 #include <boost/serialization/array_wrapper.hpp> #endif @@ -68,17 +68,17 @@ public: {} ColourConversion ( - boost::shared_ptr<const TransferFunction> in, + std::shared_ptr<const TransferFunction> in, YUVToRGB yuv_to_rgb, Chromaticity red, Chromaticity green, Chromaticity blue, Chromaticity white, boost::optional<Chromaticity> adjusted_white, - boost::shared_ptr<const TransferFunction> out + std::shared_ptr<const TransferFunction> out ); - boost::shared_ptr<const TransferFunction> in () const { + std::shared_ptr<const TransferFunction> in () const { return _in; } @@ -106,11 +106,11 @@ public: return _adjusted_white; } - boost::shared_ptr<const TransferFunction> out () const { + std::shared_ptr<const TransferFunction> out () const { return _out; } - void set_in (boost::shared_ptr<const TransferFunction> f) { + void set_in (std::shared_ptr<const TransferFunction> f) { _in = f; } @@ -142,7 +142,7 @@ public: _adjusted_white = boost::optional<Chromaticity> (); } - void set_out (boost::shared_ptr<const TransferFunction> f) { + void set_out (std::shared_ptr<const TransferFunction> f) { _out = f; } @@ -162,7 +162,7 @@ public: protected: /** Input transfer function (probably a gamma function, or something similar) */ - boost::shared_ptr<const TransferFunction> _in; + std::shared_ptr<const TransferFunction> _in; /** Conversion to use from YUV to RGB */ YUVToRGB _yuv_to_rgb; Chromaticity _red; @@ -172,7 +172,7 @@ protected: /** White point that we are adjusting to using a Bradford matrix */ boost::optional<Chromaticity> _adjusted_white; /** Output transfer function (probably an inverse gamma function, or something similar) */ - boost::shared_ptr<const TransferFunction> _out; + std::shared_ptr<const TransferFunction> _out; }; } diff --git a/src/combine.cc b/src/combine.cc index 65cd3d0b..5c9a1087 100644 --- a/src/combine.cc +++ b/src/combine.cc @@ -53,9 +53,9 @@ using std::map; using std::set; using std::string; using std::vector; -using boost::dynamic_pointer_cast; +using std::dynamic_pointer_cast; using boost::optional; -using boost::shared_ptr; +using std::shared_ptr; boost::filesystem::path diff --git a/src/combine.h b/src/combine.h index 3d8a6284..21acbb04 100644 --- a/src/combine.h +++ b/src/combine.h @@ -48,7 +48,7 @@ void combine ( std::string creator = String::compose("libdcp %1", dcp::version), std::string issue_date = LocalTime().as_string(), std::string annotation_text = String::compose("Created by libdcp %1", dcp::version), - boost::shared_ptr<const CertificateChain> signer = boost::shared_ptr<CertificateChain>() + std::shared_ptr<const CertificateChain> signer = std::shared_ptr<CertificateChain>() ); } @@ -59,9 +59,9 @@ using std::make_pair; using std::cout; using std::set; using std::vector; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; -using boost::dynamic_pointer_cast; +using std::dynamic_pointer_cast; using namespace dcp; @@ -156,7 +156,7 @@ CPL::CPL (boost::filesystem::path file) * @param reel Reel to add. */ void -CPL::add (boost::shared_ptr<Reel> reel) +CPL::add (std::shared_ptr<Reel> reel) { _reels.push_back (reel); } @@ -49,7 +49,7 @@ #include <boost/filesystem.hpp> #include <boost/function.hpp> #include <boost/optional.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <list> #include <vector> @@ -74,32 +74,32 @@ public: explicit CPL (boost::filesystem::path file); bool equals ( - boost::shared_ptr<const Asset> other, + std::shared_ptr<const Asset> other, EqualityOptions options, NoteHandler note ) const; - void add (boost::shared_ptr<Reel> reel); + void add (std::shared_ptr<Reel> reel); void add (DecryptedKDM const &); /** @return the reels in this CPL */ - std::list<boost::shared_ptr<Reel> > reels () const { + std::list<std::shared_ptr<Reel> > reels () const { return _reels; } /** @return the ReelMXFs in this CPL in all reels */ - std::list<boost::shared_ptr<const ReelMXF> > reel_mxfs () const; - std::list<boost::shared_ptr<ReelMXF> > reel_mxfs (); + std::list<std::shared_ptr<const ReelMXF> > reel_mxfs () const; + std::list<std::shared_ptr<ReelMXF> > reel_mxfs (); bool encrypted () const; void write_xml ( boost::filesystem::path file, Standard standard, - boost::shared_ptr<const CertificateChain> + std::shared_ptr<const CertificateChain> ) const; - void resolve_refs (std::list<boost::shared_ptr<Asset> >); + void resolve_refs (std::list<std::shared_ptr<Asset> >); int64_t duration () const; @@ -311,7 +311,7 @@ private: /* See note for _release_territory above */ std::vector<std::string> _additional_subtitle_languages; - std::list<boost::shared_ptr<Reel> > _reels; + std::list<std::shared_ptr<Reel> > _reels; /** Standard of CPL that was read in */ boost::optional<Standard> _standard; @@ -75,8 +75,8 @@ using std::make_pair; using std::map; using std::cerr; using std::exception; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using boost::optional; using boost::algorithm::starts_with; using namespace dcp; @@ -311,7 +311,7 @@ DCP::equals (DCP const & other, EqualityOptions opt, NoteHandler note) const } void -DCP::add (boost::shared_ptr<CPL> cpl) +DCP::add (std::shared_ptr<CPL> cpl) { _cpls.push_back (cpl); } @@ -46,7 +46,7 @@ #include "name_format.h" #include "verify.h" #include "version.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/signals2.hpp> #include <string> #include <vector> @@ -101,10 +101,10 @@ public: */ bool equals (DCP const & other, EqualityOptions options, NoteHandler note) const; - void add (boost::shared_ptr<CPL> cpl); + void add (std::shared_ptr<CPL> cpl); - std::list<boost::shared_ptr<CPL> > cpls () const; - std::list<boost::shared_ptr<Asset> > assets (bool ignore_unresolved = false) const; + std::list<std::shared_ptr<CPL> > cpls () const; + std::list<std::shared_ptr<Asset> > assets (bool ignore_unresolved = false) const; bool encrypted () const; @@ -116,11 +116,11 @@ public: std::string creator = String::compose("libdcp %1", dcp::version), std::string issue_date = LocalTime().as_string(), std::string annotation_text = String::compose("Created by libdcp %1", dcp::version), - boost::shared_ptr<const CertificateChain> signer = boost::shared_ptr<const CertificateChain> (), + std::shared_ptr<const CertificateChain> signer = std::shared_ptr<const CertificateChain> (), NameFormat name_format = NameFormat("%t") ); - void resolve_refs (std::list<boost::shared_ptr<Asset> > assets); + void resolve_refs (std::list<std::shared_ptr<Asset> > assets); /** @return Standard of a DCP that was read in */ boost::optional<Standard> standard () const { @@ -134,7 +134,7 @@ public: /** @return PKLs if this DCP was read from an existing one, or if write_xml() has been called on it. * If neither is true, this method returns an empty list. */ - std::list<boost::shared_ptr<PKL> > pkls () const { + std::list<std::shared_ptr<PKL> > pkls () const { return _pkls; } @@ -160,9 +160,9 @@ private: /** The directory that we are writing to */ boost::filesystem::path _directory; /** The CPLs that make up this DCP */ - std::list<boost::shared_ptr<CPL> > _cpls; + std::list<std::shared_ptr<CPL> > _cpls; /** The PKLs that make up this DCP */ - std::list<boost::shared_ptr<PKL> > _pkls; + std::list<std::shared_ptr<PKL> > _pkls; /** File that the ASSETMAP was read from or last written to */ mutable boost::optional<boost::filesystem::path> _asset_map; diff --git a/src/decrypted_kdm.cc b/src/decrypted_kdm.cc index 1f68c283..043eac47 100644 --- a/src/decrypted_kdm.cc +++ b/src/decrypted_kdm.cc @@ -57,7 +57,7 @@ using std::setfill; using std::hex; using std::pair; using std::map; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using namespace dcp; diff --git a/src/decrypted_kdm.h b/src/decrypted_kdm.h index 1cf1e0d4..a67fdbfe 100644 --- a/src/decrypted_kdm.h +++ b/src/decrypted_kdm.h @@ -92,7 +92,7 @@ public: */ DecryptedKDM ( std::string cpl_id, - std::map<boost::shared_ptr<const ReelMXF>, Key> keys, + std::map<std::shared_ptr<const ReelMXF>, Key> keys, LocalTime not_valid_before, LocalTime not_valid_after, std::string annotation_text, @@ -109,7 +109,7 @@ public: * @param not_valid_after End time for the KDM. */ DecryptedKDM ( - boost::shared_ptr<const CPL> cpl, + std::shared_ptr<const CPL> cpl, Key key, LocalTime not_valid_before, LocalTime not_valid_after, @@ -130,7 +130,7 @@ public: * @return Encrypted KDM. */ EncryptedKDM encrypt ( - boost::shared_ptr<const CertificateChain> signer, + std::shared_ptr<const CertificateChain> signer, Certificate recipient, std::vector<std::string> trusted_devices, Formulation formulation, diff --git a/src/encrypted_kdm.cc b/src/encrypted_kdm.cc index e8e89870..ca2a8346 100644 --- a/src/encrypted_kdm.cc +++ b/src/encrypted_kdm.cc @@ -50,7 +50,7 @@ using std::vector; using std::string; using std::map; using std::pair; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using boost::starts_with; using namespace dcp; @@ -87,7 +87,7 @@ class X509Data public: X509Data () {} - explicit X509Data (boost::shared_ptr<const cxml::Node> node) + explicit X509Data (std::shared_ptr<const cxml::Node> node) : x509_issuer_serial (Signer (node->node_child ("X509IssuerSerial"))) , x509_certificate (node->string_child ("X509Certificate")) { diff --git a/src/encrypted_kdm.h b/src/encrypted_kdm.h index ddc0273a..175b578f 100644 --- a/src/encrypted_kdm.h +++ b/src/encrypted_kdm.h @@ -102,7 +102,7 @@ private: /** Construct an EncryptedKDM from a set of details */ EncryptedKDM ( - boost::shared_ptr<const CertificateChain> signer, + std::shared_ptr<const CertificateChain> signer, Certificate recipient, std::vector<std::string> trusted_devices, std::string cpl_id, diff --git a/src/frame.h b/src/frame.h index 69983c4a..7aa471fd 100644 --- a/src/frame.h +++ b/src/frame.h @@ -46,7 +46,7 @@ template <class R, class B> class Frame : public boost::noncopyable { public: - Frame (R* reader, int n, boost::shared_ptr<const DecryptionContext> c) + Frame (R* reader, int n, std::shared_ptr<const DecryptionContext> c) { /* XXX: unfortunate guesswork on this buffer size */ _buffer.reset(new B(Kumu::Megabyte)); @@ -67,7 +67,7 @@ public: } private: - boost::shared_ptr<B> _buffer; + std::shared_ptr<B> _buffer; }; } diff --git a/src/gamma_transfer_function.cc b/src/gamma_transfer_function.cc index f493e818..c7c16f24 100644 --- a/src/gamma_transfer_function.cc +++ b/src/gamma_transfer_function.cc @@ -39,8 +39,8 @@ #include <cmath> using std::pow; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using namespace dcp; GammaTransferFunction::GammaTransferFunction (double gamma) diff --git a/src/gamma_transfer_function.h b/src/gamma_transfer_function.h index 7f25c8ed..f1a1c13b 100644 --- a/src/gamma_transfer_function.h +++ b/src/gamma_transfer_function.h @@ -51,7 +51,7 @@ public: return _gamma; } - bool about_equal (boost::shared_ptr<const TransferFunction> other, double epsilon) const; + bool about_equal (std::shared_ptr<const TransferFunction> other, double epsilon) const; protected: double * make_lut (int bit_depth, bool inverse) const; diff --git a/src/identity_transfer_function.cc b/src/identity_transfer_function.cc index 1edc61da..ef18825b 100644 --- a/src/identity_transfer_function.cc +++ b/src/identity_transfer_function.cc @@ -39,8 +39,8 @@ #include <cmath> using std::pow; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using namespace dcp; double * diff --git a/src/identity_transfer_function.h b/src/identity_transfer_function.h index f157cd6f..f2313c10 100644 --- a/src/identity_transfer_function.h +++ b/src/identity_transfer_function.h @@ -42,7 +42,7 @@ namespace dcp { class IdentityTransferFunction : public TransferFunction { public: - bool about_equal (boost::shared_ptr<const TransferFunction> other, double epsilon) const; + bool about_equal (std::shared_ptr<const TransferFunction> other, double epsilon) const; protected: double * make_lut (int bit_depth, bool inverse) const; diff --git a/src/interop_load_font_node.cc b/src/interop_load_font_node.cc index 99d8a48e..a5bc1428 100644 --- a/src/interop_load_font_node.cc +++ b/src/interop_load_font_node.cc @@ -35,7 +35,7 @@ #include <libcxml/cxml.h> using std::string; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using namespace dcp; diff --git a/src/interop_load_font_node.h b/src/interop_load_font_node.h index 4d53b168..17ce1893 100644 --- a/src/interop_load_font_node.h +++ b/src/interop_load_font_node.h @@ -33,7 +33,7 @@ #include "load_font_node.h" #include <libcxml/cxml.h> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/optional.hpp> namespace dcp { diff --git a/src/interop_subtitle_asset.cc b/src/interop_subtitle_asset.cc index c6173a26..ac3dcc98 100644 --- a/src/interop_subtitle_asset.cc +++ b/src/interop_subtitle_asset.cc @@ -52,10 +52,10 @@ using std::string; using std::cout; using std::cerr; using std::map; -using boost::shared_ptr; +using std::shared_ptr; using boost::shared_array; using boost::optional; -using boost::dynamic_pointer_cast; +using std::dynamic_pointer_cast; using namespace dcp; InteropSubtitleAsset::InteropSubtitleAsset (boost::filesystem::path file) diff --git a/src/interop_subtitle_asset.h b/src/interop_subtitle_asset.h index b34a2a28..7ce7d175 100644 --- a/src/interop_subtitle_asset.h +++ b/src/interop_subtitle_asset.h @@ -54,22 +54,22 @@ public: explicit InteropSubtitleAsset (boost::filesystem::path file); bool equals ( - boost::shared_ptr<const Asset>, + std::shared_ptr<const Asset>, EqualityOptions, NoteHandler note ) const; void write_to_assetmap (xmlpp::Node* node, boost::filesystem::path root) const; - void add_to_pkl (boost::shared_ptr<PKL> pkl, boost::filesystem::path root) const; + void add_to_pkl (std::shared_ptr<PKL> pkl, boost::filesystem::path root) const; - std::list<boost::shared_ptr<LoadFontNode> > load_font_nodes () const; + std::list<std::shared_ptr<LoadFontNode> > load_font_nodes () const; void add_font (std::string load_id, dcp::ArrayData data); std::string xml_as_string () const; void write (boost::filesystem::path path) const; - void resolve_fonts (std::list<boost::shared_ptr<Asset> > assets); - void add_font_assets (std::list<boost::shared_ptr<Asset> >& assets); + void resolve_fonts (std::list<std::shared_ptr<Asset> > assets); + void add_font_assets (std::list<std::shared_ptr<Asset> >& assets); void set_font_file (std::string load_id, boost::filesystem::path file); /** Set the reel number or sub-element identifier @@ -123,7 +123,7 @@ private: std::string _reel_number; std::string _language; std::string _movie_title; - std::list<boost::shared_ptr<InteropLoadFontNode> > _load_font_nodes; + std::list<std::shared_ptr<InteropLoadFontNode> > _load_font_nodes; }; } @@ -45,7 +45,7 @@ using std::min; using std::pow; using std::string; -using boost::shared_ptr; +using std::shared_ptr; using boost::shared_array; using namespace dcp; @@ -33,15 +33,15 @@ #include "array_data.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <stdint.h> namespace dcp { class OpenJPEGImage; -extern boost::shared_ptr<OpenJPEGImage> decompress_j2k (uint8_t* data, int64_t size, int reduce); -extern boost::shared_ptr<OpenJPEGImage> decompress_j2k (ArrayData data, int reduce); -extern ArrayData compress_j2k (boost::shared_ptr<const OpenJPEGImage>, int bandwith, int frames_per_second, bool threed, bool fourk, std::string comment = "libdcp"); +extern std::shared_ptr<OpenJPEGImage> decompress_j2k (uint8_t* data, int64_t size, int reduce); +extern std::shared_ptr<OpenJPEGImage> decompress_j2k (ArrayData data, int reduce); +extern ArrayData compress_j2k (std::shared_ptr<const OpenJPEGImage>, int bandwith, int frames_per_second, bool threed, bool fourk, std::string comment = "libdcp"); } diff --git a/src/modified_gamma_transfer_function.cc b/src/modified_gamma_transfer_function.cc index 7522cde7..bb388689 100644 --- a/src/modified_gamma_transfer_function.cc +++ b/src/modified_gamma_transfer_function.cc @@ -35,8 +35,8 @@ #include <cmath> using std::pow; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using namespace dcp; ModifiedGammaTransferFunction::ModifiedGammaTransferFunction (double power, double threshold, double A, double B) diff --git a/src/modified_gamma_transfer_function.h b/src/modified_gamma_transfer_function.h index f0448158..b38a16b0 100644 --- a/src/modified_gamma_transfer_function.h +++ b/src/modified_gamma_transfer_function.h @@ -70,7 +70,7 @@ public: return _B; } - bool about_equal (boost::shared_ptr<const TransferFunction>, double epsilon) const; + bool about_equal (std::shared_ptr<const TransferFunction>, double epsilon) const; protected: double * make_lut (int bit_depth, bool inverse) const; diff --git a/src/mono_picture_asset.cc b/src/mono_picture_asset.cc index 1f3dcc9d..12165f7b 100644 --- a/src/mono_picture_asset.cc +++ b/src/mono_picture_asset.cc @@ -45,8 +45,8 @@ using std::string; using std::vector; using std::list; using std::pair; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; #endif diff --git a/src/mono_picture_asset.h b/src/mono_picture_asset.h index 7a1c0d0a..28913f61 100644 --- a/src/mono_picture_asset.h +++ b/src/mono_picture_asset.h @@ -59,11 +59,11 @@ public: explicit MonoPictureAsset (Fraction edit_rate, Standard standard); /** Start a progressive write to a MonoPictureAsset */ - boost::shared_ptr<PictureAssetWriter> start_write (boost::filesystem::path, bool); - boost::shared_ptr<MonoPictureAssetReader> start_read () const; + std::shared_ptr<PictureAssetWriter> start_write (boost::filesystem::path, bool); + std::shared_ptr<MonoPictureAssetReader> start_read () const; bool equals ( - boost::shared_ptr<const Asset> other, + std::shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note ) const; diff --git a/src/mono_picture_asset_writer.cc b/src/mono_picture_asset_writer.cc index 30a6ee96..01fb11f0 100644 --- a/src/mono_picture_asset_writer.cc +++ b/src/mono_picture_asset_writer.cc @@ -46,7 +46,7 @@ #include "picture_asset_writer_common.cc" using std::string; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; struct MonoPictureAssetWriter::ASDCPState : public ASDCPStateBase diff --git a/src/mono_picture_asset_writer.h b/src/mono_picture_asset_writer.h index 2284cd3c..2dce922e 100644 --- a/src/mono_picture_asset_writer.h +++ b/src/mono_picture_asset_writer.h @@ -39,7 +39,7 @@ #define LIBDCP_MONO_PICTURE_ASSET_WRITER_H #include "picture_asset_writer.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/utility.hpp> #include <stdint.h> #include <string> @@ -74,7 +74,7 @@ private: */ struct ASDCPState; - boost::shared_ptr<ASDCPState> _state; + std::shared_ptr<ASDCPState> _state; }; } diff --git a/src/mono_picture_frame.cc b/src/mono_picture_frame.cc index 6587a720..7420193e 100644 --- a/src/mono_picture_frame.cc +++ b/src/mono_picture_frame.cc @@ -47,7 +47,7 @@ #include <asdcp/AS_DCP.h> using std::string; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using namespace dcp; diff --git a/src/mono_picture_frame.h b/src/mono_picture_frame.h index 27d52833..67784509 100644 --- a/src/mono_picture_frame.h +++ b/src/mono_picture_frame.h @@ -40,7 +40,7 @@ #include "types.h" #include "asset_reader.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/noncopyable.hpp> #include <boost/filesystem.hpp> #include <boost/optional.hpp> @@ -68,7 +68,7 @@ public: explicit MonoPictureFrame (boost::filesystem::path path); MonoPictureFrame (uint8_t const * data, int size); - boost::shared_ptr<OpenJPEGImage> xyz_image (int reduce = 0) const; + std::shared_ptr<OpenJPEGImage> xyz_image (int reduce = 0) const; uint8_t const * data () const; uint8_t* data (); @@ -80,9 +80,9 @@ private: */ friend class AssetReader<ASDCP::JP2K::MXFReader, MonoPictureFrame>; - MonoPictureFrame (ASDCP::JP2K::MXFReader* reader, int n, boost::shared_ptr<DecryptionContext>); + MonoPictureFrame (ASDCP::JP2K::MXFReader* reader, int n, std::shared_ptr<DecryptionContext>); - boost::shared_ptr<ASDCP::JP2K::FrameBuffer> _buffer; + std::shared_ptr<ASDCP::JP2K::FrameBuffer> _buffer; }; } @@ -53,8 +53,8 @@ using std::string; using std::cout; using std::list; using std::pair; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using namespace dcp; MXF::MXF () @@ -120,7 +120,7 @@ public: protected: template <class P, class Q> - friend void start (PictureAssetWriter* writer, boost::shared_ptr<P> state, Q* mxf, uint8_t const * data, int size); + friend void start (PictureAssetWriter* writer, std::shared_ptr<P> state, Q* mxf, uint8_t const * data, int size); MXF (); diff --git a/src/picture_asset.cc b/src/picture_asset.cc index 68af0896..86741ba6 100644 --- a/src/picture_asset.cc +++ b/src/picture_asset.cc @@ -52,7 +52,7 @@ using std::vector; using std::max; using std::pair; using std::make_pair; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; /** Load a PictureAsset from a file */ diff --git a/src/picture_asset.h b/src/picture_asset.h index cc1be9f0..a49d1a7d 100644 --- a/src/picture_asset.h +++ b/src/picture_asset.h @@ -64,7 +64,7 @@ public: explicit PictureAsset (boost::filesystem::path file); explicit PictureAsset (Fraction edit_rate, Standard standard); - virtual boost::shared_ptr<PictureAssetWriter> start_write ( + virtual std::shared_ptr<PictureAssetWriter> start_write ( boost::filesystem::path file, bool overwrite ) = 0; diff --git a/src/picture_asset_writer.cc b/src/picture_asset_writer.cc index 6861562e..a8dee68c 100644 --- a/src/picture_asset_writer.cc +++ b/src/picture_asset_writer.cc @@ -40,7 +40,7 @@ #include <stdint.h> using std::string; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; PictureAssetWriter::PictureAssetWriter (PictureAsset* asset, boost::filesystem::path file, bool overwrite) diff --git a/src/picture_asset_writer.h b/src/picture_asset_writer.h index f2bd611b..12530513 100644 --- a/src/picture_asset_writer.h +++ b/src/picture_asset_writer.h @@ -41,7 +41,7 @@ #include "metadata.h" #include "types.h" #include "asset_writer.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/utility.hpp> #include <stdint.h> #include <string> @@ -82,7 +82,7 @@ public: protected: template <class P, class Q> - friend void start (PictureAssetWriter *, boost::shared_ptr<P>, Q *, uint8_t const *, int); + friend void start (PictureAssetWriter *, std::shared_ptr<P>, Q *, uint8_t const *, int); PictureAssetWriter (PictureAsset *, boost::filesystem::path, bool); diff --git a/src/picture_asset_writer_common.cc b/src/picture_asset_writer_common.cc index 2caadc6e..6591823f 100644 --- a/src/picture_asset_writer_common.cc +++ b/src/picture_asset_writer_common.cc @@ -31,7 +31,7 @@ files in the program, then also delete it here. */ -using boost::shared_ptr; +using std::shared_ptr; namespace dcp { @@ -41,7 +41,7 @@ #include <iostream> using std::string; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using namespace dcp; @@ -64,7 +64,7 @@ public: boost::optional<std::string> type (std::string id) const; void add_asset (std::string id, boost::optional<std::string> annotation_text, std::string hash, int64_t size, std::string type); - void write (boost::filesystem::path file, boost::shared_ptr<const CertificateChain> signer) const; + void write (boost::filesystem::path file, std::shared_ptr<const CertificateChain> signer) const; /** @return the most recent disk file used to read or write this PKL, if there is one */ boost::optional<boost::filesystem::path> file () const { @@ -103,7 +103,7 @@ private: std::string _issue_date; std::string _issuer; std::string _creator; - std::list<boost::shared_ptr<Asset> > _asset_list; + std::list<std::shared_ptr<Asset> > _asset_list; /** The most recent disk file used to read or write this PKL */ mutable boost::optional<boost::filesystem::path> _file; }; diff --git a/src/reel.cc b/src/reel.cc index 918349c1..a8f66ae5 100644 --- a/src/reel.cc +++ b/src/reel.cc @@ -62,11 +62,11 @@ using std::string; using std::list; using std::cout; using std::min; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using namespace dcp; -Reel::Reel (boost::shared_ptr<const cxml::Node> node) +Reel::Reel (std::shared_ptr<const cxml::Node> node) : Object (remove_urn_uuid (node->string_child ("Id"))) { shared_ptr<cxml::Node> asset_list = node->node_child ("AssetList"); @@ -156,7 +156,7 @@ Reel::write_to_cpl (xmlpp::Element* node, Standard standard) const } bool -Reel::equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, NoteHandler note) const +Reel::equals (std::shared_ptr<const Reel> other, EqualityOptions opt, NoteHandler note) const { if ((_main_picture && !other->_main_picture) || (!_main_picture && other->_main_picture)) { note (DCP_ERROR, "Reel: picture assets differ"); @@ -37,7 +37,7 @@ #include "key.h" #include "types.h" #include "ref.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/function.hpp> #include <list> @@ -68,11 +68,11 @@ public: Reel () {} Reel ( - boost::shared_ptr<ReelPictureAsset> picture, - boost::shared_ptr<ReelSoundAsset> sound = boost::shared_ptr<ReelSoundAsset> (), - boost::shared_ptr<ReelSubtitleAsset> subtitle = boost::shared_ptr<ReelSubtitleAsset> (), - boost::shared_ptr<ReelMarkersAsset> markers = boost::shared_ptr<ReelMarkersAsset> (), - boost::shared_ptr<ReelAtmosAsset> atmos = boost::shared_ptr<ReelAtmosAsset> () + std::shared_ptr<ReelPictureAsset> picture, + std::shared_ptr<ReelSoundAsset> sound = std::shared_ptr<ReelSoundAsset> (), + std::shared_ptr<ReelSubtitleAsset> subtitle = std::shared_ptr<ReelSubtitleAsset> (), + std::shared_ptr<ReelMarkersAsset> markers = std::shared_ptr<ReelMarkersAsset> (), + std::shared_ptr<ReelAtmosAsset> atmos = std::shared_ptr<ReelAtmosAsset> () ) : _main_picture (picture) , _main_sound (sound) @@ -81,55 +81,55 @@ public: , _atmos (atmos) {} - explicit Reel (boost::shared_ptr<const cxml::Node>); + explicit Reel (std::shared_ptr<const cxml::Node>); - boost::shared_ptr<ReelPictureAsset> main_picture () const { + std::shared_ptr<ReelPictureAsset> main_picture () const { return _main_picture; } - boost::shared_ptr<ReelSoundAsset> main_sound () const { + std::shared_ptr<ReelSoundAsset> main_sound () const { return _main_sound; } - boost::shared_ptr<ReelSubtitleAsset> main_subtitle () const { + std::shared_ptr<ReelSubtitleAsset> main_subtitle () const { return _main_subtitle; } - boost::shared_ptr<ReelMarkersAsset> main_markers () const { + std::shared_ptr<ReelMarkersAsset> main_markers () const { return _main_markers; } - std::list<boost::shared_ptr<ReelClosedCaptionAsset> > closed_captions () const { + std::list<std::shared_ptr<ReelClosedCaptionAsset> > closed_captions () const { return _closed_captions; } - boost::shared_ptr<ReelAtmosAsset> atmos () const { + std::shared_ptr<ReelAtmosAsset> atmos () const { return _atmos; } int64_t duration () const; - void add (boost::shared_ptr<ReelAsset> asset); + void add (std::shared_ptr<ReelAsset> asset); - std::list<boost::shared_ptr<ReelAsset> > assets () const; + std::list<std::shared_ptr<ReelAsset> > assets () const; xmlpp::Element* write_to_cpl (xmlpp::Element* node, Standard standard) const; bool encrypted () const; - bool equals (boost::shared_ptr<const Reel> other, EqualityOptions opt, NoteHandler notes) const; + bool equals (std::shared_ptr<const Reel> other, EqualityOptions opt, NoteHandler notes) const; void add (DecryptedKDM const &); - void resolve_refs (std::list<boost::shared_ptr<Asset> >); + void resolve_refs (std::list<std::shared_ptr<Asset> >); private: - boost::shared_ptr<ReelPictureAsset> _main_picture; - boost::shared_ptr<ReelSoundAsset> _main_sound; - boost::shared_ptr<ReelSubtitleAsset> _main_subtitle; - boost::shared_ptr<ReelMarkersAsset> _main_markers; - std::list<boost::shared_ptr<ReelClosedCaptionAsset> > _closed_captions; - boost::shared_ptr<ReelAtmosAsset> _atmos; + std::shared_ptr<ReelPictureAsset> _main_picture; + std::shared_ptr<ReelSoundAsset> _main_sound; + std::shared_ptr<ReelSubtitleAsset> _main_subtitle; + std::shared_ptr<ReelMarkersAsset> _main_markers; + std::list<std::shared_ptr<ReelClosedCaptionAsset> > _closed_captions; + std::shared_ptr<ReelAtmosAsset> _atmos; }; } diff --git a/src/reel_asset.cc b/src/reel_asset.cc index fdc412b8..5c05e33c 100644 --- a/src/reel_asset.cc +++ b/src/reel_asset.cc @@ -45,7 +45,7 @@ using std::pair; using std::string; using std::make_pair; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using namespace dcp; diff --git a/src/reel_asset.h b/src/reel_asset.h index 07ddcc18..654b5a97 100644 --- a/src/reel_asset.h +++ b/src/reel_asset.h @@ -41,7 +41,7 @@ #include "object.h" #include "util.h" #include "ref.h" -#include <boost/shared_ptr.hpp> +#include <memory> namespace cxml { class Node; @@ -66,7 +66,7 @@ class ReelAsset : public Object { public: ReelAsset (std::string id, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); - explicit ReelAsset (boost::shared_ptr<const cxml::Node>); + explicit ReelAsset (std::shared_ptr<const cxml::Node>); virtual xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const = 0; @@ -104,7 +104,7 @@ public: _annotation_text = at; } - bool asset_equals (boost::shared_ptr<const ReelAsset>, EqualityOptions, NoteHandler) const; + bool asset_equals (std::shared_ptr<const ReelAsset>, EqualityOptions, NoteHandler) const; protected: diff --git a/src/reel_atmos_asset.cc b/src/reel_atmos_asset.cc index 958bc72c..9dccbbcb 100644 --- a/src/reel_atmos_asset.cc +++ b/src/reel_atmos_asset.cc @@ -43,17 +43,17 @@ using std::string; using std::pair; using std::make_pair; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; -ReelAtmosAsset::ReelAtmosAsset (boost::shared_ptr<AtmosAsset> asset, int64_t entry_point) +ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr<AtmosAsset> asset, int64_t entry_point) : ReelAsset (asset->id(), asset->edit_rate(), asset->intrinsic_duration(), entry_point) , ReelMXF (asset, asset->key_id()) { } -ReelAtmosAsset::ReelAtmosAsset (boost::shared_ptr<const cxml::Node> node) +ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr<const cxml::Node> node) : ReelAsset (node) , ReelMXF (node) { diff --git a/src/reel_atmos_asset.h b/src/reel_atmos_asset.h index 6fb4bf51..92077fc0 100644 --- a/src/reel_atmos_asset.h +++ b/src/reel_atmos_asset.h @@ -52,15 +52,15 @@ class AtmosAsset; class ReelAtmosAsset : public ReelAsset, public ReelMXF { public: - ReelAtmosAsset (boost::shared_ptr<AtmosAsset> asset, int64_t entry_point); - explicit ReelAtmosAsset (boost::shared_ptr<const cxml::Node>); + ReelAtmosAsset (std::shared_ptr<AtmosAsset> asset, int64_t entry_point); + explicit ReelAtmosAsset (std::shared_ptr<const cxml::Node>); - boost::shared_ptr<AtmosAsset> asset () const { + std::shared_ptr<AtmosAsset> asset () const { return asset_of_type<AtmosAsset> (); } xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const; - bool equals (boost::shared_ptr<const ReelAtmosAsset>, EqualityOptions, NoteHandler) const; + bool equals (std::shared_ptr<const ReelAtmosAsset>, EqualityOptions, NoteHandler) const; private: std::string key_type () const; diff --git a/src/reel_closed_caption_asset.cc b/src/reel_closed_caption_asset.cc index 9ddd81a6..720362b8 100644 --- a/src/reel_closed_caption_asset.cc +++ b/src/reel_closed_caption_asset.cc @@ -44,19 +44,19 @@ using std::string; using std::pair; using std::make_pair; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using boost::optional; using namespace dcp; -ReelClosedCaptionAsset::ReelClosedCaptionAsset (boost::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) +ReelClosedCaptionAsset::ReelClosedCaptionAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) : ReelAsset (asset->id(), edit_rate, intrinsic_duration, entry_point) , ReelMXF (asset, dynamic_pointer_cast<SMPTESubtitleAsset>(asset) ? dynamic_pointer_cast<SMPTESubtitleAsset>(asset)->key_id() : optional<string>()) { } -ReelClosedCaptionAsset::ReelClosedCaptionAsset (boost::shared_ptr<const cxml::Node> node) +ReelClosedCaptionAsset::ReelClosedCaptionAsset (std::shared_ptr<const cxml::Node> node) : ReelAsset (node) , ReelMXF (node) { diff --git a/src/reel_closed_caption_asset.h b/src/reel_closed_caption_asset.h index 13d50429..47645a8f 100644 --- a/src/reel_closed_caption_asset.h +++ b/src/reel_closed_caption_asset.h @@ -53,13 +53,13 @@ class SubtitleAsset; class ReelClosedCaptionAsset : public ReelAsset, public ReelMXF { public: - ReelClosedCaptionAsset (boost::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t instrinsic_duration, int64_t entry_point); - explicit ReelClosedCaptionAsset (boost::shared_ptr<const cxml::Node>); + ReelClosedCaptionAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t instrinsic_duration, int64_t entry_point); + explicit ReelClosedCaptionAsset (std::shared_ptr<const cxml::Node>); xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const; - bool equals (boost::shared_ptr<const ReelClosedCaptionAsset>, EqualityOptions, NoteHandler) const; + bool equals (std::shared_ptr<const ReelClosedCaptionAsset>, EqualityOptions, NoteHandler) const; - boost::shared_ptr<SubtitleAsset> asset () const { + std::shared_ptr<SubtitleAsset> asset () const { return asset_of_type<SubtitleAsset> (); } diff --git a/src/reel_markers_asset.cc b/src/reel_markers_asset.cc index 9b6d69cf..de73980e 100644 --- a/src/reel_markers_asset.cc +++ b/src/reel_markers_asset.cc @@ -41,7 +41,7 @@ using std::string; using std::map; using std::max; using boost::optional; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; ReelMarkersAsset::ReelMarkersAsset (Fraction edit_rate, int64_t entry_point) diff --git a/src/reel_markers_asset.h b/src/reel_markers_asset.h index 24dff222..0066a27d 100644 --- a/src/reel_markers_asset.h +++ b/src/reel_markers_asset.h @@ -41,10 +41,10 @@ class ReelMarkersAsset : public ReelAsset { public: ReelMarkersAsset (Fraction edit_rate, int64_t entry_point); - explicit ReelMarkersAsset (boost::shared_ptr<const cxml::Node>); + explicit ReelMarkersAsset (std::shared_ptr<const cxml::Node>); xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const; - bool equals (boost::shared_ptr<const ReelMarkersAsset>, EqualityOptions, NoteHandler) const; + bool equals (std::shared_ptr<const ReelMarkersAsset>, EqualityOptions, NoteHandler) const; void set (Marker, Time); void unset (Marker); diff --git a/src/reel_mono_picture_asset.cc b/src/reel_mono_picture_asset.cc index 36abb55e..ec42919f 100644 --- a/src/reel_mono_picture_asset.cc +++ b/src/reel_mono_picture_asset.cc @@ -40,16 +40,16 @@ #include <libcxml/cxml.h> using std::string; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; -ReelMonoPictureAsset::ReelMonoPictureAsset (boost::shared_ptr<MonoPictureAsset> asset, int64_t entry_point) +ReelMonoPictureAsset::ReelMonoPictureAsset (std::shared_ptr<MonoPictureAsset> asset, int64_t entry_point) : ReelPictureAsset (asset, entry_point) { } -ReelMonoPictureAsset::ReelMonoPictureAsset (boost::shared_ptr<const cxml::Node> node) +ReelMonoPictureAsset::ReelMonoPictureAsset (std::shared_ptr<const cxml::Node> node) : ReelPictureAsset (node) { node->done (); diff --git a/src/reel_mono_picture_asset.h b/src/reel_mono_picture_asset.h index 099feafd..c996c762 100644 --- a/src/reel_mono_picture_asset.h +++ b/src/reel_mono_picture_asset.h @@ -51,16 +51,16 @@ class MonoPictureAsset; class ReelMonoPictureAsset : public ReelPictureAsset { public: - ReelMonoPictureAsset (boost::shared_ptr<MonoPictureAsset> asset, int64_t entry_point); - explicit ReelMonoPictureAsset (boost::shared_ptr<const cxml::Node>); + ReelMonoPictureAsset (std::shared_ptr<MonoPictureAsset> asset, int64_t entry_point); + explicit ReelMonoPictureAsset (std::shared_ptr<const cxml::Node>); /** @return the MonoPictureAsset that this object refers to */ - boost::shared_ptr<const MonoPictureAsset> mono_asset () const { + std::shared_ptr<const MonoPictureAsset> mono_asset () const { return asset_of_type<const MonoPictureAsset> (); } /** @return the MonoPictureAsset that this object refers to */ - boost::shared_ptr<MonoPictureAsset> mono_asset () { + std::shared_ptr<MonoPictureAsset> mono_asset () { return asset_of_type<MonoPictureAsset> (); } diff --git a/src/reel_mxf.cc b/src/reel_mxf.cc index fbc55cf7..71b47836 100644 --- a/src/reel_mxf.cc +++ b/src/reel_mxf.cc @@ -39,7 +39,7 @@ #include <libxml++/libxml++.h> using std::string; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using namespace dcp; diff --git a/src/reel_mxf.h b/src/reel_mxf.h index 7b4d92aa..07514189 100644 --- a/src/reel_mxf.h +++ b/src/reel_mxf.h @@ -40,7 +40,7 @@ #include "ref.h" #include <boost/optional.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <string> namespace cxml { @@ -55,8 +55,8 @@ namespace dcp { class ReelMXF { public: - explicit ReelMXF (boost::shared_ptr<Asset> asset, boost::optional<std::string> key_id); - explicit ReelMXF (boost::shared_ptr<const cxml::Node>); + explicit ReelMXF (std::shared_ptr<Asset> asset, boost::optional<std::string> key_id); + explicit ReelMXF (std::shared_ptr<const cxml::Node>); virtual ~ReelMXF () {} /** @return the 4-character key type for this MXF (MDIK, MDAK, etc.) */ @@ -97,18 +97,18 @@ public: return _key_id; } - bool mxf_equals (boost::shared_ptr<const ReelMXF> other, EqualityOptions opt, NoteHandler note) const; + bool mxf_equals (std::shared_ptr<const ReelMXF> other, EqualityOptions opt, NoteHandler note) const; protected: template <class T> - boost::shared_ptr<T> asset_of_type () const { - return boost::dynamic_pointer_cast<T> (_asset_ref.asset ()); + std::shared_ptr<T> asset_of_type () const { + return std::dynamic_pointer_cast<T> (_asset_ref.asset ()); } template <class T> - boost::shared_ptr<T> asset_of_type () { - return boost::dynamic_pointer_cast<T> (_asset_ref.asset ()); + std::shared_ptr<T> asset_of_type () { + return std::dynamic_pointer_cast<T> (_asset_ref.asset ()); } void write_to_cpl_mxf (xmlpp::Node* node) const; diff --git a/src/reel_picture_asset.cc b/src/reel_picture_asset.cc index 3052c616..6e6cd035 100644 --- a/src/reel_picture_asset.cc +++ b/src/reel_picture_asset.cc @@ -47,8 +47,8 @@ using std::bad_cast; using std::string; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using boost::optional; using namespace dcp; diff --git a/src/reel_picture_asset.h b/src/reel_picture_asset.h index 88729148..a1f92628 100644 --- a/src/reel_picture_asset.h +++ b/src/reel_picture_asset.h @@ -50,19 +50,19 @@ namespace dcp { class ReelPictureAsset : public ReelAsset, public ReelMXF { public: - ReelPictureAsset (boost::shared_ptr<PictureAsset> asset, int64_t entry_point); - explicit ReelPictureAsset (boost::shared_ptr<const cxml::Node>); + ReelPictureAsset (std::shared_ptr<PictureAsset> asset, int64_t entry_point); + explicit ReelPictureAsset (std::shared_ptr<const cxml::Node>); virtual xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const; - bool equals (boost::shared_ptr<const ReelPictureAsset>, EqualityOptions, NoteHandler) const; + bool equals (std::shared_ptr<const ReelPictureAsset>, EqualityOptions, NoteHandler) const; /** @return the PictureAsset that this object refers to */ - boost::shared_ptr<const PictureAsset> asset () const { + std::shared_ptr<const PictureAsset> asset () const { return asset_of_type<const PictureAsset> (); } /** @return the PictureAsset that this object refers to */ - boost::shared_ptr<PictureAsset> asset () { + std::shared_ptr<PictureAsset> asset () { return asset_of_type<PictureAsset> (); } diff --git a/src/reel_sound_asset.cc b/src/reel_sound_asset.cc index 40466ff3..52095999 100644 --- a/src/reel_sound_asset.cc +++ b/src/reel_sound_asset.cc @@ -41,7 +41,7 @@ #include <libxml++/libxml++.h> using std::string; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; ReelSoundAsset::ReelSoundAsset (shared_ptr<SoundAsset> asset, int64_t entry_point) diff --git a/src/reel_sound_asset.h b/src/reel_sound_asset.h index 57d14bc6..cbc667e5 100644 --- a/src/reel_sound_asset.h +++ b/src/reel_sound_asset.h @@ -38,7 +38,7 @@ #include "reel_mxf.h" #include "reel_asset.h" #include "sound_asset.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <string> namespace dcp { @@ -49,19 +49,19 @@ namespace dcp { class ReelSoundAsset : public ReelAsset, public ReelMXF { public: - ReelSoundAsset (boost::shared_ptr<dcp::SoundAsset> content, int64_t entry_point); - explicit ReelSoundAsset (boost::shared_ptr<const cxml::Node>); + ReelSoundAsset (std::shared_ptr<dcp::SoundAsset> content, int64_t entry_point); + explicit ReelSoundAsset (std::shared_ptr<const cxml::Node>); xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const; - bool equals (boost::shared_ptr<const ReelSoundAsset>, EqualityOptions, NoteHandler) const; + bool equals (std::shared_ptr<const ReelSoundAsset>, EqualityOptions, NoteHandler) const; /** @return the SoundAsset that this object refers to */ - boost::shared_ptr<SoundAsset> asset () { + std::shared_ptr<SoundAsset> asset () { return asset_of_type<SoundAsset> (); } /** @return the SoundAsset that this object refers to */ - boost::shared_ptr<const SoundAsset> asset () const { + std::shared_ptr<const SoundAsset> asset () const { return asset_of_type<const SoundAsset> (); } diff --git a/src/reel_stereo_picture_asset.cc b/src/reel_stereo_picture_asset.cc index 8a169df2..06c57c66 100644 --- a/src/reel_stereo_picture_asset.cc +++ b/src/reel_stereo_picture_asset.cc @@ -42,16 +42,16 @@ using std::string; using std::pair; using std::make_pair; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; -ReelStereoPictureAsset::ReelStereoPictureAsset (boost::shared_ptr<StereoPictureAsset> mxf, int64_t entry_point) +ReelStereoPictureAsset::ReelStereoPictureAsset (std::shared_ptr<StereoPictureAsset> mxf, int64_t entry_point) : ReelPictureAsset (mxf, entry_point) { } -ReelStereoPictureAsset::ReelStereoPictureAsset (boost::shared_ptr<const cxml::Node> node) +ReelStereoPictureAsset::ReelStereoPictureAsset (std::shared_ptr<const cxml::Node> node) : ReelPictureAsset (node) { node->done (); diff --git a/src/reel_stereo_picture_asset.h b/src/reel_stereo_picture_asset.h index 80353b77..b343626f 100644 --- a/src/reel_stereo_picture_asset.h +++ b/src/reel_stereo_picture_asset.h @@ -51,16 +51,16 @@ class StereoPictureAsset; class ReelStereoPictureAsset : public ReelPictureAsset { public: - ReelStereoPictureAsset (boost::shared_ptr<StereoPictureAsset> content, int64_t entry_point); - explicit ReelStereoPictureAsset (boost::shared_ptr<const cxml::Node>); + ReelStereoPictureAsset (std::shared_ptr<StereoPictureAsset> content, int64_t entry_point); + explicit ReelStereoPictureAsset (std::shared_ptr<const cxml::Node>); /** @return the StereoPictureAsset that this object refers to */ - boost::shared_ptr<const StereoPictureAsset> stereo_asset () const { + std::shared_ptr<const StereoPictureAsset> stereo_asset () const { return asset_of_type<const StereoPictureAsset> (); } /** @return the StereoPictureAsset that this object refers to */ - boost::shared_ptr<StereoPictureAsset> stereo_asset () { + std::shared_ptr<StereoPictureAsset> stereo_asset () { return asset_of_type<StereoPictureAsset> (); } diff --git a/src/reel_subtitle_asset.cc b/src/reel_subtitle_asset.cc index 00c694a1..029c8cb0 100644 --- a/src/reel_subtitle_asset.cc +++ b/src/reel_subtitle_asset.cc @@ -42,19 +42,19 @@ #include <libxml++/libxml++.h> using std::string; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using boost::optional; using namespace dcp; -ReelSubtitleAsset::ReelSubtitleAsset (boost::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) +ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) : ReelAsset (asset->id(), edit_rate, intrinsic_duration, entry_point) , ReelMXF (asset, dynamic_pointer_cast<SMPTESubtitleAsset>(asset) ? dynamic_pointer_cast<SMPTESubtitleAsset>(asset)->key_id() : optional<string>()) { } -ReelSubtitleAsset::ReelSubtitleAsset (boost::shared_ptr<const cxml::Node> node) +ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr<const cxml::Node> node) : ReelAsset (node) , ReelMXF (node) { diff --git a/src/reel_subtitle_asset.h b/src/reel_subtitle_asset.h index a0cc405c..13e72133 100644 --- a/src/reel_subtitle_asset.h +++ b/src/reel_subtitle_asset.h @@ -53,13 +53,13 @@ class SubtitleAsset; class ReelSubtitleAsset : public ReelAsset, public ReelMXF { public: - ReelSubtitleAsset (boost::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); - explicit ReelSubtitleAsset (boost::shared_ptr<const cxml::Node>); + ReelSubtitleAsset (std::shared_ptr<SubtitleAsset> asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); + explicit ReelSubtitleAsset (std::shared_ptr<const cxml::Node>); xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const; - bool equals (boost::shared_ptr<const ReelSubtitleAsset>, EqualityOptions, NoteHandler) const; + bool equals (std::shared_ptr<const ReelSubtitleAsset>, EqualityOptions, NoteHandler) const; - boost::shared_ptr<SubtitleAsset> asset () const { + std::shared_ptr<SubtitleAsset> asset () const { return asset_of_type<SubtitleAsset> (); } @@ -34,7 +34,7 @@ #include "ref.h" using std::list; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; /** Look through a list of assets and copy a shared_ptr to any asset @@ -41,7 +41,7 @@ #include "exceptions.h" #include "asset.h" #include "util.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <string> namespace dcp { @@ -66,7 +66,7 @@ public: {} /** Initialise a Ref with a shared_ptr to an asset */ - explicit Ref (boost::shared_ptr<Asset> asset) + explicit Ref (std::shared_ptr<Asset> asset) : _id (asset->id ()) , _asset (asset) {} @@ -77,7 +77,7 @@ public: _id = id; } - void resolve (std::list<boost::shared_ptr<Asset> > assets); + void resolve (std::list<std::shared_ptr<Asset> > assets); /** @return the ID of the thing that we are pointing to */ std::string id () const { @@ -87,7 +87,7 @@ public: /** @return a shared_ptr to the thing; an UnresolvedRefError is thrown * if the shared_ptr is not known. */ - boost::shared_ptr<Asset> asset () const { + std::shared_ptr<Asset> asset () const { if (!_asset) { throw UnresolvedRefError (_id); } @@ -113,7 +113,7 @@ public: private: std::string _id; ///< ID; will always be known - boost::shared_ptr<Asset> _asset; ///< shared_ptr to the thing, may be null. + std::shared_ptr<Asset> _asset; ///< shared_ptr to the thing, may be null. }; } diff --git a/src/rgb_xyz.cc b/src/rgb_xyz.cc index d0774e7c..d7c9ae6f 100644 --- a/src/rgb_xyz.cc +++ b/src/rgb_xyz.cc @@ -42,7 +42,7 @@ using std::min; using std::max; using std::cout; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using namespace dcp; @@ -65,7 +65,7 @@ using namespace dcp; */ void dcp::xyz_to_rgba ( - boost::shared_ptr<const OpenJPEGImage> xyz_image, + std::shared_ptr<const OpenJPEGImage> xyz_image, ColourConversion const & conversion, uint8_t* argb, int stride diff --git a/src/rgb_xyz.h b/src/rgb_xyz.h index 652f5522..60df612c 100644 --- a/src/rgb_xyz.h +++ b/src/rgb_xyz.h @@ -32,7 +32,7 @@ */ #include "types.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/optional.hpp> #include <stdint.h> @@ -43,21 +43,21 @@ class Image; class ColourConversion; extern void xyz_to_rgba ( - boost::shared_ptr<const OpenJPEGImage>, + std::shared_ptr<const OpenJPEGImage>, ColourConversion const & conversion, uint8_t* rgba, int stride ); extern void xyz_to_rgb ( - boost::shared_ptr<const OpenJPEGImage>, + std::shared_ptr<const OpenJPEGImage>, ColourConversion const & conversion, uint8_t* rgb, int stride, boost::optional<NoteHandler> note = boost::optional<NoteHandler> () ); -extern boost::shared_ptr<OpenJPEGImage> rgb_to_xyz ( +extern std::shared_ptr<OpenJPEGImage> rgb_to_xyz ( uint8_t const * rgb, dcp::Size size, int stride, diff --git a/src/s_gamut3_transfer_function.cc b/src/s_gamut3_transfer_function.cc index 371aebac..599028b4 100644 --- a/src/s_gamut3_transfer_function.cc +++ b/src/s_gamut3_transfer_function.cc @@ -39,8 +39,8 @@ #include <cmath> using std::pow; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using namespace dcp; double * diff --git a/src/s_gamut3_transfer_function.h b/src/s_gamut3_transfer_function.h index 231b4cc6..3f83da87 100644 --- a/src/s_gamut3_transfer_function.h +++ b/src/s_gamut3_transfer_function.h @@ -42,7 +42,7 @@ namespace dcp { class SGamut3TransferFunction : public TransferFunction { public: - bool about_equal (boost::shared_ptr<const TransferFunction> other, double epsilon) const; + bool about_equal (std::shared_ptr<const TransferFunction> other, double epsilon) const; protected: double * make_lut (int bit_depth, bool inverse) const; diff --git a/src/smpte_load_font_node.cc b/src/smpte_load_font_node.cc index 6d746048..4d206784 100644 --- a/src/smpte_load_font_node.cc +++ b/src/smpte_load_font_node.cc @@ -36,7 +36,7 @@ #include <libcxml/cxml.h> using std::string; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; SMPTELoadFontNode::SMPTELoadFontNode (string id, string urn_) diff --git a/src/smpte_load_font_node.h b/src/smpte_load_font_node.h index e472408c..c310246d 100644 --- a/src/smpte_load_font_node.h +++ b/src/smpte_load_font_node.h @@ -36,7 +36,7 @@ */ #include "load_font_node.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/optional.hpp> namespace cxml { @@ -53,7 +53,7 @@ class SMPTELoadFontNode : public LoadFontNode public: SMPTELoadFontNode () {} SMPTELoadFontNode (std::string id, std::string urn); - explicit SMPTELoadFontNode (boost::shared_ptr<const cxml::Node> node); + explicit SMPTELoadFontNode (std::shared_ptr<const cxml::Node> node); std::string urn; }; diff --git a/src/smpte_subtitle_asset.cc b/src/smpte_subtitle_asset.cc index 606ef84c..1ce64e5c 100644 --- a/src/smpte_subtitle_asset.cc +++ b/src/smpte_subtitle_asset.cc @@ -56,11 +56,11 @@ using std::string; using std::list; using std::vector; using std::map; -using boost::shared_ptr; +using std::shared_ptr; using boost::split; using boost::is_any_of; using boost::shared_array; -using boost::dynamic_pointer_cast; +using std::dynamic_pointer_cast; using boost::optional; using boost::starts_with; using namespace dcp; diff --git a/src/smpte_subtitle_asset.h b/src/smpte_subtitle_asset.h index 1f2215a8..b66b1ea6 100644 --- a/src/smpte_subtitle_asset.h +++ b/src/smpte_subtitle_asset.h @@ -65,16 +65,16 @@ public: explicit SMPTESubtitleAsset (boost::filesystem::path file); bool equals ( - boost::shared_ptr<const Asset>, + std::shared_ptr<const Asset>, EqualityOptions, NoteHandler note ) const; - std::list<boost::shared_ptr<LoadFontNode> > load_font_nodes () const; + std::list<std::shared_ptr<LoadFontNode> > load_font_nodes () const; std::string xml_as_string () const; void write (boost::filesystem::path path) const; - void add (boost::shared_ptr<Subtitle>); + void add (std::shared_ptr<Subtitle>); void add_font (std::string id, dcp::ArrayData data); void set_key (Key key); @@ -173,9 +173,9 @@ private: friend struct ::write_smpte_subtitle_test; friend struct ::write_smpte_subtitle_test2; - void read_fonts (boost::shared_ptr<ASDCP::TimedText::MXFReader>); - void parse_xml (boost::shared_ptr<cxml::Document> xml); - void read_mxf_descriptor (boost::shared_ptr<ASDCP::TimedText::MXFReader> reader, boost::shared_ptr<DecryptionContext> dec); + void read_fonts (std::shared_ptr<ASDCP::TimedText::MXFReader>); + void parse_xml (std::shared_ptr<cxml::Document> xml); + void read_mxf_descriptor (std::shared_ptr<ASDCP::TimedText::MXFReader> reader, std::shared_ptr<DecryptionContext> dec); /** The total length of this content in video frames. The amount of * content presented may be less than this. @@ -194,7 +194,7 @@ private: int _time_code_rate; boost::optional<Time> _start_time; - std::list<boost::shared_ptr<SMPTELoadFontNode> > _load_font_nodes; + std::list<std::shared_ptr<SMPTELoadFontNode> > _load_font_nodes; /** UUID for the XML inside the MXF, which should be different to the ID of the MXF according to * Doremi's 2.8.18 release notes. */ diff --git a/src/sound_asset.cc b/src/sound_asset.cc index 056471be..618574b6 100644 --- a/src/sound_asset.cc +++ b/src/sound_asset.cc @@ -53,8 +53,8 @@ using std::string; using std::vector; using std::list; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using namespace dcp; diff --git a/src/sound_asset.h b/src/sound_asset.h index 80f1cfb6..8e55aef7 100644 --- a/src/sound_asset.h +++ b/src/sound_asset.h @@ -59,11 +59,11 @@ public: explicit SoundAsset (boost::filesystem::path file); SoundAsset (Fraction edit_rate, int sampling_rate, int channels, LanguageTag language, Standard standard); - boost::shared_ptr<SoundAssetWriter> start_write (boost::filesystem::path file, std::vector<Channel> active_channels, bool atmos_sync = false); - boost::shared_ptr<SoundAssetReader> start_read () const; + std::shared_ptr<SoundAssetWriter> start_write (boost::filesystem::path file, std::vector<Channel> active_channels, bool atmos_sync = false); + std::shared_ptr<SoundAssetReader> start_read () const; bool equals ( - boost::shared_ptr<const Asset> other, + std::shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note ) const; diff --git a/src/sound_asset_writer.h b/src/sound_asset_writer.h index d3b260e6..f1cdf419 100644 --- a/src/sound_asset_writer.h +++ b/src/sound_asset_writer.h @@ -39,7 +39,7 @@ #include "fsk.h" #include "types.h" #include "sound_frame.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/filesystem.hpp> #include <boost/shared_array.hpp> @@ -81,7 +81,7 @@ private: */ struct ASDCPState; - boost::shared_ptr<ASDCPState> _state; + std::shared_ptr<ASDCPState> _state; SoundAsset* _asset; int _frame_buffer_offset; diff --git a/src/sound_frame.cc b/src/sound_frame.cc index 53d00b38..821a8866 100644 --- a/src/sound_frame.cc +++ b/src/sound_frame.cc @@ -38,7 +38,7 @@ using std::cout; using namespace dcp; -SoundFrame::SoundFrame (ASDCP::PCM::MXFReader* reader, int n, boost::shared_ptr<const DecryptionContext> c) +SoundFrame::SoundFrame (ASDCP::PCM::MXFReader* reader, int n, std::shared_ptr<const DecryptionContext> c) : Frame<ASDCP::PCM::MXFReader, ASDCP::PCM::FrameBuffer> (reader, n, c) { ASDCP::PCM::AudioDescriptor desc; diff --git a/src/sound_frame.h b/src/sound_frame.h index 5494d2da..096bc1b3 100644 --- a/src/sound_frame.h +++ b/src/sound_frame.h @@ -46,7 +46,7 @@ namespace dcp { class SoundFrame : public Frame<ASDCP::PCM::MXFReader, ASDCP::PCM::FrameBuffer> { public: - SoundFrame (ASDCP::PCM::MXFReader* reader, int n, boost::shared_ptr<const DecryptionContext> c); + SoundFrame (ASDCP::PCM::MXFReader* reader, int n, std::shared_ptr<const DecryptionContext> c); int channels () const; int samples () const; int32_t get (int channel, int sample) const; diff --git a/src/stereo_picture_asset.cc b/src/stereo_picture_asset.cc index a8805304..0dfba553 100644 --- a/src/stereo_picture_asset.cc +++ b/src/stereo_picture_asset.cc @@ -42,8 +42,8 @@ using std::string; using std::pair; using std::make_pair; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using namespace dcp; StereoPictureAsset::StereoPictureAsset (boost::filesystem::path file) diff --git a/src/stereo_picture_asset.h b/src/stereo_picture_asset.h index 704ea1d4..e0302758 100644 --- a/src/stereo_picture_asset.h +++ b/src/stereo_picture_asset.h @@ -47,11 +47,11 @@ public: explicit StereoPictureAsset (Fraction edit_rate, Standard standard); /** Start a progressive write to a StereoPictureAsset */ - boost::shared_ptr<PictureAssetWriter> start_write (boost::filesystem::path file, bool); - boost::shared_ptr<StereoPictureAssetReader> start_read () const; + std::shared_ptr<PictureAssetWriter> start_write (boost::filesystem::path file, bool); + std::shared_ptr<StereoPictureAssetReader> start_read () const; bool equals ( - boost::shared_ptr<const Asset> other, + std::shared_ptr<const Asset> other, EqualityOptions opt, NoteHandler note ) const; diff --git a/src/stereo_picture_asset_writer.cc b/src/stereo_picture_asset_writer.cc index 14900e6d..124d0185 100644 --- a/src/stereo_picture_asset_writer.cc +++ b/src/stereo_picture_asset_writer.cc @@ -42,7 +42,7 @@ #include "picture_asset_writer_common.cc" using std::string; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; struct StereoPictureAssetWriter::ASDCPState : public ASDCPStateBase diff --git a/src/stereo_picture_asset_writer.h b/src/stereo_picture_asset_writer.h index 82b78757..d4dfa0f6 100644 --- a/src/stereo_picture_asset_writer.h +++ b/src/stereo_picture_asset_writer.h @@ -33,7 +33,7 @@ #include "picture_asset_writer.h" #include "types.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/utility.hpp> #include <stdint.h> #include <string> @@ -73,7 +73,7 @@ private: */ struct ASDCPState; - boost::shared_ptr<ASDCPState> _state; + std::shared_ptr<ASDCPState> _state; dcp::Eye _next_eye; }; diff --git a/src/stereo_picture_frame.cc b/src/stereo_picture_frame.cc index 4bbeae24..36c26602 100644 --- a/src/stereo_picture_frame.cc +++ b/src/stereo_picture_frame.cc @@ -43,7 +43,7 @@ #include <asdcp/KM_fileio.h> using std::string; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; diff --git a/src/stereo_picture_frame.h b/src/stereo_picture_frame.h index c38124c0..13c02232 100644 --- a/src/stereo_picture_frame.h +++ b/src/stereo_picture_frame.h @@ -36,7 +36,7 @@ #include "types.h" #include "asset_reader.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/noncopyable.hpp> #include <boost/filesystem.hpp> #include <stdint.h> @@ -63,7 +63,7 @@ class StereoPictureFrame : public boost::noncopyable public: StereoPictureFrame (); - boost::shared_ptr<OpenJPEGImage> xyz_image (Eye eye, int reduce = 0) const; + std::shared_ptr<OpenJPEGImage> xyz_image (Eye eye, int reduce = 0) const; class Part : public Data { @@ -75,15 +75,15 @@ public: private: friend class StereoPictureFrame; - Part (boost::shared_ptr<ASDCP::JP2K::SFrameBuffer> buffer, Eye eye); + Part (std::shared_ptr<ASDCP::JP2K::SFrameBuffer> buffer, Eye eye); ASDCP::JP2K::FrameBuffer& mono () const; - boost::shared_ptr<ASDCP::JP2K::SFrameBuffer> _buffer; + std::shared_ptr<ASDCP::JP2K::SFrameBuffer> _buffer; Eye _eye; }; - boost::shared_ptr<Part> left () const; - boost::shared_ptr<Part> right () const; + std::shared_ptr<Part> left () const; + std::shared_ptr<Part> right () const; private: /* XXX: this is a bit of a shame, but I tried friend StereoPictureAssetReader and it's @@ -91,9 +91,9 @@ private: */ friend class AssetReader<ASDCP::JP2K::MXFSReader, StereoPictureFrame>; - StereoPictureFrame (ASDCP::JP2K::MXFSReader* reader, int n, boost::shared_ptr<DecryptionContext>); + StereoPictureFrame (ASDCP::JP2K::MXFSReader* reader, int n, std::shared_ptr<DecryptionContext>); - boost::shared_ptr<ASDCP::JP2K::SFrameBuffer> _buffer; + std::shared_ptr<ASDCP::JP2K::SFrameBuffer> _buffer; }; } diff --git a/src/subtitle_asset.cc b/src/subtitle_asset.cc index 96e5cba5..570877ab 100644 --- a/src/subtitle_asset.cc +++ b/src/subtitle_asset.cc @@ -54,10 +54,10 @@ using std::list; using std::cout; using std::cerr; using std::map; -using boost::shared_ptr; +using std::shared_ptr; using boost::shared_array; using boost::optional; -using boost::dynamic_pointer_cast; +using std::dynamic_pointer_cast; using boost::lexical_cast; using namespace dcp; diff --git a/src/subtitle_asset.h b/src/subtitle_asset.h index ab909a26..dff31cc6 100644 --- a/src/subtitle_asset.h +++ b/src/subtitle_asset.h @@ -83,17 +83,17 @@ public: explicit SubtitleAsset (boost::filesystem::path file); bool equals ( - boost::shared_ptr<const Asset>, + std::shared_ptr<const Asset>, EqualityOptions, NoteHandler note ) const; - std::list<boost::shared_ptr<Subtitle> > subtitles_during (Time from, Time to, bool starting) const; - std::list<boost::shared_ptr<Subtitle> > const & subtitles () const { + std::list<std::shared_ptr<Subtitle> > subtitles_during (Time from, Time to, bool starting) const; + std::list<std::shared_ptr<Subtitle> > const & subtitles () const { return _subtitles; } - virtual void add (boost::shared_ptr<Subtitle>); + virtual void add (std::shared_ptr<Subtitle>); virtual void add_font (std::string id, dcp::ArrayData data) = 0; std::map<std::string, ArrayData> font_data () const; std::map<std::string, boost::filesystem::path> font_filenames () const; @@ -105,7 +105,7 @@ public: void fix_empty_font_ids (); - virtual std::list<boost::shared_ptr<LoadFontNode> > load_font_nodes () const = 0; + virtual std::list<std::shared_ptr<LoadFontNode> > load_font_nodes () const = 0; std::string raw_xml () const { return _raw_xml; @@ -152,7 +152,7 @@ protected: void subtitles_as_xml (xmlpp::Element* root, int time_code_rate, Standard standard) const; /** All our subtitles, in no particular order */ - std::list<boost::shared_ptr<Subtitle> > _subtitles; + std::list<std::shared_ptr<Subtitle> > _subtitles; class Font { @@ -190,7 +190,7 @@ private: void maybe_add_subtitle (std::string text, std::list<ParseState> const & parse_state, Standard standard); - static void pull_fonts (boost::shared_ptr<order::Part> part); + static void pull_fonts (std::shared_ptr<order::Part> part); }; } diff --git a/src/subtitle_asset_internal.cc b/src/subtitle_asset_internal.cc index 7b9e18e9..ae5893de 100644 --- a/src/subtitle_asset_internal.cc +++ b/src/subtitle_asset_internal.cc @@ -38,7 +38,7 @@ using std::string; using std::map; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; string @@ -141,7 +141,7 @@ order::Part::write_xml (xmlpp::Element* parent, order::Context& context) const parent = as_xml (parent, context); - BOOST_FOREACH (boost::shared_ptr<order::Part> i, children) { + BOOST_FOREACH (std::shared_ptr<order::Part> i, children) { i->write_xml (parent, context); } } diff --git a/src/subtitle_asset_internal.h b/src/subtitle_asset_internal.h index e5c8e141..6168ba18 100644 --- a/src/subtitle_asset_internal.h +++ b/src/subtitle_asset_internal.h @@ -68,7 +68,7 @@ class Font public: Font () {} - Font (boost::shared_ptr<SubtitleString> s, Standard standard); + Font (std::shared_ptr<SubtitleString> s, Standard standard); xmlpp::Element* as_xml (xmlpp::Element* parent, Context& context) const; @@ -91,11 +91,11 @@ private: class Part { public: - Part (boost::shared_ptr<Part> parent_) + Part (std::shared_ptr<Part> parent_) : parent (parent_) {} - Part (boost::shared_ptr<Part> parent_, Font font_) + Part (std::shared_ptr<Part> parent_, Font font_) : parent (parent_) , font (font_) {} @@ -105,15 +105,15 @@ public: virtual xmlpp::Element* as_xml (xmlpp::Element* parent, Context &) const; void write_xml (xmlpp::Element* parent, order::Context& context) const; - boost::shared_ptr<Part> parent; + std::shared_ptr<Part> parent; Font font; - std::list<boost::shared_ptr<Part> > children; + std::list<std::shared_ptr<Part> > children; }; class String : public Part { public: - String (boost::shared_ptr<Part> parent, Font font, std::string text_) + String (std::shared_ptr<Part> parent, Font font, std::string text_) : Part (parent, font) , text (text_) {} @@ -126,7 +126,7 @@ public: class Text : public Part { public: - Text (boost::shared_ptr<Part> parent, HAlign h_align, float h_position, VAlign v_align, float v_position, Direction direction) + Text (std::shared_ptr<Part> parent, HAlign h_align, float h_position, VAlign v_align, float v_position, Direction direction) : Part (parent) , _h_align (h_align) , _h_position (h_position) @@ -148,7 +148,7 @@ private: class Subtitle : public Part { public: - Subtitle (boost::shared_ptr<Part> parent, Time in, Time out, Time fade_up, Time fade_down) + Subtitle (std::shared_ptr<Part> parent, Time in, Time out, Time fade_up, Time fade_down) : Part (parent) , _in (in) , _out (out) @@ -168,7 +168,7 @@ private: class Image : public Part { public: - Image (boost::shared_ptr<Part> parent, std::string id, ArrayData png_data, HAlign h_align, float h_position, VAlign v_align, float v_position) + Image (std::shared_ptr<Part> parent, std::string id, ArrayData png_data, HAlign h_align, float h_position, VAlign v_align, float v_position) : Part (parent) , _png_data (png_data) , _id (id) diff --git a/src/subtitle_image.cc b/src/subtitle_image.cc index e280e392..99d63d27 100644 --- a/src/subtitle_image.cc +++ b/src/subtitle_image.cc @@ -36,7 +36,7 @@ using std::ostream; using std::string; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; SubtitleImage::SubtitleImage ( diff --git a/src/subtitle_image.h b/src/subtitle_image.h index e397fb2b..2cdfea25 100644 --- a/src/subtitle_image.h +++ b/src/subtitle_image.h @@ -99,7 +99,7 @@ public: return _file; } - bool equals (boost::shared_ptr<dcp::SubtitleImage> other, EqualityOptions options, NoteHandler note); + bool equals (std::shared_ptr<dcp::SubtitleImage> other, EqualityOptions options, NoteHandler note); private: ArrayData _png_image; diff --git a/src/transfer_function.cc b/src/transfer_function.cc index ea71818e..8746c828 100644 --- a/src/transfer_function.cc +++ b/src/transfer_function.cc @@ -38,7 +38,7 @@ using std::pow; using std::map; using std::pair; using std::make_pair; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; TransferFunction::~TransferFunction () diff --git a/src/transfer_function.h b/src/transfer_function.h index 8facf8a4..52624c66 100644 --- a/src/transfer_function.h +++ b/src/transfer_function.h @@ -39,7 +39,7 @@ #define LIBDCP_TRANSFER_FUNCTION_H #include <boost/noncopyable.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/thread/mutex.hpp> #include <map> @@ -56,7 +56,7 @@ public: /** @return A look-up table (of size 2^bit_depth) whose values range from 0 to 1 */ double const * lut (int bit_depth, bool inverse) const; - virtual bool about_equal (boost::shared_ptr<const TransferFunction> other, double epsilon) const = 0; + virtual bool about_equal (std::shared_ptr<const TransferFunction> other, double epsilon) const = 0; protected: /** Make a LUT and return an array allocated by new */ diff --git a/src/types.h b/src/types.h index 1102f16b..3bd5c2c3 100644 --- a/src/types.h +++ b/src/types.h @@ -40,7 +40,7 @@ #include <libcxml/cxml.h> #include <asdcp/KLV.h> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/function.hpp> #include <string> diff --git a/src/util.cc b/src/util.cc index 56b44889..133f6dc9 100644 --- a/src/util.cc +++ b/src/util.cc @@ -70,7 +70,7 @@ using std::list; using std::setw; using std::setfill; using std::ostream; -using boost::shared_ptr; +using std::shared_ptr; using boost::shared_array; using boost::optional; using boost::function; @@ -43,7 +43,7 @@ #include "types.h" #include "local_time.h" #include <asdcp/KM_log.h> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/function.hpp> #include <boost/filesystem.hpp> #include <boost/optional.hpp> diff --git a/src/verify.cc b/src/verify.cc index 69109983..e31fa682 100644 --- a/src/verify.cc +++ b/src/verify.cc @@ -78,10 +78,10 @@ using std::string; using std::cout; using std::map; using std::max; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using boost::function; -using boost::dynamic_pointer_cast; +using std::dynamic_pointer_cast; using namespace dcp; using namespace xercesc; @@ -41,61 +41,61 @@ namespace dcp { template <class T> -boost::shared_ptr<T> +std::shared_ptr<T> optional_type_child (cxml::Node const & node, std::string name) { - std::list<boost::shared_ptr<cxml::Node> > n = node.node_children (name); + std::list<std::shared_ptr<cxml::Node> > n = node.node_children (name); if (n.size() > 1) { throw XMLError ("duplicate XML tag"); } else if (n.empty ()) { - return boost::shared_ptr<T> (); + return std::shared_ptr<T> (); } - return boost::shared_ptr<T> (new T (n.front ())); + return std::shared_ptr<T> (new T (n.front ())); } 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))); +std::shared_ptr<T> type_child (std::shared_ptr<const cxml::Node> node, std::string name) { + return std::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) +std::shared_ptr<T> +optional_type_child (std::shared_ptr<const cxml::Node> node, std::string name) { return optional_type_child<T> (*node.get(), name); } template <class T> -std::list<boost::shared_ptr<T> > +std::list<std::shared_ptr<T> > type_children (cxml::Node const & node, std::string name) { - std::list<boost::shared_ptr<cxml::Node> > n = node.node_children (name); - std::list<boost::shared_ptr<T> > r; - for (typename std::list<boost::shared_ptr<cxml::Node> >::iterator i = n.begin(); i != n.end(); ++i) { - r.push_back (boost::shared_ptr<T> (new T (*i))); + std::list<std::shared_ptr<cxml::Node> > n = node.node_children (name); + std::list<std::shared_ptr<T> > r; + for (typename std::list<std::shared_ptr<cxml::Node> >::iterator i = n.begin(); i != n.end(); ++i) { + r.push_back (std::shared_ptr<T> (new T (*i))); } return r; } template <class T> -std::list<boost::shared_ptr<T> > -type_children (boost::shared_ptr<const cxml::Node> node, std::string name) +std::list<std::shared_ptr<T> > +type_children (std::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> > +std::list<std::shared_ptr<T> > type_grand_children (cxml::Node const & node, std::string name, std::string sub) { - boost::shared_ptr<const cxml::Node> p = node.node_child (name); + std::shared_ptr<const cxml::Node> p = node.node_child (name); return type_children<T> (p, sub); } template <class T> -std::list<boost::shared_ptr<T> > -type_grand_children (boost::shared_ptr<const cxml::Node> node, std::string name, std::string sub) +std::list<std::shared_ptr<T> > +type_grand_children (std::shared_ptr<const cxml::Node> node, std::string name, std::string sub) { return type_grand_children<T> (*node.get(), name, sub); } diff --git a/test/asset_test.cc b/test/asset_test.cc index 13f4773e..a6fa4b33 100644 --- a/test/asset_test.cc +++ b/test/asset_test.cc @@ -37,7 +37,7 @@ #include <boost/test/unit_test.hpp> using std::string; -using boost::shared_ptr; +using std::shared_ptr; class DummyAsset : public dcp::Asset { diff --git a/test/certificates_test.cc b/test/certificates_test.cc index 692b169e..1dc11932 100644 --- a/test/certificates_test.cc +++ b/test/certificates_test.cc @@ -41,7 +41,7 @@ using std::list; using std::string; -using boost::shared_ptr; +using std::shared_ptr; /** Check that loading certificates from files via strings works */ BOOST_AUTO_TEST_CASE (certificates1) diff --git a/test/colour_conversion_test.cc b/test/colour_conversion_test.cc index 16661b03..5a6bdd85 100644 --- a/test/colour_conversion_test.cc +++ b/test/colour_conversion_test.cc @@ -38,7 +38,7 @@ #include <cmath> using std::pow; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; static void diff --git a/test/combine_test.cc b/test/combine_test.cc index c5d2f4a7..6db968f6 100644 --- a/test/combine_test.cc +++ b/test/combine_test.cc @@ -53,7 +53,7 @@ using std::list; using std::string; using std::vector; using boost::optional; -using boost::shared_ptr; +using std::shared_ptr; static void diff --git a/test/cpl_metadata_test.cc b/test/cpl_metadata_test.cc index a97daaa9..6fef2c74 100644 --- a/test/cpl_metadata_test.cc +++ b/test/cpl_metadata_test.cc @@ -39,14 +39,14 @@ #include "reel.h" #include "reel_subtitle_asset.h" #include "test.h" -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/test/unit_test.hpp> using std::list; using std::string; using std::vector; -using boost::shared_ptr; +using std::shared_ptr; BOOST_AUTO_TEST_CASE (cpl_metadata_bad_values_test) diff --git a/test/cpl_ratings_test.cc b/test/cpl_ratings_test.cc index ae846998..931359b4 100644 --- a/test/cpl_ratings_test.cc +++ b/test/cpl_ratings_test.cc @@ -48,7 +48,7 @@ BOOST_AUTO_TEST_CASE (cpl_ratings) ratings.push_back (dcp::Rating("http://www.movielabs.com/md/ratings/GB/BBFC/1/12A%3C/Agency", "12A")); cpl.set_ratings (ratings); - cpl.write_xml ("build/test/cpl_ratings.xml", dcp::SMPTE, boost::shared_ptr<dcp::CertificateChain>()); + cpl.write_xml ("build/test/cpl_ratings.xml", dcp::SMPTE, std::shared_ptr<dcp::CertificateChain>()); list<string> ignore; ignore.push_back ("Id"); diff --git a/test/cpl_sar_test.cc b/test/cpl_sar_test.cc index 1988fa22..60945aae 100644 --- a/test/cpl_sar_test.cc +++ b/test/cpl_sar_test.cc @@ -39,7 +39,7 @@ #include <boost/test/unit_test.hpp> using std::string; -using boost::shared_ptr; +using std::shared_ptr; static void check (shared_ptr<dcp::ReelMonoPictureAsset> pa, dcp::Fraction far, string sar) diff --git a/test/dcp_font_test.cc b/test/dcp_font_test.cc index 313ff939..1a78bfd2 100644 --- a/test/dcp_font_test.cc +++ b/test/dcp_font_test.cc @@ -44,8 +44,8 @@ using std::list; using std::string; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using boost::shared_array; /** Create a DCP with interop subtitles and check that the font is written and read back correctly */ diff --git a/test/dcp_test.cc b/test/dcp_test.cc index 135887d5..347d433d 100644 --- a/test/dcp_test.cc +++ b/test/dcp_test.cc @@ -54,8 +54,8 @@ using std::string; using std::vector; -using boost::dynamic_pointer_cast; -using boost::shared_ptr; +using std::dynamic_pointer_cast; +using std::shared_ptr; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; #endif diff --git a/test/decryption_test.cc b/test/decryption_test.cc index 65f1fe87..6a7dde9d 100644 --- a/test/decryption_test.cc +++ b/test/decryption_test.cc @@ -49,8 +49,8 @@ using std::pair; using std::make_pair; -using boost::dynamic_pointer_cast; -using boost::shared_ptr; +using std::dynamic_pointer_cast; +using std::shared_ptr; using boost::scoped_array; pair<uint8_t*, dcp::Size> diff --git a/test/encryption_test.cc b/test/encryption_test.cc index 2793e8ad..9748ee3f 100644 --- a/test/encryption_test.cc +++ b/test/encryption_test.cc @@ -51,11 +51,11 @@ #include <asdcp/KM_util.h> #include <sndfile.h> #include <boost/test/unit_test.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> using std::vector; using std::string; -using boost::shared_ptr; +using std::shared_ptr; /** Load a certificate chain from build/test/data/ *.pem and then build * an encrypted DCP and a KDM using it. diff --git a/test/frame_info_hash_test.cc b/test/frame_info_hash_test.cc index 2d08669e..e01181d1 100644 --- a/test/frame_info_hash_test.cc +++ b/test/frame_info_hash_test.cc @@ -38,7 +38,7 @@ #include <boost/test/unit_test.hpp> using std::string; -using boost::shared_ptr; +using std::shared_ptr; static void check (unsigned int* seed, shared_ptr<dcp::PictureAssetWriter> writer, string hash) diff --git a/test/gamma_transfer_function_test.cc b/test/gamma_transfer_function_test.cc index 46af4dd7..993f4e9b 100644 --- a/test/gamma_transfer_function_test.cc +++ b/test/gamma_transfer_function_test.cc @@ -35,7 +35,7 @@ #include "modified_gamma_transfer_function.h" #include <boost/test/unit_test.hpp> -using boost::shared_ptr; +using std::shared_ptr; /** Check GammaTransferFunction::about_equal */ BOOST_AUTO_TEST_CASE (gamma_transfer_function_test) diff --git a/test/kdm_test.cc b/test/kdm_test.cc index bf5c14c5..21c922a2 100644 --- a/test/kdm_test.cc +++ b/test/kdm_test.cc @@ -51,7 +51,7 @@ using std::list; using std::string; using std::vector; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; /** Check reading and decryption of a KDM */ diff --git a/test/markers_test.cc b/test/markers_test.cc index f42f33c5..fe4fbb05 100644 --- a/test/markers_test.cc +++ b/test/markers_test.cc @@ -33,14 +33,14 @@ #include <boost/bind.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/test/unit_test.hpp> #include "cpl.h" #include "reel.h" #include "reel_markers_asset.h" using std::string; -using boost::shared_ptr; +using std::shared_ptr; BOOST_AUTO_TEST_CASE (markers_write_test) { diff --git a/test/mca_test.cc b/test/mca_test.cc index 3df03bd1..b573daf1 100644 --- a/test/mca_test.cc +++ b/test/mca_test.cc @@ -47,7 +47,7 @@ using std::list; using std::string; using std::vector; -using boost::shared_ptr; +using std::shared_ptr; /** Check that when we read a MXF and write its MCA metadata to a CPL we get the same answer diff --git a/test/read_dcp_test.cc b/test/read_dcp_test.cc index 66a4b43f..c885523a 100644 --- a/test/read_dcp_test.cc +++ b/test/read_dcp_test.cc @@ -37,7 +37,7 @@ #include "cpl.h" using std::list; -using boost::shared_ptr; +using std::shared_ptr; /** Read a SMPTE DCP that is in git and make sure that basic stuff is read in correctly */ BOOST_AUTO_TEST_CASE (read_dcp_test1) diff --git a/test/read_interop_subtitle_test.cc b/test/read_interop_subtitle_test.cc index 2860a725..c665bcc2 100644 --- a/test/read_interop_subtitle_test.cc +++ b/test/read_interop_subtitle_test.cc @@ -40,8 +40,8 @@ using std::list; using std::string; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; /** Load some subtitle content from Interop XML and check that it is read correctly */ BOOST_AUTO_TEST_CASE (read_interop_subtitle_test1) diff --git a/test/read_smpte_subtitle_test.cc b/test/read_smpte_subtitle_test.cc index 9cf1451d..7c367bd4 100644 --- a/test/read_smpte_subtitle_test.cc +++ b/test/read_smpte_subtitle_test.cc @@ -41,8 +41,8 @@ #include <boost/optional/optional_io.hpp> using std::list; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; /** Check reading of a SMPTE subtitle file */ BOOST_AUTO_TEST_CASE (read_smpte_subtitle_test) diff --git a/test/recovery_test.cc b/test/recovery_test.cc index afeba6d7..76dff195 100644 --- a/test/recovery_test.cc +++ b/test/recovery_test.cc @@ -39,7 +39,7 @@ #include <boost/filesystem.hpp> using std::string; -using boost::shared_ptr; +using std::shared_ptr; /** Check that recovery from a partially-written MXF works */ BOOST_AUTO_TEST_CASE (recovery) diff --git a/test/reel_asset_test.cc b/test/reel_asset_test.cc index 42d76525..bf609c2c 100644 --- a/test/reel_asset_test.cc +++ b/test/reel_asset_test.cc @@ -40,7 +40,7 @@ using std::string; using boost::optional; -using boost::shared_ptr; +using std::shared_ptr; /** Test the XML constructor of ReelPictureAsset */ diff --git a/test/rewrite_subs.cc b/test/rewrite_subs.cc index 724f424d..a6c708e3 100644 --- a/test/rewrite_subs.cc +++ b/test/rewrite_subs.cc @@ -43,7 +43,7 @@ using std::cout; using std::cerr; using std::list; using std::string; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; /** Load a DCP then re-write its subtitle XML or MXF in-place */ @@ -62,7 +62,7 @@ main (int argc, char* argv[]) dcp->read (); list<shared_ptr<CPL> > cpls = dcp->cpls (); - for (list<boost::shared_ptr<CPL> >::iterator i = cpls.begin(); i != cpls.end(); ++i) { + for (list<std::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) { diff --git a/test/rgb_xyz_test.cc b/test/rgb_xyz_test.cc index 5dcfe673..af79b1e3 100644 --- a/test/rgb_xyz_test.cc +++ b/test/rgb_xyz_test.cc @@ -42,7 +42,7 @@ using std::max; using std::list; using std::string; using std::cout; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using boost::scoped_array; diff --git a/test/round_trip_test.cc b/test/round_trip_test.cc index 10b7b6fe..49da5b65 100644 --- a/test/round_trip_test.cc +++ b/test/round_trip_test.cc @@ -57,7 +57,7 @@ using std::list; using std::vector; using std::string; -using boost::shared_ptr; +using std::shared_ptr; using boost::scoped_array; /** Build an encrypted picture asset and a KDM for it and check that the KDM can be decrypted */ diff --git a/test/smpte_subtitle_test.cc b/test/smpte_subtitle_test.cc index 35ad5550..6f72511e 100644 --- a/test/smpte_subtitle_test.cc +++ b/test/smpte_subtitle_test.cc @@ -36,7 +36,7 @@ using std::string; using boost::optional; -using boost::shared_ptr; +using std::shared_ptr; BOOST_AUTO_TEST_CASE (smpte_subtitle_id_test) { diff --git a/test/sound_frame_test.cc b/test/sound_frame_test.cc index a9088e26..a8060bd4 100644 --- a/test/sound_frame_test.cc +++ b/test/sound_frame_test.cc @@ -39,7 +39,7 @@ #include "exceptions.h" #include <sndfile.h> -using boost::shared_ptr; +using std::shared_ptr; BOOST_AUTO_TEST_CASE (sound_frame_test) { diff --git a/test/sync_test.cc b/test/sync_test.cc index 0bffdb83..cbfd7400 100644 --- a/test/sync_test.cc +++ b/test/sync_test.cc @@ -37,14 +37,14 @@ #include "sound_asset_writer.h" #include "test.h" #include <boost/filesystem.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/test/unit_test.hpp> #include <vector> using std::vector; using boost::shared_array; -using boost::shared_ptr; +using std::shared_ptr; static const int sample_A = 0.038 * 8388608; diff --git a/test/test.cc b/test/test.cc index 69772e98..76a6c4c5 100644 --- a/test/test.cc +++ b/test/test.cc @@ -68,7 +68,7 @@ using std::string; using std::min; using std::list; using std::vector; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; diff --git a/test/test.h b/test/test.h index ea697e40..fdc3c4d7 100644 --- a/test/test.h +++ b/test/test.h @@ -42,14 +42,14 @@ extern boost::filesystem::path xsd_test; extern void check_xml (xmlpp::Element* ref, xmlpp::Element* test, std::list<std::string> ignore_tags, bool ignore_whitespace = false); extern void check_xml (std::string ref, std::string test, std::list<std::string> ignore); extern void check_file (boost::filesystem::path ref, boost::filesystem::path check); -extern boost::shared_ptr<dcp::MonoPictureAsset> simple_picture (boost::filesystem::path path, std::string suffix); -extern boost::shared_ptr<dcp::DCP> make_simple (boost::filesystem::path path, int reels = 1); -extern boost::shared_ptr<dcp::DCP> make_simple_with_interop_subs (boost::filesystem::path path); -extern boost::shared_ptr<dcp::DCP> make_simple_with_smpte_subs (boost::filesystem::path path); -extern boost::shared_ptr<dcp::DCP> make_simple_with_interop_ccaps (boost::filesystem::path path); -extern boost::shared_ptr<dcp::DCP> make_simple_with_smpte_ccaps (boost::filesystem::path path); -extern boost::shared_ptr<dcp::OpenJPEGImage> black_image (); -extern boost::shared_ptr<dcp::ReelAsset> black_picture_asset (boost::filesystem::path dir, int frames = 24); +extern std::shared_ptr<dcp::MonoPictureAsset> simple_picture (boost::filesystem::path path, std::string suffix); +extern std::shared_ptr<dcp::DCP> make_simple (boost::filesystem::path path, int reels = 1); +extern std::shared_ptr<dcp::DCP> make_simple_with_interop_subs (boost::filesystem::path path); +extern std::shared_ptr<dcp::DCP> make_simple_with_smpte_subs (boost::filesystem::path path); +extern std::shared_ptr<dcp::DCP> make_simple_with_interop_ccaps (boost::filesystem::path path); +extern std::shared_ptr<dcp::DCP> make_simple_with_smpte_ccaps (boost::filesystem::path path); +extern std::shared_ptr<dcp::OpenJPEGImage> black_image (); +extern std::shared_ptr<dcp::ReelAsset> black_picture_asset (boost::filesystem::path dir, int frames = 24); /** Creating an object of this class will make asdcplib's random number generation * (more) predictable. diff --git a/test/verify_test.cc b/test/verify_test.cc index 9b9111d2..fdf85100 100644 --- a/test/verify_test.cc +++ b/test/verify_test.cc @@ -58,7 +58,7 @@ using std::string; using std::vector; using std::make_pair; using boost::optional; -using boost::shared_ptr; +using std::shared_ptr; static list<pair<string, optional<boost::filesystem::path> > > stages; diff --git a/test/write_subtitle_test.cc b/test/write_subtitle_test.cc index c3217dbc..deb18339 100644 --- a/test/write_subtitle_test.cc +++ b/test/write_subtitle_test.cc @@ -47,7 +47,7 @@ using std::list; using std::string; using boost::optional; -using boost::shared_ptr; +using std::shared_ptr; /** Test dcp::order::Font::take_intersection */ BOOST_AUTO_TEST_CASE (take_intersection_test) diff --git a/tools/common.cc b/tools/common.cc index 0238a8cc..ca3fd2c5 100644 --- a/tools/common.cc +++ b/tools/common.cc @@ -35,8 +35,8 @@ #include "dcp.h" using std::list; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; void dcp::filter_notes (list<dcp::VerificationNote>& notes, bool ignore_missing_assets) diff --git a/tools/dcpdecryptmxf.cc b/tools/dcpdecryptmxf.cc index a2998697..12cb492c 100644 --- a/tools/dcpdecryptmxf.cc +++ b/tools/dcpdecryptmxf.cc @@ -50,7 +50,7 @@ using std::string; using std::cerr; using std::cout; using boost::optional; -using boost::shared_ptr; +using std::shared_ptr; static void help (string n) diff --git a/tools/dcpdiff.cc b/tools/dcpdiff.cc index 2bda4347..5f9911d4 100644 --- a/tools/dcpdiff.cc +++ b/tools/dcpdiff.cc @@ -37,7 +37,7 @@ #include "mxf.h" #include <getopt.h> #include <boost/optional.hpp> -#include <boost/shared_ptr.hpp> +#include <memory> #include <boost/filesystem.hpp> #include <boost/foreach.hpp> #include <iostream> @@ -47,9 +47,9 @@ using std::list; using std::cerr; using std::cout; using std::string; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; -using boost::dynamic_pointer_cast; +using std::dynamic_pointer_cast; #if BOOST_VERSION >= 106100 using namespace boost::placeholders; #endif diff --git a/tools/dcpinfo.cc b/tools/dcpinfo.cc index e8aed3d8..28b67a8d 100644 --- a/tools/dcpinfo.cc +++ b/tools/dcpinfo.cc @@ -69,8 +69,8 @@ using std::max; using std::exception; using std::vector; using std::stringstream; -using boost::shared_ptr; -using boost::dynamic_pointer_cast; +using std::shared_ptr; +using std::dynamic_pointer_cast; using boost::optional; using namespace dcp; diff --git a/tools/dcprecover.cc b/tools/dcprecover.cc index 65240ae8..9105f2a7 100644 --- a/tools/dcprecover.cc +++ b/tools/dcprecover.cc @@ -46,7 +46,7 @@ using std::cerr; using std::cout; using std::string; using std::list; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; static void @@ -62,14 +62,11 @@ def options(opt): opt.add_option('--enable-openmp', action='store_true', default=False, help='enable use of OpenMP') opt.add_option('--openmp', default='gomp', help='specify OpenMP Library to use: omp, gomp (default), iomp') opt.add_option('--jpeg', default='oj2', help='specify JPEG library to build with: oj1 or oj2 for OpenJPEG 1.5.x or OpenJPEG 2.1.x respectively') - opt.add_option('--force-cpp11', action='store_true', default=False, help='force use of C++11') def configure(conf): conf.load('compiler_cxx') conf.load('clang_compilation_database', tooldir=['waf-tools']) - conf.env.append_value('CXXFLAGS', ['-Wall', '-Wextra', '-D_FILE_OFFSET_BITS=64', '-D__STDC_FORMAT_MACROS']) - if conf.options.force_cpp11: - conf.env.append_value('CXXFLAGS', ['-std=c++11', '-DBOOST_NO_CXX11_SCOPED_ENUMS']) + conf.env.append_value('CXXFLAGS', ['-Wall', '-Wextra', '-D_FILE_OFFSET_BITS=64', '-D__STDC_FORMAT_MACROS', '-std=c++11', '-DBOOST_NO_CXX11_SCOPED_ENUMS']) gcc = conf.env['CC_VERSION'] if int(gcc[0]) >= 4 and int(gcc[1]) > 1: conf.env.append_value('CXXFLAGS', ['-Wno-maybe-uninitialized']) |
