mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-01-18 23:15:38 +00:00
Added menu option and integrations for VideoFFmpegComponent
This commit is contained in:
parent
ef8b008d28
commit
b87d7238fc
|
@ -12,6 +12,7 @@
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
#include "components/VideoOmxComponent.h"
|
#include "components/VideoOmxComponent.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "components/VideoFFmpegComponent.h"
|
||||||
#include "components/VideoVlcComponent.h"
|
#include "components/VideoVlcComponent.h"
|
||||||
#include "resources/Font.h"
|
#include "resources/Font.h"
|
||||||
#include "utils/FileSystemUtil.h"
|
#include "utils/FileSystemUtil.h"
|
||||||
|
@ -179,10 +180,18 @@ void SystemScreensaver::startScreensaver(bool generateMediaList)
|
||||||
// Create the correct type of video component.
|
// Create the correct type of video component.
|
||||||
if (Settings::getInstance()->getBool("ScreensaverOmxPlayer"))
|
if (Settings::getInstance()->getBool("ScreensaverOmxPlayer"))
|
||||||
mVideoScreensaver = new VideoOmxComponent(mWindow);
|
mVideoScreensaver = new VideoOmxComponent(mWindow);
|
||||||
|
else if (Settings::getInstance()->getString("VideoPlayer") == "vlc")
|
||||||
|
mVideoScreensaver = new VideoVlcComponent(window);
|
||||||
|
else
|
||||||
|
mVideoScreensaver = new VideoFFmpegComponent(window);
|
||||||
|
|
||||||
else
|
else
|
||||||
mVideoScreensaver = new VideoVlcComponent(mWindow);
|
mVideoScreensaver = new VideoVlcComponent(mWindow);
|
||||||
#else
|
#else
|
||||||
mVideoScreensaver = new VideoVlcComponent(mWindow);
|
if (Settings::getInstance()->getString("VideoPlayer") == "vlc")
|
||||||
|
mVideoScreensaver = new VideoVlcComponent(mWindow);
|
||||||
|
else
|
||||||
|
mVideoScreensaver = new VideoFFmpegComponent(mWindow);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mVideoScreensaver->topWindow(true);
|
mVideoScreensaver->topWindow(true);
|
||||||
|
|
|
@ -755,6 +755,25 @@ void GuiMenu::openOtherSettings()
|
||||||
});
|
});
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Video player.
|
||||||
|
auto video_player = std::make_shared<OptionListComponent<std::string>>
|
||||||
|
(mWindow, getHelpStyle(), "FULLSCREEN MODE", false);
|
||||||
|
std::string selectedPlayer = Settings::getInstance()->getString("VideoPlayer");
|
||||||
|
video_player->add("VLC", "vlc", selectedPlayer == "vlc");
|
||||||
|
video_player->add("FFmpeg (experimental)", "ffmpeg", selectedPlayer == "ffmpeg");
|
||||||
|
// If there are no objects returned, then there must be a manually modified entry in the
|
||||||
|
// configuration file. Simply set the video player to VLC in this case.
|
||||||
|
if (video_player->getSelectedObjects().size() == 0)
|
||||||
|
video_player->selectEntry(0);
|
||||||
|
s->addWithLabel("VIDEO PLAYER", video_player);
|
||||||
|
s->addSaveFunc([video_player, s] {
|
||||||
|
if (video_player->getSelected() != Settings::getInstance()->getString("VideoPlayer")) {
|
||||||
|
Settings::getInstance()->setString("VideoPlayer", video_player->getSelected());
|
||||||
|
s->setNeedsSaving();
|
||||||
|
s->setNeedsReloading();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// When to save game metadata.
|
// When to save game metadata.
|
||||||
auto save_gamelist_mode = std::make_shared<OptionListComponent<std::string>>
|
auto save_gamelist_mode = std::make_shared<OptionListComponent<std::string>>
|
||||||
(mWindow, getHelpStyle(), "WHEN TO SAVE METADATA", false);
|
(mWindow, getHelpStyle(), "WHEN TO SAVE METADATA", false);
|
||||||
|
|
|
@ -12,12 +12,14 @@
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
#include "components/VideoOmxComponent.h"
|
#include "components/VideoOmxComponent.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "components/VideoFFmpegComponent.h"
|
||||||
#include "components/VideoVlcComponent.h"
|
#include "components/VideoVlcComponent.h"
|
||||||
#include "utils/FileSystemUtil.h"
|
#include "utils/FileSystemUtil.h"
|
||||||
#include "views/ViewController.h"
|
#include "views/ViewController.h"
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
#include "Settings.h"
|
#include "Settings.h"
|
||||||
#endif
|
#endif
|
||||||
|
#include "AudioManager.h"
|
||||||
#include "CollectionSystemsManager.h"
|
#include "CollectionSystemsManager.h"
|
||||||
#include "SystemData.h"
|
#include "SystemData.h"
|
||||||
|
|
||||||
|
@ -64,10 +66,15 @@ VideoGameListView::VideoGameListView(
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
if (Settings::getInstance()->getBool("VideoOmxPlayer"))
|
if (Settings::getInstance()->getBool("VideoOmxPlayer"))
|
||||||
mVideo = new VideoOmxComponent(window);
|
mVideo = new VideoOmxComponent(window);
|
||||||
else
|
else if (Settings::getInstance()->getString("VideoPlayer") == "vlc")
|
||||||
mVideo = new VideoVlcComponent(window);
|
mVideo = new VideoVlcComponent(window);
|
||||||
|
else
|
||||||
|
mVideo = new VideoFFmpegComponent(window);
|
||||||
#else
|
#else
|
||||||
mVideo = new VideoVlcComponent(window);
|
if (Settings::getInstance()->getString("VideoPlayer") == "vlc")
|
||||||
|
mVideo = new VideoVlcComponent(window);
|
||||||
|
else
|
||||||
|
mVideo = new VideoFFmpegComponent(window);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
mList.setPosition(mSize.x() * (0.50f + padding), mList.getPosition().y());
|
mList.setPosition(mSize.x() * (0.50f + padding), mList.getPosition().y());
|
||||||
|
@ -388,8 +395,10 @@ void VideoGameListView::updateInfoPanel()
|
||||||
mThumbnail.setImage(file->getThumbnailPath());
|
mThumbnail.setImage(file->getThumbnailPath());
|
||||||
mMarquee.setImage(file->getMarqueePath());
|
mMarquee.setImage(file->getMarqueePath());
|
||||||
mVideo->setImage(file->getImagePath());
|
mVideo->setImage(file->getImagePath());
|
||||||
|
AudioManager::getInstance()->clearStream();
|
||||||
mVideo->onHide();
|
mVideo->onHide();
|
||||||
|
|
||||||
|
|
||||||
if (!mVideo->setVideo(file->getVideoPath()))
|
if (!mVideo->setVideo(file->getVideoPath()))
|
||||||
mVideo->setDefaultVideo();
|
mVideo->setDefaultVideo();
|
||||||
}
|
}
|
||||||
|
|
|
@ -205,6 +205,7 @@ void Settings::setDefaults()
|
||||||
#if defined (__unix__)
|
#if defined (__unix__)
|
||||||
mStringMap["FullscreenMode"] = { "normal", "normal" };
|
mStringMap["FullscreenMode"] = { "normal", "normal" };
|
||||||
#endif
|
#endif
|
||||||
|
mStringMap["VideoPlayer"] = { "vlc", "vlc" };
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
mBoolMap["VideoOmxPlayer"] = { false, false };
|
mBoolMap["VideoOmxPlayer"] = { false, false };
|
||||||
// We're defaulting to OMX Player for full screen video on the Pi.
|
// We're defaulting to OMX Player for full screen video on the Pi.
|
||||||
|
|
Loading…
Reference in a new issue