Hi,
gda
naja, Variante 1 ist nicht sooo schlimm (bis auf die Binary, ok) variante 2 evlt auch nicht, da will ich meine hand aber nichts für ins feuer legen.
DPatch 1 sieht so aus:
#! /bin/sh /usr/share/dpatch/dpatch-run
## Mcli-Patch-Patch.dpatch by <root@vdr-srv.fritz.box>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
Index: plugin.h
===================================================================
--- vdr/plugin.h (revision 2072)
+++ vdr/plugin.h (working copy)
@@ -45,7 +45,8 @@
virtual const char *MainMenuEntry(void);
virtual cOsdObject *MainMenuAction(void);
-
+ virtual cOsdObject *AltMenuAction(void) { return NULL; };
+
virtual cMenuSetupPage *SetupMenu(void);
virtual bool SetupParse(const char *Name, const char *Value);
void SetupStore(const char *Name, const char *Value = NULL);
Index: vdr.c
===================================================================
--- vdr/vdr.c (revision 2072)
+++ vdr/vdr.c (working copy)
@@ -929,6 +929,19 @@
Recordings.Update();
DeletedRecordings.Update();
}
+ cPlugin *mcliPlugin = cPluginManager::GetPlugin("mcli");
+ if (mcliPlugin) {
+ if (!ShutdownHandler.countdown) { // if kPower has been pressed, cMenuShutdown takes precedence over other menus
+ cOsdObject *MyMenu = mcliPlugin->AltMenuAction();
+ if (MyMenu) { // is there any cam-menu waiting?
+ DELETE_MENU;
+ if (cControl::Control())
+ cControl::Control()->Hide();
+ Menu = MyMenu;
+ Menu->Show();
+ }
+ }
+ }
// CAM control:
if (!Menu && !cOsd::IsOpen())
Menu = CamControl();
Alles anzeigen
Dpatch2 so:
#! /bin/sh /usr/share/dpatch/dpatch-run
## Mcli-Patch-Patch.dpatch by <root@vdr-srv.fritz.box>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
Index: vdr-1.6.0-nocamdevices/device.c
===================================================================
--- vdr-1.6.0-nocamdevices/device.c
+++ vdr-1.6.0-nocamdevices/device.c 2008-04-27 18:55:37.000000000 +0300
@@ -363,6 +363,7 @@
int NumCamSlots = CamSlots.Count();
int SlotPriority[NumCamSlots];
int NumUsableSlots = 0;
+ bool InternalCamNeeded = false;
if (Channel->Ca() >= CA_ENCRYPTED_MIN) {
for (cCamSlot *CamSlot = CamSlots.First(); CamSlot; CamSlot = CamSlots.Next(CamSlot)) {
SlotPriority[CamSlot->Index()] = MAXPRIORITY + 1; // assumes it can't be used
@@ -376,7 +377,7 @@
}
}
if (!NumUsableSlots)
- return NULL; // no CAM is able to decrypt this channel
+ InternalCamNeeded = true; // no CAM is able to decrypt this channel
}
bool NeedsDetachReceivers = false;
@@ -392,11 +393,13 @@
continue; // this device shall be temporarily avoided
if (Channel->Ca() && Channel->Ca() <= CA_DVB_MAX && Channel->Ca() != device[i]->CardIndex() + 1)
continue; // a specific card was requested, but not this one
- if (NumUsableSlots && !CamSlots.Get(j)->Assign(device[i], true))
+ if (InternalCamNeeded && !device[i]->HasInternalCam())
+ continue; // no CAM is able to decrypt this channel and the device uses vdr handled CAMs
+ if (NumUsableSlots && !device[i]->HasInternalCam() && !CamSlots.Get(j)->Assign(device[i], true))
continue; // CAM slot can't be used with this device
bool ndr;
if (device[i]->ProvidesChannel(Channel, Priority, &ndr)) { // this device is basicly able to do the job
- if (NumUsableSlots && device[i]->CamSlot() && device[i]->CamSlot() != CamSlots.Get(j))
+ if (NumUsableSlots && !device[i]->HasInternalCam() && device[i]->CamSlot() && device[i]->CamSlot() != CamSlots.Get(j))
ndr = true; // using a different CAM slot requires detaching receivers
// Put together an integer number that reflects the "impact" using
// this device would have on the overall system. Each condition is represented
@@ -410,18 +413,18 @@
imp <<= 1; imp |= device[i]->Receiving(); // avoid devices that are receiving
imp <<= 1; imp |= device[i] == cTransferControl::ReceiverDevice(); // avoid the Transfer Mode receiver device
imp <<= 8; imp |= min(max(device[i]->Priority() + MAXPRIORITY, 0), 0xFF); // use the device with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used)
- imp <<= 8; imp |= min(max((NumUsableSlots ? SlotPriority[j] : 0) + MAXPRIORITY, 0), 0xFF); // use the CAM slot with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used)
+ imp <<= 8; imp |= min(max(((NumUsableSlots && !device[i]->HasInternalCam()) ? SlotPriority[j] : 0) + MAXPRIORITY, 0), 0xFF); // use the CAM slot with the lowest priority (+MAXPRIORITY to assure that values -99..99 can be used)
imp <<= 1; imp |= ndr; // avoid devices if we need to detach existing receivers
imp <<= 1; imp |= device[i]->IsPrimaryDevice(); // avoid the primary device
- imp <<= 1; imp |= NumUsableSlots ? 0 : device[i]->HasCi(); // avoid cards with Common Interface for FTA channels
+ imp <<= 1; imp |= (NumUsableSlots || InternalCamNeeded) ? 0 : device[i]->HasCi(); // avoid cards with Common Interface for FTA channels
imp <<= 1; imp |= device[i]->HasDecoder(); // avoid full featured cards
- imp <<= 1; imp |= NumUsableSlots ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel
+ imp <<= 1; imp |= (NumUsableSlots && !device[i]->HasInternalCam()) ? !ChannelCamRelations.CamDecrypt(Channel->GetChannelID(), j + 1) : 0; // prefer CAMs that are known to decrypt this channel
if (imp < Impact) {
// This device has less impact than any previous one, so we take it.
Impact = imp;
d = device[i];
NeedsDetachReceivers = ndr;
- if (NumUsableSlots)
+ if (NumUsableSlots && !device[i]->HasInternalCam())
s = CamSlots.Get(j);
}
}
Index: vdr-1.6.0-nocamdevices/device.h
===================================================================
--- vdr-1.6.0-nocamdevices/device.h
+++ vdr-1.6.0-nocamdevices/device.h 2008-04-27 18:55:49.000000000 +0300
@@ -335,6 +335,12 @@
public:
virtual bool HasCi(void);
///< Returns true if this device has a Common Interface.
+ virtual bool HasInternalCam(void) { return false; }
+ ///< Returns true if this device handles encrypted channels itself
+ ///< without VDR assistance. This can be e.g. when the device is a
+ ///< client that gets the stream from another VDR instance that has
+ ///< already decrypted the stream. In this case ProvidesChannel()
+ ///< shall check whether the channel can be decrypted.
void SetCamSlot(cCamSlot *CamSlot);
///< Sets the given CamSlot to be used with this device.
cCamSlot *CamSlot(void) const { return camSlot; }
Alles anzeigen
Überschaubar....
Die probleme beim plugin sind NUR wenn es auch geladen ist bemerkbar. Ich habe meinen VDR vor langer Zeit gepacht OHNE das Plugin zu aktivieren... Ich werd mal Reelschorsch bzw Deti hierin lozen, die kennen sich da besser aus
Das böse plugin läuft übrigens aus einem einfachen grund nicht, es ist beim starten des VDR kein device verfügbar und das böse plugin verhindert somit den vdr start. Es gibt in div. Foren versuche (die auch mit dem reelvdr klappen) das in den griff zu bekommen, ich blick da aber nicht durch. Aber mal ehrlich, das böse plugin nutzt ja eh keiner
MfG
Kris
Edit
habe deti und real_schorch per PN auf diesem Thread aufmerksam gemacht