Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/7.3-dev' into 7.3-dev-sigc3
Browse files Browse the repository at this point in the history
  • Loading branch information
henrylicious committed Apr 9, 2024
2 parents c4328a4 + c4c079a commit 9cfc1bc
Show file tree
Hide file tree
Showing 100 changed files with 5,753 additions and 931 deletions.
3 changes: 1 addition & 2 deletions data/keymap.xml
Original file line number Diff line number Diff line change
Expand Up @@ -387,7 +387,6 @@
</map>

<map context="InfobarSubserviceSelectionActions">
<key id="KEY_SUBTITLE" mapto="subserviceSelection" flags="b"/>
<key id="KEY_GREEN" mapto="subserviceSelection" flags="b" />
</map>

Expand Down Expand Up @@ -600,7 +599,7 @@

<map context="TvRadioActions">
<key id="KEY_TV" mapto="keyTV" flags="b" />
<key id="KEY_TV2" mapto="keyTV" flags="b" />
<key id="KEY_TV2" mapto="toggleTvRadio" flags="b" />
<key id="KEY_RADIO" mapto="keyRadio" flags="b" />
<key id="KEY_AUDIO" mapto="audio" flags="b" />
</map>
Expand Down
20 changes: 2 additions & 18 deletions lib/dvb/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
#include <dvbsi++/satellite_delivery_system_descriptor.h>
#include <dvbsi++/s2_satellite_delivery_system_descriptor.h>
#include <dirent.h>
#include <lib/nav/core.h>

