}
}
+
+void
+FilmViewer::image_changed (shared_ptr<PlayerVideo> pv)
+{
+ emit (boost::bind(boost::ref(ImageChanged), pv));
+}
+
return _closed_captions_dialog;
}
void finished ();
+ void image_changed (boost::shared_ptr<PlayerVideo> video);
bool pending_idle_get () const {
return _idle_get;
}
- boost::signals2::signal<void (boost::weak_ptr<PlayerVideo>)> ImageChanged;
+ boost::signals2::signal<void (boost::shared_ptr<PlayerVideo>)> ImageChanged;
boost::signals2::signal<void (dcpomatic::DCPTime)> Started;
boost::signals2::signal<void (dcpomatic::DCPTime)> Stopped;
/** While playing back we reached the end of the film (emitted from GUI thread) */
if (pv) {
set_image (pv->image(bind(&PlayerVideo::force, _1, AV_PIX_FMT_RGB24), false, true));
draw (pv->inter_position(), pv->inter_size());
+ _viewer->image_changed (pv);
}
}
);
_state_timer.set ("ImageChanged");
- _viewer->ImageChanged (player_video().first);
+ _viewer->image_changed (player_video().first);
_state_timer.unset ();
_inter_position = player_video().first->inter_position ();
}
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 (¬e));
+ _image = DCPVideo::convert_to_xyz (image->shallow_copy(), boost::bind(¬e));
_dirty = true;
Refresh ();
}
void paint ();
void sized (wxSizeEvent &);
void create_waveform ();
- void set_image (boost::weak_ptr<PlayerVideo>);
+ void set_image (boost::shared_ptr<PlayerVideo>);
void mouse_moved (wxMouseEvent &);
boost::weak_ptr<const Film> _film;