X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;f=src%2Fwx%2Fvideo_waveform_plot.cc;h=826e173597d31038ec92cdbd421b2123be430b45;hb=c36609cf83b825110e9b5472ba8b8ada4b10c1cd;hp=f45a5662e9fee87c072952e8864fcad362c5b382;hpb=b9a1ad3df5f9d85fb7439efd93fede72b9b078af;p=dcpomatic.git diff --git a/src/wx/video_waveform_plot.cc b/src/wx/video_waveform_plot.cc index f45a5662e..826e17359 100644 --- a/src/wx/video_waveform_plot.cc +++ b/src/wx/video_waveform_plot.cc @@ -26,18 +26,16 @@ #include "lib/film.h" #include "lib/image.h" #include "lib/player_video.h" -#include "lib/warnings.h" #include #include -DCPOMATIC_DISABLE_WARNINGS +#include +LIBDCP_DISABLE_WARNINGS #include #include -DCPOMATIC_ENABLE_WARNINGS +LIBDCP_ENABLE_WARNINGS #include -#include -using std::cout; using std::make_shared; using std::max; using std::min; @@ -55,7 +53,7 @@ int const VideoWaveformPlot::_pixel_values = 4096; int const VideoWaveformPlot::_x_axis_width = 52; -VideoWaveformPlot::VideoWaveformPlot (wxWindow* parent, weak_ptr film, weak_ptr viewer) +VideoWaveformPlot::VideoWaveformPlot(wxWindow* parent, weak_ptr film, FilmViewer& viewer) : wxPanel (parent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxFULL_REPAINT_ON_RESIZE) , _film (film) { @@ -63,10 +61,7 @@ VideoWaveformPlot::VideoWaveformPlot (wxWindow* parent, weak_ptr fil SetDoubleBuffered (true); #endif - auto fv = viewer.lock (); - DCPOMATIC_ASSERT (fv); - - _viewer_connection = fv->ImageChanged.connect (boost::bind(&VideoWaveformPlot::set_image, this, _1)); + _viewer_connection = viewer.ImageChanged.connect(boost::bind(&VideoWaveformPlot::set_image, this, _1)); Bind (wxEVT_PAINT, boost::bind(&VideoWaveformPlot::paint, this)); Bind (wxEVT_SIZE, boost::bind(&VideoWaveformPlot::sized, this, _1));