Re-work scaling following excellent insights by Carsten Kurz, described
[dcpomatic.git] / src / lib / image_proxy.h
index 9619fab75d345fe53b3ad278d4466756dc5dbcd0..08516e718bb4dbfe34ae5f07a81ef16abfe3265b 100644 (file)
@@ -64,6 +64,13 @@ public:
                Result (boost::shared_ptr<Image> image_, int log2_scaling_)
                        : image (image_)
                        , log2_scaling (log2_scaling_)
+                       , error (false)
+               {}
+
+               Result (boost::shared_ptr<Image> image_, int log2_scaling_, bool error_)
+                       : image (image_)
+                       , log2_scaling (log2_scaling_)
+                       , error (error_)
                {}
 
                /** Image (which will be aligned) */
@@ -73,6 +80,8 @@ public:
                 *  will be 1.
                 */
                int log2_scaling;
+               /** true if there was an error during image decoding, otherwise false */
+               bool error;
        };
 
        /** @param log Log to write to, or 0.
@@ -84,7 +93,7 @@ public:
                ) const = 0;
 
        virtual void add_metadata (xmlpp::Node *) const = 0;
-       virtual void send_binary (boost::shared_ptr<Socket>) const = 0;
+       virtual void write_to_socket (boost::shared_ptr<Socket>) const = 0;
        /** @return true if our image is definitely the same as another, false if it is probably not */
        virtual bool same (boost::shared_ptr<const ImageProxy>) const = 0;
        /** Do any useful work that would speed up a subsequent call to ::image().