Help with dvd plugin! + dvd patch

Message ID 357865.93502.qm@web55605.mail.re4.yahoo.com
State New
Headers

Commit Message

lucian orasanu April 3, 2009, 10:42 a.m. UTC
  OK!! thankyou all,

I got it working and I made a patch too. patch is for 

plugin dvd -> dvd-cvs-20071113

orking on vdr-1.7.4
  

Patch

diff -Naur ./dvd-ori/control-dvd.c ./dvd/control-dvd.c
--- ./dvd-ori/control-dvd.c	2007-11-13 15:33:30.000000000 +0200
+++ ./dvd/control-dvd.c	2009-04-03 13:08:29.000000000 +0300
@@ -412,8 +412,8 @@ 
 {
     #define STAY_SECONDS_OFF_END 10
     int Seconds = (timeSearchTime >> 24) * 36000 + ((timeSearchTime & 0x00FF0000) >> 16) * 3600 + ((timeSearchTime & 0x0000FF00) >> 8) * 600 + (timeSearchTime & 0x000000FF) * 60;
-    int Current = (lastCurrent / FRAMESPERSEC);
-    int Total = (lastTotal / FRAMESPERSEC);
+    int Current = (lastCurrent / DEFAULTFRAMESPERSECOND);
+    int Total = (lastTotal / DEFAULTFRAMESPERSECOND);
     switch (Key) {
         case k0 ... k9:
             if (timeSearchPos < 4) {
diff -Naur ./dvd-ori/player-dvd.c ./dvd/player-dvd.c
--- ./dvd-ori/player-dvd.c	2007-11-13 15:33:30.000000000 +0200
+++ ./dvd/player-dvd.c	2009-04-03 13:07:56.000000000 +0300
@@ -21,6 +21,7 @@ 
 #include <vdr/thread.h>
 #include <vdr/device.h>
 #include <vdr/plugin.h>
+#include <vdr/recording.h>
 
 #ifdef HAVE_CONFIG_H
 #include "config.h"
@@ -239,7 +240,7 @@ 
 #define VIDEOBUFSIZE  MEGABYTE(1)
 
 // The number of frames to back up when resuming an interrupted replay session:
-#define RESUMEBACKUP (10 * FRAMESPERSEC)
+#define RESUMEBACKUP (10 * DEFAULTFRAMESPERSECOND)
 
 #define MAX_VIDEO_SLOWMOTION 63 // max. arg to pass to VIDEO_SLOWMOTION // TODO is this value correct?
 #define NORMAL_SPEED 10 // the index of the '1' entry in the following array
@@ -2027,8 +2028,8 @@ 
     LOCK_THREAD; // save UpdateBlockInfo()
     BlocksToPGCTicks(pgcCurrentBlockNum, currentTicks, totalTicks);
 
-    CurrentFrame = (int)((currentTicks / 90000L) * FRAMESPERSEC);
-    TotalFrame   = (int)((totalTicks   / 90000L) * FRAMESPERSEC);
+    CurrentFrame = (int)((currentTicks / 90000L) * DEFAULTFRAMESPERSECOND);
+    TotalFrame   = (int)((totalTicks   / 90000L) * DEFAULTFRAMESPERSECOND);
 
     //workaround for lcdproc-crashing
     if (CurrentFrame == TotalFrame) {
@@ -2074,7 +2075,7 @@ 
 {
     if (!DVDActiveAndRunning())
         return -1;
-    SkipSeconds(Frames*FRAMESPERSEC);
+    SkipSeconds(Frames*DEFAULTFRAMESPERSECOND);
     return Frames;
 }