[vdr-plugin-dummydevice] 01/03: Imported Upstream version 2.0.0

Tobias Grimm tiber-guest at moszumanska.debian.org
Mon Feb 9 18:34:51 UTC 2015


This is an automated email from the git hooks/post-receive script.

tiber-guest pushed a commit to branch master
in repository vdr-plugin-dummydevice.

commit 4c22b27f719f67cf7407166c7bc5a5b13e82c20a
Author: etobi <git at e-tobi.net>
Date:   Mon Feb 9 19:11:02 2015 +0100

    Imported Upstream version 2.0.0
---
 HISTORY                         |  3 ++
 Makefile                        | 92 +++++++++++++++++++++++++++++------------
 Makefile => Makefile.vdr-1.7.37 |  0
 README                          |  4 +-
 dummydevice.c                   | 55 ++++--------------------
 5 files changed, 80 insertions(+), 74 deletions(-)

diff --git a/HISTORY b/HISTORY
index f6e3819..e7bdf78 100644
--- a/HISTORY
+++ b/HISTORY
@@ -21,3 +21,6 @@ VDR Plugin 'dummydevice' Revision History
 
 - Added dummy OSD (Thanks to L. Hanisch)
 
+2013-08-20: Version 2.0.0
+
+- Updated for vdr-2.0.0
diff --git a/Makefile b/Makefile
index 66b9587..dc959f1 100644
--- a/Makefile
+++ b/Makefile
@@ -1,3 +1,4 @@
+#
 # Makefile for a Video Disk Recorder plugin
 #
 # $Id$
@@ -5,74 +6,110 @@
 # The official name of this plugin.
 # This name will be used in the '-P...' option of VDR to load the plugin.
 # By default the main source file also carries this name.
