aboutsummaryrefslogtreecommitdiff
path: root/video/video_decoder.h
diff options
context:
space:
mode:
authorMatthew Hoops2013-08-06 22:26:15 -0400
committerMatthew Hoops2013-08-06 22:26:15 -0400
commit6e9390feb8166d5f9d6c6fdfe00a336b4f71de4c (patch)
treee9943792aec71fec640af286bcb4327e78eadeac /video/video_decoder.h
parentd041177e2f8fe71853b974868e20d4919374bd3f (diff)
downloadscummvm-rg350-6e9390feb8166d5f9d6c6fdfe00a336b4f71de4c.tar.gz
scummvm-rg350-6e9390feb8166d5f9d6c6fdfe00a336b4f71de4c.tar.bz2
scummvm-rg350-6e9390feb8166d5f9d6c6fdfe00a336b4f71de4c.zip
VIDEO: Don't allow VideoDecoder::seek() to be overridden
A new seekIntern() that performs the actual seeking is to be overriden instead. Having the caller override seek() and then call VideoDecoder::seek() kind of defeated the purpose of stopping/starting the audio.
Diffstat (limited to 'video/video_decoder.h')
-rw-r--r--video/video_decoder.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/video/video_decoder.h b/video/video_decoder.h
index d0a6e08005..7811734dd5 100644
--- a/video/video_decoder.h
+++ b/video/video_decoder.h
@@ -168,14 +168,15 @@ public:
/**
* Seek to a given time in the video.
*
- * If the video is playing, it will continue to play. The default
- * implementation will seek each track and must still be called
- * from any other implementation.
+ * If the video is playing, it will continue to play. This calls
+ * seekIntern(), which can be overriden. By default, seekIntern()
+ * will call Track::seek() on all tracks with the time passed to
+ * this function.
*
* @param time The time to seek to
* @return true on success, false otherwise
*/
- virtual bool seek(const Audio::Timestamp &time);
+ bool seek(const Audio::Timestamp &time);
/**
* Seek to a given frame.
@@ -820,6 +821,15 @@ protected:
*/
TrackListIterator getTrackListEnd() { return _tracks.end(); }
+ /**
+ * The internal seek function that does the actual seeking.
+ *
+ * @see seek()
+ *
+ * @return true on success, false otherwise
+ */
+ virtual bool seekIntern(const Audio::Timestamp &time);
+
private:
// Tracks owned by this VideoDecoder
TrackList _tracks;