diff options
author | Matthew Hoops | 2011-01-11 17:27:31 +0000 |
---|---|---|
committer | Matthew Hoops | 2011-01-11 17:27:31 +0000 |
commit | 3bb5a9fe719a666fe85300831e570e6b375d612e (patch) | |
tree | b47c75678dc3f6920b158d982b0a6599954f8f10 /graphics/video/video_decoder.cpp | |
parent | 0089d3b338819ca28ba9100ba61d344be86057b3 (diff) | |
download | scummvm-rg350-3bb5a9fe719a666fe85300831e570e6b375d612e.tar.gz scummvm-rg350-3bb5a9fe719a666fe85300831e570e6b375d612e.tar.bz2 scummvm-rg350-3bb5a9fe719a666fe85300831e570e6b375d612e.zip |
VIDEO: Add a SeekableVideoDecoder class
svn-id: r55202
Diffstat (limited to 'graphics/video/video_decoder.cpp')
-rw-r--r-- | graphics/video/video_decoder.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/graphics/video/video_decoder.cpp b/graphics/video/video_decoder.cpp index da3aae2821..d1d3445c38 100644 --- a/graphics/video/video_decoder.cpp +++ b/graphics/video/video_decoder.cpp @@ -121,4 +121,16 @@ uint32 FixedRateVideoDecoder::getFrameBeginTime(uint32 frame) const { return beginTime.toInt(); } +VideoTimestamp::VideoTimestamp() : _units(0), _scale(1) { +} + +VideoTimestamp::VideoTimestamp(uint units, uint scale) : _units(units), _scale(scale) { + assert(_scale); +} + +uint VideoTimestamp::getUnitsInScale(uint scale) const { + assert(scale); + return (_scale == scale) ? _units : _units * scale / _scale; +} + } // End of namespace Graphics |