summaryrefslogtreecommitdiff
path: root/src/lib/video_decoder.cc
diff options
context:
space:
mode:
authorCarl Hetherington <cth@carlh.net>2013-06-09 17:28:51 +0100
committerCarl Hetherington <cth@carlh.net>2013-06-09 17:28:51 +0100
commit11d0d8d07917543d6c40a6bb1fe5581ae216f5aa (patch)
tree666bc0e50e2c872cef79ceea690f3999fef4bffc /src/lib/video_decoder.cc
parent883d885dc8690519d205c8baa275385af8a39f4b (diff)
parent0b97307b78b1d5e017e97ff90d5d05102cb70c1c (diff)
Merge branch '1.0' of ssh://houllier/home/carl/git/dvdomatic into 1.0
Diffstat (limited to 'src/lib/video_decoder.cc')
-rw-r--r--src/lib/video_decoder.cc24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/lib/video_decoder.cc b/src/lib/video_decoder.cc
index a5147f42e..c5e1850c0 100644
--- a/src/lib/video_decoder.cc
+++ b/src/lib/video_decoder.cc
@@ -121,3 +121,27 @@ VideoDecoder::video_done () const
return (_video_content->length() - _next_video) < film->video_frames_to_time (1);
}
+
+void
+VideoDecoder::seek (Time t)
+{
+ _next_video = t;
+}
+
+void
+VideoDecoder::seek_back ()
+{
+ shared_ptr<const Film> film = _film.lock ();
+ assert (film);
+ _next_video -= film->video_frames_to_time (1);
+}
+
+void
+VideoDecoder::seek_forward ()
+{
+ shared_ptr<const Film> film = _film.lock ();
+ assert (film);
+ _next_video += film->video_frames_to_time (1);
+}
+
+