Skip to content

Commit

Permalink
Merge branch 'master' into GUIUpdates
Browse files Browse the repository at this point in the history
* master: (23 commits)
  Revert "add vti workaroud"
  Sync with Pli/Vix (#2938)
  [MenuList] * partialy revert aa2c1a7
  add vti workaroud
  [ServiceScan.py] Update after this commit aa2c1a7!
  [dvbci_ccmgr_helper] * Replace call to the non reentrant function "localtime" by a call to "localtime_r".
  ci add ci+ 1.4 support
  [skin.py] Small corrections and adjustments
  [TemplatedMultiContent.py] Sort imports
  [MultiContent.py] Remove unneeded import
  [eListbox] * rename setSpacerColor -> setSpacingColor
  GUI Updates (#2943)
  [Geolocation.py] Code updates (#2950)
  [main] * checkInternetAccess change return codes to:
  [Timers] * remove duplicate getSpace
  Unicable connected (#2949)
  [enigma] (#2947)
  Changed graphical EPG to only load event data for visible channels.
  [StackTrace.py] Small code clean up
  multiboot fix slot R target selection for kexecmultiboot
  ...
  • Loading branch information
jbleyel committed Jun 26, 2023
2 parents 487db73 + 8241cb1 commit 6245997
Show file tree
Hide file tree
Showing 91 changed files with 4,628 additions and 1,575 deletions.
1 change: 1 addition & 0 deletions .github/workflows/SonarCloud.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ jobs:
sudo apt-get install libavahi-client-dev
sudo apt-get install libjpeg-turbo8-dev
sudo apt-get install libgif-dev
sudo apt-get install libcurl4-openssl-dev
- uses: actions/checkout@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/enigma2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
sudo apt-get install libavahi-client-dev
sudo apt-get install libjpeg-turbo8-dev
sudo apt-get install libgif-dev
sudo apt-get install libcurl4-openssl-dev
- uses: actions/checkout@v3

Expand Down
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ AC_ARG_WITH(gstversion,

PKG_CHECK_MODULES(TUXTXT, tuxbox-tuxtxt)
PKG_CHECK_MODULES(GSTREAMER, gstreamer-$GST_MAJORMINOR gstreamer-pbutils-$GST_MAJORMINOR)
PKG_CHECK_MODULES(BASE, [freetype2 fribidi gstreamer-$GST_MAJORMINOR gstreamer-pbutils-$GST_MAJORMINOR libdvbsi++ libpng libxml-2.0 sigc++-2.0 libssl libcrypto])
PKG_CHECK_MODULES(BASE, [freetype2 fribidi gstreamer-$GST_MAJORMINOR gstreamer-pbutils-$GST_MAJORMINOR libdvbsi++ libpng libxml-2.0 sigc++-2.0 libssl libcrypto libcurl])
PKG_CHECK_MODULES(LIBDDVD, libdreamdvd, HAVE_LIBDDVD="yes", HAVE_LIBDDVD="no")
AM_CONDITIONAL(HAVE_LIBDDVD, test "$HAVE_LIBDDVD" = "yes")
PKG_CHECK_MODULES(AVAHI, avahi-client)
Expand Down
1 change: 0 additions & 1 deletion data/menu.xml
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,6 @@ self.session.openWithCallback(msgClosed, EpgDeleteMsg)
<item key="softcam_settings" level="0" text="Softcam Settings" weight="50" requires="HAVEINITCAM"><screen module="SoftcamSetup" screen="SoftcamSetup" /></item>
<item key="oscam_info" level="0" text="OScam Information" weight="60" requires="ShowOscamInfo"><screen module="OScamInfo" screen="OscamInfoMenu" /></item>
<item key="cccam_info" level="0" text="CCCam Information" weight="70" requires="ShowCCCamInfo"><screen module="CCcamInfo" screen="CCcamInfoMain" /></item>
<item key="ci_settings" level="1" text="CI Basic Settings" weight="80" requires="CommonInterface"><setup setupKey="CISettings" /></item>
<item key="ci_setup" level="1" text="CI Helper Settings" weight="90" requires="CIHelper"><screen module="Ci" screen="CIHelper" /></item>
<item key="ci_selection" level="1" text="Common Interface Settings" weight="100" requires="CommonInterface"><screen module="Ci" screen="CiSelection" /></item>
<item key="parental_setup" level="0" text="Parental Control Settings" weight="200"><screen module="ParentalControlSetup" screen="ParentalControlSetup" /></item>
Expand Down
9 changes: 1 addition & 8 deletions data/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -104,14 +104,6 @@
<item level="2" text="Number of digits in channel number" description="This allows you to set the number of digits to 5, if you have more than 9999 channels.">config.usage.maxchannelnumlen</item>
<item level="0" text="Set action for 'Info' key" description="Here you can set what is called when pressing the 'Info' key.">config.usage.servicelist_infokey</item>
</setup>
<setup key="CISettings" title="CI Basic Settings" requires="CommonInterface" showOpenWebif="1">
<item level="1" text="DVB CI Delay" description="Choose dvb wait delay for ci response." requires="CommonInterfaceCIDelay">config.cimisc.dvbCiDelay</item>
<if requires="HaveCISSL">
<item level="1" text="CI Operation Mode" description="Choose the CI protocol operation mode for standard ci or ciplus.">config.cimisc.civersion</item>
<else />
<item level="1" text="CI Operation Mode" description="Your Hardware can detect ci mode self or work only in legacy mode.">config.cimisc.civersion</item>
</if>
</setup>
<setup key="Display" title="Display Settings" requires="FrontpanelDisplay" showOpenWebif="1">
<item level="0" text="Clone TV screen to LCD" description="Shows live tv or informations on LCD." requires="FBLCDDisplay">config.lcd.fblcddisplay</item>
<item level="0" text="Brightness (Normal)" description="Configure the brightness level of the front panel display for normal operation.">config.lcd.bright</item>
Expand Down Expand Up @@ -887,6 +879,7 @@
<item level="0" text="Show transponder remaining/elapsed as" description="This option allows you choose how to display the remaining/elapsed time for live tv.">config.usage.swap_time_display_on_osd</item>
<item level="0" text="Media playback Remaining/Elapsed as" description="This option allows you choose how to display the remaining/elapsed time for media playback.">config.usage.swap_media_time_display_on_osd</item>
<item level="2" text="Hide zap errors" description="Hide any zap error messages.">config.usage.hide_zap_errors</item>
<item level="2" text="Hide CI messages" description="Hide error messages from the Common Interface module.">config.usage.hide_ci_messages</item>
<item level="2" text="Show crypto info in InfoBar" description="Show encryption information in the InfoBar (when supported by the skin).">config.usage.show_cryptoinfo</item>
<item level="2" text="InfoBar front end data source" description="Configure the source of the frontend data as shown on the infobars. 'Settings' is as stored on the settings. 'Tuner' is as reported by the tuner.">config.usage.infobar_frontend_source</item>
<item level="2" text="Swap SNR in '&#37;' with SNR in 'db'" description="This option allows you to the SNR as a percentage (not all receivers support this).">config.usage.swap_snr_on_osd</item>
Expand Down
4 changes: 2 additions & 2 deletions lib/actions/action.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -314,8 +314,8 @@ void eActionMap::keyPressed(const std::string &device, int key, int flags)
{
//eDebug("[eActionMap] python wildcard.");
ePyObject pArgs = PyTuple_New(2);
PyTuple_SET_ITEM(pArgs, 0, PyInt_FromLong(key));
PyTuple_SET_ITEM(pArgs, 1, PyInt_FromLong(flags));
PyTuple_SET_ITEM(pArgs, 0, PyLong_FromLong(key));
PyTuple_SET_ITEM(pArgs, 1, PyLong_FromLong(flags));
Py_INCREF(c->second.m_fnc);
call_list.push_back(call_entry(c->second.m_fnc, pArgs));
}
Expand Down
4 changes: 2 additions & 2 deletions lib/base/ebase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,8 @@ int eMainloop::processOneEvent(long user_timeout, PyObject **res, ePyObject addi
if (!*res) // NOSONAR
*res = PyList_New(0);
ePyObject it = PyTuple_New(2);
PyTuple_SET_ITEM(it, 0, PyInt_FromLong(pfd[i].fd));
PyTuple_SET_ITEM(it, 1, PyInt_FromLong(pfd[i].revents));
PyTuple_SET_ITEM(it, 0, PyLong_FromLong(pfd[i].fd));
PyTuple_SET_ITEM(it, 1, PyLong_FromLong(pfd[i].revents));
PyList_Append(*res, it);
Py_DECREF(it);
}
Expand Down
73 changes: 56 additions & 17 deletions lib/dvb/cahandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ void eDVBCAHandler::connectionLost(ePMTClient *client)
}
}

int eDVBCAHandler::getNumberOfCAServices()
{
return services.size();
}

int eDVBCAHandler::registerService(const eServiceReferenceDVB &ref, int adapter, int demux_nums[2], int servicetype, eDVBCAService *&caservice)
{
CAServiceMap::iterator it = services.find(ref);
Expand Down Expand Up @@ -308,7 +313,7 @@ int eDVBCAHandler::registerService(const eServiceReferenceDVB &ref, int adapter,
return 0;
}

int eDVBCAHandler::unregisterService(const eServiceReferenceDVB &ref, int adapter, int demux_nums[2], eTable<ProgramMapSection> *ptr)
int eDVBCAHandler::unregisterService(const eServiceReferenceDVB &ref, int adapter, int demux_nums[2], int servicetype, eTable<ProgramMapSection> *ptr)
{
CAServiceMap::iterator it = services.find(ref);
if (it == services.end())
Expand All @@ -319,6 +324,8 @@ int eDVBCAHandler::unregisterService(const eServiceReferenceDVB &ref, int adapte
else
{
eDVBCAService *caservice = it->second;
caservice->removeServiceType(servicetype);

int loops = demux_nums[0] != demux_nums[1] ? 2 : 1;
for (int i = 0; i < loops; ++i)
{
Expand Down Expand Up @@ -352,6 +359,12 @@ int eDVBCAHandler::unregisterService(const eServiceReferenceDVB &ref, int adapte
{
delete it->second;
services.erase(it);

/*
* this service is completely removed, so we distribute
* a new list of CAPMT objects to all our clients
*/
distributeCAPMT();
}
else
{
Expand All @@ -374,8 +387,7 @@ int eDVBCAHandler::unregisterService(const eServiceReferenceDVB &ref, int adapte
serviceLeft->startLongTimer(2);

usedcaid(0);
/* our servicelist has changed, distribute the list of CAPMT objects to all our clients */
distributeCAPMT();

return 0;
}

Expand Down Expand Up @@ -432,7 +444,10 @@ void eDVBCAHandler::processPMTForService(eDVBCAService *service, eTable<ProgramM

if (isUpdate)
{
/* this is a PMT update, we should distribute the new CAPMT object to all our connected clients */
/*
* this is a PMT update for an existing service, so we should
* send the updated CAPMT object to all our connected clients
*/
for (ePtrList<ePMTClient>::iterator client_it = clients.begin(); client_it != clients.end(); ++client_it)
{
if (client_it->state() == eSocket::Connection)
Expand All @@ -444,10 +459,18 @@ void eDVBCAHandler::processPMTForService(eDVBCAService *service, eTable<ProgramM
else
{
/*
* this is PMT information for a new service, so we can now distribute
* the CAPMT objects to all our connected clients
* this is PMT information for a new service, so we should
* send the new CAPMT object to all our connected clients
*/
distributeCAPMT();
int list_management = (getNumberOfCAServices() == 1) ? LIST_ONLY : LIST_ADD;

for (ePtrList<ePMTClient>::iterator client_it = clients.begin(); client_it != clients.end(); ++client_it)
{
if (client_it->state() == eSocket::Connection)
{
service->writeCAPMTObject(*client_it, list_management);
}
}
}
}

Expand Down Expand Up @@ -539,6 +562,11 @@ void eDVBCAService::addServiceType(int type)
m_service_type_mask |= (1 << type);
}

void eDVBCAService::removeServiceType(int type)
{
m_service_type_mask ^= (1 << type);
}

void eDVBCAService::connectionLost()
{
/* reconnect in 1s */
Expand All @@ -556,7 +584,7 @@ int eDVBCAService::buildCAPMT(eTable<ProgramMapSection> *ptr)
int pmtpid = table_spec.pid,
pmt_version = table_spec.version;

uint8_t demux_mask = 0;
uint32_t demux_mask = 0;
int data_demux = -1;
uint32_t crc = 0;

Expand Down Expand Up @@ -586,11 +614,11 @@ int eDVBCAService::buildCAPMT(eTable<ProgramMapSection> *ptr)
build_hash <<= 16;
build_hash |= pmtpid;
build_hash <<= 8;
build_hash |= demux_mask;
build_hash |= (demux_mask & 0xff);
build_hash <<= 8;
build_hash |= (pmt_version & 0xff);
build_hash <<= 16;
build_hash |= (m_service_type_mask & 0xffff);
//build_hash <<= 16;
//build_hash |= (m_service_type_mask & 0xffff); // don't include in build_hash

bool scrambled = false;
for (std::vector<ProgramMapSection*>::const_iterator pmt = ptr->getSections().begin();
Expand Down Expand Up @@ -651,7 +679,7 @@ int eDVBCAService::buildCAPMT(eTable<ProgramMapSection> *ptr)

tmp[0] = 0x82; // demux
tmp[1] = 0x02;
tmp[2] = demux_mask; // descramble bitmask
tmp[2] = demux_mask&0xFF; // descramble bitmask
tmp[3] = data_demux&0xFF; // read section data from demux number
capmt.injectDescriptor(tmp, false);

Expand All @@ -675,6 +703,11 @@ int eDVBCAService::buildCAPMT(eTable<ProgramMapSection> *ptr)
tmp[5] = m_service_type_mask & 0xff;
capmt.injectDescriptor(tmp, true);

tmp[0] = 0x86; // demux only
tmp[1] = 0x01;
tmp[2] = data_demux&0xFF; // read section data from demux number
capmt.injectDescriptor(tmp, true);

ePtr<eDVBService> dvbservice;
if (!scrambled && !eDVBDB::getInstance()->getService(m_service, dvbservice))
{
Expand Down Expand Up @@ -718,7 +751,7 @@ int eDVBCAService::buildCAPMT(eTable<ProgramMapSection> *ptr)
int eDVBCAService::buildCAPMT(ePtr<eDVBService> &dvbservice)
{
int pmt_version = 0;
uint8_t demux_mask = 0;
uint32_t demux_mask = 0;
int data_demux = -1;
uint32_t crc = 0;

Expand Down Expand Up @@ -754,11 +787,11 @@ int eDVBCAService::buildCAPMT(ePtr<eDVBService> &dvbservice)
build_hash <<= 16;
build_hash |= pmtpid;
build_hash <<= 8;
build_hash |= demux_mask;
build_hash |= (demux_mask & 0xff);
build_hash <<= 8;
build_hash |= (pmt_version & 0xff);
build_hash <<= 16;
build_hash |= (m_service_type_mask & 0xffff);
//build_hash <<= 16;
//build_hash |= (m_service_type_mask & 0xffff); // don't include in build_hash

int pos = 0;
int programInfoLength = 0;
Expand Down Expand Up @@ -796,7 +829,7 @@ int eDVBCAService::buildCAPMT(ePtr<eDVBService> &dvbservice)

m_capmt[pos++] = 0x82; // demux
m_capmt[pos++] = 0x02;
m_capmt[pos++] = demux_mask; // descramble bitmask
m_capmt[pos++] = demux_mask&0xFF; // descramble bitmask
m_capmt[pos++] = data_demux&0xFF; // read section data from demux number

programInfoLength += 4;
Expand Down Expand Up @@ -840,6 +873,12 @@ int eDVBCAService::buildCAPMT(ePtr<eDVBService> &dvbservice)

programInfoLength += 6;

m_capmt[pos++] = 0x86; // demux
m_capmt[pos++] = 0x01;
m_capmt[pos++] = data_demux&0xFF; // read section data from demux number

programInfoLength += 3;

std::map<int,int> pidtype;

pidtype[eDVBService::cVPID] = 0x02; // Videostream (MPEG-2)
Expand Down
10 changes: 5 additions & 5 deletions lib/dvb/cahandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ class ePMTClient : public eUnixDomainSocket
class eDVBCAService: public eUnixDomainSocket
{
eServiceReferenceDVB m_service;
uint8_t m_used_demux[8];
uint8_t m_used_demux[32];
uint8_t m_adapter;
uint32_t m_service_type_mask;
uint64_t m_prev_build_hash;
Expand All @@ -122,6 +122,7 @@ class eDVBCAService: public eUnixDomainSocket
uint8_t getAdapter();
void setAdapter(uint8_t value);
void addServiceType(int type);
void removeServiceType(int type);
void sendCAPMT();
int writeCAPMTObject(eSocket *socket, int list_management = -1);
int buildCAPMT(eTable<ProgramMapSection> *ptr);
Expand All @@ -136,13 +137,11 @@ typedef std::map<eServiceReferenceDVB, eDVBCAService*> CAServiceMap;
SWIG_IGNORE(iCryptoInfo);
class iCryptoInfo : public iObject
{
#ifdef SWIG
public:
#ifdef SWIG
iCryptoInfo();
~iCryptoInfo();
private:
#endif
public:
PSignal1<void, const char*> clientname;
PSignal1<void, const char*> clientinfo;
PSignal1<void, const char*> verboseinfo;
Expand Down Expand Up @@ -176,8 +175,9 @@ DECLARE_REF(eDVBCAHandler);
#ifndef SWIG
~eDVBCAHandler();

int getNumberOfCAServices();
int registerService(const eServiceReferenceDVB &service, int adapter, int demux_nums[2], int servicetype, eDVBCAService *&caservice);
int unregisterService(const eServiceReferenceDVB &service , int adapter, int demux_nums[2], eTable<ProgramMapSection> *ptr);
int unregisterService(const eServiceReferenceDVB &service, int adapter, int demux_nums[2], int servicetype, eTable<ProgramMapSection> *ptr);
void handlePMT(const eServiceReferenceDVB &service, ePtr<eTable<ProgramMapSection> > &ptr);
void handlePMT(const eServiceReferenceDVB &service, ePtr<eDVBService> &dvbservice);
void connectionLost(ePMTClient *client);
Expand Down
Loading

0 comments on commit 6245997

Please sign in to comment.