[vdr] VDR LiveBuffer Patch

Thomas Günther tom1 at toms-cafe.de
Thu Aug 18 20:52:53 CEST 2005


C.Y.M schrieb:
> But, besides vdr, I found
> 5 common plugins that also required changes when using this LiveBuffer patch.

I tried to solve the plugin conflicts. Use this patch after LiveBuffer
patch.

Tom
-------------- next part --------------
#!/bin/sh /usr/share/dpatch/dpatch-run

## opt-43_LiveBufferE.dpatch by Thomas Günther <tom at toms-cafe.de>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: This patch solves conflicts of lifebuffer patch (0.0.7) with the plugin
## DP: interfaces regarding dvd, mp3, sky, streamdev and vcs plugins.

@DPATCH@
diff -Naur vdr-1.3.29-LiveBuffer-0.0.7/device.c vdr-1.3.29-LiveBuffer-0.0.7E/device.c
--- vdr-1.3.29-LiveBuffer-0.0.7/device.c	2005-08-18 20:29:07.000000000 +0200
+++ vdr-1.3.29-LiveBuffer-0.0.7E/device.c	2005-08-18 19:31:06.000000000 +0200
@@ -513,7 +513,12 @@
   return true;
 }
 
-bool cDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers, bool LiveRec) const
+bool cDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const
+{
+  return false;
+}
+
+bool cDevice::ProvidesChannelE(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers, bool LiveRec) const
 {
   return false;
 }
@@ -579,7 +584,7 @@
   // If this card can't receive this channel, we must not actually switch
   // the channel here, because that would irritate the driver when we
   // start replaying in Transfer Mode immediately after switching the channel:
-  bool NeedsTransferMode = (LiveView && IsPrimaryDevice() && !ProvidesChannel(Channel, Setup.PrimaryLimit, NULL, Setup.LiveBuffer));
+  bool NeedsTransferMode = (LiveView && IsPrimaryDevice() && !ProvidesChannelE(Channel, Setup.PrimaryLimit, NULL, Setup.LiveBuffer));
 
   eSetChannelResult Result = scrOk;
 
diff -Naur vdr-1.3.29-LiveBuffer-0.0.7/device.h vdr-1.3.29-LiveBuffer-0.0.7E/device.h
--- vdr-1.3.29-LiveBuffer-0.0.7/device.h	2005-08-18 20:29:07.000000000 +0200
+++ vdr-1.3.29-LiveBuffer-0.0.7E/device.h	2005-08-18 19:17:03.000000000 +0200
@@ -189,7 +189,8 @@
   virtual bool ProvidesTransponderExclusively(const cChannel *Channel) const;
          ///< Returns true if this is the only device that is able to provide
          ///< the given channel's transponder.
-  virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL, bool LiveRec = false) const;
+  virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const;
+  virtual bool ProvidesChannelE(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL, bool LiveRec = false) const;
          ///< Returns true if this device can provide the given channel.
          ///< In case the device has cReceivers attached to it or it is the primary
          ///< device, Priority is used to decide whether the caller's request can
diff -Naur vdr-1.3.29-LiveBuffer-0.0.7/dvbdevice.c vdr-1.3.29-LiveBuffer-0.0.7E/dvbdevice.c
--- vdr-1.3.29-LiveBuffer-0.0.7/dvbdevice.c	2005-08-18 20:29:07.000000000 +0200
+++ vdr-1.3.29-LiveBuffer-0.0.7E/dvbdevice.c	2005-08-18 19:36:32.000000000 +0200
@@ -745,7 +745,12 @@
   return ProvidesSource(Channel->Source()) && (!cSource::IsSat(Channel->Source()) || !Setup.DiSEqC || Diseqcs.Get(Channel->Source(), Channel->Frequency(), Channel->Polarization()));
 }
 
-bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers, bool LiveRec) const
+bool cDvbDevice::ProvidesChannel(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers) const
+{
+  return ProvidesChannelE(Channel, Priority, NeedsDetachReceivers);
+}
+
+bool cDvbDevice::ProvidesChannelE(const cChannel *Channel, int Priority, bool *NeedsDetachReceivers, bool LiveRec) const
 {
   bool result = false;
   bool hasPriority = Priority < 0 || Priority > this->Priority();
diff -Naur vdr-1.3.29-LiveBuffer-0.0.7/dvbdevice.h vdr-1.3.29-LiveBuffer-0.0.7E/dvbdevice.h
--- vdr-1.3.29-LiveBuffer-0.0.7/dvbdevice.h	2005-08-18 20:29:07.000000000 +0200
+++ vdr-1.3.29-LiveBuffer-0.0.7E/dvbdevice.h	2005-08-18 20:14:03.000000000 +0200
@@ -60,7 +60,8 @@
 public:
   virtual bool ProvidesSource(int Source) const;
   virtual bool ProvidesTransponder(const cChannel *Channel) const;
-  virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL, bool LiveRec = NULL) const;
+  virtual bool ProvidesChannel(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL) const;
+  virtual bool ProvidesChannelE(const cChannel *Channel, int Priority = -1, bool *NeedsDetachReceivers = NULL, bool LiveRec = false) const;
 protected:
   virtual bool SetChannelDevice(const cChannel *Channel, bool LiveView);
 public:
