diff options
| author | Matthew Hoops | 2012-08-16 13:34:28 -0400 | 
|---|---|---|
| committer | Matthew Hoops | 2012-08-16 13:34:28 -0400 | 
| commit | 7569ec7dc00e95e0643cde7f413a7cf46a4770f0 (patch) | |
| tree | 7731d640f058b24b42cf6e3b87420d28ca7f0179 | |
| parent | fb35c7f46f986a22235638e2946ba8492e735109 (diff) | |
| download | scummvm-rg350-7569ec7dc00e95e0643cde7f413a7cf46a4770f0.tar.gz scummvm-rg350-7569ec7dc00e95e0643cde7f413a7cf46a4770f0.tar.bz2 scummvm-rg350-7569ec7dc00e95e0643cde7f413a7cf46a4770f0.zip  | |
VIDEO: Rename setStopTime() to setEndTime()
To better differentiate with stop()
| -rw-r--r-- | engines/mohawk/video.cpp | 2 | ||||
| -rw-r--r-- | video/video_decoder.cpp | 26 | ||||
| -rw-r--r-- | video/video_decoder.h | 10 | 
3 files changed, 19 insertions, 19 deletions
diff --git a/engines/mohawk/video.cpp b/engines/mohawk/video.cpp index 13adfcb1cd..0ed4f38b53 100644 --- a/engines/mohawk/video.cpp +++ b/engines/mohawk/video.cpp @@ -514,7 +514,7 @@ bool VideoManager::isVideoPlaying() {  void VideoManager::setVideoBounds(VideoHandle handle, Audio::Timestamp start, Audio::Timestamp end) {  	assert(handle != NULL_VID_HANDLE);  	_videoStreams[handle].start = start; -	_videoStreams[handle]->setStopTime(end); +	_videoStreams[handle]->setEndTime(end);  	_videoStreams[handle]->seek(start);  } diff --git a/video/video_decoder.cpp b/video/video_decoder.cpp index 1ead6af54e..fc4d7e1ae7 100644 --- a/video/video_decoder.cpp +++ b/video/video_decoder.cpp @@ -106,8 +106,8 @@ AdvancedVideoDecoder::AdvancedVideoDecoder() {  	_pauseLevel = 0;  	_needsUpdate = false;  	_lastTimeChange = 0; -	_stopTime = 0; -	_stopTimeSet = false; +	_endTime = 0; +	_endTimeSet = false;  	// Find the best format for output  	_defaultHighColorFormat = g_system->getScreenFormat(); @@ -133,8 +133,8 @@ void AdvancedVideoDecoder::close() {  	_pauseLevel = 0;  	_needsUpdate = false;  	_lastTimeChange = 0; -	_stopTime = 0; -	_stopTimeSet = false; +	_endTime = 0; +	_endTimeSet = false;  }  bool AdvancedVideoDecoder::isVideoLoaded() const { @@ -254,10 +254,10 @@ bool AdvancedVideoDecoder::endOfVideo() const {  	if (!isVideoLoaded())  		return true; -	if (_stopTimeSet) { +	if (_endTimeSet) {  		const VideoTrack *track = findNextVideoTrack(); -		if (track && track->getNextFrameStartTime() >= (uint)_stopTime.msecs()) +		if (track && track->getNextFrameStartTime() >= (uint)_endTime.msecs())  			return true;  	} @@ -592,7 +592,7 @@ bool AdvancedVideoDecoder::addStreamFileTrack(const Common::String &baseName) {  	return result;  } -void AdvancedVideoDecoder::setStopTime(const Audio::Timestamp &stopTime) { +void AdvancedVideoDecoder::setEndTime(const Audio::Timestamp &endTime) {  	Audio::Timestamp startTime = 0;  	if (isPlaying()) { @@ -600,17 +600,17 @@ void AdvancedVideoDecoder::setStopTime(const Audio::Timestamp &stopTime) {  		stopAudio();  	} -	_stopTime = stopTime; -	_stopTimeSet = true; +	_endTime = endTime; +	_endTimeSet = true; -	if (startTime > stopTime) +	if (startTime > endTime)  		return;  	if (isPlaying()) {  		// We'll assume the audio track is going to start up at the same time it just was  		// and therefore not do any seeking.  		// Might want to set it anyway if we're seekable. -		startAudioLimit(_stopTime.msecs() - startTime.msecs()); +		startAudioLimit(_endTime.msecs() - startTime.msecs());  		_lastTimeChange = startTime;  	}  } @@ -676,10 +676,10 @@ const AdvancedVideoDecoder::VideoTrack *AdvancedVideoDecoder::findNextVideoTrack  }  void AdvancedVideoDecoder::startAudio() { -	if (_stopTimeSet) { +	if (_endTimeSet) {  		// HACK: Timestamp's subtraction asserts out when subtracting two times  		// with different rates. -		startAudioLimit(_stopTime - _lastTimeChange.convertToFramerate(_stopTime.framerate())); +		startAudioLimit(_endTime - _lastTimeChange.convertToFramerate(_endTime.framerate()));  		return;  	} diff --git a/video/video_decoder.h b/video/video_decoder.h index 72be634f17..d6cfcde0b4 100644 --- a/video/video_decoder.h +++ b/video/video_decoder.h @@ -360,15 +360,15 @@ public:  	void setDefaultHighColorFormat(const Graphics::PixelFormat &format) { _defaultHighColorFormat = format; }  	/** -	 * Set the time for this video to stop at. At this time in the video, +	 * Set the time for this video to end at. At this time in the video,  	 * all audio will stop and endOfVideo() will return true.  	 */ -	void setStopTime(const Audio::Timestamp &stopTime); +	void setEndTime(const Audio::Timestamp &endTime);  	/**  	 * Get the stop time of the video (if not set, zero)  	 */ -	Audio::Timestamp getStopTime() const { return _stopTime; } +	Audio::Timestamp getEndTime() const { return _endTime; }  	// Future API  	//void setRate(const Common::Rational &rate); @@ -761,8 +761,8 @@ private:  	// Current playback status  	bool _isPlaying, _needsRewind, _needsUpdate; -	Audio::Timestamp _lastTimeChange, _stopTime; -	bool _stopTimeSet; +	Audio::Timestamp _lastTimeChange, _endTime; +	bool _endTimeSet;  	// Palette settings from individual tracks  	mutable bool _dirtyPalette;  | 
