*/
#include "image_proxy.h"
-#include <dcp/data.h>
+#include "types.h"
+#include <dcp/array_data.h>
#include <boost/thread/mutex.hpp>
#include <boost/filesystem.hpp>
{
public:
explicit FFmpegImageProxy (boost::filesystem::path);
- explicit FFmpegImageProxy (dcp::Data);
- FFmpegImageProxy (boost::shared_ptr<cxml::Node> xml, boost::shared_ptr<Socket> socket);
+ explicit FFmpegImageProxy (dcp::ArrayData);
+ FFmpegImageProxy (std::shared_ptr<Socket> socket);
- std::pair<boost::shared_ptr<Image>, int> image (
+ Result image (
+ Image::Alignment alignment,
boost::optional<dcp::Size> size = boost::optional<dcp::Size> ()
) const;
void add_metadata (xmlpp::Node *) const;
- void send_binary (boost::shared_ptr<Socket>) const;
- bool same (boost::shared_ptr<const ImageProxy> other) const;
+ void write_to_socket (std::shared_ptr<Socket>) const;
+ bool same (std::shared_ptr<const ImageProxy> other) const;
size_t memory_used () const;
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<boost::filesystem::path> _path;
- mutable boost::shared_ptr<Image> _image;
+ mutable std::shared_ptr<Image> _image;
mutable boost::mutex _mutex;
};