using std::cout;
using std::cerr;
-using boost::shared_ptr;
+using std::shared_ptr;
class Timer
{
#include <stdint.h>
using boost::scoped_array;
-using boost::shared_ptr;
+using std::shared_ptr;
int const trials = 256;
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:
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')
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");
/* 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];
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 */
}
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]);
using std::string;
using boost::function;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
using namespace dcp;
}
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");
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;
*/
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 {
#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>
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);
}
#include "crypto_context.h"
#include <asdcp/AS_DCP.h>
#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace dcp {
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 {
protected:
R* _reader;
- boost::shared_ptr<DecryptionContext> _crypto_context;
+ std::shared_ptr<DecryptionContext> _crypto_context;
};
}
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;
};
}
#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)
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 {
using std::min;
using std::max;
-using boost::shared_ptr;
+using std::shared_ptr;
using namespace dcp;
struct AtmosAssetWriter::ASDCPState
#include "asset_writer.h"
#include "types.h"
#include "atmos_frame.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/filesystem.hpp>
namespace dcp {
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 ();
ASDCP headers
*/
struct ASDCPState;
- boost::shared_ptr<ASDCPState> _state;
+ std::shared_ptr<ASDCPState> _state;
AtmosAsset* _asset;
};
#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;
#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
{}
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;
}
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;
}
_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;
}
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;
/** 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;
};
}
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
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>()
);
}
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;
* @param reel Reel to add.
*/
void
-CPL::add (boost::shared_ptr<Reel> reel)
+CPL::add (std::shared_ptr<Reel> reel)
{
_reels.push_back (reel);
}
#include <boost/filesystem.hpp>
#include <boost/function.hpp>
#include <boost/optional.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <list>
#include <vector>
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;
/* 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;
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;
}
void
-DCP::add (boost::shared_ptr<CPL> cpl)
+DCP::add (std::shared_ptr<CPL> cpl)
{
_cpls.push_back (cpl);
}
#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>
*/
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;
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 {
/** @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;
}
/** 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;
using std::hex;
using std::pair;
using std::map;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
using namespace dcp;
*/
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,
* @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,
* @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,
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;
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"))
{
/** 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,
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));
}
private:
- boost::shared_ptr<B> _buffer;
+ std::shared_ptr<B> _buffer;
};
}
#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)
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;
#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 *
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;
#include <libcxml/cxml.h>
using std::string;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
using namespace dcp;
#include "load_font_node.h"
#include <libcxml/cxml.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/optional.hpp>
namespace dcp {
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)
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
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;
};
}
using std::min;
using std::pow;
using std::string;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::shared_array;
using namespace dcp;
#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");
}
#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)
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;
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
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;
#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
#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>
*/
struct ASDCPState;
- boost::shared_ptr<ASDCPState> _state;
+ std::shared_ptr<ASDCPState> _state;
};
}
#include <asdcp/AS_DCP.h>
using std::string;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
using namespace dcp;
#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>
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 ();
*/
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;
};
}
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 ()
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 ();
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 */
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;
#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)
#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>
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);
files in the program, then also delete it here.
*/
-using boost::shared_ptr;
+using std::shared_ptr;
namespace dcp {
#include <iostream>
using std::string;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
using namespace dcp;
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 {
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;
};
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");
}
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");
#include "key.h"
#include "types.h"
#include "ref.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/function.hpp>
#include <list>
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)
, _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;
};
}
using std::pair;
using std::string;
using std::make_pair;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
using namespace dcp;
#include "object.h"
#include "util.h"
#include "ref.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
namespace cxml {
class Node;
{
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;
_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:
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)
{
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;
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)
{
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> ();
}
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)
{
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);
#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 ();
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> ();
}
#include <libxml++/libxml++.h>
using std::string;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
using namespace dcp;
#include "ref.h"
#include <boost/optional.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <string>
namespace cxml {
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.) */
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;
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;
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> ();
}
#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)
#include "reel_mxf.h"
#include "reel_asset.h"
#include "sound_asset.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <string>
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> ();
}
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 ();
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> ();
}
#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)
{
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> ();
}
#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
#include "exceptions.h"
#include "asset.h"
#include "util.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <string>
namespace dcp {
{}
/** 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)
{}
_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 {
/** @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);
}
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.
};
}
using std::min;
using std::max;
using std::cout;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
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
*/
#include "types.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/optional.hpp>
#include <stdint.h>
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,
#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 *
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;
#include <libcxml/cxml.h>
using std::string;
-using boost::shared_ptr;
+using std::shared_ptr;
using namespace dcp;
SMPTELoadFontNode::SMPTELoadFontNode (string id, string urn_)
*/
#include "load_font_node.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/optional.hpp>
namespace cxml {
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;
};
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;
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);
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.
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.
*/
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;
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;
#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>
*/
struct ASDCPState;
- boost::shared_ptr<ASDCPState> _state;
+ std::shared_ptr<ASDCPState> _state;
SoundAsset* _asset;
int _frame_buffer_offset;
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;
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;
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)
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;
#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
#include "picture_asset_writer.h"
#include "types.h"
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/utility.hpp>
#include <stdint.h>
#include <string>
*/
struct ASDCPState;
- boost::shared_ptr<ASDCPState> _state;
+ std::shared_ptr<ASDCPState> _state;
dcp::Eye _next_eye;
};
#include <asdcp/KM_fileio.h>
using std::string;
-using boost::shared_ptr;
+using std::shared_ptr;
using namespace dcp;
#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>
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
{
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
*/
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;
};
}
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;
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;
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;
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
{
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);
};
}
using std::string;
using std::map;
-using boost::shared_ptr;
+using std::shared_ptr;
using namespace dcp;
string
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);
}
}
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;
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_)
{}
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_)
{}
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)
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)
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)
using std::ostream;
using std::string;
-using boost::shared_ptr;
+using std::shared_ptr;
using namespace dcp;
SubtitleImage::SubtitleImage (
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;
using std::map;
using std::pair;
using std::make_pair;
-using boost::shared_ptr;
+using std::shared_ptr;
using namespace dcp;
TransferFunction::~TransferFunction ()
#define LIBDCP_TRANSFER_FUNCTION_H
#include <boost/noncopyable.hpp>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/thread/mutex.hpp>
#include <map>
/** @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 */
#include <libcxml/cxml.h>
#include <asdcp/KLV.h>
-#include <boost/shared_ptr.hpp>
+#include <memory>
#include <boost/function.hpp>
#include <string>
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;
#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>
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;
{
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);
}
#include <boost/test/unit_test.hpp>
using std::string;
-using boost::shared_ptr;
+using std::shared_ptr;
class DummyAsset : public dcp::Asset
{
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)
#include <cmath>
using std::pow;
-using boost::shared_ptr;
+using std::shared_ptr;
using namespace dcp;
static void
using std::string;
using std::vector;
using boost::optional;
-using boost::shared_ptr;
+using std::shared_ptr;
static void
#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)
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");
#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)
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 */
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
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>
#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.
#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)
#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)
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 */
#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)
{
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
#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)
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)
#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)
#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)
using std::string;
using boost::optional;
-using boost::shared_ptr;
+using std::shared_ptr;
/** Test the XML constructor of ReelPictureAsset */
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 */
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) {
using std::list;
using std::string;
using std::cout;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
using boost::scoped_array;
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 */
using std::string;
using boost::optional;
-using boost::shared_ptr;
+using std::shared_ptr;
BOOST_AUTO_TEST_CASE (smpte_subtitle_id_test)
{
#include "exceptions.h"
#include <sndfile.h>
-using boost::shared_ptr;
+using std::shared_ptr;
BOOST_AUTO_TEST_CASE (sound_frame_test)
{
#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;
using std::min;
using std::list;
using std::vector;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
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.
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;
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)
#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)
using std::cerr;
using std::cout;
using boost::optional;
-using boost::shared_ptr;
+using std::shared_ptr;
static void
help (string n)
#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>
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
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;
using std::cout;
using std::string;
using std::list;
-using boost::shared_ptr;
+using std::shared_ptr;
using boost::optional;
static void
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'])