Assorted C++11/formatting cleanups.
[dcpomatic.git] / src / wx / video_waveform_plot.cc
index 9674d0af27015879bccd38fb5cc7b4941c91442b..7293af69071abfc2761793ee7cf71b52eb96c674 100644 (file)
 #include <dcp/openjpeg_image.h>
 #include <wx/rawbmp.h>
 #include <wx/graphics.h>
-#include <boost/bind.hpp>
+#include <boost/bind/bind.hpp>
 #include <iostream>
 
 using std::cout;
 using std::min;
 using std::max;
 using std::string;
-using boost::weak_ptr;
-using boost::shared_ptr;
+using std::weak_ptr;
+using std::shared_ptr;
 #if BOOST_VERSION >= 106100
 using namespace boost::placeholders;
 #endif
@@ -181,7 +181,7 @@ VideoWaveformPlot::create_waveform ()
 
        _waveform = _waveform->scale (
                dcp::Size (GetSize().GetWidth() - _x_axis_width, waveform_height),
-               dcp::YUV_TO_RGB_REC709, AV_PIX_FMT_RGB24, false, false
+               dcp::YUVToRGB::REC709, AV_PIX_FMT_RGB24, false, false
                );
 }
 
@@ -192,18 +192,16 @@ note ()
 }
 
 void
-VideoWaveformPlot::set_image (weak_ptr<PlayerVideo> image)
+VideoWaveformPlot::set_image (shared_ptr<PlayerVideo> image)
 {
        if (!_enabled) {
                return;
        }
 
-       shared_ptr<PlayerVideo> pv = image.lock ();
-       DCPOMATIC_ASSERT (pv);
        /* We must copy the PlayerVideo here as we will call ::image() on it, potentially
           with a different pixel_format than was used when ::prepare() was called.
        */
-       _image = DCPVideo::convert_to_xyz (pv->shallow_copy(), boost::bind (&note));
+       _image = DCPVideo::convert_to_xyz (image->shallow_copy(), boost::bind(&note));
        _dirty = true;
        Refresh ();
 }