From 0bb1f321e0b0e50c49960195a490dc715889bd13 Mon Sep 17 00:00:00 2001 From: Jonas Karlman Date: Mon, 22 Apr 2019 20:03:23 +0000 Subject: GBM: override ProcessInfo and use Deinterlace Half by default on arm --- cmake/treedata/optional/common/gbm.txt | 1 + xbmc/cores/VideoPlayer/Process/gbm/CMakeLists.txt | 5 ++++ .../VideoPlayer/Process/gbm/ProcessInfoGBM.cpp | 34 ++++++++++++++++++++++ .../cores/VideoPlayer/Process/gbm/ProcessInfoGBM.h | 26 +++++++++++++++++ xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp | 2 ++ 5 files changed, 68 insertions(+) create mode 100644 xbmc/cores/VideoPlayer/Process/gbm/CMakeLists.txt create mode 100644 xbmc/cores/VideoPlayer/Process/gbm/ProcessInfoGBM.cpp create mode 100644 xbmc/cores/VideoPlayer/Process/gbm/ProcessInfoGBM.h diff --git a/cmake/treedata/optional/common/gbm.txt b/cmake/treedata/optional/common/gbm.txt index 196b32357f..d6e6e9ebdc 100644 --- a/cmake/treedata/optional/common/gbm.txt +++ b/cmake/treedata/optional/common/gbm.txt @@ -1,2 +1,3 @@ xbmc/cores/RetroPlayer/process/gbm cores/RetroPlayer/process/gbm # GBM +xbmc/cores/VideoPlayer/Process/gbm cores/VideoPlayer/Process/gbm # GBM xbmc/windowing/gbm windowing/gbm # GBM \ No newline at end of file diff --git a/xbmc/cores/VideoPlayer/Process/gbm/CMakeLists.txt b/xbmc/cores/VideoPlayer/Process/gbm/CMakeLists.txt new file mode 100644 index 0000000000..18b4b94c25 --- /dev/null +++ b/xbmc/cores/VideoPlayer/Process/gbm/CMakeLists.txt @@ -0,0 +1,5 @@ +set(SOURCES ProcessInfoGBM.cpp) + +set(HEADERS ProcessInfoGBM.h) + +core_add_library(processGBM) diff --git a/xbmc/cores/VideoPlayer/Process/gbm/ProcessInfoGBM.cpp b/xbmc/cores/VideoPlayer/Process/gbm/ProcessInfoGBM.cpp new file mode 100644 index 0000000000..0228319397 --- /dev/null +++ b/xbmc/cores/VideoPlayer/Process/gbm/ProcessInfoGBM.cpp @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2019 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#include "ProcessInfoGBM.h" + +using namespace VIDEOPLAYER; + +CProcessInfo* CProcessInfoGBM::Create() +{ + return new CProcessInfoGBM(); +} + +void CProcessInfoGBM::Register() +{ + CProcessInfo::RegisterProcessControl("gbm", CProcessInfoGBM::Create); +} + +CProcessInfoGBM::CProcessInfoGBM() +{ +} + +EINTERLACEMETHOD CProcessInfoGBM::GetFallbackDeintMethod() +{ +#if defined(__arm__) + return EINTERLACEMETHOD::VS_INTERLACEMETHOD_DEINTERLACE_HALF; +#else + return CProcessInfo::GetFallbackDeintMethod(); +#endif +} diff --git a/xbmc/cores/VideoPlayer/Process/gbm/ProcessInfoGBM.h b/xbmc/cores/VideoPlayer/Process/gbm/ProcessInfoGBM.h new file mode 100644 index 0000000000..479e4fde4c --- /dev/null +++ b/xbmc/cores/VideoPlayer/Process/gbm/ProcessInfoGBM.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2019 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#pragma once + +#include "cores/IPlayer.h" +#include "cores/VideoPlayer/Process/ProcessInfo.h" + +namespace VIDEOPLAYER +{ + +class CProcessInfoGBM : public CProcessInfo +{ +public: + CProcessInfoGBM(); + static CProcessInfo* Create(); + static void Register(); + EINTERLACEMETHOD GetFallbackDeintMethod() override; +}; + +} // namespace VIDEOPLAYER diff --git a/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp b/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp index c24cb919ae..f763577117 100644 --- a/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp +++ b/xbmc/windowing/gbm/WinSystemGbmGLESContext.cpp @@ -14,6 +14,7 @@ #include "cores/RetroPlayer/rendering/VideoRenderers/RPRendererGBM.h" #include "cores/RetroPlayer/rendering/VideoRenderers/RPRendererOpenGLES.h" #include "cores/VideoPlayer/DVDCodecs/DVDFactoryCodec.h" +#include "cores/VideoPlayer/Process/gbm/ProcessInfoGBM.h" #include "cores/VideoPlayer/VideoRenderers/LinuxRendererGLES.h" #include "cores/VideoPlayer/VideoRenderers/RenderFactory.h" @@ -65,6 +66,7 @@ bool CWinSystemGbmGLESContext::InitWindowSystem() CRendererDRMPRIMEGLES::Register(); CRendererDRMPRIME::Register(); CDVDVideoCodecDRMPRIME::Register(); + VIDEOPLAYER::CProcessInfoGBM::Register(); return true; } -- cgit v1.2.3