[vdr] [PATCH] vcd plugin

Halim Sahin halim.sahin at t-online.de
Sun Jun 18 19:04:47 CEST 2006


Hello,
I found no patches for the vcd plugin to get it work with vdr-1.4.x
So I tried to make one.
Here it is
Best regards
Halim

-- 
Halim Sahin
E-Mail:				
halim.sahin at t-online.de
-------------- next part --------------
diff -Nur vcd-0.7-orig/Makefile vcd-0.7/Makefile
--- vcd-0.7-orig/Makefile	2005-01-26 22:23:47.000000000 +0100
+++ vcd-0.7/Makefile	2006-06-18 18:57:50.000000000 +0200
@@ -21,9 +21,8 @@
 LIBDIR = ../../lib
 TMPDIR = /tmp
 
-### The version number of VDR (taken from VDR's "config.h"):
-
-VDRVERSION = $(shell grep 'define VDRVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
+### The version number of VDR's plugin API (taken from VDR's "config.h"):
+APIVERSION = $(shell grep 'define APIVERSION ' $(VDRDIR)/config.h | awk '{ print $$3 }' | sed -e 's/"//g')
 
 ### The name of the distribution archive:
 
@@ -73,7 +72,7 @@
 
 libvdr-$(PLUGIN).so: $(OBJS)
 	$(CXX) $(CXXFLAGS) -shared $(OBJS) -o $@
-	@cp $@ $(LIBDIR)/$@.$(VDRVERSION)
+	@cp $@ $(LIBDIR)/$@.$(APIVERSION)
 
 dist: clean
 	@-rm -rf $(TMPDIR)/$(ARCHIVE)
diff -Nur vcd-0.7-orig/menucontrol.c vcd-0.7/menucontrol.c
--- vcd-0.7-orig/menucontrol.c	2005-01-28 16:06:48.000000000 +0100
+++ vcd-0.7/menucontrol.c	2006-06-18 18:47:47.000000000 +0200
@@ -39,7 +39,11 @@
 
 cMenuSpiControl::~cMenuSpiControl()
 {
-  cStatus::MsgReplaying(this, NULL);
+#if VDRVERSNUM >= 10337
+    cStatus::MsgReplaying(this, NULL, NULL, false);
+#else
+cStatus::MsgReplaying(this, NULL);
+#endif
   Stop();
 }
 
@@ -118,13 +122,21 @@
   lastSpeed = -1;
   timeoutShow = 0;
   timeSearchActive = false;
-  cStatus::MsgReplaying(this, "VCD");
-}
+#if VDRVERSNUM >= 10337
+cStatus::MsgReplaying(this, "VCD", NULL, true);
+#else
+cStatus::MsgReplaying(this, "VCD");
+        #endif
+        }
 
 cMenuVcdControl::~cMenuVcdControl()
 {
   Hide();
+#if VDRVERSNUM >= 10337
+    cStatus::MsgReplaying(this, NULL, NULL, false);
+ #else
   cStatus::MsgReplaying(this, NULL);
+#endif
   Stop();
 }
 
diff -Nur vcd-0.7-orig/psdcontrol.c vcd-0.7/psdcontrol.c
--- vcd-0.7-orig/psdcontrol.c	2005-01-28 20:15:14.000000000 +0100
+++ vcd-0.7/psdcontrol.c	2006-06-18 18:52:15.000000000 +0200
@@ -84,8 +84,12 @@
  
 cPsdSpiControl::~cPsdSpiControl()
 {
-  cStatus::MsgReplaying(this, NULL);
-}
+#if VDRVERSNUM >= 10337
+    cStatus::MsgReplaying(this, NULL, NULL, false);
+#else
+    cStatus::MsgReplaying(this, NULL);
+#endif
+        }
 
 void cPsdSpiControl::SetItem(int Spi, cVcd *Vcd, union psd_vcd *PsdVcd)
 {
@@ -248,12 +252,21 @@
 cPsdVcdControl::cPsdVcdControl(int Lba, int Loop, int AutoWait)
 : cVcdPlayerControl(track, vcd, Lba, Loop, AutoWait)
 {
+#if VDRVERSNUM >= 10337
+    cStatus::MsgReplaying(this, NULL, NULL, false);
+#else
+cStatus::MsgReplaying(this, NULL);
+ #endif
 }
 
 cPsdVcdControl::~cPsdVcdControl()
 {
-  cStatus::MsgReplaying(this, NULL);
-}
+#if VDRVERSNUM >= 10337
+    cStatus::MsgReplaying(this, NULL, NULL, false);
+    #else
+        cStatus::MsgReplaying(this, NULL);
+        #endif
+        }
 
 void cPsdVcdControl::SetTrack(int Track, cVcd *Vcd, union psd_vcd *PsdVcd)
 {


More information about the vdr mailing list