rpms/vdr/devel MainMenuHooks-v1_0.patch, NONE, 1.1.2.1 timercmd-0.1_1.5.12.diff, NONE, 1.1.2.1 vdr-1.5.17-progressbar-support-0.0.1.diff, NONE, 1.1.2.1 vdr-1.5.18-hlcutter-0.2.0.diff, NONE, 1.1.2.1 vdr-1.5.18-syncearly.patch, NONE, 1.1.2.1 vdr-1.5.18-use-pkgconfig.patch, NONE, 1.1.2.1 vdr-1.6.0-man-section.patch, NONE, 1.1.2.1 vdr-1.6.0-paths.patch, NONE, 1.1.2.1 vdr-1.6.0-scriptnames.patch, NONE, 1.1.2.1 .cvsignore, 1.13, 1.13.2.1 sources, 1.13, 1.13.2.1 vdr.init, 1.7, 1.7.2.1 vdr.spec, 1.23, 1.23.2.1 vdr.sysconfig, 1.5, 1.5.2.1 vdr-1.4.1-dumpable.patch, 1.1, NONE vdr-1.4.6-1-syncearly.patch, 1.1, NONE vdr-1.4.6-paths.patch, 1.1, NONE vdr-1.4.7-gcc43.patch, 1.1, NONE vdr-1.4.7-hlcutter-0.2.0.diff, 1.1, NONE vdr-1.4.7-recmenu-play.patch, 1.1, NONE vdr-1.4.7-syncearly-syslog.patch, 1.1, NONE

Ville Skytta (scop) fedora-extras-commits at redhat.com
Mon Mar 24 16:08:18 UTC 2008


Author: scop

Update of /cvs/pkgs/rpms/vdr/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv15389

Modified Files:
      Tag: vdr-1_6-test
	.cvsignore sources vdr.init vdr.spec vdr.sysconfig 
Added Files:
      Tag: vdr-1_6-test
	MainMenuHooks-v1_0.patch timercmd-0.1_1.5.12.diff 
	vdr-1.5.17-progressbar-support-0.0.1.diff 
	vdr-1.5.18-hlcutter-0.2.0.diff vdr-1.5.18-syncearly.patch 
	vdr-1.5.18-use-pkgconfig.patch vdr-1.6.0-man-section.patch 
	vdr-1.6.0-paths.patch vdr-1.6.0-scriptnames.patch 
Removed Files:
      Tag: vdr-1_6-test
	vdr-1.4.1-dumpable.patch vdr-1.4.6-1-syncearly.patch 
	vdr-1.4.6-paths.patch vdr-1.4.7-gcc43.patch 
	vdr-1.4.7-hlcutter-0.2.0.diff vdr-1.4.7-recmenu-play.patch 
	vdr-1.4.7-syncearly-syslog.patch 
Log Message:
First cut at 1.6.0.

MainMenuHooks-v1_0.patch:

--- NEW FILE MainMenuHooks-v1_0.patch ---
This is a "patch" for the Video Disk Recorder (VDR).

* Authors:
Tobias Grimm <vdr at e-tobi dot net>
Martin Prochnow <nordlicht at martins-kabuff dot de>  
Frank Schmirler <vdrdev at schmirler dot de>
Christian Wieninger <cwieninger at gmx dot de>

* Description:
This patch allows plugins to replace the VDR mainmenus "Schedule",
"Channels", "Timers" and "Recordings" by a different implementation.

The patch is based on a suggestion of Christian Wieninger back in 2006.
(http://www.linuxtv.org/pipermail/vdr/2006-March/008234.html). It is
meant to be an interim solution for VDR 1.4 until (maybe) VDR 1.5
introduces an official API for this purpose.

* Installation
Change into the VDR source directory, then issue
  patch -p1 < path/to/MainMenuHooks-v1_0.patch
and recompile.

* Notes for plugin authors
The following code sample shows the required plugin code for replacing
the original Schedule menu:

bool cMyPlugin::Service(const char *Id, void *Data)
{
  cOsdMenu **menu = (cOsdMenu**) Data;
  if (MySetup.replaceSchedule &&
            strcmp(Id, "MainMenuHooksPatch-v1.0::osSchedule") == 0) {
    if (menu)
      *menu = (cOsdMenu*) MainMenuAction();
    return true;
  }
  return false;
}

A plugin can replace more than one menu at a time. Simply replace the
call to MainMenuAction() in the sample above by appropriate code).

Note that a plugin *should* offer a setup option which allows the user
to enable or disable the replacement. "Disabled" would be a reasonable
default setting. By testing for define MAINMENUHOOKSVERSNUM, a plugin
can leave the setup option out at compiletime.

In case there is an internal problem when trying to open the replacement
menu, it is safe to return true even though Data is NULL. However an
OSD message should indicate the problem to the user.

Feel free to ship this patch along with your plugin. However if you
think you need to modify the patch, we'd encourage you to contact the
authors first or at least use a service id which differs in more than
just the version number.

--- vdr-1.4.5/menu.c.orig	2007-02-07 08:23:49.000000000 +0100
+++ vdr-1.4.5/menu.c	2007-02-20 11:05:34.000000000 +0100
@@ -2792,15 +2792,30 @@
 
   // Initial submenus:
 
+  cOsdMenu *menu = NULL;
   switch (State) {
-    case osSchedule:   AddSubMenu(new cMenuSchedule); break;
-    case osChannels:   AddSubMenu(new cMenuChannels); break;
-    case osTimers:     AddSubMenu(new cMenuTimers); break;
-    case osRecordings: AddSubMenu(new cMenuRecordings(NULL, 0, true)); break;
-    case osSetup:      AddSubMenu(new cMenuSetup); break;
-    case osCommands:   AddSubMenu(new cMenuCommands(tr("Commands"), &Commands)); break;
+    case osSchedule:
+        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osSchedule", &menu))
+            menu = new cMenuSchedule;
+        break;
+    case osChannels:
+        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osChannels", &menu))
+            menu = new cMenuChannels;
+        break;
+    case osTimers:
+        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osTimers", &menu))
+            menu = new cMenuTimers;
+        break;
+    case osRecordings:
+        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osRecordings", &menu))
+            menu = new cMenuRecordings(NULL, 0, true);
+        break;
+    case osSetup:      menu = new cMenuSetup; break;
+    case osCommands:   menu = new cMenuCommands(tr("Commands"), &Commands); break;
     default: break;
     }
+  if (menu)
+      AddSubMenu(menu);
 }
 
 cOsdObject *cMenuMain::PluginOsdObject(void)
@@ -2927,13 +2942,34 @@
   eOSState state = cOsdMenu::ProcessKey(Key);
   HadSubMenu |= HasSubMenu();
 
