本文整理汇总了C++中VideoEntryPtr::pause方法的典型用法代码示例。如果您正苦于以下问题:C++ VideoEntryPtr::pause方法的具体用法?C++ VideoEntryPtr::pause怎么用?C++ VideoEntryPtr::pause使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类VideoEntryPtr
的用法示例。
在下文中一共展示了VideoEntryPtr::pause方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: playMovie
VideoEntryPtr MystAreaVideo::playMovie() {
// Check if the video is already running
VideoEntryPtr handle = _vm->_video->findVideo(_videoFile);
// If the video is not running, play it
if (!handle) {
handle = _vm->_video->playMovie(_videoFile, Audio::Mixer::kSFXSoundType);
if (!handle)
error("Failed to open '%s'", _videoFile.c_str());
handle->moveTo(_left, _top);
handle->setLooping(_loop != 0);
Common::Rational rate;
if (_playRate != 0) {
rate = Common::Rational(_playRate, 100);
} else {
rate = 1;
}
if (_direction == -1) {
rate = -rate;
handle->seek(handle->getDuration());
}
handle->setRate(rate);
} else {
// Resume the video
handle->pause(false);
handle->start();
}
if (_playBlocking) {
_vm->waitUntilMovieEnds(handle);
return VideoEntryPtr();
}
return handle;
}
示例2: pauseMovie
void MystAreaVideo::pauseMovie(bool pause) {
VideoEntryPtr handle = _vm->_video->findVideo(_videoFile);
if (handle && !handle->endOfVideo())
handle->pause(pause);
}