summaryrefslogtreecommitdiff
path: root/src/lib/dcp_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2016-06-21 23:08:53 +0100
committerCarl Hetherington <cth@carlh.net>2016-06-21 23:08:53 +0100
commita8a0dfd1b21de6c0facf965ab119833ff6f790bf (patch)
tree88bd3a7dd6d4ae56a1efa9b7443c341550759869 /src/lib/dcp_decoder.cc
parente669b562937786bf5b771c927cc03a4074b01be8 (diff)
Revert "Use make_shared<>."
Support for this seems to vary wildly across DoM's build targets. Stuff that builds on 16.04 won't build on 14.04, for example. Seems to not be worth the hassle now. This reverts commit 5a5324ed3a381a86dfe0a6e3932c1d58fdcd596f.
Diffstat (limited to 'src/lib/dcp_decoder.cc')
-rw-r--r--src/lib/dcp_decoder.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/lib/dcp_decoder.cc b/src/lib/dcp_decoder.cc
index 3bf7c1464..e7e88d319 100644
--- a/src/lib/dcp_decoder.cc
+++ b/src/lib/dcp_decoder.cc
@@ -43,14 +43,12 @@
#include <dcp/sound_frame.h>
#include <dcp/sound_asset_reader.h>
#include <boost/foreach.hpp>
-#include <boost/make_shared.hpp>
#include <iostream>
using std::list;
using std::cout;
using boost::shared_ptr;
using boost::dynamic_pointer_cast;
-using boost::make_shared;
DCPDecoder::DCPDecoder (shared_ptr<const DCPContent> c, shared_ptr<Log> log, bool fast)
: _dcp_content (c)
@@ -96,15 +94,15 @@ DCPDecoder::pass (PassReason reason, bool)
shared_ptr<dcp::PictureAsset> asset = (*_reel)->main_picture()->asset ();
int64_t const entry_point = (*_reel)->main_picture()->entry_point ();
if (_mono_reader) {
- video->give (make_shared<J2KImageProxy> (_mono_reader->get_frame (entry_point + frame), asset->size()), _offset + frame);
+ video->give (shared_ptr<ImageProxy> (new J2KImageProxy (_mono_reader->get_frame (entry_point + frame), asset->size())), _offset + frame);
} else {
video->give (
- make_shared<J2KImageProxy> (_stereo_reader->get_frame (entry_point + frame), asset->size(), dcp::EYE_LEFT),
+ shared_ptr<ImageProxy> (new J2KImageProxy (_stereo_reader->get_frame (entry_point + frame), asset->size(), dcp::EYE_LEFT)),
_offset + frame
);
video->give (
- make_shared<J2KImageProxy> (_stereo_reader->get_frame (entry_point + frame), asset->size(), dcp::EYE_RIGHT),
+ shared_ptr<ImageProxy> (new J2KImageProxy (_stereo_reader->get_frame (entry_point + frame), asset->size(), dcp::EYE_RIGHT)),
_offset + frame
);
}
@@ -117,7 +115,7 @@ DCPDecoder::pass (PassReason reason, bool)
int const channels = _dcp_content->audio->stream()->channels ();
int const frames = sf->size() / (3 * channels);
- shared_ptr<AudioBuffers> data = make_shared<AudioBuffers> (channels, frames);
+ shared_ptr<AudioBuffers> data (new AudioBuffers (channels, frames));
for (int i = 0; i < frames; ++i) {
for (int j = 0; j < channels; ++j) {
data->data()[j][i] = static_cast<int> ((from[0] << 8) | (from[1] << 16) | (from[2] << 24)) / static_cast<float> (INT_MAX - 256);