summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/raw_image_proxy.cc7
-rw-r--r--src/lib/raw_image_proxy.h4
-rw-r--r--src/lib/video_filter_graph.cc4
-rw-r--r--src/lib/video_filter_graph.h2
4 files changed, 9 insertions, 8 deletions
diff --git a/src/lib/raw_image_proxy.cc b/src/lib/raw_image_proxy.cc
index 9b486dd5c..c606ddd99 100644
--- a/src/lib/raw_image_proxy.cc
+++ b/src/lib/raw_image_proxy.cc
@@ -45,7 +45,7 @@ using boost::optional;
using dcp::raw_convert;
-RawImageProxy::RawImageProxy (shared_ptr<Image> image)
+RawImageProxy::RawImageProxy(shared_ptr<const Image> image)
: _image (image)
{
@@ -58,8 +58,9 @@ RawImageProxy::RawImageProxy (shared_ptr<cxml::Node> xml, shared_ptr<Socket> soc
xml->number_child<int>("Width"), xml->number_child<int>("Height")
);
- _image = make_shared<Image>(static_cast<AVPixelFormat>(xml->number_child<int>("PixelFormat")), size, Image::Alignment::PADDED);
- _image->read_from_socket (socket);
+ auto image = make_shared<Image>(static_cast<AVPixelFormat>(xml->number_child<int>("PixelFormat")), size, Image::Alignment::PADDED);
+ image->read_from_socket (socket);
+ _image = image;
}
diff --git a/src/lib/raw_image_proxy.h b/src/lib/raw_image_proxy.h
index 1111b66c0..d5ae2457d 100644
--- a/src/lib/raw_image_proxy.h
+++ b/src/lib/raw_image_proxy.h
@@ -29,7 +29,7 @@
class RawImageProxy : public ImageProxy
{
public:
- explicit RawImageProxy (std::shared_ptr<Image>);
+ explicit RawImageProxy(std::shared_ptr<const Image>);
RawImageProxy (std::shared_ptr<cxml::Node> xml, std::shared_ptr<Socket> socket);
Result image (
@@ -43,7 +43,7 @@ public:
size_t memory_used () const override;
private:
- std::shared_ptr<Image> _image;
+ std::shared_ptr<const Image> _image;
};
diff --git a/src/lib/video_filter_graph.cc b/src/lib/video_filter_graph.cc
index 1cc142520..64f7deb19 100644
--- a/src/lib/video_filter_graph.cc
+++ b/src/lib/video_filter_graph.cc
@@ -51,10 +51,10 @@ VideoFilterGraph::VideoFilterGraph (dcp::Size s, AVPixelFormat p, dcp::Fraction
/** Take an AVFrame and process it using our configured filters, returning a
* set of Images. Caller handles memory management of the input frame.
*/
-list<pair<shared_ptr<Image>, int64_t>>
+list<pair<shared_ptr<const Image>, int64_t>>
VideoFilterGraph::process (AVFrame* frame)
{
- list<pair<shared_ptr<Image>, int64_t>> images;
+ list<pair<shared_ptr<const Image>, int64_t>> images;
if (_copy) {
images.push_back (make_pair(make_shared<Image>(frame, Image::Alignment::PADDED), frame->best_effort_timestamp));
diff --git a/src/lib/video_filter_graph.h b/src/lib/video_filter_graph.h
index d887e551b..e120fb467 100644
--- a/src/lib/video_filter_graph.h
+++ b/src/lib/video_filter_graph.h
@@ -28,7 +28,7 @@ public:
VideoFilterGraph (dcp::Size s, AVPixelFormat p, dcp::Fraction r);
bool can_process (dcp::Size s, AVPixelFormat p) const;
- std::list<std::pair<std::shared_ptr<Image>, int64_t>> process (AVFrame * frame);
+ std::list<std::pair<std::shared_ptr<const Image>, int64_t>> process (AVFrame * frame);
protected:
std::string src_parameters () const override;