+  cOsdMenu *menu = NULL;
   switch (state) {
-    case osSchedule:   return AddSubMenu(new cMenuSchedule);
-    case osChannels:   return AddSubMenu(new cMenuChannels);
-    case osTimers:     return AddSubMenu(new cMenuTimers);
-    case osRecordings: return AddSubMenu(new cMenuRecordings);
-    case osSetup:      return AddSubMenu(new cMenuSetup);
-    case osCommands:   return AddSubMenu(new cMenuCommands(tr("Commands"), &Commands));
+    case osSchedule:
+        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osSchedule", &menu))
+            menu = new cMenuSchedule;
+        else
+            state = osContinue;
+        break;
+    case osChannels:
+        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osChannels", &menu))
+            menu = new cMenuChannels;
+        else
+            state = osContinue;
+        break;
+    case osTimers:
+        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osTimers", &menu))
+            menu = new cMenuTimers;
+        else
+            state = osContinue;
+        break;
+    case osRecordings:
+        if (!cPluginManager::CallFirstService("MainMenuHooksPatch-v1.0::osRecordings", &menu))
+            menu = new cMenuRecordings;
+        else
+            state = osContinue;
+        break;
+    case osSetup:      menu = new cMenuSetup; break;
+    case osCommands:   menu = new cMenuCommands(tr("Commands"), &Commands); break;
     case osStopRecord: if (Interface->Confirm(tr("Stop recording?"))) {
                           cOsdItem *item = Get(Current());
                           if (item) {
@@ -2985,6 +3021,8 @@
                default:      break;
                }
     }
+  if (menu)
+      return AddSubMenu(menu);
   if (!HasSubMenu() && Update(HadSubMenu))
      Display();
   if (Key != kNone) {
--- vdr-1.4.5/config.h.orig	2007-02-20 11:55:40.000000000 +0100
+++ vdr-1.4.5/config.h	2007-02-20 11:56:43.000000000 +0100
@@ -35,6 +35,8 @@
 // plugins to work with newer versions of the core VDR as long as no
 // VDR header files have changed.
 
+#define MAINMENUHOOKSVERSNUM 1.0
+
 #define MAXPRIORITY 99
 #define MAXLIFETIME 99
 

timercmd-0.1_1.5.12.diff:

--- NEW FILE timercmd-0.1_1.5.12.diff ---
diff -Nru vdr-1.5.12-orig/config.c vdr-1.5.12/config.c
--- vdr-1.5.12-orig/config.c	2007-10-06 16:28:58.000000000 +0200
+++ vdr-1.5.12/config.c	2007-11-28 21:01:20.000000000 +0100
@@ -126,6 +126,7 @@
 
 cCommands Commands;
 cCommands RecordingCommands;
+cCommands TimerCommands;
 
 // -- cSVDRPhosts ------------------------------------------------------------
 
diff -Nru vdr-1.5.12-orig/config.h vdr-1.5.12/config.h
--- vdr-1.5.12-orig/config.h	2007-11-10 14:38:19.000000000 +0100
+++ vdr-1.5.12/config.h	2007-11-28 21:01:20.000000000 +0100
@@ -168,6 +168,7 @@
 
 extern cCommands Commands;
 extern cCommands RecordingCommands;
+extern cCommands TimerCommands;
 extern cSVDRPhosts SVDRPhosts;
 
 class cSetupLine : public cListObject {
diff -Nru vdr-1.5.12-orig/menu.c vdr-1.5.12/menu.c
--- vdr-1.5.12-orig/menu.c	2007-11-03 16:02:00.000000000 +0100
+++ vdr-1.5.12/menu.c	2007-11-28 21:01:20.000000000 +0100
@@ -738,8 +738,20 @@
   return state;
 }
 
-// --- cMenuTimerItem --------------------------------------------------------
+// --- cMenuCommands ---------------------------------------------------------
+// declaration shifted so it can be used in cMenuTimers
+class cMenuCommands : public cOsdMenu {
+private:
+  cCommands *commands;
+  char *parameters;
+  eOSState Execute(void);
+public:
+  cMenuCommands(const char *Title, cCommands *Commands, const char *Parameters = NULL);
+  virtual ~cMenuCommands();
+  virtual eOSState ProcessKey(eKeys Key);
+  };
 
+// --- cMenuTimerItem --------------------------------------------------------
 class cMenuTimerItem : public cOsdItem {
 private:
   cTimer *timer;
@@ -804,6 +816,7 @@
   eOSState OnOff(void);
   eOSState Info(void);
   cTimer *CurrentTimer(void);
+  eOSState Commands(eKeys Key = kNone);
   void SetHelpKeys(void);
 public:
   cMenuTimers(void);
@@ -920,6 +933,53 @@
   return osContinue;
 }
 
+#define CHECK_2PTR_NULL(x_,y_) ((x_)? ((y_)? y_:""):"")
+
+eOSState cMenuTimers::Commands(eKeys Key)
+{
+  if (HasSubMenu() || Count() == 0)
+     return osContinue;
+  cTimer *ti = CurrentTimer();
+  if (ti) {
+     char *parameter = NULL;
+     const cEvent *pEvent = ti->Event();
+     int iRecNumber=0;
+
+     if(!pEvent) {
+        Timers.SetEvents();
+        pEvent = ti->Event();
+     }
+     if(pEvent) {
+// create a dummy recording to get the real filename
+        cRecording *rc_dummy = new cRecording(ti, pEvent);
+        Recordings.Load();
+        cRecording *rc = Recordings.GetByName(rc_dummy->FileName());
+     
+        delete rc_dummy;
+        if(rc)
+           iRecNumber=rc->Index() + 1;
+     }
+//Parameter format TimerNumber 'ChannelId' Start Stop 'Titel' 'Subtitel' 'file' RecNumer
+//                 1           2           3     4    5       6          7      8
+     asprintf(&parameter, "%d '%s' %d %d '%s' '%s' '%s' %d", ti->Index(), 
+                                                             *ti->Channel()->GetChannelID().ToString(),
+                                                             (int)ti->StartTime(),
+                                                             (int)ti->StopTime(),
+                                                             CHECK_2PTR_NULL(pEvent, pEvent->Title()),
+                                                             CHECK_2PTR_NULL(pEvent, pEvent->ShortText()),
+                                                             ti->File(),
+                                                             iRecNumber);
+     isyslog("timercmd: %s", parameter);
+     cMenuCommands *menu;
+     eOSState state = AddSubMenu(menu = new cMenuCommands(tr("Timer commands"), &TimerCommands, parameter));
+     free(parameter);
+     if (Key != kNone)
+        state = menu->ProcessKey(Key);
+     return state;
+     }
+  return osContinue;
+}
+
 eOSState cMenuTimers::ProcessKey(eKeys Key)
 {
   int TimerNumber = HasSubMenu() ? Count() : -1;
@@ -933,6 +993,8 @@
        case kYellow: state = Delete(); break;
        case kBlue:   return Info();
                      break;
+       case k1...k9: return Commands(Key);
+       case k0:      return (TimerCommands.Count()? Commands():osContinue);
        default: break;
        }
      }
@@ -1517,17 +1579,6 @@
 
 // --- cMenuCommands ---------------------------------------------------------
 
-class cMenuCommands : public cOsdMenu {
-private:
-  cCommands *commands;
-  char *parameters;
-  eOSState Execute(void);
-public:
-  cMenuCommands(const char *Title, cCommands *Commands, const char *Parameters = NULL);
-  virtual ~cMenuCommands();
-  virtual eOSState ProcessKey(eKeys Key);
-  };
-
 cMenuCommands::cMenuCommands(const char *Title, cCommands *Commands, const char *Parameters)
 :cOsdMenu(Title)
 {

diff -Nru vdr-1.5.12-orig/po/de_DE.po vdr-1.5.12/po/de_DE.po
--- vdr-1.5.12-orig/po/de_DE.po	2007-11-04 12:37:26.000000000 +0100
+++ vdr-1.5.12/po/de_DE.po	2007-11-28 21:03:00.000000000 +0100
@@ -7,7 +7,7 @@
 msgstr ""
 "Project-Id-Version: VDR 1.5.7\n"
 "Report-Msgid-Bugs-To: <vdr-bugs at cadsoft.de>\n"
-"POT-Creation-Date: 2007-10-13 11:29+0200\n"
+"POT-Creation-Date: 2007-11-28 21:02+0100\n"
 "PO-Revision-Date: 2007-08-12 14:17+0200\n"
 "Last-Translator: Klaus Schmidinger <kls at cadsoft.de>\n"
 "Language-Team: <vdr at linuxtv.org>\n"
@@ -375,6 +375,9 @@
 msgid "Timer still recording - really delete?"
 msgstr "Timer zeichnet auf - trotzdem löschen?"
 
+msgid "Timer commands"
+msgstr "Befehle für Timer"
+
 msgid "Event"
 msgstr "Sendung"
  
diff -Nru vdr-1.5.12-orig/vdr.c vdr-1.5.12/vdr.c
--- vdr-1.5.12-orig/vdr.c	2007-11-03 15:46:29.000000000 +0100
+++ vdr-1.5.12/vdr.c	2007-11-28 21:01:20.000000000 +0100
@@ -550,6 +550,7 @@
         Timers.Load(AddDirectory(ConfigDirectory, "timers.conf")) &&
         Commands.Load(AddDirectory(ConfigDirectory, "commands.conf"), true) &&
         RecordingCommands.Load(AddDirectory(ConfigDirectory, "reccmds.conf"), true) &&
+        TimerCommands.Load(AddDirectory(ConfigDirectory, "timercmds.conf"), true) &&
         SVDRPhosts.Load(AddDirectory(ConfigDirectory, "svdrphosts.conf"), true) &&
         Keys.Load(AddDirectory(ConfigDirectory, "remote.conf")) &&
         KeyMacros.Load(AddDirectory(ConfigDirectory, "keymacros.conf"), true)

vdr-1.5.17-progressbar-support-0.0.1.diff:

--- NEW FILE vdr-1.5.17-progressbar-support-0.0.1.diff ---
diff -Nru vdr-1.5.17-orig/skinclassic.c vdr-1.5.17-progressbar/skinclassic.c
--- vdr-1.5.17-orig/skinclassic.c
+++ vdr-1.5.17-progressbar/skinclassic.c
@@ -314,8 +314,47 @@
   for (int i = 0; i < MaxTabs; i++) {
       const char *s = GetTabbedText(Text, i);
       if (s) {
-         int xt = x0 + Tab(i);
-         osd->DrawText(xt, y, s, ColorFg, ColorBg, font, x2 - xt);
+         bool isprogressbar = false;
+         int now = 0, total = 0;
+         // check if progress bar: "[|||||||   ]"
+         if ((strlen(s) > 5 && s[0] == '[' && s[strlen(s) - 1] == ']')) {
+            const char *p = s + 1;
+            // update status
+            isprogressbar = true;
+            for (; *p != ']'; ++p) {
+                // check if progressbar characters
+                if (*p == ' ' || *p == '|') {
+                   // update counters
+                   ++total;
+                   if (*p == '|')
+                      ++now;
+                   }
+                else {
+                   // wrong character detected; not a progressbar
+                   isprogressbar = false;
+                   break;
+                   }
+                }
+            }
+         int xt = x0 + Tab(i);
+         if (isprogressbar) {
+            // define x coordinates of progressbar
+            int px0 = xt;
+            int px1 = (Tab(i + 1)?Tab(i+1):x1) - 5;
+            int px = px0 + max((int)((float) now * (float) (px1 - px0) / (float) total), 1);
+            // define y coordinates of progressbar
+            int py0 = y + 4;
+            int py1 = y + lineHeight - 4;
+            // draw background
+            osd->DrawRectangle(px0, y, (Tab(i + 1)?Tab(i+1):x1) - 1, y + lineHeight - 1, ColorBg);
+            // draw progressbar
+            osd->DrawRectangle(px0,    py0, px,  py1, ColorFg);
+            osd->DrawRectangle(px + 1, py0, px1, py0 + 1, ColorFg);
+            osd->DrawRectangle(px + 1, py1 - 1, px1, py1, ColorFg);
+            osd->DrawRectangle(px1 - 1, py0, px1, py1, ColorFg);
+            }
+         else
+            osd->DrawText(xt, y, s, ColorFg, ColorBg, font, x2 - xt);
          }
       if (!Tab(i + 1))
          break;
diff -Nru vdr-1.5.17-orig/skinsttng.c vdr-1.5.17-progressbar/skinsttng.c
--- vdr-1.5.17-orig/skinsttng.c
+++ vdr-1.5.17-progressbar/skinsttng.c
@@ -558,8 +558,47 @@
   for (int i = 0; i < MaxTabs; i++) {
       const char *s = GetTabbedText(Text, i);
       if (s) {
-         int xt = x3 + 5 + Tab(i);
-         osd->DrawText(xt, y, s, ColorFg, ColorBg, font, x4 - xt);
+         bool isprogressbar = false;
+         int now = 0, total = 0;
+         // check if progress bar: "[|||||||   ]"
+         if ((strlen(s) > 5 && s[0] == '[' && s[strlen(s) - 1] == ']')) {
+            const char *p = s + 1;
+            // update status
+            isprogressbar = true;
+            for (; *p != ']'; ++p) {
+                // check if progressbar characters
+                if (*p == ' ' || *p == '|') {
+                   // update counters
+                   ++total;
+                   if (*p == '|')
+                      ++now;
+                   }
+                else {
+                   // wrong character detected; not a progressbar
+                   isprogressbar = false;
+                   break;
+                   }
+                }
+            }
+         int xt = x3 + 5 + Tab(i);
+         if (isprogressbar) {
+            // define x coordinates of progressbar
+            int px0 = xt;
+            int px1 = x3 + (Tab(i + 1)?Tab(i + 1):x4-x3-5) - 1;
+            int px = px0 + max((int)((float) now * (float) (px1 - px0) / (float) total), 1);
+            // define y coordinates of progressbar
+            int py0 = y + 4;
+            int py1 = y + lineHeight - 4;
+            // draw background
+            osd->DrawRectangle(px0, y, (Tab(i + 1)?Tab(i + 1):x4-x3-5) - 1, y + lineHeight - 1, ColorBg);
+            // draw progressbar
+            osd->DrawRectangle(px0,    py0, px,  py1, ColorFg);
+            osd->DrawRectangle(px + 1, py0, px1, py0 + 1, ColorFg);
+            osd->DrawRectangle(px + 1, py1 - 1, px1, py1, ColorFg);
+            osd->DrawRectangle(px1 - 1, py0, px1, py1, ColorFg);
+            }
+         else
+            osd->DrawText(xt, y, s, ColorFg, ColorBg, font, x4 - xt);
          }
       if (!Tab(i + 1))
          break;

vdr-1.5.18-hlcutter-0.2.0.diff:

--- NEW FILE vdr-1.5.18-hlcutter-0.2.0.diff ---
Index: menu.c
===================================================================
--- menu.c	(.../base)	(Revision 1008)
+++ menu.c	(.../hlcutter)	(Revision 1008)
@@ -2723,2 +2723,4 @@
   Add(new cMenuEditIntItem( tr("Setup.Recording$Max. video file size (MB)"), &data.MaxVideoFileSize, MINVIDEOFILESIZE, MAXVIDEOFILESIZE));
+  Add(new cMenuEditIntItem( tr("Setup.Recording$Max. recording size (GB)"),  &data.MaxRecordingSize, MINRECORDINGSIZE, MAXRECORDINGSIZE));
   Add(new cMenuEditBoolItem(tr("Setup.Recording$Split edited files"),        &data.SplitEditedFiles));
+  Add(new cMenuEditBoolItem(tr("Setup.Recording$Hard Link Cutter"),          &data.HardLinkCutter));
Index: cutter.c
===================================================================
--- cutter.c	(.../base)	(Revision 1008)
+++ cutter.c	(.../hlcutter)	(Revision 1008)
@@ -71,6 +71,7 @@
      Mark = fromMarks.Next(Mark);
      int FileSize = 0;
      int CurrentFileNumber = 0;
+     bool SkipThisSourceFile = false;
      int LastIFrame = 0;
      toMarks.Add(0);
      toMarks.Save();
@@ -88,12 +89,92 @@
 
            // Read one frame:
 
-           if (fromIndex->Get(Index++, &FileNumber, &FileOffset, &PictureType, &Length)) {
-              if (FileNumber != CurrentFileNumber) {
-                 fromFile = fromFileName->SetOffset(FileNumber, FileOffset);
-                 fromFile->SetReadAhead(MEGABYTE(20));
-                 CurrentFileNumber = FileNumber;
-                 }
+           if (!fromIndex->Get(Index++, &FileNumber, &FileOffset, &PictureType, &Length)) {
+              // Error, unless we're past last cut-in and there's no cut-out
+              if (Mark || LastMark)
+                 error = "index";
+              break;
+              }
+
+           if (FileNumber != CurrentFileNumber) {
+              fromFile = fromFileName->SetOffset(FileNumber, FileOffset);
+              fromFile->SetReadAhead(MEGABYTE(20));
+              CurrentFileNumber = FileNumber;
+              if (SkipThisSourceFile) {
+                 // At end of fast forward: Always skip to next file
+                 toFile = toFileName->NextFile();
+                 if (!toFile) {
+                    error = "toFile 4";
+                    break;
+                    }
+                 FileSize = 0;
+                 SkipThisSourceFile = false;
+                 }                 
+              
+
+              if (Setup.HardLinkCutter && FileOffset == 0) {
+                 // We are at the beginning of a new source file.
+                 // Do we need to copy the whole file?
+
+                 // if !Mark && LastMark, then we're past the last cut-out and continue to next I-frame
+                 // if !Mark && !LastMark, then there's just a cut-in, but no cut-out
+                 // if Mark, then we're between a cut-in and a cut-out
+                 
+                 uchar MarkFileNumber;
+                 int MarkFileOffset;
+                 // Get file number of next cut mark
+                 if (!Mark && !LastMark
+                     || Mark
+                        && fromIndex->Get(Mark->position, &MarkFileNumber, &MarkFileOffset)
+                        && (MarkFileNumber != CurrentFileNumber)) {
+                    // The current source file will be copied completely.
+                    // Start new output file unless we did that already
+                    if (FileSize != 0) {
+                       toFile = toFileName->NextFile();
+                       if (!toFile) {
+                          error = "toFile 3";
+                          break;
+                          }
+                       FileSize = 0;
+                       }
+
+                    // Safety check that file has zero size
+                    struct stat buf;
+                    if (stat(toFileName->Name(), &buf) == 0) {
+                       if (buf.st_size != 0) {
+                          esyslog("cCuttingThread: File %s exists and has nonzero size", toFileName->Name());
+                          error = "nonzero file exist";
+                          break;
+                          }
+                       }
+                    else if (errno != ENOENT) {
+                       esyslog("cCuttingThread: stat failed on %s", toFileName->Name());
+                       error = "stat";
+                       break;
+                       }
+
+                    // Clean the existing 0-byte file
+                    toFileName->Close();
+                    cString ActualToFileName(ReadLink(toFileName->Name()), true);
+                    unlink(ActualToFileName);
+                    unlink(toFileName->Name());
+
+                    // Try to create a hard link
+                    if (HardLinkVideoFile(fromFileName->Name(), toFileName->Name())) {
+                       // Success. Skip all data transfer for this file
+                       SkipThisSourceFile = true;
+                       cutIn = false;
+                       toFile = NULL; // was deleted by toFileName->Close()
+                       } 
+                    else {
+                       // Fallback: Re-open the file if necessary
+                       toFile = toFileName->Open();
+                       }
+                    }
+                 } 
+              }
+
+           if (!SkipThisSourceFile) {
               if (fromFile) {
                  int len = ReadFrame(fromFile, buffer,  Length, sizeof(buffer));
                  if (len < 0) {
@@ -110,19 +191,12 @@
                  break;
                  }
               }
-           else {
-              // Error, unless we're past the last cut-in and there's no cut-out
-              if (Mark || LastMark)
-                 error = "index";
-              break;
-              }
-
            // Write one frame:
 
            if (PictureType == I_FRAME) { // every file shall start with an I_FRAME
               if (LastMark) // edited version shall end before next I-frame
                  break;
-              if (FileSize > MEGABYTE(Setup.MaxVideoFileSize)) {
+              if (!SkipThisSourceFile && FileSize > toFileName->MaxFileSize()) {
                  toFile = toFileName->NextFile();
                  if (!toFile) {
                     error = "toFile 1";
@@ -132,12 +206,12 @@
                  }
               LastIFrame = 0;
 
-              if (cutIn) {
+              if (!SkipThisSourceFile && cutIn) {
                  cRemux::SetBrokenLink(buffer, Length);
                  cutIn = false;
                  }
               }
-           if (toFile->Write(buffer, Length) < 0) {
+           if (!SkipThisSourceFile && toFile->Write(buffer, Length) < 0) {
               error = "safe_write";
               break;
               }
@@ -172,7 +246,7 @@
                     }
                  }
               else
-                 LastMark = true;
+                 LastMark = true; // After last cut-out: Write on until next I-frame, then exit
               }
            }
      Recordings.TouchUpdate();
Index: README-HLCUTTER
===================================================================
--- README-HLCUTTER	(.../base)	(Revision 0)
+++ README-HLCUTTER	(.../hlcutter)	(Revision 1008)
@@ -0,0 +1,117 @@
+
+                    VDR-HLCUTTER README
+
+
+Written by:           Udo Richter
+Available at:         http://www.udo-richter.de/vdr/patches.html#hlcutter
+                      http://www.udo-richter.de/vdr/patches.en.html#hlcutter
+Contact:              udo_richter at gmx.de
+
+
+
+About
+-----
+
+The hard link cutter patch changes the recording editing algorithms of VDR to
+use filesystem hard links to 'copy' recording files whenever possible to speed
+up editing recordings noticeably.
+
+The patch has matured to be quite stable, at least I'm using it without issues.
+Nevertheless the patch is still in development and should be used with caution. 
+The patch is EXPERIMENTAL for multiple /videoxx folders. The safety checks 
+should prevent data loss, but you should always carefully check the results.
+
+While editing a recording, the patch searches for any 00x.vdr files that dont
+contain editing marks and would normally be copied 1:1 unmodified to the edited
+recording. In this case the current target 00x.vdr file will be aborted, and 
+the cutter process attempts to duplicate the source file as a hard link, so 
+that both files share the same disk space. If this succeeds, the editing 
+process fast-forwards through the duplicated file and continues normally 
+beginning with the next source file. If hard linking fails, the cutter process
+continues with plain old copying. (but does not take up the aborted last file.)
+
+After editing, the un-edited recording can be deleted as usual, the hard linked
+copies will continue to exist as the only remaining copy.
+
+To be effective, the default 'Max. video file size (MB)' should be lowered. 
+The patch lowers the smallest possible file size to 1mb. Since VDR only 
+supports up to 255 files, this would limit the recording size to 255Mb or
+10 minutes, in other words: This setting is insane!
+
+To make sure that the 255 file limit will not be reached, the patch also 
+introduces "Max. recording size (GB)" with a default of 100Gb (66 hours), and 
+increases the file size to 2000Mb early enough, so that 100Gb-recordings will
+fit into the 255 files.
+
+Picking the right parameters can be tricky. The smaller the file size, the 
+faster the editing process works. However, with a small file size, long 
+recordings will fall back to 2000Mb files soon, that are slow on editing again.
+
+Here are some examples:
+
+Max file size:      100Gb   100Gb   100Gb   100Gb   100Gb   100Gb   100Gb
+Max recording size: 1Mb     10Mb    20Mb    30Mb    40Mb    50Mb    100Mb
+
+Small files:        1-203   1-204   1-205   1-206   1-207   1-209   1-214
+  GBytes:           0.2     2.0     4.0     6.0     8.1     10.2    20.9
+  Hours:            0.13    1.3     2.65    4       5.4     6.8     13.9
+
+Big (2000mb) files: 204-255 204-255 206-255 207-255 208-255 210-255 215-255
+  GBytes:           101.5   99.6    97.7    95.7    93.8    89.8    80.1
+  Hours:            67      66      65      63      62      60      53
+
+A recording limit of 100Gb keeps plenty of reserve without blocking too much
+file numbers. And with a file size of 30-40Mb, recordings of 4-5 hours fit into
+small files completely. (depends on bit rate of course)
+
+
+
+The patch must be enabled in Setup-> Recordings-> Hard Link Cutter. When 
+disabled, the cutter process behaves identical to VDR's default cutter.
+
+There's a //#define HARDLINK_TEST_ONLY in the videodir.c file that enables a
+test-mode that hard-links 00x.vdr_ files only, and continues the classic 
+editing. The resulting 00x.vdr and 00x.vdr_ files should be identical. If you 
+delete the un-edited recording, dont forget to delete the *.vdr_ files too, 
+they will now eat real disk space.
+
+Note: 'du' displays the disk space of hard links only on first appearance, and
+usually you will see a noticeably smaller size on the edited recording.
+
+
+History
+-------
+
+Version 0.2.0
+  New: Support for multiple /videoXX recording folders, using advanced searching
+       for matching file systems where a hard link can be created.
+       Also supports deep mounted file systems.
+  Fix: Do not fail if last mark is a cut-in. (Again.)
+
+Version 0.1.4
+  New: Dynamic increase of file size before running out of xxx.vdr files
+  Fix: Last edit mark is not a cut-out
+  Fix: Write error if link-copied file is smaller than allowed file size
+  Fix: Broken index/marks if cut-in is at the start of a new file
+  Fix: Clear dangeling pointer to free'd cUnbufferedFile, 
+       thx to Matthias Schwarzott
+
+Version 0.1.0
+  Initial release
+
+
+
+
+Future plans
+------------
+
+Since original and edited copy share disk space, free space is wrong if one of
+them is moved to *.del. Free space should only count files with hard link 
+count = 1. This still goes wrong if all copies get deleted.
+
+
+For more safety, the hard-linked files may be made read-only, as modifications
+to one copy will affect the other copy too. (except deleting, of course)
+
+
+SetBrokenLink may get lost on rare cases, this needs some more thoughts.

Eigenschaftsänderungen: README-HLCUTTER
___________________________________________________________________
Name: svn:executable
   + *

Index: recorder.c
===================================================================
--- recorder.c	(.../base)	(Revision 1008)
+++ recorder.c	(.../hlcutter)	(Revision 1008)
@@ -85,7 +85,7 @@
 bool cFileWriter::NextFile(void)
 {
   if (recordFile && pictureType == I_FRAME) { // every file shall start with an I_FRAME
-     if (fileSize > MEGABYTE(Setup.MaxVideoFileSize) || RunningLowOnDiskSpace()) {
+     if (fileSize > fileName->MaxFileSize() || RunningLowOnDiskSpace()) {
         recordFile = fileName->NextFile();
         fileSize = 0;
         }
Index: config.c
===================================================================
--- config.c	(.../base)	(Revision 1008)
+++ config.c	(.../hlcutter)	(Revision 1008)
@@ -277,7 +277,9 @@
   FontSmlSize = 18;
   FontFixSize = 20;
   MaxVideoFileSize = MAXVIDEOFILESIZE;
+  MaxRecordingSize = DEFAULTRECORDINGSIZE;
   SplitEditedFiles = 0;
+  HardLinkCutter = 0;
   MinEventTimeout = 30;
   MinUserInactivity = 300;
   NextWakeupTime = 0;
@@ -453,7 +455,9 @@
   else if (!strcasecmp(Name, "FontSmlSize"))         FontSmlSize        = atoi(Value);
   else if (!strcasecmp(Name, "FontFixSize"))         FontFixSize        = atoi(Value);
   else if (!strcasecmp(Name, "MaxVideoFileSize"))    MaxVideoFileSize   = atoi(Value);
+  else if (!strcasecmp(Name, "MaxRecordingSize"))    MaxRecordingSize   = atoi(Value);
   else if (!strcasecmp(Name, "SplitEditedFiles"))    SplitEditedFiles   = atoi(Value);
+  else if (!strcasecmp(Name, "HardLinkCutter"))      HardLinkCutter     = atoi(Value);
   else if (!strcasecmp(Name, "MinEventTimeout"))     MinEventTimeout    = atoi(Value);
   else if (!strcasecmp(Name, "MinUserInactivity"))   MinUserInactivity  = atoi(Value);
   else if (!strcasecmp(Name, "NextWakeupTime"))      NextWakeupTime     = atoi(Value);
@@ -536,7 +540,9 @@
   Store("FontSmlSize",        FontSmlSize);
   Store("FontFixSize",        FontFixSize);
   Store("MaxVideoFileSize",   MaxVideoFileSize);
+  Store("MaxRecordingSize",   MaxRecordingSize);
   Store("SplitEditedFiles",   SplitEditedFiles);
+  Store("HardLinkCutter",     HardLinkCutter);
   Store("MinEventTimeout",    MinEventTimeout);
   Store("MinUserInactivity",  MinUserInactivity);
   Store("NextWakeupTime",     NextWakeupTime);
Index: config.h
===================================================================
--- config.h	(.../base)	(Revision 1008)
+++ config.h	(.../hlcutter)	(Revision 1008)
@@ -255,7 +255,9 @@
   int FontSmlSize;
   int FontFixSize;
   int MaxVideoFileSize;
+  int MaxRecordingSize;
   int SplitEditedFiles;
+  int HardLinkCutter;
   int MinEventTimeout, MinUserInactivity;
   time_t NextWakeupTime;
   int MultiSpeedMode;
Index: recording.c
===================================================================
--- recording.c	(.../base)	(Revision 1008)
+++ recording.c	(.../hlcutter)	(Revision 1008)
@@ -1514,6 +1514,16 @@
   return NULL;
 }
 
+int cFileName::MaxFileSize() {
+  const int smallFiles = (255 * MAXVIDEOFILESIZE - 1024 * Setup.MaxRecordingSize)
+                          / max(MAXVIDEOFILESIZE - Setup.MaxVideoFileSize, 1);
+
+  if (fileNumber <= smallFiles)
+     return MEGABYTE(Setup.MaxVideoFileSize);
+  
+  return MEGABYTE(MAXVIDEOFILESIZE);
+}
+
 cUnbufferedFile *cFileName::NextFile(void)
 {
   return SetOffset(fileNumber + 1);
Index: recording.h
===================================================================
--- recording.h	(.../base)	(Revision 1008)
+++ recording.h	(.../hlcutter)	(Revision 1008)
@@ -195,8 +195,16 @@
 // may be slightly higher because we stop recording only before the next
 // 'I' frame, to have a complete Group Of Pictures):
 #define MAXVIDEOFILESIZE 2000 // MB
-#define MINVIDEOFILESIZE  100 // MB
+#define MINVIDEOFILESIZE    1 // MB
 
+#define MINRECORDINGSIZE      25 // GB
+#define MAXRECORDINGSIZE     500 // GB
+#define DEFAULTRECORDINGSIZE 100 // GB
+// Dynamic recording size:
+// Keep recording file size at Setup.MaxVideoFileSize for as long as possible,
+// but switch to MAXVIDEOFILESIZE early enough, so that Setup.MaxRecordingSize
+// will be reached, before recording to file 255.vdr
+
 class cIndexFile {
 private:
   struct tIndex { int offset; uchar type; uchar number; short reserved; };
@@ -236,6 +244,8 @@
   cUnbufferedFile *Open(void);
   void Close(void);
   cUnbufferedFile *SetOffset(int Number, int Offset = 0);
+  int MaxFileSize();
+      // Dynamic file size for this file
   cUnbufferedFile *NextFile(void);
   };
 
Index: videodir.c
===================================================================
--- videodir.c	(.../base)	(Revision 1008)
+++ videodir.c	(.../hlcutter)	(Revision 1008)
@@ -19,6 +19,9 @@
 #include "recording.h"
 #include "tools.h"
 
+
+//#define HARDLINK_TEST_ONLY
+
 const char *VideoDirectory = VIDEODIR;
 
 class cVideoDirectory {
@@ -168,6 +171,120 @@
   return RemoveFileOrDir(FileName, true);
 }
 
+static bool StatNearestDir(const char *FileName, struct stat *Stat)
+{
+  cString Name(FileName);
+  char *p;
+  while ((p = strrchr((const char*)Name + 1, '/')) != NULL) {
+        *p = 0; // truncate at last '/'
+        if (stat(Name, Stat) == 0) {
+           isyslog("StatNearestDir: Stating %s", (const char*)Name);
+           return true;
+           }
+        }
+  return false;
+}
+
+bool HardLinkVideoFile(const char *OldName, const char *NewName)
+{
+  // Incoming name must be in base video directory:
+  if (strstr(OldName, VideoDirectory) != OldName) {
+     esyslog("ERROR: %s not in %s", OldName, VideoDirectory);
+     return false;
+     }
+  if (strstr(NewName, VideoDirectory) != NewName) {
+     esyslog("ERROR: %s not in %s", NewName, VideoDirectory);
+     return false;
+     }
+
+  const char *ActualNewName = NewName;
+  cString ActualOldName(ReadLink(OldName), true);
+
+  // Some safety checks:
+  struct stat StatOldName;
+  if (lstat(ActualOldName, &StatOldName) == 0) {
+     if (S_ISLNK(StatOldName.st_mode)) {
+        esyslog("HardLinkVideoFile: Failed to resolve symbolic link %s", (const char*)ActualOldName);
+        return false;
+        }
+     }
+  else {
+     esyslog("HardLinkVideoFile: lstat failed on %s", (const char*)ActualOldName);
+     return false;
+     }
+  isyslog("HardLinkVideoFile: %s is on %i", (const char*)ActualOldName, (int)StatOldName.st_dev);
+
+  // Find the video directory where ActualOldName is located
+
+  cVideoDirectory Dir;
+  struct stat StatDir;
+  if (!StatNearestDir(NewName, &StatDir)) {
+     esyslog("HardLinkVideoFile: stat failed on %s", NewName);
+     return false;
+     }
+  
+  isyslog("HardLinkVideoFile: %s is on %i", NewName, (int)StatDir.st_dev);
+  if (StatDir.st_dev != StatOldName.st_dev) {
+     // Not yet found.
+     
+     if (!Dir.IsDistributed()) {
+        esyslog("HardLinkVideoFile: No matching video folder to hard link %s", (const char*)ActualOldName);
+        return false;
+        }
+
+     // Search in video01 and upwards
+     bool found = false;
+     while (Dir.Next()) {
+           Dir.Store();
+           const char *TmpNewName = Dir.Adjust(NewName);
+           if (StatNearestDir(TmpNewName, &StatDir) && StatDir.st_dev == StatOldName.st_dev) {
+              isyslog("HardLinkVideoFile: %s is on %i (match)", TmpNewName, (int)StatDir.st_dev);
+              ActualNewName = TmpNewName;
+              found = true;
+              break;
+              }
+           isyslog("HardLinkVideoFile: %s is on %i", TmpNewName, (int)StatDir.st_dev);
+           }
+     if (ActualNewName == NewName) {
+        esyslog("HardLinkVideoFile: No matching video folder to hard link %s", (const char*)ActualOldName);
+        return false;
+        }
+
+     // Looking good, we have a match. Create necessary folders.
+     if (!MakeDirs(ActualNewName, false))
+        return false;
+     // There's no guarantee that the directory of ActualNewName 
+     // is on the same device as the dir that StatNearestDir found.
+     // But worst case is that the link fails.
+     }
+
+#ifdef HARDLINK_TEST_ONLY
+  // Do the hard link to *.vdr_ for testing only
+  char *name = NULL;
+  asprintf(&name, "%s_",ActualNewName);
+  link(ActualOldName, name); 
+  free(name);
+  return false;
+#endif // HARDLINK_TEST_ONLY
+  
+  // Try creating the hard link
+  if (link(ActualOldName, ActualNewName) != 0) {
+     // Failed to hard link. Maybe not allowed on file system.
+     LOG_ERROR_STR(ActualNewName);
+     isyslog("HardLinkVideoFile: failed to hard link from %s to %s", (const char*)ActualOldName, ActualNewName);
+     return false;
+     }
+  
+  if (ActualNewName != NewName) {
+     // video01 and up. Do the remaining symlink
+     if (symlink(ActualNewName, NewName) < 0) {
+        LOG_ERROR_STR(NewName);
+        return false;
+        }
+     }
+  return true;
+}
+
 bool VideoFileSpaceAvailable(int SizeMB)
 {
   cVideoDirectory Dir;
Index: videodir.h
===================================================================
--- videodir.h	(.../base)	(Revision 1008)
+++ videodir.h	(.../hlcutter)	(Revision 1008)
@@ -19,6 +19,7 @@
 int CloseVideoFile(cUnbufferedFile *File);
 bool RenameVideoFile(const char *OldName, const char *NewName);
 bool RemoveVideoFile(const char *FileName);
+bool HardLinkVideoFile(const char *OldName, const char *NewName);
 bool VideoFileSpaceAvailable(int SizeMB);
 int VideoDiskSpace(int *FreeMB = NULL, int *UsedMB = NULL); // returns the used disk space in percent
 cString PrefixVideoFileName(const char *FileName, char Prefix);

Eigenschaftsänderungen: .
___________________________________________________________________
Name: svnmerge-integrated
   + /vdr/trunk:1-1003


vdr-1.5.18-syncearly.patch:

--- NEW FILE vdr-1.5.18-syncearly.patch ---
Sync early parts extracted from the non-dvbs2 patch at
http://article.gmane.org/gmane.linux.vdr/36097, fprintf(stderr) calls
changed to dsyslog().

diff -Nurp ../vdr-1.5.18-orig/device.c ./device.c
--- ../vdr-1.5.18-orig/device.c	2008-03-09 11:03:34.000000000 +0100
+++ ./device.c	2008-03-19 22:34:40.000000000 +0100
@@ -840,7 +840,7 @@ eSetChannelResult cDevice::SetChannel(co
            }
         for (int i = 0; i < MAXSPIDS; i++)
             SetAvailableTrack(ttSubtitle, i, Channel->Spid(i), Channel->Slang(i));
-        if (!NeedsTransferMode)
+        if (!NeedsTransferMode || GetCurrentAudioTrack() == ttNone)
            EnsureAudioTrack(true);
         EnsureSubtitleTrack();
         }
diff -Nurp ../vdr-1.5.18-orig/remux.c ./remux.c
--- ../vdr-1.5.18-orig/remux.c	2007-11-25 14:56:03.000000000 +0100
+++ ./remux.c	2008-02-24 19:47:40.000000000 +0100
@@ -1896,12 +2526,13 @@ int cRingBufferLinearPes::DataReady(cons
 
 #define RESULTBUFFERSIZE KILOBYTE(256)
 
-cRemux::cRemux(int VPid, const int *APids, const int *DPids, const int *SPids, bool ExitOnFailure)
+cRemux::cRemux(int VPid, const int *APids, const int *DPids, const int *SPids, bool ExitOnFailure, bool SyncEarly)
 {
   exitOnFailure = ExitOnFailure;
   noVideo = VPid == 0 || VPid == 1 || VPid == 0x1FFF;
   numUPTerrors = 0;
   synced = false;
+  syncEarly = SyncEarly;
   skipped = 0;
   numTracks = 0;
   resultSkipped = 0;
@@ -2105,12 +2840,14 @@ uchar *cRemux::Get(int &Count, uchar *Pi
                         }
                      }
                   else if (!synced) {
-                     if (pt == I_FRAME) {
+                     if (pt == I_FRAME || syncEarly) {
                         if (PictureType)
                            *PictureType = pt;
                         resultSkipped = i; // will drop everything before this position
-                        SetBrokenLink(data + i, l);
                         synced = true;
+                        if (pt == I_FRAME) // syncEarly: it's ok but there is no need to call SetBrokenLink()
+                           SetBrokenLink(data + i, l);
+else dsyslog("video: synced early");
                         }
                      }
                   else if (Count)
@@ -2123,17 +2860,19 @@ uchar *cRemux::Get(int &Count, uchar *Pi
                l = GetPacketLength(data, resultCount, i);
                if (l < 0)
                   return resultData;
-               if (noVideo) {
+               if (noVideo || !synced && syncEarly) {
+                  uchar pt = NO_PICTURE;
                   if (!synced) {
-                     if (PictureType)
-                        *PictureType = I_FRAME;
+                     if (PictureType && noVideo)
+                        *PictureType = pt;
                      resultSkipped = i; // will drop everything before this position
                      synced = true;
+if (!noVideo) dsyslog("audio: synced early");
                      }
                   else if (Count)
                      return resultData;
                   else if (PictureType)
-                     *PictureType = I_FRAME;
+                     *PictureType = pt;
                   }
                }
             if (synced) {
diff -Nurp ../vdr-1.5.18-orig/remux.h ./remux.h
--- ../vdr-1.5.18-orig/remux.h	2007-09-02 12:19:06.000000000 +0200
+++ ./remux.h	2008-02-24 19:47:40.000000000 +0100
@@ -40,6 +40,7 @@
   bool noVideo;
   int numUPTerrors;
   bool synced;
+  bool syncEarly;
   int skipped;
   cTS2PES *ts2pes[MAXTRACKS];
   int numTracks;
@@ -47,12 +48,13 @@
   int resultSkipped;
   int GetPid(const uchar *Data);
 public:
-  cRemux(int VPid, const int *APids, const int *DPids, const int *SPids, bool ExitOnFailure = false);
+  cRemux(int VPid, const int *APids, const int *DPids, const int *SPids, bool ExitOnFailure = false, bool SyncEarly = false);
        ///< Creates a new remuxer for the given PIDs. VPid is the video PID, while
        ///< APids, DPids and SPids are pointers to zero terminated lists of audio,
        ///< dolby and subtitle PIDs (the pointers may be NULL if there is no such
        ///< PID). If ExitOnFailure is true, the remuxer will initiate an "emergency
-       ///< exit" in case of problems with the data stream.
+       ///< exit" in case of problems with the data stream. SyncEarly causes cRemux
+       ///< to sync as soon as a video or audio frame is seen.
   ~cRemux();
   void SetTimeouts(int PutTimeout, int GetTimeout) { resultBuffer->SetTimeouts(PutTimeout, GetTimeout); }
        ///< By default cRemux assumes that Put() and Get() are called from different
diff -Nurp ../vdr-1.5.18-orig/transfer.c ./transfer.c
--- ../vdr-1.5.18-orig/transfer.c	2007-01-05 11:45:28.000000000 +0100
+++ ./transfer.c	2008-02-24 19:47:40.000000000 +0100
@@ -19,7 +19,7 @@ cTransfer::cTransfer(tChannelID ChannelI
 ,cThread("transfer")
 {
   ringBuffer = new cRingBufferLinear(TRANSFERBUFSIZE, TS_SIZE * 2, true, "Transfer");
-  remux = new cRemux(VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids);
+  remux = new cRemux(VPid, APids, Setup.UseDolbyDigital ? DPids : NULL, SPids, false, true);
 }
 
 cTransfer::~cTransfer()

vdr-1.5.18-use-pkgconfig.patch:

--- NEW FILE vdr-1.5.18-use-pkgconfig.patch ---
diff -up vdr-1.5.18/Makefile~ vdr-1.5.18/Makefile
--- vdr-1.5.18/Makefile~	2008-02-29 23:43:03.000000000 +0200
+++ vdr-1.5.18/Makefile	2008-03-18 00:17:06.000000000 +0200
@@ -20,8 +20,8 @@ PREFIX  ?= /usr/local
 MANDIR   = $(PREFIX)/share/man
 BINDIR   = $(PREFIX)/bin
 LOCDIR   = ./locale
-LIBS     = -ljpeg -lpthread -ldl -lcap -lrt -lfreetype -lfontconfig
-INCLUDES = -I/usr/include/freetype2
+LIBS     = -ljpeg -lpthread -ldl -lcap -lrt $(shell pkg-config --libs freetype2 fontconfig)
+INCLUDES = $(shell pkg-config --cflags freetype2 fontconfig)
 
 PLUGINDIR= ./PLUGINS
 PLUGINLIBDIR= $(PLUGINDIR)/lib

vdr-1.6.0-man-section.patch:

--- NEW FILE vdr-1.6.0-man-section.patch ---
diff -U1 vdr-1.6.0/HISTORY~ vdr-1.6.0/HISTORY
--- vdr-1.6.0/HISTORY~	2008-03-23 12:26:08.000000000 +0200
+++ vdr-1.6.0/HISTORY	2008-03-23 15:48:23.000000000 +0200
@@ -1142,3 +1142,3 @@
   delimiter (thanks to Bernd Zierath for helping to debug this one).
-- Added manual pages vdr(1) and vdr(5) (which made the FORMATS file obsolete).
+- Added manual pages vdr(8) and vdr(5) (which made the FORMATS file obsolete).
 - New command command line option '-V' to display the VDR version.
@@ -1252,3 +1252,3 @@
 - First step towards a universal plugin interface. See the file PLUGINS.html
-  for a detailed description. The man page vdr(1) describes the new options '-L'
+  for a detailed description. The man page vdr(8) describes the new options '-L'
   and '-P' used to load plugins. This first step implements the complete "outer"
@@ -3894,3 +3894,3 @@
 - Updated the Finnish OSD texts (thanks to Rolf Ahrenberg).
-- Fixed a leftover 'summary.vdr' in vdr.1 (reported by Christoph Hermanns).
+- Fixed a leftover 'summary.vdr' in vdr.8 (reported by Christoph Hermanns).
 - Added more error messages and line numbers when reading EPG data and info.vdr
@@ -4165,3 +4165,3 @@
   introduced in version 1.3.32.
-- Removed the now obsolete "ca.conf" section from vdr.1 (thanks to Ville Skyttä).
+- Removed the now obsolete "ca.conf" section from vdr.8 (thanks to Ville Skyttä).
 - Added missing description of L and R circular polarization to 'diseqc.conf'.
@@ -4522,3 +4522,3 @@
   request by Ville Skyttä, as in the initial patch from Christoph Haubrich).
-- Fixed the vdr.1 man page (a single DVB card can record and do live tv).
+- Fixed the vdr.8 man page (a single DVB card can record and do live tv).
 - The preferred audio language is now automatically selected when starting replay.
@@ -4812,3 +4812,3 @@
 - Added a comment regarding the PLUGIN macro to the 'newplugin' script.
-- Added '--vfat' to the vdr.1 man page (reported by Udo Richter).
+- Added '--vfat' to the vdr.8 man page (reported by Udo Richter).
 - Removed a double fdopen() in cPipe::Open() (reported by Stefan Huelswitt).
diff -U1 vdr-1.6.0/vdr.1~ vdr-1.6.0/vdr.1
--- vdr-1.6.0/vdr.1~	2008-03-09 18:07:06.000000000 +0200
+++ vdr-1.6.0/vdr.1	2008-03-23 15:48:54.000000000 +0200
@@ -10,5 +10,5 @@
 .\"
-.\" $Id: vdr.1 1.33 2008/03/09 16:07:06 kls Exp $
+.\" $Id: vdr.8 1.33 2008/03/09 16:07:06 kls Exp $
 .\"
-.TH vdr 1 "10 Feb 2008" "1.6" "Video Disk Recorder"
+.TH vdr 8 "10 Feb 2008" "1.6" "Video Disk Recorder"
 .SH NAME
diff -U1 vdr-1.6.0/vdr.5~ vdr-1.6.0/vdr.5
--- vdr-1.6.0/vdr.5~	2008-03-09 17:46:57.000000000 +0200
+++ vdr-1.6.0/vdr.5	2008-03-23 15:46:21.000000000 +0200
@@ -665,3 +665,3 @@
 .SH SEE ALSO
-.BR vdr (1)
+.BR vdr (8)
 .SH AUTHOR
diff -U1 vdr-1.6.0/UPDATE-1.2.0~ vdr-1.6.0/UPDATE-1.2.0
--- vdr-1.6.0/UPDATE-1.2.0~	2003-05-30 16:46:54.000000000 +0300
+++ vdr-1.6.0/UPDATE-1.2.0	2008-03-23 15:47:32.000000000 +0200
@@ -10,3 +10,3 @@
 - Implemented a universal plugin interface. See the file PLUGINS.html
-  for a detailed description. The man page vdr(1) describes the new options '-L'
+  for a detailed description. The man page vdr(8) describes the new options '-L'
   and '-P' used to load plugins.

vdr-1.6.0-paths.patch:

--- NEW FILE vdr-1.6.0-paths.patch ---
diff -up vdr-1.6.0/PLUGINS/src/sky/README~ vdr-1.6.0/PLUGINS/src/sky/README
--- vdr-1.6.0/PLUGINS/src/sky/README~	2007-08-12 14:08:16.000000000 +0300
+++ vdr-1.6.0/PLUGINS/src/sky/README	2008-03-23 16:24:18.000000000 +0200
@@ -37,7 +37,7 @@ derived from the actual channel data and
 data for each channel can be found (see below). Copy this file to your
 plugins config directory, in a subdirectory named 'sky', as in
 
-/video/plugins/sky/channels.conf.sky
+__CONFIGDIR__/plugins/sky/channels.conf.sky
 
 The Sky EPG is available on the Internet at http://www.bleb.org.
 The Perl script getskyepg.pl extracts the EPG data from these pages
diff -up vdr-1.6.0/epg2html.pl~ vdr-1.6.0/epg2html.pl
--- vdr-1.6.0/epg2html.pl~	2006-04-17 15:19:08.000000000 +0300
+++ vdr-1.6.0/epg2html.pl	2008-03-23 16:24:07.000000000 +0200
@@ -2,12 +2,12 @@
 
 # A simple EPG to HTML converter
 #
-# Converts the EPG data written by 'vdr' into the file /video/epg.data
+# Converts the EPG data written by 'vdr' into the file __CACHEDIR__/epg.data
 # into a simple HTML programme listing, consisting of one file per channel
 # plus an 'index.htm' file. All output files are written into the current
 # directory.
 #
-# Usage: epg2html < /video/epg.data
+# Usage: epg2html < __CACHEDIR__/epg.data
 #
 # See the main source file 'vdr.c' for copyright information and
 # how to reach the author.
diff -up vdr-1.6.0/vdr.1~ vdr-1.6.0/vdr.1
--- vdr-1.6.0/vdr.1~	2008-03-09 18:07:06.000000000 +0200
+++ vdr-1.6.0/vdr.1	2008-03-23 16:24:04.000000000 +0200
@@ -45,7 +45,7 @@ Send Dolby Digital audio to stdin of com
 .TP
 .BI \-c\  dir ,\ \-\-config= dir
 Read config files from directory \fIdir\fR
-(default is to read them from the video directory).
+(default is to read them from __CONFIGDIR__).
 .TP
 .B \-d, \-\-daemon
 Run in daemon mode (implies \-\-no\-kbd).
@@ -56,7 +56,7 @@ There may be several \fB\-D\fR options (
 .TP
 .BI \-E\  file ,\ \-\-epgfile= file
 Write the EPG data into the given \fIfile\fR
-(default is \fI/video/epg.data\fR).
+(default is \fI__CACHEDIR__/epg.data\fR).
 Use \fB\-E\-\fR to disable this.
 If \fIfile\fR is a directory, the file \fIepg.data\fR
 will be created in that directory.
@@ -80,7 +80,7 @@ If logging should be done to LOG_LOCAL\f
 LOG_USER, add '.n' to LEVEL, as in 3.7 (n=0..7).
 .TP
 .BI \-L\  dir ,\ \-\-lib= dir
-Search for plugins in directory \fIdir\fR (default is ./PLUGINS/lib).
+Search for plugins in directory \fIdir\fR (default is __PLUGINDIR__).
 There can be several \fB\-L\fR options with different \fIdir\fR values.
 Each of them will apply to the \fB\-P\fR options following it.
 .TP
@@ -151,7 +151,7 @@ with VFAT file systems.
 .TP
 .BI \-v\  dir ,\ \-\-video= dir
 Use \fIdir\fR as video directory.
-The default is \fI/video\fR.
+The default is \fI__VIDEODIR__\fR.
 .TP
 .B \-V, \-\-version
 Print version information and exit.
diff -up vdr-1.6.0/vdr.5~ vdr-1.6.0/vdr.5
--- vdr-1.6.0/vdr.5~	2008-03-09 17:46:57.000000000 +0200
+++ vdr-1.6.0/vdr.5	2008-03-23 16:24:02.000000000 +0200
@@ -506,7 +506,7 @@ The file \fIsetup.conf\fR contains the b
 Each line contains one option in the format "Name = Value".
 See the MANUAL file for a description of the available options.
 .SS THEMES
-The files \fIthemes/<skin>\-<theme>.theme\fR in the config directory contain the
+The files \fI__VARDIR__/themes/<skin>\-<theme>.theme\fR contain the
 color theme definitions for the various skins. In the actual file names \fI<skin>\fR
 will be replaced by the name if the skin this theme belongs to, and \fI<theme>\fR
 will be the name of this theme.
diff -up vdr-1.6.0/vdr.c~ vdr-1.6.0/vdr.c
--- vdr-1.6.0/vdr.c~	2008-03-14 15:22:39.000000000 +0200
+++ vdr-1.6.0/vdr.c	2008-03-23 16:23:59.000000000 +0200
@@ -403,7 +403,7 @@ int main(int argc, char *argv[])
                "                           there may be several -D options (default: all DVB\n"
                "                           devices will be used)\n"
                "  -E FILE,  --epgfile=FILE write the EPG data into the given FILE (default is\n"
-               "                           '%s' in the video directory)\n"
+               "                           __CACHEDIR__/%s)\n"
                "                           '-E-' disables this\n"
                "                           if FILE is a directory, the default EPG file will be\n"
                "                           created in that directory\n"
@@ -560,7 +560,7 @@ int main(int argc, char *argv[])
      ConfigDirectory = DEFAULTCONFDIR;
 
   cPlugin::SetConfigDirectory(ConfigDirectory);
-  cThemes::SetThemesDirectory(AddDirectory(ConfigDirectory, "themes"));
+  cThemes::SetThemesDirectory("__VARDIR__/themes");
 
   Setup.Load(AddDirectory(ConfigDirectory, "setup.conf"));
   if (!(Sources.Load(AddDirectory(ConfigDirectory, "sources.conf"), true, true) &&
@@ -595,7 +595,7 @@ int main(int argc, char *argv[])
         EpgDataFileName = DEFAULTEPGDATAFILENAME;
         }
      else if (*EpgDataFileName != '/' && *EpgDataFileName != '.')
-        EpgDirectory = VideoDirectory;
+        EpgDirectory = "__CACHEDIR__";
      if (EpgDirectory)
         cSchedules::SetEpgDataFileName(AddDirectory(EpgDirectory, EpgDataFileName));
      else
diff -up vdr-1.6.0/newplugin~ vdr-1.6.0/newplugin
--- vdr-1.6.0/newplugin~	2008-01-13 15:00:23.000000000 +0200
+++ vdr-1.6.0/newplugin	2008-03-23 16:23:49.000000000 +0200
@@ -24,7 +24,7 @@ $PLUGIN_VERSION = "0.0.1";
 $PLUGIN_DESCRIPTION = "Enter description for '$PLUGIN_NAME' plugin";
 $PLUGIN_MAINENTRY = $PLUGIN_CLASS;
 
-$PLUGINS_SRC = "PLUGINS/src";
+$PLUGINS_SRC = ".";
 
 $README = qq
 {This is a "plugin" for the Video Disk Recorder (VDR).

vdr-1.6.0-scriptnames.patch:

--- NEW FILE vdr-1.6.0-scriptnames.patch ---
diff -U1 vdr-1.6.0/PLUGINS/src/sky/HISTORY~ vdr-1.6.0/PLUGINS/src/sky/HISTORY
--- vdr-1.6.0/PLUGINS/src/sky/HISTORY~	2008-03-22 12:20:10.000000000 +0200
+++ vdr-1.6.0/PLUGINS/src/sky/HISTORY	2008-03-23 15:56:00.000000000 +0200
@@ -23,3 +23,3 @@
 - Switched EPG data retrieval to http://www.bleb.org.
-- Added automatic DST detection to getskyepg.pl.
+- Added automatic DST detection to getskyepg.
 - Fixed handling receivers, so that a recording on the same channel
@@ -50,8 +50,8 @@
 
-- Made the getskyepg.pl script send a user agent message to
+- Made the getskyepg script send a user agent message to
   the server, according to the rules at http://bleb.org/tv/data/listings.
   If your version of 'wget' doesn't support the -U option to set the user agent,
-  use the new option -U of getskyepg.pl to have the information added to the URL
+  use the new option -U of getskyepg to have the information added to the URL
   as a query string.
-- The getskyepg.pl script now replaces "&" with "&".
+- The getskyepg script now replaces "&" with "&".
 
@@ -64,3 +64,3 @@
 
-- Removed the full path from the 'logger' call in the getskyepg.pl script (this
+- Removed the full path from the 'logger' call in the getskyepg script (this
   program is apparently "on the move" through the file system...).
diff -U1 vdr-1.6.0/PLUGINS/src/sky/README~ vdr-1.6.0/PLUGINS/src/sky/README
--- vdr-1.6.0/PLUGINS/src/sky/README~	2007-08-12 14:08:16.000000000 +0300
+++ vdr-1.6.0/PLUGINS/src/sky/README	2008-03-23 15:55:40.000000000 +0200
@@ -42,8 +42,8 @@
 The Sky EPG is available on the Internet at http://www.bleb.org.
-The Perl script getskyepg.pl extracts the EPG data from these pages
+The Perl script getskyepg extracts the EPG data from these pages
 and sends it to VDR via an SVDRP connection. The channel names as
 used on the bleb.org pages are defined in the channels.conf.sky file.
-You can keep your EPG data up-to-date by entering a call to getskyepg.pl
-into your /etc/crontab. Call 'getskyepg.pl -h' for a list of options.
-The getskyepg.pl script requires the programs /usr/bin/wget and /usr/bin/logger
+You can keep your EPG data up-to-date by entering a call to getskyepg
+into your /etc/crontab. Call 'getskyepg -h' for a list of options.
+The getskyepg script requires the programs /usr/bin/wget and /usr/bin/logger
 to be installed on your system.
diff -U1 vdr-1.6.0/PLUGINS/src/sky/getskyepg.pl~ vdr-1.6.0/PLUGINS/src/sky/getskyepg.pl
--- vdr-1.6.0/PLUGINS/src/sky/getskyepg.pl~	2008-03-22 12:17:42.000000000 +0200
+++ vdr-1.6.0/PLUGINS/src/sky/getskyepg.pl	2008-03-23 15:55:28.000000000 +0200
@@ -2,3 +2,3 @@
 
-# getskyepg.pl: Get EPG data for Sky channels from the Internet
+# getskyepg: Get EPG data for Sky channels from the Internet
 #
@@ -10,3 +10,3 @@
 #
-# $Id: getskyepg.pl 1.7 2008/03/22 10:17:42 kls Exp $
+# $Id: getskyepg 1.7 2008/03/22 10:17:42 kls Exp $
 
@@ -40,3 +40,3 @@
 # who runs that web site, can contact you in case of problems.
-$IDENT = "VDR::getskyepg.pl, http://www.cadsoft.de/vdr - vdrbugs\@cadsoft.de";
+$IDENT = "VDR::getskyepg, http://www.cadsoft.de/vdr - vdrbugs\@cadsoft.de";
 $GAP = 2;
diff -U1 vdr-1.6.0/epg2html.pl~ vdr-1.6.0/epg2html.pl
--- vdr-1.6.0/epg2html.pl~	2006-04-17 15:19:08.000000000 +0300
+++ vdr-1.6.0/epg2html.pl	2008-03-23 15:54:40.000000000 +0200
@@ -9,3 +9,3 @@
 #
-# Usage: epg2html.pl < /video/epg.data
+# Usage: epg2html < /video/epg.data
 #
@@ -14,3 +14,3 @@
 #
-# $Id: epg2html.pl 1.7 2006/04/17 12:19:08 kls Exp $
+# $Id: epg2html 1.7 2006/04/17 12:19:08 kls Exp $
 
diff -U1 vdr-1.6.0/HISTORY~ vdr-1.6.0/HISTORY
--- vdr-1.6.0/HISTORY~	2008-03-23 12:26:08.000000000 +0200
+++ vdr-1.6.0/HISTORY	2008-03-23 15:54:59.000000000 +0200
@@ -327,3 +327,3 @@
 - The EPG data is now dumped into the file /video/epg.data every ten minutes.
-  Use the Perl script 'epg2html.pl' to convert the raw EPG data into a simple
+  Use the Perl script 'epg2html' to convert the raw EPG data into a simple
   HTML programme listing.
@@ -397,3 +397,3 @@
 - New SVDRP command MESG to display a short message on the OSD.
-- The Perl script 'svdrpsend.pl' can be used to send SVDRP commands to VDR.
+- The Perl script 'svdrpsend' can be used to send SVDRP commands to VDR.
 - SVDRP can now immediately reuse the same port if VDR is restarted.
@@ -1054,3 +1054,3 @@
 
-- Fixed parsing 'E' records in epg2html.pl.
+- Fixed parsing 'E' records in epg2html.
 - Fixed a deadlock when switching channels via Schedule/Now|Next/Switch (reported
@@ -1325,3 +1325,3 @@
 - Added Swedish language texts (thanks to Tomas Prybil).
-- Fixed parsing 'E' records in epg2html.pl (thanks to Matthias Fechner for pointing
+- Fixed parsing 'E' records in epg2html (thanks to Matthias Fechner for pointing
   out this one).
@@ -2760,3 +2760,3 @@
   available for plugins.
-- The epg2html.pl script now handles '|' in description texts.
+- The epg2html script now handles '|' in description texts.
 - The new setup option "OSD/Use small font" can be used to control the use of
@@ -4031,3 +4031,3 @@
 
-  svdrpsend.pl -d <hostname> 'grab -' | sed -n -e 's/^216-//p' -e '1ibegin-base64 644 -' -e '$a====' | uudecode | display -
+  svdrpsend -d <hostname> 'grab -' | sed -n -e 's/^216-//p' -e '1ibegin-base64 644 -' -e '$a====' | uudecode | display -
 
diff -U1 vdr-1.6.0/CONTRIBUTORS~ vdr-1.6.0/CONTRIBUTORS
--- vdr-1.6.0/CONTRIBUTORS~	2008-03-18 19:34:00.000000000 +0200
+++ vdr-1.6.0/CONTRIBUTORS	2008-03-23 15:54:07.000000000 +0200
@@ -546,3 +546,3 @@
 Matthias Fechner <matthiasfechner at web.de>
- for pointing out a bug in parsing 'E' records in epg2html.pl
+ for pointing out a bug in parsing 'E' records in epg2html
  for suggesting to add a note about LANG having to be set to a valid locale in INSTALL


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/vdr/devel/.cvsignore,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -u -r1.13 -r1.13.2.1
--- .cvsignore	12 Oct 2007 19:00:55 -0000	1.13
+++ .cvsignore	24 Mar 2008 16:07:35 -0000	1.13.2.1
@@ -1,4 +1,4 @@
 vdr_1.4.5-2.ds.diff.gz
-vdr-1.4.7.tar.bz2
-vdr-1.4.7-liemikuutio-1.13.diff.gz
-vdr-1.4.7-subtitles-0.5.0-and-ttxtsubs-0.0.5.diff.gz
+vdr-1.5.18-liemikuutio-1.19.diff.gz
+vdr-1.5.18-ttxtsubs-0.0.5.diff.gz
+vdr-1.6.0.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/vdr/devel/sources,v
retrieving revision 1.13
retrieving revision 1.13.2.1
diff -u -r1.13 -r1.13.2.1
--- sources	12 Oct 2007 19:00:55 -0000	1.13
+++ sources	24 Mar 2008 16:07:35 -0000	1.13.2.1
@@ -1,4 +1,4 @@
 3e9287f726df5a667054a15078235791  vdr_1.4.5-2.ds.diff.gz
-81be33a0edb93288ca3d235a04107ec4  vdr-1.4.7.tar.bz2
-7b43fa7a9c0d45e5f24ba6143926e720  vdr-1.4.7-liemikuutio-1.13.diff.gz
-5a20307263224153df63d79e047a5793  vdr-1.4.7-subtitles-0.5.0-and-ttxtsubs-0.0.5.diff.gz
+63a276c23a71658739641a969832ef28  vdr-1.5.18-liemikuutio-1.19.diff.gz
+a411bb27e814cedbbef0c71c0ff6bab7  vdr-1.5.18-ttxtsubs-0.0.5.diff.gz
+76f4ebe6525a35e33313d27a3f8e80c0  vdr-1.6.0.tar.bz2


Index: vdr.init
===================================================================
RCS file: /cvs/pkgs/rpms/vdr/devel/vdr.init,v
retrieving revision 1.7
retrieving revision 1.7.2.1
diff -u -r1.7 -r1.7.2.1
--- vdr.init	17 Mar 2008 19:53:15 -0000	1.7
+++ vdr.init	24 Mar 2008 16:07:35 -0000	1.7.2.1
@@ -77,8 +77,7 @@
 }
 
 restart() {
-    stop
-    start
+    action $"Restarting Video Disk Recorder ($prog): " killproc $prog -HUP
 }
 
 case "$1" in


Index: vdr.spec
===================================================================
RCS file: /cvs/pkgs/rpms/vdr/devel/vdr.spec,v
retrieving revision 1.23
retrieving revision 1.23.2.1
diff -u -r1.23 -r1.23.2.1
--- vdr.spec	17 Mar 2008 22:04:50 -0000	1.23
+++ vdr.spec	24 Mar 2008 16:07:35 -0000	1.23.2.1
@@ -1,6 +1,7 @@
 # TODO, maybe some day:
 # - livebuffer patch, http://www.vdr-portal.de/board/thread.php?threadid=37309
 # - channelfilter patch, http://www.u32.de/vdr.html#patches
+# - rofa's parentalrating, cutter-marks patches
 
 %define videodir  /srv/vdr
 %define audiodir  /srv/audio
@@ -14,53 +15,74 @@
 %define vdr_user  vdr
 %define vdr_group video
 # From APIVERSION in config.h
-%define apiver    1.4.5
+%define apiver    1.6.0
 
 Name:           vdr
-Version:        1.4.7
-Release:        11%{?dist}
+Version:        1.6.0
+Release:        0.1%{?dist}
 Summary:        Video Disk Recorder
 
 Group:          Applications/Multimedia
 License:        GPLv2+
 URL:            http://www.cadsoft.de/vdr/
 Source0:        ftp://ftp.cadsoft.de/vdr/%{name}-%{version}.tar.bz2
+# TODO
 Source1:        %{name}.init
+# TODO
 Source2:        %{name}.sysconfig
+# TODO
 Source4:        %{name}-udev.rules
+# TODO
 Source5:        %{name}-reccmds.conf
+# TODO
 Source6:        %{name}-commands.conf
+# TODO
 Source7:        %{name}-runvdr.sh
+# TODO
 Source8:        %{name}.consoleperms
+# TODO
 Source9:        %{name}-config.sh
+# TODO
 Source10:       %{name}-README.package
 Source11:       %{name}-skincurses.conf
 Source12:       %{name}-sky.conf
+# TODO
 Source13:       %{name}-timercmds.conf
+# TODO
 Source14:       %{name}-shutdown.sh
 Source15:       %{name}-moveto.sh
 Source16:       %{name}-CHANGES.package.old
+# TODO
 Patch0:         %{name}-channel+epg.patch
+# TODO
 Patch1:         http://zap.tartarus.org/~ds/debian/dists/stable/main/source/vdr_1.4.5-2.ds.diff.gz
-Patch2:         http://www.saunalahti.fi/~rahrenbe/vdr/patches/vdr-1.4.7-liemikuutio-1.13.diff.gz
-Patch3:         %{name}-1.4.6-paths.patch
-Patch4:         %{name}-1.4.1-dumpable.patch
-# http://article.gmane.org/gmane.linux.vdr/32708
-Patch5:         %{name}-1.4.6-1-syncearly.patch
-Patch6:         http://www.saunalahti.fi/~rahrenbe/vdr/patches/vdr-1.4.7-subtitles-0.5.0-and-ttxtsubs-0.0.5.diff.gz
-Patch7:         %{name}-1.4.7-recmenu-play.patch
-# Patch8: http://www.udo-richter.de/vdr/files/vdr-1.4.7-hlcutter-0.2.0.diff
+Patch2:         http://www.saunalahti.fi/~rahrenbe/vdr/patches/vdr-1.5.18-liemikuutio-1.19.diff.gz
+Patch3:         %{name}-1.6.0-scriptnames.patch
+Patch4:         %{name}-1.6.0-paths.patch
+Patch5:         %{name}-1.5.18-use-pkgconfig.patch
+# http://article.gmane.org/gmane.linux.vdr/36097
+Patch6:         %{name}-1.5.18-syncearly.patch
+Patch7:         http://www.saunalahti.fi/~rahrenbe/vdr/patches/vdr-1.5.18-ttxtsubs-0.0.5.diff.gz
+Patch8:         %{name}-1.6.0-man-section.patch
+# Patch8: http://www.udo-richter.de/vdr/files/vdr-1.5.13-hlcutter-0.2.0.diff
 # edited so that it applies on top of the liemikuutio patch (menu.c)
-Patch8:         %{name}-1.4.7-hlcutter-0.2.0.diff
-Patch9:         %{name}-1.4.7-hlcutter-0.2.0-finnish.patch
-Patch10:        %{name}-1.4.7-gcc43.patch
-Patch11:        %{name}-1.4.7-syncearly-syslog.patch
+Patch9:         %{name}-1.5.18-hlcutter-0.2.0.diff
+# TODO
+Patch10:        %{name}-1.4.7-hlcutter-0.2.0-finnish.patch
+# mainmenuhooks, timercmd and progressbar-support from
+# http://winni.vdr-developer.org/epgsearch/downloads/beta/vdr-epgsearch-0.9.24.beta22.tgz
+Patch11:        MainMenuHooks-v1_0.patch
+Patch12:        timercmd-0.1_1.5.12.diff
+Patch13:        %{name}-1.5.17-progressbar-support-0.0.1.diff
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildRequires:  libjpeg-devel
 BuildRequires:  libcap-devel
 BuildRequires:  pkgconfig
 BuildRequires:  perl(File::Spec)
+BuildRequires:  fontconfig-devel
+BuildRequires:  freetype-devel
+BuildRequires:  gettext
 Requires:       udev
 Requires(pre):  shadow-utils
 Requires(post): /sbin/chkconfig
@@ -85,7 +107,6 @@
 %package        skincurses
 Summary:        Shell window skin plugin for VDR
 Group:          Applications/Multimedia
-License:        GPL+
 %if 0%{?_with_plugins:1}
 BuildRequires:  ncurses-devel
 %endif
@@ -98,8 +119,9 @@
 %package        sky
 Summary:        Sky Digibox plugin for VDR
 Group:          Applications/Multimedia
-License:        GPL+
 Requires:       vdr(abi) = %{apiver}
+Requires:       wget
+Requires:       /usr/bin/logger
 
 %description    sky
 The sky plugin implements a new device for VDR, which is based on the
@@ -112,65 +134,50 @@
 
 %prep
 %setup -q
-%patch0 -p1
+# TODO: does not apply
+#patch0 -p1
 %patch1 -p1
-#patch -i debian/patches/02_latin-1.dpatch
-patch -i debian/patches/02_plugin_missing.dpatch
-patch -i debian/patches/02_reload.dpatch
+# TODO: does not apply
+#patch -i debian/patches/02_plugin_missing.dpatch
 # sort_options would be nice, but it conflicts with channel+epg which is nicer
 #patch -i debian/patches/02_sort_options.dpatch
-#patch -i debian/patches/03_no-data_timeout.dpatch
-#patch -i debian/patches/03_settime_segfault.dpatch
-#patch -i debian/patches/04_cmdsubmenu.dpatch
-#patch -i debian/patches/05_nissl_dvbplayer.dpatch
-#patch -i debian/patches/06_recording_readonly.dpatch
 patch -i debian/patches/06_recording_scan_speedup.dpatch
 patch -i debian/patches/07_blockify_define.dpatch
-#patch -i debian/patches/09_increase_epgscan_timeout.dpatch
 patch -i debian/patches/10_livelock.dpatch
 patch -i debian/patches/11_atsc.dpatch
 echo "DEFINES += -DHAVE_ATSC" >> Makefile
-#patch -i debian/patches/12_skinclassic_icons.dpatch
-#patch -i debian/patches/15_cut_compensate_start_time.dpatch
 patch -i debian/patches/19_debian_osdbase_maxitems.dpatch
-patch -i debian/patches/opt-20_epgsearch.dpatch
-#patch -i debian/patches/opt-20_liemikuutio.dpatch
-#patch -i debian/patches/opt-20_subtitles_0.4.0_ttxtsubs_0.0.5.dpatch
-patch -i debian/patches/opt-20_suspend.dpatch
-patch -i debian/patches/opt-20_vdr-timer-info.dpatch
+# TODO: does not apply, check upstream:
+#       http://www.ktverkko.fi/~msmakela/software/vdr/
+#patch -i debian/patches/opt-20_suspend.dpatch
+# TODO: does not apply
+#patch -i debian/patches/opt-20_vdr-timer-info.dpatch
 %patch2 -p1
 %patch3 -p1
-%patch4 -p1
-%patch5 -p0
-%patch6 -p1
-%patch7 -p0
-%patch8 -p0
-%patch9 -p0
-%patch10 -p1
-%patch11 -p1
-
-# Fix up paths
-sed -i \
+sed \
   -e 's|__CACHEDIR__|%{cachedir}|'   \
   -e 's|__CONFIGDIR__|%{configdir}|' \
   -e 's|__PLUGINDIR__|%{plugindir}|' \
   -e 's|__VARDIR__|%{vardir}|'       \
   -e 's|__VIDEODIR__|%{videodir}|'   \
-  epg2html.pl vdr.1 vdr.5 vdr.c PLUGINS/src/sky/README
-
-# Fix up man page section
-sed -i -e 's/\bvdr\(\s*\)(1)/vdr\1(8)/' HISTORY UPDATE-1.2.0 vdr.5
-sed -i -e 's/\bvdr\([\. ]\)1\b/vdr\18/' HISTORY vdr.1
+  %{PATCH4} | patch -p1
+%patch5 -p1
+%patch6 -p0
+%patch7 -p1
+%patch8 -p1
+%patch9 -p0
+# TODO: does not apply
+#patch10 -p0
+%patch11 -p1
+# TODO: does not apply
+#patch12 -p1
+%patch13 -p1
 
 for f in CONTRIBUTORS HISTORY* UPDATE-1.4.0 ; do
   iconv -f iso-8859-1 -t utf-8 -o $f.utf8 $f && mv $f.utf8 $f
 done
 
-sed -i -e 's/epg2html.pl/epg2html/' CONTRIBUTORS HISTORY epg2html.pl
-sed -i -e 's/svdrpsend.pl/svdrpsend/' HISTORY
-sed -i -e 's/getskyepg.pl/getskyepg/' \
-  PLUGINS/src/sky/{getskyepg.pl,README,HISTORY}
-
+# TODO: all
 cp -p %{SOURCE5} reccmds.conf
 cp -p %{SOURCE13} timercmds.conf
 sed -e 's|/srv/audio|%{audiodir}|' %{SOURCE6} > commands.conf
@@ -199,6 +206,7 @@
 vdrver=$(sed -ne '/define VDRVERSION/s/^.*"\(.*\)".*$/\1/p' config.h)
 apiver=$(sed -ne '/define APIVERSION/s/^.*"\(.*\)".*$/\1/p' config.h)
 
+# TODO: check
 cat << EOF > vdr.pc
 videodir=%{videodir}
 audiodir=%{audiodir}
@@ -224,18 +232,23 @@
 
 ifeq (\$(RPM_OPT_FLAGS),)
   CFLAGS     = $RPM_OPT_FLAGS
-  CXXFLAGS   = $RPM_OPT_FLAGS -Wall -Woverloaded-virtual
+  CXXFLAGS   = $RPM_OPT_FLAGS -Wall -Woverloaded-virtual -Wno-parentheses
 else
   CFLAGS     = \$(RPM_OPT_FLAGS)
-  CXXFLAGS   = \$(RPM_OPT_FLAGS) -Wall -Woverloaded-virtual
+  CXXFLAGS   = \$(RPM_OPT_FLAGS) -Wall -Woverloaded-virtual -Wno-parentheses
 endif
 ifdef PLUGIN
   CFLAGS    += -fPIC
   CXXFLAGS  += -fPIC
 endif
 
+MANDIR       = %{_mandir}
+BINDIR       = %{_bindir}
+
+LOCDIR       = %{_datadir}/locale
 PLUGINLIBDIR = \$(DESTDIR)\$(shell pkg-config vdr --variable=plugindir)
 VIDEODIR     = \$(DESTDIR)\$(shell pkg-config vdr --variable=videodir)
+CONFDIR      = \$(DESTDIR)\$(shell pkg-config vdr --variable=configdir)
 LIBDIR       = \$(PLUGINLIBDIR)
 
 VDR_USER     = %{vdr_user}
@@ -263,6 +276,8 @@
 install -Dpm 644 vdr.1 $RPM_BUILD_ROOT%{_mandir}/man8/vdr.8
 install -Dpm 644 vdr.5 $RPM_BUILD_ROOT%{_mandir}/man5/vdr.5
 
+make install-i18n DESTDIR=$RPM_BUILD_ROOT
+
 install -dm 755 $RPM_BUILD_ROOT%{configdir}/plugins
 install -pm 644 *.conf $RPM_BUILD_ROOT%{configdir}
 
@@ -335,12 +350,19 @@
 ln -s $(abs2rel %{_includedir}/vdr/config.h %{_libdir}/vdr) \
   $RPM_BUILD_ROOT%{_libdir}/vdr
 
+# i18n
+%find_lang %{name}
+sed -i -e '1i%%defattr(-,root,root,-)' %{name}.lang
+
 # plugins
 %if 0%{?_with_plugins:1}
 install -pm 755 PLUGINS/src/skincurses/libvdr-skincurses.so.%{apiver} \
   $RPM_BUILD_ROOT%{plugindir}
 install -pm 644 %{SOURCE11} \
   $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/vdr-plugins.d/skincurses.conf
+%find_lang %{name}-skincurses
+sed -i -e '1i%%defattr(-,root,root,-)' %{name}-skincurses.lang
+
 install -pm 755 PLUGINS/src/sky/libvdr-sky.so.%{apiver} \
   $RPM_BUILD_ROOT%{plugindir}
 install -pm 644 %{SOURCE12} \
@@ -384,15 +406,15 @@
 [ $1 -gt 0 ] && %{_initrddir}/vdr try-restart >/dev/null || :
 
 
-%files
+%files -f %{name}.lang
 %defattr(-,root,root,-)
-%doc CONTRIBUTORS COPYING HISTORY* INSTALL MANUAL README* UPDATE-1.[24].0
+%doc CONTRIBUTORS COPYING HISTORY* INSTALL MANUAL README* UPDATE-1.?.0
 %doc CHANGES.package.old
 %config(noreplace) %{_sysconfdir}/sysconfig/vdr
 %config(noreplace) %{_sysconfdir}/udev/rules.d/*-%{name}.rules
 %config(noreplace) %{_sysconfdir}/security/console.perms.d/*-%{name}.perms
 %config(noreplace) %{_sysconfdir}/rwtab.d/%{name}
-%config %{_sysconfdir}/sysconfig/vdr-plugins.d/
+%config %dir %{_sysconfdir}/sysconfig/vdr-plugins.d/
 %{_initrddir}/vdr
 %{_bindir}/epg2html
 %{_bindir}/svdrpsend
@@ -434,7 +456,7 @@
 %{_libdir}/vdr/config.h
 
 %if 0%{?_with_plugins:1}
-%files skincurses
+%files skincurses -f %{name}-skincurses.lang
 %defattr(-,root,root,-)
 %doc PLUGINS/src/skincurses/COPYING PLUGINS/src/skincurses/HISTORY
 %doc PLUGINS/src/skincurses/README
@@ -452,6 +474,18 @@
 %endif
 
 %changelog
+* Sun Mar 23 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.6.0-0.1
+- 1.6.0 final; still quite a bit to do with the package.
+- Adapt sync early and epgsearch (partially) patches.
+- Fix dependencies of the sky plugin.
+- Move bunch of inline sed'ing to separate patches.
+- Use kill -HUP in init script's restart action.
+- Don't include bundled plugin sysconfig snippets in main package.
+
+* Tue Mar 18 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.5.18-0.1
+- First cut at packaging 1.5.18.
+- Plugin licenses clarified to be GPLv2+.
+
 * Sun Mar 16 2008 Ville Skyttä <ville.skytta at iki.fi> - 1.4.7-11
 - Kill runvdr before vdr in init script's "stop" action in order to prevent
   it from restarting vdr in case something goes wrong when shutting down.


Index: vdr.sysconfig
===================================================================
RCS file: /cvs/pkgs/rpms/vdr/devel/vdr.sysconfig,v
retrieving revision 1.5
retrieving revision 1.5.2.1
diff -u -r1.5 -r1.5.2.1
--- vdr.sysconfig	17 Mar 2008 19:53:15 -0000	1.5
+++ vdr.sysconfig	24 Mar 2008 16:07:35 -0000	1.5.2.1
@@ -7,7 +7,7 @@
 # sudo(8) configuration to work as expected, see the script source for
 # details.
 #
-VDR_OPTIONS=(--lirc --vfat -s vdr-shutdown.sh)
+VDR_OPTIONS=(--lirc --vfat --userdump -s vdr-shutdown.sh)
 
 # VDR_PLUGIN_ORDER is a space separated list of plugins that should be
 # loaded in a specific order.  This affects eg. the order the plugins'
@@ -41,12 +41,9 @@
 burn
 "
 
-# I18N settings; VDR doesn't work with UTF-8.
+# I18N settings.
 #
 . /etc/sysconfig/i18n 2>/dev/null || :
-LANG=${LANG%.UTF-8}
-LC_ALL=${LC_ALL%.UTF-8}
-LC_CTYPE=${LC_CTYPE%.UTF-8}
 # LC_TIME affects how dates and times are displayed.
 #export LC_TIME=fi_FI
 


--- vdr-1.4.1-dumpable.patch DELETED ---


--- vdr-1.4.6-1-syncearly.patch DELETED ---


--- vdr-1.4.6-paths.patch DELETED ---


--- vdr-1.4.7-gcc43.patch DELETED ---


--- vdr-1.4.7-hlcutter-0.2.0.diff DELETED ---


--- vdr-1.4.7-recmenu-play.patch DELETED ---


--- vdr-1.4.7-syncearly-syslog.patch DELETED ---




More information about the fedora-extras-commits mailing list