vcd plugin

Message ID 20060618170447.GA17784@halim.local
State New
Headers

Commit Message

Halim Sahin June 18, 2006, 5:04 p.m. UTC
  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
  

Comments

C.Y.M June 20, 2006, 8:53 a.m. UTC | #1
On 6/18/06, Halim Sahin <halim.sahin@t-online.de> wrote:
>
> Hello,
> I found no patches for the vcd plugin to get it work with vdr-1.4.x
> So I tried to make one.



E-tobi is usually a good place to look for current patches.  It seems to be
very up-to-date.  I believe there are current patches for the VCD plugin
located there in the debian/patches directory.
  

Patch

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)
 {