From d39880eef211a296fa8ef4712cdef5945d08527c Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 20 Dec 2020 14:14:07 +0100 Subject: std::shared_ptr --- src/asset.cc | 4 +-- src/asset.h | 4 +-- src/asset_factory.cc | 4 +-- src/asset_factory.h | 2 +- src/asset_reader.h | 8 +++--- src/asset_writer.h | 2 +- src/atmos_asset.cc | 2 +- src/atmos_asset.h | 4 +-- src/atmos_asset_writer.cc | 2 +- src/atmos_asset_writer.h | 6 ++--- src/colour_conversion.cc | 2 +- src/colour_conversion.h | 18 ++++++------- src/combine.cc | 4 +-- src/combine.h | 2 +- src/cpl.cc | 6 ++--- src/cpl.h | 18 ++++++------- src/dcp.cc | 6 ++--- src/dcp.h | 18 ++++++------- src/decrypted_kdm.cc | 2 +- src/decrypted_kdm.h | 6 ++--- src/encrypted_kdm.cc | 4 +-- src/encrypted_kdm.h | 2 +- src/frame.h | 4 +-- src/gamma_transfer_function.cc | 4 +-- src/gamma_transfer_function.h | 2 +- src/identity_transfer_function.cc | 4 +-- src/identity_transfer_function.h | 2 +- src/interop_load_font_node.cc | 2 +- src/interop_load_font_node.h | 2 +- src/interop_subtitle_asset.cc | 4 +-- src/interop_subtitle_asset.h | 12 ++++----- src/j2k.cc | 2 +- src/j2k.h | 8 +++--- src/modified_gamma_transfer_function.cc | 4 +-- src/modified_gamma_transfer_function.h | 2 +- src/mono_picture_asset.cc | 4 +-- src/mono_picture_asset.h | 6 ++--- src/mono_picture_asset_writer.cc | 2 +- src/mono_picture_asset_writer.h | 4 +-- src/mono_picture_frame.cc | 2 +- src/mono_picture_frame.h | 8 +++--- src/mxf.cc | 4 +-- src/mxf.h | 2 +- src/picture_asset.cc | 2 +- src/picture_asset.h | 2 +- src/picture_asset_writer.cc | 2 +- src/picture_asset_writer.h | 4 +-- src/picture_asset_writer_common.cc | 2 +- src/pkl.cc | 2 +- src/pkl.h | 4 +-- src/reel.cc | 8 +++--- src/reel.h | 46 ++++++++++++++++----------------- src/reel_asset.cc | 2 +- src/reel_asset.h | 6 ++--- src/reel_atmos_asset.cc | 6 ++--- src/reel_atmos_asset.h | 8 +++--- src/reel_closed_caption_asset.cc | 8 +++--- src/reel_closed_caption_asset.h | 8 +++--- src/reel_markers_asset.cc | 2 +- src/reel_markers_asset.h | 4 +-- src/reel_mono_picture_asset.cc | 6 ++--- src/reel_mono_picture_asset.h | 8 +++--- src/reel_mxf.cc | 2 +- src/reel_mxf.h | 16 ++++++------ src/reel_picture_asset.cc | 4 +-- src/reel_picture_asset.h | 10 +++---- src/reel_sound_asset.cc | 2 +- src/reel_sound_asset.h | 12 ++++----- src/reel_stereo_picture_asset.cc | 6 ++--- src/reel_stereo_picture_asset.h | 8 +++--- src/reel_subtitle_asset.cc | 8 +++--- src/reel_subtitle_asset.h | 8 +++--- src/ref.cc | 2 +- src/ref.h | 10 +++---- src/rgb_xyz.cc | 4 +-- src/rgb_xyz.h | 8 +++--- src/s_gamut3_transfer_function.cc | 4 +-- src/s_gamut3_transfer_function.h | 2 +- src/smpte_load_font_node.cc | 2 +- src/smpte_load_font_node.h | 4 +-- src/smpte_subtitle_asset.cc | 4 +-- src/smpte_subtitle_asset.h | 14 +++++----- src/sound_asset.cc | 4 +-- src/sound_asset.h | 6 ++--- src/sound_asset_writer.h | 4 +-- src/sound_frame.cc | 2 +- src/sound_frame.h | 2 +- src/stereo_picture_asset.cc | 4 +-- src/stereo_picture_asset.h | 6 ++--- src/stereo_picture_asset_writer.cc | 2 +- src/stereo_picture_asset_writer.h | 4 +-- src/stereo_picture_frame.cc | 2 +- src/stereo_picture_frame.h | 16 ++++++------ src/subtitle_asset.cc | 4 +-- src/subtitle_asset.h | 14 +++++----- src/subtitle_asset_internal.cc | 4 +-- src/subtitle_asset_internal.h | 18 ++++++------- src/subtitle_image.cc | 2 +- src/subtitle_image.h | 2 +- src/transfer_function.cc | 2 +- src/transfer_function.h | 4 +-- src/types.h | 2 +- src/util.cc | 2 +- src/util.h | 2 +- src/verify.cc | 4 +-- src/xml.h | 38 +++++++++++++-------------- 106 files changed, 310 insertions(+), 310 deletions(-) (limited to 'src') 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 progress) const } bool -Asset::equals (boost::shared_ptr other, EqualityOptions, NoteHandler note) const +Asset::equals (std::shared_ptr 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 other, + std::shared_ptr 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, boost::filesystem::path root) const; + virtual void add_to_pkl (std::shared_ptr 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 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 +#include -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; shared_ptr 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_factory (boost::filesystem::path path, bool ignore_incorrect_picture_mxf_type); +std::shared_ptr 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 #include -#include +#include namespace dcp { @@ -64,9 +64,9 @@ public: delete _reader; } - boost::shared_ptr get_frame (int n) const + std::shared_ptr get_frame (int n) const { - return boost::shared_ptr (new F (_reader, n, _crypto_context)); + return std::shared_ptr (new F (_reader, n, _crypto_context)); } R* reader () const { @@ -75,7 +75,7 @@ public: protected: R* _reader; - boost::shared_ptr _crypto_context; + std::shared_ptr _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 _crypto_context; + std::shared_ptr _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 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 start_write (boost::filesystem::path file); - boost::shared_ptr start_read () const; + std::shared_ptr start_write (boost::filesystem::path file); + std::shared_ptr 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 +#include #include namespace dcp { @@ -56,7 +56,7 @@ class AtmosAsset; class AtmosAssetWriter : public AssetWriter { public: - void write (boost::shared_ptr frame); + void write (std::shared_ptr frame); void write (uint8_t const * data, int size); bool finalize (); @@ -69,7 +69,7 @@ private: ASDCP headers */ struct ASDCPState; - boost::shared_ptr _state; + std::shared_ptr _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 #include -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 +#include #if BOOST_VERSION >= 106400 #include #endif @@ -68,17 +68,17 @@ public: {} ColourConversion ( - boost::shared_ptr in, + std::shared_ptr in, YUVToRGB yuv_to_rgb, Chromaticity red, Chromaticity green, Chromaticity blue, Chromaticity white, boost::optional adjusted_white, - boost::shared_ptr out + std::shared_ptr out ); - boost::shared_ptr in () const { + std::shared_ptr in () const { return _in; } @@ -106,11 +106,11 @@ public: return _adjusted_white; } - boost::shared_ptr out () const { + std::shared_ptr out () const { return _out; } - void set_in (boost::shared_ptr f) { + void set_in (std::shared_ptr f) { _in = f; } @@ -142,7 +142,7 @@ public: _adjusted_white = boost::optional (); } - void set_out (boost::shared_ptr f) { + void set_out (std::shared_ptr f) { _out = f; } @@ -162,7 +162,7 @@ public: protected: /** Input transfer function (probably a gamma function, or something similar) */ - boost::shared_ptr _in; + std::shared_ptr _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 _adjusted_white; /** Output transfer function (probably an inverse gamma function, or something similar) */ - boost::shared_ptr _out; + std::shared_ptr _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 signer = boost::shared_ptr() + std::shared_ptr signer = std::shared_ptr() ); } diff --git a/src/cpl.cc b/src/cpl.cc index 81fe1fc2..8e87283d 100644 --- a/src/cpl.cc +++ b/src/cpl.cc @@ -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) +CPL::add (std::shared_ptr reel) { _reels.push_back (reel); } diff --git a/src/cpl.h b/src/cpl.h index c1f505df..316a5504 100644 --- a/src/cpl.h +++ b/src/cpl.h @@ -49,7 +49,7 @@ #include #include #include -#include +#include #include #include @@ -74,32 +74,32 @@ public: explicit CPL (boost::filesystem::path file); bool equals ( - boost::shared_ptr other, + std::shared_ptr other, EqualityOptions options, NoteHandler note ) const; - void add (boost::shared_ptr reel); + void add (std::shared_ptr reel); void add (DecryptedKDM const &); /** @return the reels in this CPL */ - std::list > reels () const { + std::list > reels () const { return _reels; } /** @return the ReelMXFs in this CPL in all reels */ - std::list > reel_mxfs () const; - std::list > reel_mxfs (); + std::list > reel_mxfs () const; + std::list > reel_mxfs (); bool encrypted () const; void write_xml ( boost::filesystem::path file, Standard standard, - boost::shared_ptr + std::shared_ptr ) const; - void resolve_refs (std::list >); + void resolve_refs (std::list >); int64_t duration () const; @@ -311,7 +311,7 @@ private: /* See note for _release_territory above */ std::vector _additional_subtitle_languages; - std::list > _reels; + std::list > _reels; /** Standard of CPL that was read in */ boost::optional _standard; diff --git a/src/dcp.cc b/src/dcp.cc index 381adde4..aea05960 100644 --- a/src/dcp.cc +++ b/src/dcp.cc @@ -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) +DCP::add (std::shared_ptr cpl) { _cpls.push_back (cpl); } diff --git a/src/dcp.h b/src/dcp.h index 8b5bd746..3eab743e 100644 --- a/src/dcp.h +++ b/src/dcp.h @@ -46,7 +46,7 @@ #include "name_format.h" #include "verify.h" #include "version.h" -#include +#include #include #include #include @@ -101,10 +101,10 @@ public: */ bool equals (DCP const & other, EqualityOptions options, NoteHandler note) const; - void add (boost::shared_ptr cpl); + void add (std::shared_ptr cpl); - std::list > cpls () const; - std::list > assets (bool ignore_unresolved = false) const; + std::list > cpls () const; + std::list > 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 signer = boost::shared_ptr (), + std::shared_ptr signer = std::shared_ptr (), NameFormat name_format = NameFormat("%t") ); - void resolve_refs (std::list > assets); + void resolve_refs (std::list > assets); /** @return Standard of a DCP that was read in */ boost::optional 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 > pkls () const { + std::list > 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 > _cpls; + std::list > _cpls; /** The PKLs that make up this DCP */ - std::list > _pkls; + std::list > _pkls; /** File that the ASSETMAP was read from or last written to */ mutable boost::optional _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, Key> keys, + std::map, 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 cpl, + std::shared_ptr cpl, Key key, LocalTime not_valid_before, LocalTime not_valid_after, @@ -130,7 +130,7 @@ public: * @return Encrypted KDM. */ EncryptedKDM encrypt ( - boost::shared_ptr signer, + std::shared_ptr signer, Certificate recipient, std::vector 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 node) + explicit X509Data (std::shared_ptr 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 signer, + std::shared_ptr signer, Certificate recipient, std::vector 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 Frame : public boost::noncopyable { public: - Frame (R* reader, int n, boost::shared_ptr c) + Frame (R* reader, int n, std::shared_ptr c) { /* XXX: unfortunate guesswork on this buffer size */ _buffer.reset(new B(Kumu::Megabyte)); @@ -67,7 +67,7 @@ public: } private: - boost::shared_ptr _buffer; + std::shared_ptr _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 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 other, double epsilon) const; + bool about_equal (std::shared_ptr 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 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 other, double epsilon) const; + bool about_equal (std::shared_ptr 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 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 -#include +#include #include 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, + std::shared_ptr, EqualityOptions, NoteHandler note ) const; void write_to_assetmap (xmlpp::Node* node, boost::filesystem::path root) const; - void add_to_pkl (boost::shared_ptr pkl, boost::filesystem::path root) const; + void add_to_pkl (std::shared_ptr pkl, boost::filesystem::path root) const; - std::list > load_font_nodes () const; + std::list > 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 > assets); - void add_font_assets (std::list >& assets); + void resolve_fonts (std::list > assets); + void add_font_assets (std::list >& 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 > _load_font_nodes; + std::list > _load_font_nodes; }; } diff --git a/src/j2k.cc b/src/j2k.cc index 53039831..032c7caa 100644 --- a/src/j2k.cc +++ b/src/j2k.cc @@ -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; diff --git a/src/j2k.h b/src/j2k.h index fcaa28e2..a5b41f3c 100644 --- a/src/j2k.h +++ b/src/j2k.h @@ -33,15 +33,15 @@ #include "array_data.h" -#include +#include #include namespace dcp { class OpenJPEGImage; -extern boost::shared_ptr decompress_j2k (uint8_t* data, int64_t size, int reduce); -extern boost::shared_ptr decompress_j2k (ArrayData data, int reduce); -extern ArrayData compress_j2k (boost::shared_ptr, int bandwith, int frames_per_second, bool threed, bool fourk, std::string comment = "libdcp"); +extern std::shared_ptr decompress_j2k (uint8_t* data, int64_t size, int reduce); +extern std::shared_ptr decompress_j2k (ArrayData data, int reduce); +extern ArrayData compress_j2k (std::shared_ptr, 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 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, double epsilon) const; + bool about_equal (std::shared_ptr, 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 start_write (boost::filesystem::path, bool); - boost::shared_ptr start_read () const; + std::shared_ptr start_write (boost::filesystem::path, bool); + std::shared_ptr start_read () const; bool equals ( - boost::shared_ptr other, + std::shared_ptr 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 +#include #include #include #include @@ -74,7 +74,7 @@ private: */ struct ASDCPState; - boost::shared_ptr _state; + std::shared_ptr _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 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 +#include #include #include #include @@ -68,7 +68,7 @@ public: explicit MonoPictureFrame (boost::filesystem::path path); MonoPictureFrame (uint8_t const * data, int size); - boost::shared_ptr xyz_image (int reduce = 0) const; + std::shared_ptr xyz_image (int reduce = 0) const; uint8_t const * data () const; uint8_t* data (); @@ -80,9 +80,9 @@ private: */ friend class AssetReader; - MonoPictureFrame (ASDCP::JP2K::MXFReader* reader, int n, boost::shared_ptr); + MonoPictureFrame (ASDCP::JP2K::MXFReader* reader, int n, std::shared_ptr); - boost::shared_ptr _buffer; + std::shared_ptr _buffer; }; } diff --git a/src/mxf.cc b/src/mxf.cc index 512da844..b6c11bb8 100644 --- a/src/mxf.cc +++ b/src/mxf.cc @@ -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 () diff --git a/src/mxf.h b/src/mxf.h index aef8b12d..9b9f28af 100644 --- a/src/mxf.h +++ b/src/mxf.h @@ -120,7 +120,7 @@ public: protected: template - friend void start (PictureAssetWriter* writer, boost::shared_ptr

state, Q* mxf, uint8_t const * data, int size); + friend void start (PictureAssetWriter* writer, std::shared_ptr

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 start_write ( + virtual std::shared_ptr 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 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 +#include #include #include #include @@ -82,7 +82,7 @@ public: protected: template - friend void start (PictureAssetWriter *, boost::shared_ptr

, Q *, uint8_t const *, int); + friend void start (PictureAssetWriter *, std::shared_ptr

, 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 { diff --git a/src/pkl.cc b/src/pkl.cc index b2fe875b..5fb27aab 100644 --- a/src/pkl.cc +++ b/src/pkl.cc @@ -41,7 +41,7 @@ #include using std::string; -using boost::shared_ptr; +using std::shared_ptr; using boost::optional; using namespace dcp; diff --git a/src/pkl.h b/src/pkl.h index 39996318..a27a9a33 100644 --- a/src/pkl.h +++ b/src/pkl.h @@ -64,7 +64,7 @@ public: boost::optional type (std::string id) const; void add_asset (std::string id, boost::optional annotation_text, std::string hash, int64_t size, std::string type); - void write (boost::filesystem::path file, boost::shared_ptr signer) const; + void write (boost::filesystem::path file, std::shared_ptr signer) const; /** @return the most recent disk file used to read or write this PKL, if there is one */ boost::optional file () const { @@ -103,7 +103,7 @@ private: std::string _issue_date; std::string _issuer; std::string _creator; - std::list > _asset_list; + std::list > _asset_list; /** The most recent disk file used to read or write this PKL */ mutable boost::optional _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 node) +Reel::Reel (std::shared_ptr node) : Object (remove_urn_uuid (node->string_child ("Id"))) { shared_ptr 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 other, EqualityOptions opt, NoteHandler note) const +Reel::equals (std::shared_ptr other, EqualityOptions opt, NoteHandler note) const { if ((_main_picture && !other->_main_picture) || (!_main_picture && other->_main_picture)) { note (DCP_ERROR, "Reel: picture assets differ"); diff --git a/src/reel.h b/src/reel.h index ccad3c83..041e1ca1 100644 --- a/src/reel.h +++ b/src/reel.h @@ -37,7 +37,7 @@ #include "key.h" #include "types.h" #include "ref.h" -#include +#include #include #include @@ -68,11 +68,11 @@ public: Reel () {} Reel ( - boost::shared_ptr picture, - boost::shared_ptr sound = boost::shared_ptr (), - boost::shared_ptr subtitle = boost::shared_ptr (), - boost::shared_ptr markers = boost::shared_ptr (), - boost::shared_ptr atmos = boost::shared_ptr () + std::shared_ptr picture, + std::shared_ptr sound = std::shared_ptr (), + std::shared_ptr subtitle = std::shared_ptr (), + std::shared_ptr markers = std::shared_ptr (), + std::shared_ptr atmos = std::shared_ptr () ) : _main_picture (picture) , _main_sound (sound) @@ -81,55 +81,55 @@ public: , _atmos (atmos) {} - explicit Reel (boost::shared_ptr); + explicit Reel (std::shared_ptr); - boost::shared_ptr main_picture () const { + std::shared_ptr main_picture () const { return _main_picture; } - boost::shared_ptr main_sound () const { + std::shared_ptr main_sound () const { return _main_sound; } - boost::shared_ptr main_subtitle () const { + std::shared_ptr main_subtitle () const { return _main_subtitle; } - boost::shared_ptr main_markers () const { + std::shared_ptr main_markers () const { return _main_markers; } - std::list > closed_captions () const { + std::list > closed_captions () const { return _closed_captions; } - boost::shared_ptr atmos () const { + std::shared_ptr atmos () const { return _atmos; } int64_t duration () const; - void add (boost::shared_ptr asset); + void add (std::shared_ptr asset); - std::list > assets () const; + std::list > assets () const; xmlpp::Element* write_to_cpl (xmlpp::Element* node, Standard standard) const; bool encrypted () const; - bool equals (boost::shared_ptr other, EqualityOptions opt, NoteHandler notes) const; + bool equals (std::shared_ptr other, EqualityOptions opt, NoteHandler notes) const; void add (DecryptedKDM const &); - void resolve_refs (std::list >); + void resolve_refs (std::list >); private: - boost::shared_ptr _main_picture; - boost::shared_ptr _main_sound; - boost::shared_ptr _main_subtitle; - boost::shared_ptr _main_markers; - std::list > _closed_captions; - boost::shared_ptr _atmos; + std::shared_ptr _main_picture; + std::shared_ptr _main_sound; + std::shared_ptr _main_subtitle; + std::shared_ptr _main_markers; + std::list > _closed_captions; + std::shared_ptr _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 +#include 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); + explicit ReelAsset (std::shared_ptr); 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, EqualityOptions, NoteHandler) const; + bool asset_equals (std::shared_ptr, 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 asset, int64_t entry_point) +ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr 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 node) +ReelAtmosAsset::ReelAtmosAsset (std::shared_ptr 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 asset, int64_t entry_point); - explicit ReelAtmosAsset (boost::shared_ptr); + ReelAtmosAsset (std::shared_ptr asset, int64_t entry_point); + explicit ReelAtmosAsset (std::shared_ptr); - boost::shared_ptr asset () const { + std::shared_ptr asset () const { return asset_of_type (); } xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const; - bool equals (boost::shared_ptr, EqualityOptions, NoteHandler) const; + bool equals (std::shared_ptr, 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 asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) +ReelClosedCaptionAsset::ReelClosedCaptionAsset (std::shared_ptr 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(asset) ? dynamic_pointer_cast(asset)->key_id() : optional()) { } -ReelClosedCaptionAsset::ReelClosedCaptionAsset (boost::shared_ptr node) +ReelClosedCaptionAsset::ReelClosedCaptionAsset (std::shared_ptr 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 asset, Fraction edit_rate, int64_t instrinsic_duration, int64_t entry_point); - explicit ReelClosedCaptionAsset (boost::shared_ptr); + ReelClosedCaptionAsset (std::shared_ptr asset, Fraction edit_rate, int64_t instrinsic_duration, int64_t entry_point); + explicit ReelClosedCaptionAsset (std::shared_ptr); xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const; - bool equals (boost::shared_ptr, EqualityOptions, NoteHandler) const; + bool equals (std::shared_ptr, EqualityOptions, NoteHandler) const; - boost::shared_ptr asset () const { + std::shared_ptr asset () const { return asset_of_type (); } 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); + explicit ReelMarkersAsset (std::shared_ptr); xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const; - bool equals (boost::shared_ptr, EqualityOptions, NoteHandler) const; + bool equals (std::shared_ptr, 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 using std::string; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; -ReelMonoPictureAsset::ReelMonoPictureAsset (boost::shared_ptr asset, int64_t entry_point) +ReelMonoPictureAsset::ReelMonoPictureAsset (std::shared_ptr asset, int64_t entry_point) : ReelPictureAsset (asset, entry_point) { } -ReelMonoPictureAsset::ReelMonoPictureAsset (boost::shared_ptr node) +ReelMonoPictureAsset::ReelMonoPictureAsset (std::shared_ptr 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 asset, int64_t entry_point); - explicit ReelMonoPictureAsset (boost::shared_ptr); + ReelMonoPictureAsset (std::shared_ptr asset, int64_t entry_point); + explicit ReelMonoPictureAsset (std::shared_ptr); /** @return the MonoPictureAsset that this object refers to */ - boost::shared_ptr mono_asset () const { + std::shared_ptr mono_asset () const { return asset_of_type (); } /** @return the MonoPictureAsset that this object refers to */ - boost::shared_ptr mono_asset () { + std::shared_ptr mono_asset () { return asset_of_type (); } 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 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 -#include +#include #include namespace cxml { @@ -55,8 +55,8 @@ namespace dcp { class ReelMXF { public: - explicit ReelMXF (boost::shared_ptr asset, boost::optional key_id); - explicit ReelMXF (boost::shared_ptr); + explicit ReelMXF (std::shared_ptr asset, boost::optional key_id); + explicit ReelMXF (std::shared_ptr); 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 other, EqualityOptions opt, NoteHandler note) const; + bool mxf_equals (std::shared_ptr other, EqualityOptions opt, NoteHandler note) const; protected: template - boost::shared_ptr asset_of_type () const { - return boost::dynamic_pointer_cast (_asset_ref.asset ()); + std::shared_ptr asset_of_type () const { + return std::dynamic_pointer_cast (_asset_ref.asset ()); } template - boost::shared_ptr asset_of_type () { - return boost::dynamic_pointer_cast (_asset_ref.asset ()); + std::shared_ptr asset_of_type () { + return std::dynamic_pointer_cast (_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 asset, int64_t entry_point); - explicit ReelPictureAsset (boost::shared_ptr); + ReelPictureAsset (std::shared_ptr asset, int64_t entry_point); + explicit ReelPictureAsset (std::shared_ptr); virtual xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const; - bool equals (boost::shared_ptr, EqualityOptions, NoteHandler) const; + bool equals (std::shared_ptr, EqualityOptions, NoteHandler) const; /** @return the PictureAsset that this object refers to */ - boost::shared_ptr asset () const { + std::shared_ptr asset () const { return asset_of_type (); } /** @return the PictureAsset that this object refers to */ - boost::shared_ptr asset () { + std::shared_ptr asset () { return asset_of_type (); } 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 using std::string; -using boost::shared_ptr; +using std::shared_ptr; using namespace dcp; ReelSoundAsset::ReelSoundAsset (shared_ptr 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 +#include #include namespace dcp { @@ -49,19 +49,19 @@ namespace dcp { class ReelSoundAsset : public ReelAsset, public ReelMXF { public: - ReelSoundAsset (boost::shared_ptr content, int64_t entry_point); - explicit ReelSoundAsset (boost::shared_ptr); + ReelSoundAsset (std::shared_ptr content, int64_t entry_point); + explicit ReelSoundAsset (std::shared_ptr); xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const; - bool equals (boost::shared_ptr, EqualityOptions, NoteHandler) const; + bool equals (std::shared_ptr, EqualityOptions, NoteHandler) const; /** @return the SoundAsset that this object refers to */ - boost::shared_ptr asset () { + std::shared_ptr asset () { return asset_of_type (); } /** @return the SoundAsset that this object refers to */ - boost::shared_ptr asset () const { + std::shared_ptr asset () const { return asset_of_type (); } 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 mxf, int64_t entry_point) +ReelStereoPictureAsset::ReelStereoPictureAsset (std::shared_ptr mxf, int64_t entry_point) : ReelPictureAsset (mxf, entry_point) { } -ReelStereoPictureAsset::ReelStereoPictureAsset (boost::shared_ptr node) +ReelStereoPictureAsset::ReelStereoPictureAsset (std::shared_ptr 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 content, int64_t entry_point); - explicit ReelStereoPictureAsset (boost::shared_ptr); + ReelStereoPictureAsset (std::shared_ptr content, int64_t entry_point); + explicit ReelStereoPictureAsset (std::shared_ptr); /** @return the StereoPictureAsset that this object refers to */ - boost::shared_ptr stereo_asset () const { + std::shared_ptr stereo_asset () const { return asset_of_type (); } /** @return the StereoPictureAsset that this object refers to */ - boost::shared_ptr stereo_asset () { + std::shared_ptr stereo_asset () { return asset_of_type (); } 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 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 asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point) +ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr 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(asset) ? dynamic_pointer_cast(asset)->key_id() : optional()) { } -ReelSubtitleAsset::ReelSubtitleAsset (boost::shared_ptr node) +ReelSubtitleAsset::ReelSubtitleAsset (std::shared_ptr 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 asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); - explicit ReelSubtitleAsset (boost::shared_ptr); + ReelSubtitleAsset (std::shared_ptr asset, Fraction edit_rate, int64_t intrinsic_duration, int64_t entry_point); + explicit ReelSubtitleAsset (std::shared_ptr); xmlpp::Node* write_to_cpl (xmlpp::Node* node, Standard standard) const; - bool equals (boost::shared_ptr, EqualityOptions, NoteHandler) const; + bool equals (std::shared_ptr, EqualityOptions, NoteHandler) const; - boost::shared_ptr asset () const { + std::shared_ptr asset () const { return asset_of_type (); } diff --git a/src/ref.cc b/src/ref.cc index 73aaae6e..7512d32c 100644 --- a/src/ref.cc +++ b/src/ref.cc @@ -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 diff --git a/src/ref.h b/src/ref.h index fd15c29e..9ebe19b8 100644 --- a/src/ref.h +++ b/src/ref.h @@ -41,7 +41,7 @@ #include "exceptions.h" #include "asset.h" #include "util.h" -#include +#include #include namespace dcp { @@ -66,7 +66,7 @@ public: {} /** Initialise a Ref with a shared_ptr to an asset */ - explicit Ref (boost::shared_ptr asset) + explicit Ref (std::shared_ptr asset) : _id (asset->id ()) , _asset (asset) {} @@ -77,7 +77,7 @@ public: _id = id; } - void resolve (std::list > assets); + void resolve (std::list > 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 () const { + std::shared_ptr 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; ///< shared_ptr to the thing, may be null. + std::shared_ptr _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 xyz_image, + std::shared_ptr 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 +#include #include #include @@ -43,21 +43,21 @@ class Image; class ColourConversion; extern void xyz_to_rgba ( - boost::shared_ptr, + std::shared_ptr, ColourConversion const & conversion, uint8_t* rgba, int stride ); extern void xyz_to_rgb ( - boost::shared_ptr, + std::shared_ptr, ColourConversion const & conversion, uint8_t* rgb, int stride, boost::optional note = boost::optional () ); -extern boost::shared_ptr rgb_to_xyz ( +extern std::shared_ptr 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 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 other, double epsilon) const; + bool about_equal (std::shared_ptr 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 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 +#include #include namespace cxml { @@ -53,7 +53,7 @@ class SMPTELoadFontNode : public LoadFontNode public: SMPTELoadFontNode () {} SMPTELoadFontNode (std::string id, std::string urn); - explicit SMPTELoadFontNode (boost::shared_ptr node); + explicit SMPTELoadFontNode (std::shared_ptr 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, + std::shared_ptr, EqualityOptions, NoteHandler note ) const; - std::list > load_font_nodes () const; + std::list > load_font_nodes () const; std::string xml_as_string () const; void write (boost::filesystem::path path) const; - void add (boost::shared_ptr); + void add (std::shared_ptr); 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); - void parse_xml (boost::shared_ptr xml); - void read_mxf_descriptor (boost::shared_ptr reader, boost::shared_ptr dec); + void read_fonts (std::shared_ptr); + void parse_xml (std::shared_ptr xml); + void read_mxf_descriptor (std::shared_ptr reader, std::shared_ptr 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