summaryrefslogtreecommitdiff
path: root/src/lib/reel_writer.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2020-11-01 23:51:19 +0100
committerCarl Hetherington <cth@carlh.net>2020-11-02 23:10:04 +0100
commit2ea3a0d0e4066a166c0700bd1d53daa7f1c50dff (patch)
treea730b75be36d74a8aee1ebab60d5a3aa629d8d35 /src/lib/reel_writer.h
parent6fa9748f382302fa88292b4219598bb81edc7bd0 (diff)
Pass around JPEG2000 data as a shared_ptr and hence avoid a copy
of 4MB of data for every JPEG2000 frame we decode.
Diffstat (limited to 'src/lib/reel_writer.h')
-rw-r--r--src/lib/reel_writer.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/reel_writer.h b/src/lib/reel_writer.h
index 17bfc7ba2..09c29adae 100644
--- a/src/lib/reel_writer.h
+++ b/src/lib/reel_writer.h
@@ -66,7 +66,7 @@ public:
boost::optional<std::string> content_summary
);
- void write (boost::optional<dcp::Data> encoded, Frame frame, Eyes eyes);
+ void write (boost::shared_ptr<const dcp::Data> encoded, Frame frame, Eyes eyes);
void fake_write (int size);
void repeat_write (Frame frame, Eyes eyes);
void write (boost::shared_ptr<const AudioBuffers> audio);
@@ -104,7 +104,7 @@ private:
/** the first picture frame index that does not already exist in our MXF */
int _first_nonexistant_frame;
/** the data of the last written frame, if there is one */
- boost::optional<dcp::Data> _last_written[EYES_COUNT];
+ boost::shared_ptr<const dcp::Data> _last_written[EYES_COUNT];
/** index of this reel within the DCP (starting from 0) */
int _reel_index;
/** number of reels in the DCP */