-VideoDecoder::VideoDecoder (shared_ptr<Film> f, shared_ptr<const Options> o, Job* j)
- : Decoder (f, o, j)
- , _video_frame (0)
-{
-
-}
-
-/** Called by subclasses to tell the world that some video data is ready.
- * We find a subtitle then emit it for listeners.
- * @param frame to decode; caller manages memory.
- */
-void
-VideoDecoder::emit_video (shared_ptr<Image> image)
-{
- shared_ptr<Subtitle> sub;
- if (_timed_subtitle && _timed_subtitle->displayed_at (double (video_frame()) / _film->frames_per_second())) {
- sub = _timed_subtitle->subtitle ();
- }
-
- signal_video (image, sub);
-}
-
-void
-VideoDecoder::repeat_last_video ()
-{
- if (!_last_image) {
- _last_image.reset (new CompactImage (pixel_format(), native_size()));
- _last_image->make_black ();
- }
-
- signal_video (_last_image, _last_subtitle);
-}
-
-void
-VideoDecoder::signal_video (shared_ptr<Image> image, shared_ptr<Subtitle> sub)