mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2024-11-22 06:05:38 +00:00
The audio stream is now only cleared from a single location in VideoFFmpegComponent.
Also made the video player finish processing if the video is paused.
This commit is contained in:
parent
9d8cb889ac
commit
65e119cff9
|
@ -44,7 +44,6 @@ bool MediaViewer::startMediaViewer(FileData* game)
|
|||
|
||||
if (mHasVideo) {
|
||||
ViewController::get()->onPauseVideo();
|
||||
AudioManager::getInstance()->clearStream();
|
||||
}
|
||||
|
||||
if (mHasVideo || mHasImages)
|
||||
|
@ -59,7 +58,6 @@ void MediaViewer::stopMediaViewer()
|
|||
|
||||
if (mVideo) {
|
||||
ViewController::get()->onStopVideo();
|
||||
AudioManager::getInstance()->clearStream();
|
||||
delete mVideo;
|
||||
mVideo = nullptr;
|
||||
}
|
||||
|
@ -191,7 +189,6 @@ void MediaViewer::showNext()
|
|||
return;
|
||||
}
|
||||
else if (mVideo && !Settings::getInstance()->getBool("MediaViewerKeepVideoRunning")) {
|
||||
AudioManager::getInstance()->clearStream();
|
||||
delete mVideo;
|
||||
mVideo = nullptr;
|
||||
showedVideo = true;
|
||||
|
|
|
@ -235,8 +235,6 @@ void SystemScreensaver::stopScreensaver()
|
|||
|
||||
if (mGameOverlay)
|
||||
mGameOverlay.reset();
|
||||
|
||||
AudioManager::getInstance()->clearStream();
|
||||
}
|
||||
|
||||
void SystemScreensaver::nextGame() {
|
||||
|
|
|
@ -320,7 +320,6 @@ void ViewController::restoreViewPosition()
|
|||
|
||||
void ViewController::goToSystemView(SystemData* system, bool playTransition)
|
||||
{
|
||||
AudioManager::getInstance()->clearStream();
|
||||
bool applicationStartup = false;
|
||||
|
||||
if (mState.viewing == NOTHING)
|
||||
|
@ -818,7 +817,6 @@ bool ViewController::input(InputConfig* config, Input input)
|
|||
mCurrentView->stopListScrolling();
|
||||
// Finally, if the camera is currently moving, reset its position.
|
||||
cancelViewTransitions();
|
||||
AudioManager::getInstance()->clearStream();
|
||||
|
||||
mWindow->pushGui(new GuiMenu(mWindow));
|
||||
return true;
|
||||
|
@ -842,7 +840,6 @@ void ViewController::update(int deltaTime)
|
|||
updateSelf(deltaTime);
|
||||
|
||||
if (mGameToLaunch) {
|
||||
AudioManager::getInstance()->clearStream();
|
||||
launch(mGameToLaunch);
|
||||
mGameToLaunch = nullptr;
|
||||
}
|
||||
|
|
|
@ -22,7 +22,6 @@ bool IGameListView::input(InputConfig* config, Input input)
|
|||
config->isMappedTo("select", input) && input.value) {
|
||||
ViewController::get()->cancelViewTransitions();
|
||||
stopListScrolling();
|
||||
AudioManager::getInstance()->clearStream();
|
||||
mWindow->pushGui(new GuiGamelistOptions(mWindow, this->mRoot->getSystem()));
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -395,7 +395,6 @@ void VideoGameListView::updateInfoPanel()
|
|||
mThumbnail.setImage(file->getThumbnailPath());
|
||||
mMarquee.setImage(file->getMarqueePath());
|
||||
mVideo->setImage(file->getImagePath());
|
||||
AudioManager::getInstance()->clearStream();
|
||||
mVideo->onHide();
|
||||
|
||||
|
||||
|
|
|
@ -710,7 +710,6 @@ void Window::startScreensaver()
|
|||
(*it)->onScreensaverActivate();
|
||||
|
||||
stopInfoPopup();
|
||||
AudioManager::getInstance()->clearStream();
|
||||
mScreensaver->startScreensaver(true);
|
||||
mRenderScreensaver = true;
|
||||
}
|
||||
|
|
|
@ -217,7 +217,7 @@ void VideoFFmpegComponent::update(int deltaTime)
|
|||
|
||||
void VideoFFmpegComponent::frameProcessing()
|
||||
{
|
||||
while (mIsPlaying) {
|
||||
while (mIsPlaying && !mPause) {
|
||||
readFrames();
|
||||
|
||||
if (!mEndOfVideo && mIsActuallyPlaying &&
|
||||
|
@ -229,6 +229,7 @@ void VideoFFmpegComponent::frameProcessing()
|
|||
// This 1 ms wait makes sure that the thread does not consume all available CPU cycles.
|
||||
SDL_Delay(1);
|
||||
}
|
||||
AudioManager::getInstance()->clearStream();
|
||||
}
|
||||
|
||||
void VideoFFmpegComponent::readFrames()
|
||||
|
|
Loading…
Reference in a new issue