std::shared_ptr
[dcpomatic.git] / src / lib / raw_image_proxy.cc
index c3b565f3c768ade554b11d622ab6ea1e6896b304..667f25b0603f99771f69ba00ac04428c745acaae 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"
 
 using std::string;
 using std::pair;
 using std::make_pair;
-using boost::shared_ptr;
-using boost::dynamic_pointer_cast;
+using std::shared_ptr;
+using std::dynamic_pointer_cast;
 using boost::optional;
 using dcp::raw_convert;
 
@@ -54,10 +57,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 +73,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 +86,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