aboutsummaryrefslogtreecommitdiff
path: root/video/video_decoder.h
diff options
context:
space:
mode:
Diffstat (limited to 'video/video_decoder.h')
-rw-r--r--video/video_decoder.h22
1 files changed, 16 insertions, 6 deletions
diff --git a/video/video_decoder.h b/video/video_decoder.h
index 26078d5750..7e89caee40 100644
--- a/video/video_decoder.h
+++ b/video/video_decoder.h
@@ -379,14 +379,20 @@ public:
*/
void setDefaultHighColorFormat(const Graphics::PixelFormat &format) { _defaultHighColorFormat = format; }
+ /**
+ * Set the time for this video to stop at. At this time in the video,
+ * all audio will stop and endOfVideo() will return true.
+ */
+ void setStopTime(const Audio::Timestamp &stopTime);
+
+ /**
+ * Get the stop time of the video (if not set, zero)
+ */
+ Audio::Timestamp getStopTime() const { return _stopTime; }
+
// Future API
//void setRate(const Common::Rational &rate);
//Common::Rational getRate() const;
- //void setStartTime(const Audio::Timestamp &startTime);
- //Audio::Timestamp getStartTime() const;
- //void setStopTime(const Audio::Timestamp &stopTime);
- //Audio::Timestamp getStopTime() const;
- //void setSegment(const Audio::Timestamp &startTime, const Audio::Timestamp &stopTime);
protected:
// Old API
@@ -579,6 +585,8 @@ protected:
*/
void stop();
+ void start(const Audio::Timestamp &limit);
+
/**
* Get the volume for this track
*/
@@ -773,7 +781,8 @@ private:
// Current playback status
bool _isPlaying, _needsRewind, _needsUpdate;
- Audio::Timestamp _lastTimeChange;
+ Audio::Timestamp _lastTimeChange, _stopTime;
+ bool _stopTimeSet;
// Palette settings from individual tracks
mutable bool _dirtyPalette;
@@ -785,6 +794,7 @@ private:
// Internal helper functions
void stopAudio();
void startAudio();
+ void startAudioLimit(const Audio::Timestamp &limit);
};
/**