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