summaryrefslogtreecommitdiff
path: root/src/lib/video_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-05-22 17:36:11 +0100
committerCarl Hetherington <cth@carlh.net>2013-05-22 17:36:11 +0100
commit596441a4e8cf03a88113646ca6da2f90e721a38b (patch)
treebf364e57aecc1f019d69b8faf32b8818eaa9d98b /src/lib/video_decoder.cc
parent11c70b0e3051517e7bb96a7d6fa53053dab6e978 (diff)
Various hacks.
Diffstat (limited to 'src/lib/video_decoder.cc')
-rw-r--r--src/lib/video_decoder.cc16
1 files changed, 3 insertions, 13 deletions
diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc
index 0c8cda294..cb74a7987 100644
--- a/src/lib/video_decoder.cc
+++ b/src/lib/video_decoder.cc
@@ -34,9 +34,8 @@ using boost::optional;
VideoDecoder::VideoDecoder (shared_ptr<const Film> f, shared_ptr<const VideoContent> c)
: Decoder (f)
+ , _next_video (0)
, _video_content (c)
- , _video_frame (0)
- , _last_content_time (0)
{
}
@@ -58,7 +57,8 @@ VideoDecoder::emit_video (shared_ptr<Image> image, bool same, Time t)
Video (image, same, sub, t);
++_video_frame;
- _last_content_time = t;
+ /* XXX: who's doing skip / repeat? */
+ _next_video = t + _film->video_frames_to_time (1);
}
/** Set up the current subtitle. This will be put onto frames that
@@ -76,13 +76,3 @@ VideoDecoder::emit_subtitle (shared_ptr<TimedSubtitle> s)
_timed_subtitle->subtitle()->set_position (Position (p.x - _video_content->crop().left, p.y - _video_content->crop().top));
}
}
-
-void
-VideoDecoder::set_progress (Job* j) const
-{
- assert (j);
-
- if (_film->length()) {
- j->set_progress (float (_video_frame) / _film->time_to_video_frames (_film->length()));
- }
-}