Ideally, I'd like a way to "ask vdr" the status of the CAM from a script. I know this is available on the OSD by going into the "SETUP > CAM" menu where the CAM is displayed as "CAM Ready", "CAM Present" or "Alhpacrypt" but I need to do this outside the OSD.
Anyone have any ideas how to do this?
I'd like to write a plugin which can provide the displayed Setup>CAM status via an SVDRP command, and maybe check the CAM menu can be accessed.
As a beginner to such things, can someone help?
I want to use svdrpdemo as the starting point. What else do I need to include in this? #include "menu.h" #include "svdrpservice.h" (from femon plugin) ??
If I pull some of the following from menu.c I think this should give me what I want:
Get list of availablecams: void cMenuCam::GenerateTitle(const char *s) { SetTitle(cString::sprintf("CAM %d - %s", camSlot->SlotNumber(), (s && *s) ? s : camSlot->GetCamName())); }
Get the CAM status (being Ready, Present, -, or "Alphacrypt" etc: bool cMenuSetupCAMItem::Changed(void) { char buffer[32]; const char *CamName = camSlot->GetCamName(); if (!CamName) { switch (camSlot->ModuleStatus()) { case msReset: CamName = tr("CAM reset"); break; case msPresent: CamName = tr("CAM present"); break; case msReady: CamName = tr("CAM ready"); break; default: CamName = "-"; break; } } snprintf(buffer, sizeof(buffer), " %d %s", camSlot->SlotNumber(), CamName); if (strcmp(buffer, Text()) != 0) { SetText(buffer); return true; } return false; }
Can anyone help me on this?