diff options
author | Christian <zerov83@gmail.com> | 2016-02-13 21:39:23 +0100 |
---|---|---|
committer | Christian <zerov83@gmail.com> | 2016-02-13 21:39:23 +0100 |
commit | 96a27aa661e2e5562dd9fac1b8eadf0304f92da1 (patch) | |
tree | 37d5ba75017552e71524be02c563aa97311b83ff | |
parent | 63f30c89b51e54301d5dbfa981dc95e8f11af6c5 (diff) | |
download | vdr-plugin-plex-96a27aa661e2e5562dd9fac1b8eadf0304f92da1.tar.gz vdr-plugin-plex-96a27aa661e2e5562dd9fac1b8eadf0304f92da1.tar.bz2 |
define for compiling without libskindesiger.
Use 'make DISABLESKINDESIGNER=1'
-rw-r--r-- | Directory.cpp | 3 | ||||
-rw-r--r-- | Directory.h | 15 | ||||
-rw-r--r-- | Makefile | 15 | ||||
-rw-r--r-- | Media.cpp | 2 | ||||
-rw-r--r-- | Media.h | 6 | ||||
-rw-r--r-- | MediaContainer.cpp | 7 | ||||
-rw-r--r-- | MediaContainer.h | 3 | ||||
-rw-r--r-- | PVideo.cpp | 3 | ||||
-rw-r--r-- | PVideo.h | 17 | ||||
-rw-r--r-- | plex.cpp | 18 | ||||
-rw-r--r-- | plex.h | 9 |
11 files changed, 78 insertions, 20 deletions
diff --git a/Directory.cpp b/Directory.cpp index 6f58091..6d3d370 100644 --- a/Directory.cpp +++ b/Directory.cpp @@ -1,7 +1,6 @@ #include "Directory.h" #include <vdr/i18n.h> #include <Poco/Format.h> -#include "pictureCache.h" namespace plexclient { @@ -72,6 +71,7 @@ std::string Directory::GetTitle() } } +#ifdef SKINDESIGNER void Directory::AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid, bool clear, std::function<void(cGridElement*)> OnCached) { if(clear) grid->ClearTokens(); @@ -154,6 +154,7 @@ void Directory::AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid, bo } } } +#endif std::string Directory::ArtUri() { diff --git a/Directory.h b/Directory.h index a9b2ba7..97d7c85 100644 --- a/Directory.h +++ b/Directory.h @@ -12,11 +12,14 @@ #include <Poco/String.h> #include <memory> -#include <libskindesignerapi/osdelements.h> +#ifdef SKINDESIGNER + #include <libskindesignerapi/osdelements.h> + #include "pictureCache.h" + #include "viewGridNavigator.h" +#endif #include "XmlObject.h" #include "MediaContainer.h" -#include "viewGridNavigator.h" #include "PlexServer.h" using Poco::XML::DOMParser; @@ -31,7 +34,10 @@ namespace plexclient { class MediaContainer; -class Directory: private XmlObject, public cGridElement +class Directory: private XmlObject +#ifdef SKINDESIGNER +, public cGridElement +#endif { public: Directory(Poco::XML::Node* pNode, PlexServer* Server, MediaContainer* parent); @@ -70,8 +76,11 @@ public: virtual std::string GetTitle(); std::string ArtUri(); std::string ThumbUri(); + +#ifdef SKINDESIGNER // gridElement virtual void AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid, bool clear = true, std::function<void(cGridElement*)> OnCached = NULL); +#endif }; } @@ -16,6 +16,7 @@ LIBS += $(shell pkg-config --libs libskindesignerapi) ### Configuration (edit this for your needs) CONFIG := #-DDEBUG # uncomment to build DEBUG +DISABLESKINDESIGNER ?= 0 ### The version number of this plugin (taken from the main source file): @@ -59,10 +60,13 @@ PACKAGE = vdr-$(ARCHIVE) SOFILE = libvdr-$(PLUGIN).so ### Includes and Defines (add further entries here): - +ifneq ($(DISABLESKINDESIGNER),1) +CONFIG += -DSKINDESIGNER INCLUDES += $(shell pkg-config --cflags libskindesignerapi) DEFINES += -DLIBSKINDESIGNERAPIVERSION='"$(shell pkg-config --modversion libskindesignerapi)"' +endif + DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"' -DPLUGIN='"$(PLUGIN)"' -D_GNU_SOURCE $(CONFIG) \ $(if $(GIT_REV), -DGIT_REV='"$(GIT_REV)"') @@ -90,13 +94,16 @@ OBJS = $(PLUGIN).o \ Stream.o \ Media.o \ plexOsd.o \ - plexSdOsd.o \ + device.o + +ifneq ($(DISABLESKINDESIGNER),1) +OBJS += plexSdOsd.o \ viewGridNavigator.o \ browserGrid.o \ viewHeader.o \ detailView.o \ - pictureCache.o \ - device.o + pictureCache.o +endif SRCS = $(wildcard $(OBJS:.o=.c)) $(PLUGIN).cpp @@ -47,6 +47,7 @@ Media::Media(Poco::XML::Node* pNode) } } +#ifdef SKINDESIGNER void Media::AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid) { grid->AddStringToken("videoResolution", m_sVideoResolution); @@ -60,5 +61,6 @@ void Media::AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid) grid->AddStringToken("container", m_sContainer); grid->AddStringToken("videoFrameRate", m_VideoFrameRate); } +#endif } @@ -14,7 +14,9 @@ #include <vector> #include <iostream> -#include <libskindesignerapi/osdelements.h> +#ifdef SKINDESIGNER + #include <libskindesignerapi/osdelements.h> +#endif #include <memory> #include "XmlObject.h" // Base class: model::XmlObject @@ -62,7 +64,9 @@ public: std::vector<Stream> m_vStreams; +#ifdef SKINDESIGNER void AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid); +#endif }; } diff --git a/MediaContainer.cpp b/MediaContainer.cpp index 10096ce..4ad2a52 100644 --- a/MediaContainer.cpp +++ b/MediaContainer.cpp @@ -1,5 +1,8 @@ #include "MediaContainer.h" -#include "pictureCache.h" + +#ifdef SKINDESIGNER + #include "pictureCache.h" +#endif namespace plexclient { @@ -69,6 +72,7 @@ std::string MediaContainer::ThumbUri() return m_pServer->GetUri() + m_sThumb; } +#ifdef SKINDESIGNER void MediaContainer::PreCache() { bool foo; @@ -81,5 +85,6 @@ void MediaContainer::PreCache() if(!it->m_sArt.empty()) cPictureCache::GetInstance().GetPath(it->ArtUri(), 1920, 1080, foo); }*/ } +#endif } diff --git a/MediaContainer.h b/MediaContainer.h index 02b8b96..978311c 100644 --- a/MediaContainer.h +++ b/MediaContainer.h @@ -73,7 +73,10 @@ public: std::string ThumbUri(); std::string ArtUri(); + +#ifdef SKINDESIGNER void PreCache(); +#endif }; } @@ -6,7 +6,6 @@ #include <vdr/tools.h> #include "PlexHelper.h" -#include "pictureCache.h" namespace plexclient { @@ -228,6 +227,7 @@ bool Video::SetWatched() } } +#ifdef SKINDESIGNER void Video::AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid, bool clear, std::function<void(cGridElement*)> OnCached) { if(clear) grid->ClearTokens(); @@ -315,6 +315,7 @@ void Video::AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid, bool c m_Media.AddTokens(grid); } +#endif std::string Video::ArtUri() { @@ -15,8 +15,12 @@ #include <vector> #include <iostream> #include <memory> -#include <libskindesignerapi/osdelements.h> -#include "viewGridNavigator.h" + +#ifdef SKINDESIGNER + #include <libskindesignerapi/osdelements.h> + #include "viewGridNavigator.h" + #include "pictureCache.h" +#endif #include "XmlObject.h" #include "MediaContainer.h" @@ -35,7 +39,10 @@ namespace plexclient { class MediaContainer; -class Video: private XmlObject, public cGridElement +class Video: private XmlObject +#ifdef SKINDESIGNER +,public cGridElement +#endif { private: MediaContainer* m_pParent; @@ -90,9 +97,11 @@ public: std::string ArtUri(); std::string GetSubtitleUrl(); - + +#ifdef SKINDESIGNER // gridElement virtual void AddTokens(std::shared_ptr<skindesignerapi::cOsdElement> grid, bool clear = true, std::function<void(cGridElement*)> OnCached = NULL); +#endif }; } @@ -2,11 +2,8 @@ #include "SubscriptionManager.h" #include "plex.h" #include "plexOsd.h" -#include "plexSdOsd.h" -#include "pictureCache.h" #include "services.h" -#include <libskindesignerapi/skindesignerapi.h> #include <Poco/Net/SSLManager.h> #include <Poco/SharedPtr.h> #include <Poco/Net/Context.h> @@ -18,7 +15,10 @@ ////////////////////////////////////////////////////////////////////////////// volatile bool cMyPlugin::CalledFromCode = false; + +#ifdef SKINDESIGNER bool cMyPlugin::bSkindesigner = false; +#endif plexclient::Video cMyPlugin::CurrentVideo; bool cMyPlugin::PlayingFile = false; @@ -31,7 +31,9 @@ bool cMyPlugin::PlayingFile = false; */ cMyPlugin::cMyPlugin(void) { +#ifdef SKINDESIGNER m_pSdCheck = NULL; +#endif } /** @@ -66,6 +68,7 @@ const char *cMyPlugin::Description(void) bool cMyPlugin::Start(void) { +#ifdef SKINDESIGNER skindesignerapi::cPluginStructure reg; reg.name = "plex"; reg.libskindesignerAPIVersion = LIBSKINDESIGNERAPIVERSION; @@ -95,6 +98,7 @@ bool cMyPlugin::Start(void) } else { esyslog("[plex]: %s skindesigner not available", __FUNCTION__); } +#endif return true; } @@ -127,8 +131,10 @@ bool cMyPlugin::Initialize(void) plexclient::plexgdm::GetInstance().clientDetails(Config::GetInstance().GetUUID(), Config::GetInstance().GetHostname(), "3200", DESCRIPTION, VERSION); plexclient::plexgdm::GetInstance().Start(); plexclient::ControlServer::GetInstance().Start(); + +#ifdef SKINDESIGNER cPictureCache::GetInstance().Start(); - +#endif return true; } @@ -146,8 +152,12 @@ const char *cMyPlugin::MainMenuEntry(void) cOsdObject *cMyPlugin::MainMenuAction(void) { //dsyslog("[plex]%s:\n", __FUNCTION__); +#ifdef SKINDESIGNER if(m_pSdCheck && m_pSdCheck->SdSupport()) return new cPlexSdOsd(); else return cPlexMenu::ProcessMenu(); +#else + return cPlexMenu::ProcessMenu(); +#endif } /** @@ -16,7 +16,12 @@ #include "plexgdm.h" #include "cPlexOsdItem.h" #include "hlsPlayerControl.h" -#include "plexSdOsd.h" + +#ifdef SKINDESIGNER + #include <libskindesignerapi/skindesignerapi.h> + #include "plexSdOsd.h" + #include "pictureCache.h" +#endif #include <iostream> #include <string> @@ -40,8 +45,10 @@ static const char *const MAINMENUENTRY = "Plex for VDR"; class cMyPlugin:public cPlugin { private: +#ifdef SKINDESIGNER cPlexSdOsd* m_pSdCheck; static bool bSkindesigner; +#endif public: cMyPlugin(void); |