lcd4l: add camd info

Origin commit data
------------------
Branch: ni/coolstream
Commit: b2c46f2333
Author: vanhofen <vanhofen@gmx.de>
Date: 2021-07-14 (Wed, 14 Jul 2021)

Origin message was:
------------------
- lcd4l: add camd info

------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2021-07-14 23:57:34 +02:00
parent aa166a4bf6
commit 2799c259fb
2 changed files with 24 additions and 0 deletions

View File

@@ -83,6 +83,7 @@ extern CPictureViewer *g_PicViewer;
#define MODE_TSHIFT LCD_DATADIR "mode_tshift"
#define MODE_TIMER LCD_DATADIR "mode_timer"
#define MODE_ECM LCD_DATADIR "mode_ecm"
#define MODE_CAMD LCD_DATADIR "mode_camd"
#define MODE_CAM LCD_DATADIR "mode_cam"
#define SERVICE LCD_DATADIR "service"
@@ -270,6 +271,7 @@ void CLCD4l::Init()
m_ModeTshift = -1;
m_ModeTimer = -1;
m_ModeEcm = -1;
m_ModeCamd = "n/a";
m_ModeCamPresent = false;
m_ModeCam = -1;
@@ -637,6 +639,27 @@ void CLCD4l::ParseInfo(uint64_t parseID, bool newID, bool firstRun)
/* ----------------------------------------------------------------- */
std::string ModeCamd = "";
const char *camd[] = {"mgcamd","doscam","ncam","osmod","oscam","cccam","gbox"};
for (int i=0; i < (int)(sizeof(camd)/sizeof(camd[0])); i++)
{
if (getpidof(camd[i]))
{
ModeCamd += camd[i];
ModeCamd += "\n";
}
}
if (m_ModeCamd != ModeCamd)
{
WriteFile(MODE_CAMD, ModeCamd);
m_ModeCamd = ModeCamd;
}
/* ----------------------------------------------------------------- */
if (firstRun) //FIXME; what if module is added/removed while lcd4l is running?
{
for (unsigned int i = 0; i < cCA::GetInstance()->GetNumberCISlots(); i++)

View File

@@ -115,6 +115,7 @@ class CLCD4l
int m_ModeTshift;
int m_ModeTimer;
int m_ModeEcm;
std::string m_ModeCamd;
bool m_ModeCamPresent;
int m_ModeCam;