From 9d50d68a6126de597f39db20d8b42c0653f9d5cb Mon Sep 17 00:00:00 2001 From: xbmc Date: Fri, 2 Sep 2016 21:29:31 +0200 Subject: VideoPlayer: add shader based deint methods for linux to ProcessInfo --- .../Process/overrides/linux/ProcessInfoLinux.cpp | 63 ++++++++++++++++++++++ .../Process/overrides/linux/ProcessInfoLinux.h | 31 +++++++++++ 2 files changed, 94 insertions(+) create mode 100644 xbmc/cores/VideoPlayer/Process/overrides/linux/ProcessInfoLinux.cpp create mode 100644 xbmc/cores/VideoPlayer/Process/overrides/linux/ProcessInfoLinux.h diff --git a/xbmc/cores/VideoPlayer/Process/overrides/linux/ProcessInfoLinux.cpp b/xbmc/cores/VideoPlayer/Process/overrides/linux/ProcessInfoLinux.cpp new file mode 100644 index 0000000000..6696015d76 --- /dev/null +++ b/xbmc/cores/VideoPlayer/Process/overrides/linux/ProcessInfoLinux.cpp @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2005-2016 Team XBMC + * http://xbmc.org + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with XBMC; see the file COPYING. If not, see + * . + * + */ + +#include "ProcessInfoLinux.h" +#include "threads/SingleLock.h" + +// Override for platform ports +#if defined(TARGET_LINUX) + +CProcessInfo* CProcessInfo::CreateInstance() +{ + return new CProcessInfoLinux(); +} + + +// base class definitions +CProcessInfoLinux::CProcessInfoLinux() +{ + +} + +CProcessInfoLinux::~CProcessInfoLinux() +{ + +} + +void CProcessInfoLinux::SetSwDeinterlacingMethods() +{ + // first populate with the defaults from base implementation + CProcessInfo::SetSwDeinterlacingMethods(); + + std::list methods; + { + // get the current methods + CSingleLock lock(m_videoCodecSection); + methods = m_deintMethods; + } + // add bob and blend deinterlacer for osx + methods.push_back(EINTERLACEMETHOD::VS_INTERLACEMETHOD_RENDER_BOB); + methods.push_back(EINTERLACEMETHOD::VS_INTERLACEMETHOD_RENDER_BLEND); + + // update with the new methods list + UpdateDeinterlacingMethods(methods); +} +#endif + diff --git a/xbmc/cores/VideoPlayer/Process/overrides/linux/ProcessInfoLinux.h b/xbmc/cores/VideoPlayer/Process/overrides/linux/ProcessInfoLinux.h new file mode 100644 index 0000000000..5831ea3d9d --- /dev/null +++ b/xbmc/cores/VideoPlayer/Process/overrides/linux/ProcessInfoLinux.h @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2005-2016 Team XBMC + * http://xbmc.org + * + * This Program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2, or (at your option) + * any later version. + * + * This Program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with XBMC; see the file COPYING. If not, see + * . + * + */ +#pragma once + +#include "cores/IPlayer.h" +#include "../../ProcessInfo.h" + +class CProcessInfoLinux : public CProcessInfo +{ +public: + CProcessInfoLinux(); + virtual ~CProcessInfoLinux(); + void SetSwDeinterlacingMethods() override; +}; -- cgit v1.2.3