X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fimage_proxy.h;h=a37be580fcf062fbb247e1d02285e532d49279da;hb=ccd69987ab861ea4521836fa2a5227e2dfac3479;hp=cf1fb9a2dc6035ccfe65e5e3caf0215d8bd0cce1;hpb=c59981ce92898f6be6987f10ebb29161e36e6766;p=dcpomatic.git diff --git a/src/lib/image_proxy.h b/src/lib/image_proxy.h index cf1fb9a2d..a37be580f 100644 --- a/src/lib/image_proxy.h +++ b/src/lib/image_proxy.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2014 Carl Hetherington + Copyright (C) 2014-2021 Carl Hetherington This file is part of DCP-o-matic. @@ -18,13 +18,17 @@ */ + #ifndef DCPOMATIC_IMAGE_PROXY_H #define DCPOMATIC_IMAGE_PROXY_H + /** @file src/lib/image_proxy.h * @brief ImageProxy and subclasses. */ + +#include "image.h" extern "C" { #include } @@ -32,6 +36,7 @@ extern "C" { #include #include + class Image; class Socket; @@ -43,6 +48,7 @@ namespace cxml { class Node; } + /** @class ImageProxy * @brief A class which holds an Image, and can produce it on request. * @@ -91,6 +97,7 @@ public: * can be used as an optimisation. */ virtual Result image ( + Image::Alignment alignment, boost::optional size = boost::optional () ) const = 0; @@ -102,10 +109,12 @@ public: * This method may be called in a different thread to image(). * @return log2 of any scaling down that will be applied to the image. */ - virtual int prepare (boost::optional = boost::optional()) const { return 0; } + virtual int prepare (Image::Alignment, boost::optional = boost::optional()) const { return 0; } virtual size_t memory_used () const = 0; }; + std::shared_ptr image_proxy_factory (std::shared_ptr xml, std::shared_ptr socket); + #endif