From patchwork Thu Aug 18 18:52:53 2005 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Thomas_G=C3=BCnther?= X-Patchwork-Id: 11982 Received: from moutng.kundenserver.de ([212.227.126.171]) by www.linuxtv.org with esmtp (Exim 4.34) id 1E5pVe-0007xr-92 for vdr@linuxtv.org; Thu, 18 Aug 2005 20:53:02 +0200 Received: from port-212-202-165-214.static.qsc.de [212.202.165.214] (helo=[127.0.0.1]) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0MKwh2-1E5pVZ2CsI-0001WO; Thu, 18 Aug 2005 20:52:57 +0200 Message-ID: <4304D905.204@toms-cafe.de> Date: Thu, 18 Aug 2005 20:52:53 +0200 From: =?ISO-8859-1?Q?Thomas_G=FCnther?= User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) X-Accept-Language: de-DE, de, en-us, en MIME-Version: 1.0 To: Klaus Schmidinger's VDR Subject: Re: [vdr] VDR LiveBuffer Patch References: <4304A867.1040503@syphir.sytes.net> In-Reply-To: <4304A867.1040503@syphir.sytes.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:0420603a5883296add7cedafc48e0fba X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Klaus Schmidinger's VDR List-Id: Klaus Schmidinger's VDR List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Aug 2005 18:53:02 -0000 Status: O X-Status: X-Keywords: X-UID: 4257 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 #!/bin/sh /usr/share/dpatch/dpatch-run ## opt-43_LiveBufferE.dpatch by Thomas Günther ## ## 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; }