Put Image in dcpomatic:: to avoid Fastvideo name clash.
[dcpomatic.git] / src / lib / raw_image_proxy.cc
index c3b565f3c768ade554b11d622ab6ea1e6896b304..09b73da8e66bd1cd139c876039907a256ce6c8ea 100644 (file)
 
 #include "raw_image_proxy.h"
 #include "image.h"
+#include "warnings.h"
 #include <dcp/raw_convert.h>
 #include <dcp/util.h>
 #include <libcxml/cxml.h>
 extern "C" {
 #include <libavutil/pixfmt.h>
 }
+DCPOMATIC_DISABLE_WARNINGS
 #include <libxml++/libxml++.h>
+DCPOMATIC_ENABLE_WARNINGS
 
 #include "i18n.h"
 
@@ -37,6 +40,7 @@ using boost::shared_ptr;
 using boost::dynamic_pointer_cast;
 using boost::optional;
 using dcp::raw_convert;
+using namespace dcpomatic;
 
 RawImageProxy::RawImageProxy (shared_ptr<Image> image)
        : _image (image)
@@ -54,10 +58,10 @@ RawImageProxy::RawImageProxy (shared_ptr<cxml::Node> xml, shared_ptr<Socket> soc
        _image->read_from_socket (socket);
 }
 
-pair<shared_ptr<Image>, int>
-RawImageProxy::image (optional<dcp::NoteHandler>, optional<dcp::Size>) const
+ImageProxy::Result
+RawImageProxy::image (optional<dcp::Size>) const
 {
-       return make_pair (_image, 0);
+       return Result (_image, 0);
 }
 
 void
@@ -70,7 +74,7 @@ RawImageProxy::add_metadata (xmlpp::Node* node) const
 }
 
 void
-RawImageProxy::send_binary (shared_ptr<Socket> socket) const
+RawImageProxy::write_to_socket (shared_ptr<Socket> socket) const
 {
        _image->write_to_socket (socket);
 }
@@ -83,13 +87,7 @@ RawImageProxy::same (shared_ptr<const ImageProxy> other) const
                return false;
        }
 
-       return (*_image.get()) == (*rp->image().first.get());
-}
-
-AVPixelFormat
-RawImageProxy::pixel_format () const
-{
-       return _image->pixel_format ();
+       return (*_image.get()) == (*rp->image().image.get());
 }
 
 size_t