diff options
author | methodus <methodus@web.de> | 2012-10-02 02:52:14 +0200 |
---|---|---|
committer | methodus <methodus@web.de> | 2012-10-02 02:52:14 +0200 |
commit | cbef7cfb972c27251ea8d58dde054b7c57e1715f (patch) | |
tree | 090f5c5e45ba29fcaa146da9513d408e895139b5 | |
parent | b2d514992fd66335bf2ea8debb2a2d1476b27419 (diff) | |
download | vdr-plugin-upnp-cbef7cfb972c27251ea8d58dde054b7c57e1715f.tar.gz vdr-plugin-upnp-cbef7cfb972c27251ea8d58dde054b7c57e1715f.tar.bz2 |
VDRProvider plugin for serving live tv started.
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | include/media/mediaManager.h | 6 | ||||
-rw-r--r-- | media/mediaManager.cpp | 3 | ||||
-rw-r--r-- | media/pluginManager.cpp | 14 | ||||
-rw-r--r-- | plugins/provider/vdrProvider/Makefile | 2 |
5 files changed, 17 insertions, 10 deletions
@@ -28,7 +28,7 @@ LIBDIR ?= ../../lib TMPDIR ?= /tmp PLUGINDIR= ./PLUGINS -PLUGINLIBDIR= $(PLUGINDIR)/lib/upnp +PLUGINLIBDIR= /usr/lib/vdr/plugins/upnp ### Make sure that necessary options are included: diff --git a/include/media/mediaManager.h b/include/media/mediaManager.h index 71f6d38..16dbb4d 100644 --- a/include/media/mediaManager.h +++ b/include/media/mediaManager.h @@ -8,15 +8,15 @@ #ifndef MEDIAMANAGER_H_ #define MEDIAMANAGER_H_ +#include "../../include/pluginManager.h" +#include "../../include/plugin.h" +#include "../../include/tools.h" #include <vdr/thread.h> #include <list> #include <string> #include <stdint.h> #include <tntdb/connection.h> #include <tntdb/connect.h> -#include "../../include/plugin.h" -#include "../../include/tools.h" -#include "../../include/pluginManager.h" namespace upnp { diff --git a/media/mediaManager.cpp b/media/mediaManager.cpp index e8ee505..a94b563 100644 --- a/media/mediaManager.cpp +++ b/media/mediaManager.cpp @@ -5,13 +5,14 @@ * Author: savop */ -#include "../include/plugin.h" #include "../include/media/mediaManager.h" +#include "../include/plugin.h" #include "../include/server.h" #include "../include/parser.h" #include "../include/tools.h" #include <upnp/upnp.h> #include <sstream> +#include <tntdb/connection.h> #include <tntdb/statement.h> #include <tntdb/result.h> #include <upnp/ixml.h> diff --git a/media/pluginManager.cpp b/media/pluginManager.cpp index b35cd49..40a0b9f 100644 --- a/media/pluginManager.cpp +++ b/media/pluginManager.cpp @@ -259,7 +259,7 @@ upnp::cPluginManager::cPluginManager(cMediaManager* manager) : manager(manager) {} -upnp::cPluginManager::~cPluginManager(){} +cPluginManager::~cPluginManager(){} #define UPNPPLUGIN_PREFIX "libupnp-" #define SO_INDICATOR ".so." @@ -282,7 +282,7 @@ bool upnp::cPluginManager::LoadPlugins(const string& directory){ filename.find(UPNPPLUGIN_VERSION) != string::npos && filename.find(SO_INDICATOR) != string::npos) { - boost::shared_ptr<DLL> dll(new DLL(filename)); + boost::shared_ptr<DLL> dll(new DLL(directory + "/" + filename)); if(dll->Load()) dlls.push_back(dll); } @@ -313,15 +313,23 @@ bool upnp::cPluginManager::DLL::Load(){ if (!(error = dlerror())){ isyslog("UPnP\tFound provider in %s", file.c_str()); return true; + } else { + dsyslog("UPnP\tError: %s", error); } profiler = (FunctionPtr)dlsym(handle, "UPnPCreateMediaProfiler"); if (!(error = dlerror())){ isyslog("UPnP\tFound profiler in %s", file.c_str()); return true; + } else { + dsyslog("UPnP\tError: %s", error); } + } else { + dsyslog("UPnP\tError: %s", error); } + isyslog("UPnP\tInvalid library '%s', no valid symbols found.", file.c_str()); + return false; } @@ -332,5 +340,3 @@ upnp::cPluginManager::DLL::~DLL() } } // namespace upnp - - diff --git a/plugins/provider/vdrProvider/Makefile b/plugins/provider/vdrProvider/Makefile index 8bc602e..dfbf54f 100644 --- a/plugins/provider/vdrProvider/Makefile +++ b/plugins/provider/vdrProvider/Makefile @@ -25,7 +25,7 @@ INCLUDES += -I$(UPNPDIR)/include DEFINES += -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -OBJS = $(SCHEMA)Provider.cpp +OBJS = $(SCHEMA)Provider.o all: libupnp-$(SCHEMA)-provider.so |