mirror of
https://github.com/RetroDECK/ES-DE.git
synced 2025-02-16 20:15:38 +00:00
Renamed VideoPlayerComponent to VideoOmxComponent.
This commit is contained in:
parent
00ba2e78ab
commit
53cacd5eac
|
@ -10,7 +10,7 @@
|
||||||
#include "SystemScreensaver.h"
|
#include "SystemScreensaver.h"
|
||||||
|
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
#include "components/VideoPlayerComponent.h"
|
#include "components/VideoOmxComponent.h"
|
||||||
#endif
|
#endif
|
||||||
#include "components/VideoVlcComponent.h"
|
#include "components/VideoVlcComponent.h"
|
||||||
#include "resources/Font.h"
|
#include "resources/Font.h"
|
||||||
|
@ -173,7 +173,7 @@ void SystemScreensaver::startScreensaver(bool generateMediaList)
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
// 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 VideoPlayerComponent(mWindow);
|
mVideoScreensaver = new VideoOmxComponent(mWindow);
|
||||||
else
|
else
|
||||||
mVideoScreensaver = new VideoVlcComponent(mWindow);
|
mVideoScreensaver = new VideoVlcComponent(mWindow);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -503,7 +503,7 @@ void GuiMenu::openSoundSettings()
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
// OMX player Audio Device
|
// OMXPlayer audio device.
|
||||||
auto omx_audio_dev = std::make_shared<OptionListComponent<std::string>>
|
auto omx_audio_dev = std::make_shared<OptionListComponent<std::string>>
|
||||||
(mWindow, getHelpStyle(), "OMX PLAYER AUDIO DEVICE", false);
|
(mWindow, getHelpStyle(), "OMX PLAYER AUDIO DEVICE", false);
|
||||||
std::vector<std::string> omx_cards;
|
std::vector<std::string> omx_cards;
|
||||||
|
@ -655,7 +655,7 @@ void GuiMenu::openOtherSettings()
|
||||||
s->addRow(row);
|
s->addRow(row);
|
||||||
|
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
// Video Player - VideoOmxPlayer.
|
// Video playing using OMXPlayer.
|
||||||
auto video_omx_player = std::make_shared<SwitchComponent>(mWindow);
|
auto video_omx_player = std::make_shared<SwitchComponent>(mWindow);
|
||||||
video_omx_player->setState(Settings::getInstance()->getBool("VideoOmxPlayer"));
|
video_omx_player->setState(Settings::getInstance()->getBool("VideoOmxPlayer"));
|
||||||
s->addWithLabel("USE OMX PLAYER (HW ACCELERATED)", video_omx_player);
|
s->addWithLabel("USE OMX PLAYER (HW ACCELERATED)", video_omx_player);
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include "Sound.h"
|
#include "Sound.h"
|
||||||
#include "SystemData.h"
|
#include "SystemData.h"
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
#include "components/VideoPlayerComponent.h"
|
#include "components/VideoOmxComponent.h"
|
||||||
#endif
|
#endif
|
||||||
#include "components/VideoVlcComponent.h"
|
#include "components/VideoVlcComponent.h"
|
||||||
|
|
||||||
|
@ -59,7 +59,7 @@ GridGameListView::GridGameListView(
|
||||||
// Create the correct type of video window.
|
// Create the correct type of video window.
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
if (Settings::getInstance()->getBool("VideoOmxPlayer"))
|
if (Settings::getInstance()->getBool("VideoOmxPlayer"))
|
||||||
mVideo = new VideoPlayerComponent(window);
|
mVideo = new VideoOmxComponent(window);
|
||||||
else
|
else
|
||||||
mVideo = new VideoVlcComponent(window);
|
mVideo = new VideoVlcComponent(window);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
#include "animations/LambdaAnimation.h"
|
#include "animations/LambdaAnimation.h"
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
#include "components/VideoPlayerComponent.h"
|
#include "components/VideoOmxComponent.h"
|
||||||
#endif
|
#endif
|
||||||
#include "components/VideoVlcComponent.h"
|
#include "components/VideoVlcComponent.h"
|
||||||
#include "utils/FileSystemUtil.h"
|
#include "utils/FileSystemUtil.h"
|
||||||
|
@ -63,7 +63,7 @@ VideoGameListView::VideoGameListView(
|
||||||
// Create the correct type of video window.
|
// Create the correct type of video window.
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
if (Settings::getInstance()->getBool("VideoOmxPlayer"))
|
if (Settings::getInstance()->getBool("VideoOmxPlayer"))
|
||||||
mVideo = new VideoPlayerComponent(window);
|
mVideo = new VideoOmxComponent(window);
|
||||||
else
|
else
|
||||||
mVideo = new VideoVlcComponent(window);
|
mVideo = new VideoVlcComponent(window);
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -48,7 +48,7 @@ set(CORE_HEADERS
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextEditComponent.h
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextEditComponent.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextListComponent.h
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextListComponent.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoComponent.h
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoComponent.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoPlayerComponent.h
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoOmxComponent.h
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoVlcComponent.h
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoVlcComponent.h
|
||||||
|
|
||||||
# Guis
|
# Guis
|
||||||
|
@ -125,7 +125,7 @@ set(CORE_SOURCES
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextComponent.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextComponent.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextEditComponent.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/TextEditComponent.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoComponent.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoComponent.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoPlayerComponent.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoOmxComponent.cpp
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoVlcComponent.cpp
|
${CMAKE_CURRENT_SOURCE_DIR}/src/components/VideoVlcComponent.cpp
|
||||||
|
|
||||||
# Guis
|
# Guis
|
||||||
|
|
|
@ -185,10 +185,8 @@ void Settings::setDefaults()
|
||||||
mStringMap["FullscreenMode"] = "normal";
|
mStringMap["FullscreenMode"] = "normal";
|
||||||
#endif
|
#endif
|
||||||
mStringMap["PowerSaverMode"] = "disabled";
|
mStringMap["PowerSaverMode"] = "disabled";
|
||||||
// This setting only applies to Raspberry Pi but we set it for all platforms so
|
|
||||||
// we don't get a warning if we encounter it on a different platform.
|
|
||||||
mBoolMap["VideoOmxPlayer"] = false;
|
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
|
mBoolMap["VideoOmxPlayer"] = 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.
|
||||||
mBoolMap["ScreensaverOmxPlayer"] = true;
|
mBoolMap["ScreensaverOmxPlayer"] = true;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
//
|
//
|
||||||
// EmulationStation Desktop Edition
|
// EmulationStation Desktop Edition
|
||||||
// VideoPlayerComponent.cpp
|
// VideoOmxComponent.cpp
|
||||||
//
|
//
|
||||||
// OMXPlayer video playing for Raspberry Pi.
|
// Video playing using OMXPlayer for Raspberry Pi.
|
||||||
//
|
//
|
||||||
|
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
#include "components/VideoPlayerComponent.h"
|
#include "components/VideoOmxComponent.h"
|
||||||
|
|
||||||
#include "renderers/Renderer.h"
|
#include "renderers/Renderer.h"
|
||||||
#include "utils/StringUtil.h"
|
#include "utils/StringUtil.h"
|
||||||
|
@ -25,18 +25,18 @@ public:
|
||||||
int getVolume() const;
|
int getVolume() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
VideoPlayerComponent::VideoPlayerComponent(Window* window) :
|
VideoOmxComponent::VideoOmxComponent(Window* window) :
|
||||||
VideoComponent(window),
|
VideoComponent(window),
|
||||||
mPlayerPid(-1)
|
mPlayerPid(-1)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
VideoPlayerComponent::~VideoPlayerComponent()
|
VideoOmxComponent::~VideoOmxComponent()
|
||||||
{
|
{
|
||||||
stopVideo();
|
stopVideo();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoPlayerComponent::render(const Transform4x4f& parentTrans)
|
void VideoOmxComponent::render(const Transform4x4f& parentTrans)
|
||||||
{
|
{
|
||||||
if (!isVisible())
|
if (!isVisible())
|
||||||
return;
|
return;
|
||||||
|
@ -47,7 +47,7 @@ void VideoPlayerComponent::render(const Transform4x4f& parentTrans)
|
||||||
VideoComponent::renderSnapshot(parentTrans);
|
VideoComponent::renderSnapshot(parentTrans);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoPlayerComponent::setResize(float width, float height)
|
void VideoOmxComponent::setResize(float width, float height)
|
||||||
{
|
{
|
||||||
setSize(width, height);
|
setSize(width, height);
|
||||||
mTargetSize = Vector2f(width, height);
|
mTargetSize = Vector2f(width, height);
|
||||||
|
@ -56,7 +56,7 @@ void VideoPlayerComponent::setResize(float width, float height)
|
||||||
onSizeChanged();
|
onSizeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoPlayerComponent::setMaxSize(float width, float height)
|
void VideoOmxComponent::setMaxSize(float width, float height)
|
||||||
{
|
{
|
||||||
setSize(width, height);
|
setSize(width, height);
|
||||||
mTargetSize = Vector2f(width, height);
|
mTargetSize = Vector2f(width, height);
|
||||||
|
@ -65,7 +65,7 @@ void VideoPlayerComponent::setMaxSize(float width, float height)
|
||||||
onSizeChanged();
|
onSizeChanged();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoPlayerComponent::startVideo()
|
void VideoOmxComponent::startVideo()
|
||||||
{
|
{
|
||||||
if (!mIsPlaying) {
|
if (!mIsPlaying) {
|
||||||
mVideoWidth = 0;
|
mVideoWidth = 0;
|
||||||
|
@ -205,7 +205,7 @@ void catch_child(int sig_num)
|
||||||
wait(&child_status);
|
wait(&child_status);
|
||||||
}
|
}
|
||||||
|
|
||||||
void VideoPlayerComponent::stopVideo()
|
void VideoOmxComponent::stopVideo()
|
||||||
{
|
{
|
||||||
mIsPlaying = false;
|
mIsPlaying = false;
|
||||||
mStartDelayed = false;
|
mStartDelayed = false;
|
|
@ -1,24 +1,24 @@
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
//
|
//
|
||||||
// EmulationStation Desktop Edition
|
// EmulationStation Desktop Edition
|
||||||
// VideoPlayerComponent.h
|
// VideoOmxComponent.h
|
||||||
//
|
//
|
||||||
// OMXPlayer video playing for Raspberry Pi.
|
// Video playing using OMXPlayer for Raspberry Pi.
|
||||||
//
|
//
|
||||||
|
|
||||||
#if defined(_RPI_)
|
#if defined(_RPI_)
|
||||||
#ifndef ES_CORE_COMPONENTS_VIDEO_PLAYER_COMPONENT_H
|
#ifndef ES_CORE_COMPONENTS_VIDEO_OMX_COMPONENT_H
|
||||||
#define ES_CORE_COMPONENTS_VIDEO_PLAYER_COMPONENT_H
|
#define ES_CORE_COMPONENTS_VIDEO_OMX_COMPONENT_H
|
||||||
|
|
||||||
#include "components/VideoComponent.h"
|
#include "components/VideoComponent.h"
|
||||||
|
|
||||||
void catch_child(int sig_num);
|
void catch_child(int sig_num);
|
||||||
|
|
||||||
class VideoPlayerComponent : public VideoComponent
|
class VideoOmxComponent : public VideoComponent
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
VideoPlayerComponent(Window* window);
|
VideoOmxComponent(Window* window);
|
||||||
virtual ~VideoPlayerComponent();
|
virtual ~VideoOmxComponent();
|
||||||
|
|
||||||
void render(const Transform4x4f& parentTrans) override;
|
void render(const Transform4x4f& parentTrans) override;
|
||||||
|
|
||||||
|
@ -43,5 +43,5 @@ private:
|
||||||
pid_t mPlayerPid;
|
pid_t mPlayerPid;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // ES_CORE_COMPONENTS_VIDEO_PLAYER_COMPONENT_H
|
#endif // ES_CORE_COMPONENTS_VIDEO_OMX_COMPONENT_H
|
||||||
#endif // _RPI_
|
#endif // _RPI_
|
Loading…
Reference in a new issue