diff -Naur vdr-1.3.29-LiveBuffer-0.0.7/dvbplayer.c vdr-1.3.29-LiveBuffer-0.0.7E/dvbplayer.c
--- vdr-1.3.29-LiveBuffer-0.0.7/dvbplayer.c	2005-08-18 20:29:07.000000000 +0200
+++ vdr-1.3.29-LiveBuffer-0.0.7E/dvbplayer.c	2005-08-18 19:49:22.000000000 +0200
@@ -211,7 +211,8 @@
   int SkipFrames(int Frames);
   void SkipSeconds(int Seconds);
   void Goto(int Position, bool Still = false);
-  virtual bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false, bool onlyExisting = false);
+  virtual bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false);
+  virtual bool GetIndexE(int &Current, int &Total, bool SnapToIFrame = false, bool onlyExisting = false);
   virtual bool GetReplayMode(bool &Play, bool &Forward, int &Speed);
   void Rew(bool On);
   };
@@ -741,7 +742,12 @@
      }
 }
 
-bool cDvbPlayer::GetIndex(int &Current, int &Total, bool SnapToIFrame, bool onlyExisting)
+bool cDvbPlayer::GetIndex(int &Current, int &Total, bool SnapToIFrame)
+{
+  return GetIndexE(Current, Total, SnapToIFrame);
+}
+
+bool cDvbPlayer::GetIndexE(int &Current, int &Total, bool SnapToIFrame, bool onlyExisting)
 {
   if (index) {
      if (playMode == pmStill)
@@ -843,10 +849,15 @@
   return -1;
 }
 
-bool cDvbPlayerControl::GetIndex(int &Current, int &Total, bool SnapToIFrame, bool onlyExisting)
+bool cDvbPlayerControl::GetIndex(int &Current, int &Total, bool SnapToIFrame)
+{
+  return GetIndexE(Current, Total, SnapToIFrame);
+}
+
+bool cDvbPlayerControl::GetIndexE(int &Current, int &Total, bool SnapToIFrame, bool onlyExisting)
 {
   if (player) {
-     player->GetIndex(Current, Total, SnapToIFrame, onlyExisting);
+     player->GetIndexE(Current, Total, SnapToIFrame, onlyExisting);
      return true;
      }
   return false;
diff -Naur vdr-1.3.29-LiveBuffer-0.0.7/dvbplayer.h vdr-1.3.29-LiveBuffer-0.0.7E/dvbplayer.h
--- vdr-1.3.29-LiveBuffer-0.0.7/dvbplayer.h	2005-08-18 20:29:07.000000000 +0200
+++ vdr-1.3.29-LiveBuffer-0.0.7E/dvbplayer.h	2005-08-18 19:03:44.000000000 +0200
@@ -42,7 +42,8 @@
        // The sign of 'Seconds' determines the direction in which to skip.
        // Use a very large negative value to go all the way back to the
        // beginning of the recording.
-  bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false, bool onlyExisting = false);
+  bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false);
+  bool GetIndexE(int &Current, int &Total, bool SnapToIFrame = false, bool onlyExisting = false);
        // Returns the current and total frame index, optionally snapped to the
        // nearest I-frame.
   bool GetReplayMode(bool &Play, bool &Forward, int &Speed);
diff -Naur vdr-1.3.29-LiveBuffer-0.0.7/menu.c vdr-1.3.29-LiveBuffer-0.0.7E/menu.c
--- vdr-1.3.29-LiveBuffer-0.0.7/menu.c	2005-08-18 20:29:07.000000000 +0200
+++ vdr-1.3.29-LiveBuffer-0.0.7E/menu.c	2005-08-18 19:08:31.000000000 +0200
@@ -3569,7 +3569,7 @@
 {
   int Current, Total;
 
-  if (GetIndex(Current, Total, false, true) && Total > 0) {
+  if (GetIndexE(Current, Total, false, true) && Total > 0) {
      if (!visible) {
         displayReplay = Skins.Current()->DisplayReplay(modeOnly);
         displayReplay->SetMarks(&marks);
diff -Naur vdr-1.3.29-LiveBuffer-0.0.7/player.h vdr-1.3.29-LiveBuffer-0.0.7E/player.h
--- vdr-1.3.29-LiveBuffer-0.0.7/player.h	2005-08-18 20:29:07.000000000 +0200
+++ vdr-1.3.29-LiveBuffer-0.0.7E/player.h	2005-08-18 19:10:50.000000000 +0200
@@ -44,7 +44,8 @@
   cPlayer(ePlayMode PlayMode = pmAudioVideo);
   virtual ~cPlayer();
   bool IsAttached(void) { return device != NULL; }
-  virtual bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false, bool onlyExisting = false) { return false; }
+  virtual bool GetIndex(int &Current, int &Total, bool SnapToIFrame = false) { return false; }
+  virtual bool GetIndexE(int &Current, int &Total, bool SnapToIFrame = false, bool onlyExisting = false) { return false; }
        // Returns the current and total frame index, optionally snapped to the
        // nearest I-frame.
   virtual bool GetReplayMode(bool &Play, bool &Forward, int &Speed) { return false; }


More information about the vdr mailing list