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 --- examples/make_dcp.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'examples/make_dcp.cc') diff --git a/examples/make_dcp.cc b/examples/make_dcp.cc index 734ae880..1705589d 100644 --- a/examples/make_dcp.cc +++ b/examples/make_dcp.cc @@ -54,10 +54,10 @@ main () per second. */ - boost::shared_ptr picture_asset (new dcp::MonoPictureAsset (dcp::Fraction (24, 1), dcp::SMPTE)); + std::shared_ptr picture_asset (new dcp::MonoPictureAsset (dcp::Fraction (24, 1), dcp::SMPTE)); /* Start off a write to it */ - boost::shared_ptr picture_writer = picture_asset->start_write ("DCP/picture.mxf", false); + std::shared_ptr picture_writer = picture_asset->start_write ("DCP/picture.mxf", false); /* Write 24 frames of the same JPEG2000 file */ dcp::File picture ("examples/help.j2c"); @@ -71,12 +71,12 @@ main () /* Now create a sound MXF. As before, create an object and a writer. When creating the object we specify the sampling rate (48kHz) and the number of channels (2). */ - boost::shared_ptr sound_asset (new dcp::SoundAsset(dcp::Fraction(24, 1), 48000, 2, dcp::LanguageTag("en-GB"), dcp::SMPTE)); + std::shared_ptr 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 active_channels; active_channels.push_back (dcp::LEFT); active_channels.push_back (dcp::RIGHT); - boost::shared_ptr sound_writer = sound_asset->start_write ("DCP/sound.mxf", active_channels); + std::shared_ptr sound_writer = sound_asset->start_write ("DCP/sound.mxf", active_channels); /* Write some sine waves */ float* audio[2]; @@ -94,16 +94,16 @@ main () sound_writer->finalize (); /* Now create a reel */ - boost::shared_ptr reel (new dcp::Reel ()); + std::shared_ptr 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 (new dcp::ReelMonoPictureAsset (picture_asset, 0))); - reel->add (boost::shared_ptr (new dcp::ReelSoundAsset (sound_asset, 0))); + reel->add (std::shared_ptr (new dcp::ReelMonoPictureAsset (picture_asset, 0))); + reel->add (std::shared_ptr (new dcp::ReelSoundAsset (sound_asset, 0))); /* Make a CPL with this reel */ - boost::shared_ptr cpl (new dcp::CPL ("My film", dcp::FEATURE)); + std::shared_ptr cpl (new dcp::CPL ("My film", dcp::FEATURE)); cpl->add (reel); /* Write the DCP */ -- cgit v1.2.3