Ejemplo n.º 1
0
bool AVIDecoder::AVIVideoTrack::setReverse(bool reverse) {
	if (isRewindable()) {
		// Track is rewindable, so reversing is allowed
		_reversed = reverse;
		return true;
	}

	return !reverse;
}
Ejemplo n.º 2
0
bool VideoDecoder::rewind() {
	if (!isRewindable())
		return false;

	// Stop all tracks so they can be rewound
	if (isPlaying())
		stopAudio();

	for (TrackList::iterator it = _tracks.begin(); it != _tracks.end(); it++)
		if (!(*it)->rewind())
			return false;

	// Now that we've rewound, start all tracks again
	if (isPlaying())
		startAudio();

	_lastTimeChange = 0;
	_startTime = g_system->getMillis();
	resetPauseStartTime();
	return true;
}