-#
+
 PLUGIN = dummydevice
 
 ### The version number of this plugin (taken from the main source file):
 
 VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ print $$6 }' | sed -e 's/[";]//g')
 
-### The C++ compiler and options:
+### The directory environment:
 
-CXX      ?= g++
-CXXFLAGS ?= -fPIC -O2 -Wall -Woverloaded-virtual
+# Use package data if installed...otherwise assume we're under the VDR source directory:
+PKGCFG = $(if $(VDRDIR),$(shell pkg-config --variable=$(1) $(VDRDIR)/vdr.pc),$(shell pkg-config --variable=$(1) vdr || pkg-config --variable=$(1) ../../../vdr.pc))
+LIBDIR = $(call PKGCFG,libdir)
+LOCDIR = $(call PKGCFG,locdir)
+PLGCFG = $(call PKGCFG,plgcfg)
+#
+TMPDIR ?= /tmp
 
-### The directory environment:
+### The compiler options:
 
-VDRDIR = ../../..
-LIBDIR = ../../lib
-TMPDIR = /tmp
+export CFLAGS   = $(call PKGCFG,cflags)
+export CXXFLAGS = $(call PKGCFG,cxxflags)
 
-### Allow user defined options to overwrite defaults:
+### The version number of VDR's plugin API:
 
--include $(VDRDIR)/Make.config
+APIVERSION = $(call PKGCFG,apiversion)
 
-### The version number of VDR (taken from VDR's "config.h"):
+### Allow user defined options to overwrite defaults:
 
-APIVERSION = $(shell sed -ne '/define APIVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
-VDRVERSION = $(shell sed -ne '/define VDRVERSION/ { s/^.*"\(.*\)".*$$/\1/; p }' $(VDRDIR)/config.h)
-ifeq ($(strip $(APIVERSION)),)
-   APIVERSION = $(VDRVERSION)
-endif
+-include $(PLGCFG)
 
 ### The name of the distribution archive:
 
 ARCHIVE = $(PLUGIN)-$(VERSION)
 PACKAGE = vdr-$(ARCHIVE)
 
+### The name of the shared object file:
+
+SOFILE = libvdr-$(PLUGIN).so
+
 ### Includes and Defines (add further entries here):
 
-INCLUDES += -I$(VDRDIR)/include
+INCLUDES +=
 
-DEFINES += -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
+DEFINES += -DPLUGIN_NAME_I18N='"$(PLUGIN)"'
 
 ### The object files (add further files here):
 
 OBJS = $(PLUGIN).o
 
+### The main target:
+
+all: $(SOFILE) i18n
+
 ### Implicit rules:
 
 %.o: %.c
-	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) $<
+	$(CXX) $(CXXFLAGS) -c $(DEFINES) $(INCLUDES) -o $@ $<
 
-# Dependencies:
+### Dependencies:
 
-MAKEDEP = g++ -MM -MG
+MAKEDEP = $(CXX) -MM -MG
 DEPFILE = .dependencies
 $(DEPFILE): Makefile
-	@$(MAKEDEP) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
+	@$(MAKEDEP) $(CXXFLAGS) $(DEFINES) $(INCLUDES) $(OBJS:%.o=%.c) > $@
 
 -include $(DEPFILE)
 
+### Internationalization (I18N):
+
+PODIR     = po
+I18Npo    = $(wildcard $(PODIR)/*.po)
+I18Nmo    = $(addsuffix .mo, $(foreach file, $(I18Npo), $(basename $(file))))
+I18Nmsgs  = $(addprefix $(DESTDIR)$(LOCDIR)/, $(addsuffix /LC_MESSAGES/vdr-$(PLUGIN).mo, $(notdir $(foreach file, $(I18Npo), $(basename $(file))))))
+I18Npot   = $(PODIR)/$(PLUGIN).pot
+
+%.mo: %.po
+	msgfmt -c -o $@ $<
+
+$(I18Npot): $(wildcard *.c)
+	xgettext -C -cTRANSLATORS --no-wrap --no-location -k -ktr -ktrNOOP --package-name=vdr-$(PLUGIN) --package-version=$(VERSION) --msgid-bugs-address='<see README>' -o $@ `ls $^`
+
+%.po: $(I18Npot)
+	msgmerge -U --no-wrap --no-location --backup=none -q -N $@ $<
+	@touch $@
+
+$(I18Nmsgs): $(DESTDIR)$(LOCDIR)/%/LC_MESSAGES/vdr-$(PLUGIN).mo: $(PODIR)/%.mo
+	install -D -m644 $< $@
+
+.PHONY: i18n
+i18n: $(I18Nmo) $(I18Npot)
+
+install-i18n: $(I18Nmsgs)
+
 ### Targets:
 
-all: libvdr-$(PLUGIN).so
+$(SOFILE): $(OBJS)
+	$(CXX) $(CXXFLAGS) $(LDFLAGS) -shared $(OBJS) -o $@
+
+install-lib: $(SOFILE)
+	install -D $^ $(DESTDIR)$(LIBDIR)/$^.$(APIVERSION)
 
-libvdr-$(PLUGIN).so: $(OBJS)
-	$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
-	@cp $@ $(LIBDIR)/$@.$(APIVERSION)
+install: install-lib install-i18n
 
-dist: clean
+dist: $(I18Npo) clean
 	@-rm -rf $(TMPDIR)/$(ARCHIVE)
 	@mkdir $(TMPDIR)/$(ARCHIVE)
 	@cp -a * $(TMPDIR)/$(ARCHIVE)
@@ -81,4 +118,5 @@ dist: clean
 	@echo Distribution package created as $(PACKAGE).tgz
 
 clean:
+	@-rm -f $(PODIR)/*.mo $(PODIR)/*.pot
 	@-rm -f $(OBJS) $(DEPFILE) *.so *.tgz core* *~
diff --git a/Makefile b/Makefile.vdr-1.7.37
similarity index 100%
copy from Makefile
copy to Makefile.vdr-1.7.37
diff --git a/README b/README
index 737216a..c20db67 100644
--- a/README
+++ b/README
@@ -18,4 +18,6 @@ Description:
 
 Requirements:
 
-  vdr-1.2.0 or later (tested with 1.4.0).
+  vdr-2.0.0 or later.
+
+  Use vdr-dummydevice-1.0.3 with older vdr versions (vdr-1.2.0 or later)
diff --git a/dummydevice.c b/dummydevice.c
index cdb1ff5..3e31110 100644
--- a/dummydevice.c
+++ b/dummydevice.c
@@ -9,12 +9,7 @@
 #include <vdr/config.h>
 #include <vdr/device.h>
 
-#if VDRVERSNUM >= 10600
-#  include <vdr/osd.h>
-#endif
-
-
-#if VDRVERSNUM >= 10717
+#include <vdr/osd.h>
 
 class cDummyOsd : public cOsd {
   public:
@@ -51,37 +46,6 @@ class cDummyOsdProvider : public cOsdProvider {
     virtual ~cDummyOsdProvider() {}
 };
 
-#elif VDRVERSNUM >= 10600
-
-class cDummyOsd : public cOsd {
-  public:
-    cDummyOsd(int Left, int Top, uint Level) : cOsd(Left, Top, Level) {}
-    virtual ~cDummyOsd() {}
-
-    virtual eOsdError CanHandleAreas(const tArea *Areas, int NumAreas) {return oeOk;}
-    virtual eOsdError SetAreas(const tArea *Areas, int NumAreas) {return oeOk;}
-    virtual void SaveRegion(int x1, int y1, int x2, int y2) {}
-    virtual void RestoreRegion(void) {}
-    virtual eOsdError SetPalette(const cPalette &Palette, int Area) {return oeOk;}
-    virtual void DrawPixel(int x, int y, tColor Color) {}
-    virtual void DrawBitmap(int x, int y, const cBitmap &Bitmap, tColor ColorFg = 0, tColor ColorBg = 0, bool ReplacePalette = false, bool Overlay = false) {}
-    virtual void DrawText(int x, int y, const char *s, tColor ColorFg, tColor ColorBg, const cFont *Font, int Width = 0, int Height = 0, int Alignment = taDefault) {}
-    virtual void DrawRectangle(int x1, int y1, int x2, int y2, tColor Color) {}
-    virtual void DrawEllipse(int x1, int y1, int x2, int y2, tColor Color, int Quadrants = 0) {}
-    virtual void DrawSlope(int x1, int y1, int x2, int y2, tColor Color, int Type) {}
-    virtual void Flush(void) {}
-};
-
-class cDummyOsdProvider : public cOsdProvider {
-  protected:
-    virtual cOsd *CreateOsd(int Left, int Top, uint Level) { return new cDummyOsd(Left, Top, Level); }
-
-  public:
-    cDummyOsdProvider() : cOsdProvider() {}
-    virtual ~cDummyOsdProvider() {}
-};
-
-#endif
 
 class cDummyDevice : cDevice {
 public:
@@ -93,27 +57,26 @@ public:
     virtual bool SetPlayMode(ePlayMode PlayMode) {return true;}
     virtual int  PlayVideo(const uchar *Data, int Length) {return Length;}
 
-#if VDRVERSNUM < 10318
-    virtual void PlayAudio(const uchar *Data, int Length) {return Length;}
-#elif  VDRVERSNUM < 10342
-    virtual int  PlayAudio(const uchar *Data, int Length) {return Length;}
-#else
     virtual int  PlayAudio(const uchar *Data, int Length, uchar Id) {return Length;}
-#endif
+
+    virtual int PlayTsVideo(const uchar *Data, int Length) {return Length;}
+    virtual int PlayTsAudio(const uchar *Data, int Length) {return Length;}
+    virtual int PlayTsSubtitle(const uchar *Data, int Length) {return Length;}
+
+    virtual int PlayPes(const uchar *Data, int Length, bool VideoOnly = false) {return Length;}
+    virtual int PlayTs(const uchar *Data, int Length, bool VideoOnly = false) {return Length;}
 
     virtual bool Poll(cPoller &Poller, int TimeoutMs = 0) {return true;}
     virtual bool Flush(int TimeoutMs = 0) {return true;}
     bool Start(void) {return true;}
 
-#if VDRVERSNUM >= 10600
   protected:
     virtual void MakePrimaryDevice(bool On) { if (On) new cDummyOsdProvider(); cDevice::MakePrimaryDevice(On); }
-#endif
 };
 
 #include <vdr/plugin.h>
 
-static const char *VERSION        = "1.0.3";
+static const char *VERSION        = "2.0.0";
 static const char *DESCRIPTION    = "Output device that does nothing";
 
 class cPluginDummydevice : public cPlugin {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-vdr-dvb/vdr-plugin-dummydevice.git



More information about the pkg-vdr-dvb-changes mailing list