Use AV_ prefixes on some FFmpeg bits.
[dcpomatic.git] / src / lib / j2k_image_proxy.cc
index ce0b88265ee8259e44b3cc3b93879c08b638d01a..b6e684815b3e8cfcd346de91b60ad6b08ab28afd 100644 (file)
@@ -28,6 +28,8 @@
 #include <dcp/colour_conversion.h>
 #include <dcp/rgb_xyz.h>
 #include <libcxml/cxml.h>
+#include <libxml++/libxml++.h>
+#include <iostream>
 
 #include "i18n.h"
 
@@ -81,7 +83,7 @@ J2KImageProxy::J2KImageProxy (shared_ptr<cxml::Node> xml, shared_ptr<Socket> soc
 shared_ptr<Image>
 J2KImageProxy::image (optional<dcp::NoteHandler> note) const
 {
-       shared_ptr<Image> image (new Image (PIX_FMT_RGB48LE, _size, true));
+       shared_ptr<Image> image (new Image (AV_PIX_FMT_RGB48LE, _size, true));
 
        shared_ptr<dcp::OpenJPEGImage> oj = dcp::decompress_j2k (const_cast<uint8_t*> (_data.data().get()), _data.size (), 0);
 
@@ -112,7 +114,7 @@ J2KImageProxy::image (optional<dcp::NoteHandler> note) const
        } else {
                dcp::xyz_to_rgb (oj, dcp::ColourConversion::srgb_to_xyz(), image->data()[0], image->stride()[0], note);
        }
-       
+
        return image;
 }
 
@@ -148,3 +150,10 @@ J2KImageProxy::same (shared_ptr<const ImageProxy> other) const
 
        return memcmp (_data.data().get(), jp->_data.data().get(), _data.size()) == 0;
 }
+
+J2KImageProxy::J2KImageProxy (Data data, dcp::Size size)
+       : _data (data)
+       , _size (size)
+{
+
+}