Hand-apply d849d411cff28ef5453085791d0b4d7cd73bd070 from master; replace all assert...
[dcpomatic.git] / src / lib / j2k_image_proxy.cc
index 6924fad795bd1ddbdcab067036a96917110560ed..9312a7763ba8e5c959cf48e39cd227de5c686a9f 100644 (file)
 using std::string;
 using boost::shared_ptr;
 
-J2KImageProxy::J2KImageProxy (shared_ptr<const dcp::MonoPictureFrame> frame, dcp::Size size, shared_ptr<Log> log)
-       : ImageProxy (log)
-       , _mono (frame)
+/** Construct a J2KImageProxy from a JPEG2000 file */
+J2KImageProxy::J2KImageProxy (boost::filesystem::path path, dcp::Size size)
+       : _mono (new dcp::MonoPictureFrame (path))
+       , _size (size)
+{
+
+}
+
+J2KImageProxy::J2KImageProxy (shared_ptr<const dcp::MonoPictureFrame> frame, dcp::Size size)
+       : _mono (frame)
        , _size (size)
 {
        
 }
 
-J2KImageProxy::J2KImageProxy (shared_ptr<const dcp::StereoPictureFrame> frame, dcp::Size size, dcp::Eye eye, shared_ptr<Log> log)
-       : ImageProxy (log)
-       , _stereo (frame)
+J2KImageProxy::J2KImageProxy (shared_ptr<const dcp::StereoPictureFrame> frame, dcp::Size size, dcp::Eye eye)
+       : _stereo (frame)
        , _size (size)
        , _eye (eye)
 {
 
 }
 
-J2KImageProxy::J2KImageProxy (shared_ptr<cxml::Node> xml, shared_ptr<Socket> socket, shared_ptr<Log> log)
-       : ImageProxy (log)
+J2KImageProxy::J2KImageProxy (shared_ptr<cxml::Node> xml, shared_ptr<Socket> socket)
 {
        _size = dcp::Size (xml->number_child<int> ("Width"), xml->number_child<int> ("Height"));
        if (xml->optional_number_child<int> ("Eye")) {