X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Flib%2Fffmpeg_image_proxy.h;h=b2b0260b5437eab63ae99bc66e8d30ad76349ddd;hb=a1ca287cee660bce1c41baa14e079d2c97292d81;hp=5f9b3b1313935d6fcfbd754f2f4f7a7d80eedb05;hpb=e5b744922fb6aed65ec13f22a9de0c86dd1bd561;p=dcpomatic.git diff --git a/src/lib/ffmpeg_image_proxy.h b/src/lib/ffmpeg_image_proxy.h index 5f9b3b131..b2b0260b5 100644 --- a/src/lib/ffmpeg_image_proxy.h +++ b/src/lib/ffmpeg_image_proxy.h @@ -19,7 +19,8 @@ */ #include "image_proxy.h" -#include +#include "types.h" +#include #include #include @@ -27,28 +28,29 @@ class FFmpegImageProxy : public ImageProxy { public: explicit FFmpegImageProxy (boost::filesystem::path); - explicit FFmpegImageProxy (dcp::Data); - FFmpegImageProxy (boost::shared_ptr xml, boost::shared_ptr socket); + explicit FFmpegImageProxy (dcp::ArrayData); + FFmpegImageProxy (std::shared_ptr socket); - std::pair, int> image ( + Result image ( + Image::Alignment alignment, boost::optional size = boost::optional () - ) const; + ) const override; - void add_metadata (xmlpp::Node *) const; - void send_binary (boost::shared_ptr) const; - bool same (boost::shared_ptr other) const; - size_t memory_used () const; + void add_metadata (xmlpp::Node *) const override; + void write_to_socket (std::shared_ptr) const override; + bool same (std::shared_ptr other) const override; + size_t memory_used () const override; int avio_read (uint8_t* buffer, int const amount); int64_t avio_seek (int64_t const pos, int whence); private: - dcp::Data _data; + dcp::ArrayData _data; mutable int64_t _pos; /** Path of a file that this image came from, if applicable; stored so that failed-decode errors can give more detail. */ boost::optional _path; - mutable boost::shared_ptr _image; + mutable std::shared_ptr _image; mutable boost::mutex _mutex; };