summaryrefslogtreecommitdiff
path: root/src/lib/j2k_image_proxy.h
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2017-07-26 15:47:52 +0100
committerCarl Hetherington <cth@carlh.net>2017-07-26 15:47:52 +0100
commit3e230d3785f19bc707fd7ea2b1f55321b93f536f (patch)
tree2773a105d2cf218d9c038418e388ff50f9b46236 /src/lib/j2k_image_proxy.h
parentb395478cbb0706de2b6afa9a34fb33e49c61ee67 (diff)
Multi-threaded decode of DCP when previewing.
Diffstat (limited to 'src/lib/j2k_image_proxy.h')
-rw-r--r--src/lib/j2k_image_proxy.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/lib/j2k_image_proxy.h b/src/lib/j2k_image_proxy.h
index 41d68588f..3133aac20 100644
--- a/src/lib/j2k_image_proxy.h
+++ b/src/lib/j2k_image_proxy.h
@@ -1,5 +1,5 @@
/*
- Copyright (C) 2015 Carl Hetherington <cth@carlh.net>
+ Copyright (C) 2015-2017 Carl Hetherington <cth@carlh.net>
This file is part of DCP-o-matic.
@@ -21,6 +21,7 @@
#include "image_proxy.h"
#include <dcp/util.h>
#include <dcp/data.h>
+#include <boost/thread/mutex.hpp>
namespace dcp {
class MonoPictureFrame;
@@ -44,6 +45,7 @@ public:
void send_binary (boost::shared_ptr<Socket>) const;
/** @return true if our image is definitely the same as another, false if it is probably not */
bool same (boost::shared_ptr<const ImageProxy>) const;
+ void prepare (boost::optional<dcp::Size> = boost::optional<dcp::Size>()) const;
AVPixelFormat pixel_format () const {
return _pixel_format;
}
@@ -68,4 +70,5 @@ private:
mutable boost::shared_ptr<dcp::OpenJPEGImage> _decompressed;
mutable boost::optional<dcp::Size> _target_size;
AVPixelFormat _pixel_format;
+ mutable boost::mutex _mutex;
};