/*
* Copyright (C) 2017 Marcus Metzler <[email protected]>
Expand Down Expand Up @@ -222,35 +221,20 @@ bool eDVBService::isCrypted()

int eDVBService::isPlayable(const eServiceReference &ref, const eServiceReference &ignore, bool simulate)
{
eServiceReferenceDVB sRelayOrigSref;
ePtr<iPlayableService> refCur;
eNavigation::getInstance()->getCurrentService(refCur);
ePtr<iServiceInformation> tmp_info;
refCur->info(tmp_info);
std::string ref_s = tmp_info->getInfoString(iServiceInformation::sServiceref);
eServiceReferenceDVB currentlyPlaying = eServiceReferenceDVB(ref_s);
bool res = currentlyPlaying.getSROriginal(sRelayOrigSref);

ePtr<eDVBResourceManager> res_mgr;
bool remote_fallback_enabled = eConfigManager::getConfigBoolValue("config.usage.remote_fallback_enabled", false);

if (eDVBResourceManager::getInstance(res_mgr))
eDebug("[eDVBService] isPlayble... no res manager!!");
else
{
eDVBChannelID chid, chid_ignore, chid_ignore_sr;
eDVBChannelID chid, chid_ignore;
int system;

((const eServiceReferenceDVB&)ref).getChannelID(chid);
((const eServiceReferenceDVB&)ignore).getChannelID(chid_ignore);

if (res) {
sRelayOrigSref.getChannelID(chid_ignore_sr);
} else {
chid_ignore_sr = eDVBChannelID();
}

if (res_mgr->canAllocateChannel(chid, chid_ignore, chid_ignore_sr, system, simulate))
if (res_mgr->canAllocateChannel(chid, chid_ignore, system, simulate))
{
bool use_ci_assignment = eConfigManager::getConfigBoolValue("config.misc.use_ci_assignment", false);
if (use_ci_assignment)
Expand Down
20 changes: 3 additions & 17 deletions lib/dvb/dvb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#include <linux/dvb/dmx.h>
#include <linux/dvb/version.h>

#include <lib/base/cfile.h>
#include <lib/base/eerror.h>
#include <lib/base/estring.h>
#include <lib/base/wrappers.h>
Expand Down Expand Up @@ -1434,17 +1435,16 @@ int tuner_type_channel_default(ePtr<iDVBChannelList> &channellist, const eDVBCha
return 0;
}

int eDVBResourceManager::canAllocateChannel(const eDVBChannelID &channelid, const eDVBChannelID& ignore, const eDVBChannelID& ignoresr, int &system, bool simulate)
int eDVBResourceManager::canAllocateChannel(const eDVBChannelID &channelid, const eDVBChannelID& ignore, int &system, bool simulate)
{
std::list<active_channel> &active_channels = simulate ? m_active_simulate_channels : m_active_channels;
int ret = 0;
system = iDVBFrontend::feSatellite;
if (!simulate && m_cached_channel)
{
eDVBChannel *cache_chan = (eDVBChannel*)&(*m_cached_channel);
if(channelid==cache_chan->getChannelID()) {
if(channelid==cache_chan->getChannelID())
return tuner_type_channel_default(m_list, channelid, system);
}
}

/* first, check if a channel is already existing. */
Expand All @@ -1466,7 +1466,6 @@ int eDVBResourceManager::canAllocateChannel(const eDVBChannelID &channelid, cons
std::vector<int*> fcc_decremented_fe_usecounts;
std::map<eDVBChannelID, int> fcc_chids;
int apply_to_ignore = 0;
int apply_to_ignoresr = 0;
if (!eFCCServiceManager::getFCCChannelID(fcc_chids))
{
for (std::map<eDVBChannelID, int>::iterator i(fcc_chids.begin()); i != fcc_chids.end(); ++i)
Expand Down Expand Up @@ -1513,18 +1512,6 @@ int eDVBResourceManager::canAllocateChannel(const eDVBChannelID &channelid, cons
}
}

// For stream relayed channel make a check is it in the available channels and if it is ignore it
if (ignoresr) {
for (std::list<active_channel>::iterator i(active_channels.begin()); i != active_channels.end(); ++i)
{
if (i->m_channel_id == ignoresr)
{
apply_to_ignoresr = 1;
break;
}
}
}

for (std::list<active_channel>::iterator i(active_channels.begin()); i != active_channels.end(); ++i)
{
eSmartPtrList<eDVBRegisteredFrontend> &frontends = simulate ? m_simulate_frontend : m_frontend;
Expand All @@ -1538,7 +1525,6 @@ int eDVBResourceManager::canAllocateChannel(const eDVBChannelID &channelid, cons
// or 2 when the cached channel is not equal to the compared channel
int check_usecount = channel == &(*m_cached_channel) ? 1 : 0;
check_usecount += (apply_to_ignore+1) * 2; // one is used in eDVBServicePMTHandler and another is used in eDVBScan.
check_usecount += apply_to_ignoresr;
//eDebug("[eDVBResourceManager] canAllocateChannel channel->getUseCount() : %d , check_usecount : %d (cached : %d)", channel->getUseCount(), check_usecount, channel == &(*m_cached_channel));
if (channel->getUseCount() == check_usecount) // channel only used once..(except fcc)
{
Expand Down
3 changes: 2 additions & 1 deletion lib/dvb/dvb.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@ class eDVBResourceManager: public iObject, public sigc::trackable
ePtr<iDVBChannelList> m_list;
ePtr<iDVBSatelliteEquipmentControl> m_sec;
static eDVBResourceManager *instance;

friend class eDVBChannel;
friend class eFBCTunerManager;
ePtr<eFBCTunerManager> m_fbcmng;
Expand Down Expand Up @@ -215,7 +216,7 @@ class eDVBResourceManager: public iObject, public sigc::trackable
};

RESULT connectChannelAdded(const sigc::slot<void(eDVBChannel*)> &channelAdded, ePtr<eConnection> &connection);
int canAllocateChannel(const eDVBChannelID &channelid, const eDVBChannelID &ignore, const eDVBChannelID& ignoresr, int &system, bool simulate=false);
int canAllocateChannel(const eDVBChannelID &channelid, const eDVBChannelID &ignore, int &system, bool simulate=false);

/* allocate channel... */
RESULT allocateChannel(const eDVBChannelID &channelid, eUsePtr<iDVBChannel> &channel, bool simulate=false);
Expand Down
12 changes: 9 additions & 3 deletions lib/dvb/pmt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,15 @@
#include <dvbsi++/application_descriptor.h>

#define PACK_VERSION(major,minor,micro) (((major) << 16) + ((minor) << 8) + (micro))
#define UNPACK_VERSION(version,major,minor,micro) { \
major = (version)&0xff; \
minor = (version>>8)&0xff; \
micro = (version>>16)&0xff; \
}

eDVBServicePMTHandler::eDVBServicePMTHandler()
:m_ca_servicePtr(0), m_dvb_scan(0), m_decode_demux_num(0xFF), m_no_pat_entry_delay(eTimer::create())
:m_last_channel_state(-1), m_ca_servicePtr(0), m_dvb_scan(0), m_decode_demux_num(0xFF),
m_no_pat_entry_delay(eTimer::create()), m_have_cached_program(false)
{
m_use_decode_demux = 0;
m_pmt_pid = -1;
Expand Down Expand Up @@ -524,7 +530,7 @@ PyObject *eDVBServicePMTHandler::getHbbTVApplications()

int eDVBServicePMTHandler::getProgramInfo(program &program)
{
ePtr<eTable<ProgramMapSection> > ptr;
// ePtr<eTable<ProgramMapSection> > ptr;
int cached_apid_ac3 = -1;
int cached_apid_ac4 = -1;
int cached_apid_ddp = -1;
Expand Down Expand Up @@ -1127,7 +1133,7 @@ int eDVBServicePMTHandler::tuneExt(eServiceReferenceDVB &ref, ePtr<iTsSource> &s
if (isStreamRelay) {
sRelayOrigSref.getChannelID(chid);
res = m_resourceManager->allocateChannel(chid, m_sr_channel, simulate);
}
}


if (m_sr_channel) {
Expand Down
2 changes: 2 additions & 0 deletions lib/gdi/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gdi_libenigma_gdi_a_SOURCES = \
gdi/accel.cpp \
gdi/bcm.cpp \
gdi/compositing.cpp \
gdi/drawing.cpp \
gdi/epng.cpp \
gdi/erect.cpp \
gdi/fb.cpp \
Expand All @@ -27,6 +28,7 @@ gdiincludedir = $(pkgincludedir)/lib/gdi
gdiinclude_HEADERS = \
gdi/accel.h \
gdi/compositing.h \
gdi/drawing.h \
gdi/epng.h \
gdi/epoint.h \
gdi/erect.h \
Expand Down
Loading

0 comments on commit 9cfc1bc

Please sign in to comment.