Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/7.3-dev' into 7.3
Browse files Browse the repository at this point in the history
  • Loading branch information
teamblue-e2 committed Jan 28, 2024
2 parents 50bdc93 + eb044bf commit 8b0fe75
Show file tree
Hide file tree
Showing 81 changed files with 16,052 additions and 20,934 deletions.
6 changes: 6 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@ AC_SUBST(LIBJPEG_LIBS)
AC_CHECK_LIB([ungif], [DGifOpen], [LIBGIF_LIBS="-lungif"], [AC_CHECK_LIB([gif], [DGifOpen], [LIBGIF_LIBS="-lgif"], [AC_MSG_ERROR([Could not find libgif or libungif])])])
AC_SUBST(LIBGIF_LIBS)

AC_ARG_WITH(e2rev,
AS_HELP_STRING([--with-e2rev],[value of E2REV, $withval]),
[E2REV="$withval"],[E2REV=""])
AC_SUBST(E2REV)
AC_DEFINE_UNQUOTED(E2REV,"$E2REV",[enigma2 revision])

AC_ARG_WITH(boxtype,
[ --with-boxtype=NAME box type [[none,gb7356,gb7358...]]],
[BOXTYPE="$withval"],[BOXTYPE="gb7358"])
Expand Down
26 changes: 14 additions & 12 deletions data/setup.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,7 @@
<item level="2" text="Ignore DVB-T namespace sub network" description="On valid ONIDs, ignore frequency sub network part">config.usage.subnetwork_terrestrial</item>
<item level="2" text="Alternative URL for images listed on FlashImage" description="Enter an URL where alternative images could be listed for FlashImage." requires="canFlashWithOfgwrite">config.usage.alternative_imagefeed</item>
</setup>
<setup level="0" key="userinterface" title="Basic settings">
<item level="0" text="Show animation while busy" description="Show busy indicator when the system is busy.">config.usage.show_spinner</item>
<item level="1" text="Show positioner movement" requires="isRotorTuner" description="Configure whether or not an icon should be shown when your motorized dish is moving.">config.usage.showdish</item>
<item level="1" text="Show positioner position" requires="isRotorTuner" description="Configure whether or not a rotor position will be displayed on the infobar">config.misc.showrotorposition</item>
<item level="0" text="Include CI assignment" description="Set CI assignment for detection of available services." >config.misc.use_ci_assignment</item>
<item level="1" text="Enable multiple bouquets" description="When enabled, services may be grouped in multiple bouquets.">config.usage.multibouquet</item>
<item level="1" text="Multi-EPG bouquet selection" description="Enable bouquet selection in multi-EPG">config.usage.multiepg_ask_bouquet</item>
<item level="0" text="Alternative numbering mode" description="When enabled, channel numbering will start at '1' for each bouquet.">config.usage.alternative_number_mode</item>
<item level="2" text="Hide number markers" description="When enabled, number markers will be hidden.">config.usage.hide_number_markers</item>
<setup key="channelselection" title="Channel Selection">
<item level="2" text="Show channel numbers in channel selection" description="When enabled, show channel numbers in the channel selection screen.">config.usage.show_channel_numbers_in_servicelist</item>
<item level="2" text="Show two lines per entry" description="Show the service information on two lines in the channel selection screen. You can choose between the current event description below the channel name, or the current event description next to the channel name, and the next event description on the second line.">config.usage.servicelist_twolines</item>
<item level="1" text="Show event-progress in channel selection" description="Set the type of the progress indication in the channel selection screen.">config.usage.show_event_progress_in_servicelist</item>
Expand All @@ -77,13 +69,25 @@
<item level="1" text="Show picons in channel selection list" description="Configure if service picons will be shown in the channel selection list.">config.usage.service_icon_enable</item>
<item level="1" text="Customize channel list cursor behavior" description="Configure the cursor behaviour in the channel selection list. When opening the channel selection list you can keep on the current service or already select up/down and you are able to revert the B+/B- buttons.">config.usage.servicelist_cursor_behavior</item>
<item level="1" text="Number of channels shown in channel selection list" description="Configure how many channels are shown in the selection list.">config.usage.servicelist_number_of_services</item>
<item level="1" text="Service number font size" description="This allows you to change the font size relative to skin size, so 1 increases by 1 point size, and -1 decreases by 1 point size">config.usage.servicenum_fontsize</item>
<item level="1" text="Service name font size" description="This allows you to change the font size relative to skin size, so 1 increases by 1 point size, and -1 decreases by 1 point size">config.usage.servicename_fontsize</item>
<item level="1" text="Service info font size" description="This allows you to change the font size relative to skin size, so 1 increases by 1 point size, and -1 decreases by 1 point size">config.usage.serviceinfo_fontsize</item>
<item level="2" text="Enable OK as preview in channel selection" description="When enabled then when you select a new channel in the channel selection the channel selection will not close. It will only close when you select the current playing service. This is a kind of preview mode">config.usage.channelselection_preview</item>
</setup>
<setup key="userinterface" title="User interface">
<item level="1" text="Show animation while busy" description="Show busy indicator when the system is busy.">config.usage.show_spinner</item>
<item level="1" text="Show positioner movement" requires="isRotorTuner" description="Configure whether or not an icon should be shown when your motorized dish is moving.">config.usage.showdish</item>
<item level="1" text="Show positioner position" requires="isRotorTuner" description="Configure whether or not a rotor position will be displayed on the infobar">config.misc.showrotorposition</item>
<item level="0" text="Include CI assignment" description="Set CI assignment for detection of available services." >config.misc.use_ci_assignment</item>
<item level="1" text="Enable multiple bouquets" description="When enabled, services may be grouped in multiple bouquets.">config.usage.multibouquet</item>
<item level="1" text="Multi-EPG bouquet selection" description="Enable bouquet selection in multi-EPG">config.usage.multiepg_ask_bouquet</item>
<item level="0" text="Alternative numbering mode" description="When enabled, channel numbering will start at '1' for each bouquet.">config.usage.alternative_number_mode</item>
<item level="2" text="Enable 'neutrino' style zap controlling" description="When enabled the arrow buttons around the OK button will follow the 'neutrino' style zap controls instead of the enigma2 style.">config.usage.oldstyle_zap_controls</item>
<item level="2" text="Enable 'neutrino' style channel select controlling" description="When enabled the left, right, CH+/-, B+/-, P+/- buttons will follow the 'neutrino' style zap controls instead of the enigma2 style.">config.usage.oldstyle_channel_select_controls</item>
<item level="2" text="Enable zapping with CH+/-, B+/-, P+/-" description="When enabled you can zap channels with the CH+/-, B+/-, P+/- buttons instead of opening the channel selection list.">config.usage.zap_with_ch_buttons</item>
<item level="2" text="Enable OK for channel selection" description="When enabled you get the channel selection list via the OK button, the infobar toggle is then transfered to exit button">config.usage.ok_is_channelselection</item>
<item level="2" text="Set cursor on service from channel history" description="When enabled, then when changing bouquets, set the cursor on the service from the channel history in the channel selection list.">config.usage.changebouquet_set_history</item>
<item level="2" text="Enable volume control with arrow buttons" description="When enabled you can control the volume with the arrow buttons instead of getting the channel selection list">config.usage.volume_instead_of_channelselection</item>
<item level="2" text="Enable OK as preview in channel selection" description="When enabled then when you select a new channel in the channel selection the channel selection will not close. It will only close when you select the current playing service. This is a kind of preview mode">config.usage.channelselection_preview</item>
<item level="2" text="Change bouquets in quickzap" description="When enabled, continue to the next bouquet when the last channel of the current bouquet is reached while changing channels.">config.usage.quickzap_bouquet_change</item>
<item level="2" text="Hide channel list in radio mode" description="When enabled, the channel selection list will be hidden while listening to a radio channel">config.usage.e1like_radio_mode</item>
<item level="2" text="Auto play last service in radio mode" conditional="not config.usage.e1like_radio_mode.value" description="When enabled, it will automatically play to the last saved radio service when switching to radio mode.">config.usage.e1like_radio_mode_last_play</item>
Expand Down Expand Up @@ -112,7 +116,6 @@
<item level="2" text="Close PiP with 'exit' button" description="When enabled the Picture in Picture window can be closed with 'exit' button." requires="PIPAvailable">config.usage.pip_hideOnExit</item>
<item level="2" text="Remember last service in PiP" description="Configure if and how long the latest service in Picture in Picture mode will be remembered." requires="PIPAvailable">config.usage.pip_last_service_timeout</item>
<item level="2" text="Show VCR scart on main menu" description="When enabled, the VCR scart option will be shown on the main menu" requires="ScartSwitch">config.usage.show_vcr_scart</item>
<item level="1" text="Channel list update Eventinfo delay" description="Channel list update interval for Eventinfo on cursor moving">config.usage.servicelist_eventinfo_delay</item>
<item level="1" text="Show bootvideo on boot" requires="Bootvideo">config.usage.show_bootvideo</item>
<item level="2" text="Show True/False as graphical switch" description="Enable to display all true/false, yes/no, on/off and enable/disable set up options as a graphical switch.">config.usage.boolean_graphic</item>
</setup>
Expand Down Expand Up @@ -211,7 +214,6 @@
<item level="2" text="Always include ECM in recordings" description="Always include ECM messages in recordings. This overrides the individual timer settings globally. It allows recordings to be always decrypted afterwards (sometimes called offline decoding), if supported by your receiver. Default: off.">config.recording.always_ecm</item>
<item level="2" text="Never decrypt while recording" description="Never decrypt the content while recording. This overrides the individual timer settings globally. If enabled, recordings are stored in crypted presentation and must be decrypted afterwards (sometimes called offline decoding). Default: off.">config.recording.never_decrypt</item>
<item level="2" text="Offline decode delay (ms)" requires="HasOfflineDecoding" description="Configure the offline decoding delay in milliseconds. The configured delay is observed at each control word parity change.">config.recording.offline_decode_delay</item>
<item level="2" text="Default recording type" description="Descramble &amp; record ECM gives the option to descramble afterwards if descrambling on recording failed. 'Don't descramble, record ECM' save a scramble recording that can be descrambled on playback. 'Normal' means descramble the recording and don't record ECM.">config.recording.ecm_data</item>
<item level="0" text="Force zap to recording service in standby" description="This can be useful when using the CI(+) module. After the end of the recording, the service will be automatically stopped.">config.recording.zap_record_service_in_standby</item>
<item level="2" text="Include AIT in recordings" description="If enabled, AIT data is included in recordings.">config.recording.include_ait</item>
</setup>
Expand Down
8 changes: 0 additions & 8 deletions lib/base/cfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ int CFile::writeInt(const char *filename, int value)
return fprintf(f, "%d", value);
}

int CFile::writeStr(const char *filename, std::string value)
{
CFile f(filename, "w");
if (f)
fprintf(f, "%s", value.c_str());
return 0;
}

int CFile::write(const char *filename, const char *value)
{
CFile f(filename, "w");
Expand Down
25 changes: 2 additions & 23 deletions lib/base/cfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,37 +3,17 @@

#include <stdio.h>
#include <string>
#include <lib/base/eerror.h>

/* Wrapper around FILE to prevent leaks and to make your code a bit more OO */
struct CFile
{
FILE *handle;
CFile(const char *filename, const char *mode)
: handle(fopen(filename, mode))
{
#ifdef DEBUG
if (!handle)
{
std::string fn = filename;
std::string ext = fn.substr(fn.find_last_of('.')+1);
if( (ext != "meta") && (ext != "epl"))
eDebug("[CFile] information %s [%m]", filename);
}
#endif
}
{}
CFile(const std::string &filename, const char *mode)
: handle(fopen(filename.c_str(), mode))
{
#ifdef DEBUG
if (!handle)
{
std::string ext=filename.substr(filename.find_last_of('.')+1);
if( (ext != "meta") && (ext != "epl"))
eDebug("[CFile] information %s [%m]",filename.c_str());
}
#endif
}
{}
~CFile()
{
if (handle)
Expand All @@ -48,7 +28,6 @@ struct CFile
static int parseInt(int *result, const char *filename);
static int writeIntHex(const char *filename, int value);
static int writeInt(const char *filename, int value);
static int writeStr(const char *filename, std::string value);
static int write(const char *filename, const char *value);
static std::string read(const std::string &filename);
static bool contains_word(const std::string &filename, const std::string &word);
Expand Down
5 changes: 0 additions & 5 deletions lib/base/ebase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -237,11 +237,6 @@ int eMainloop::processOneEvent(long user_timeout, PyObject **res, ePyObject addi

if (additional)
{
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
# define PY_SSIZE_T_MAX INT_MAX
# define PY_SSIZE_T_MIN INT_MIN
#endif
PyObject *key, *val;
Py_ssize_t pos=0;
while (PyDict_Next(additional, &pos, &key, &val)) {
Expand Down
20 changes: 18 additions & 2 deletions lib/dvb/db.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#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 @@ -221,20 +222,35 @@ 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;
eDVBChannelID chid, chid_ignore, chid_ignore_sr;
int system;

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

if (res_mgr->canAllocateChannel(chid, chid_ignore, system, simulate))
if (res) {
sRelayOrigSref.getChannelID(chid_ignore_sr);
} else {
chid_ignore_sr = eDVBChannelID();
}

if (res_mgr->canAllocateChannel(chid, chid_ignore, chid_ignore_sr, system, simulate))
{
bool use_ci_assignment = eConfigManager::getConfigBoolValue("config.misc.use_ci_assignment", false);
if (use_ci_assignment)
Expand Down
20 changes: 17 additions & 3 deletions lib/dvb/dvb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
#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 @@ -1435,16 +1434,17 @@ int tuner_type_channel_default(ePtr<iDVBChannelList> &channellist, const eDVBCha
return 0;
}

int eDVBResourceManager::canAllocateChannel(const eDVBChannelID &channelid, const eDVBChannelID& ignore, int &system, bool simulate)
int eDVBResourceManager::canAllocateChannel(const eDVBChannelID &channelid, const eDVBChannelID& ignore, const eDVBChannelID& ignoresr, 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,6 +1466,7 @@ 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 @@ -1512,6 +1513,18 @@ 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 @@ -1525,6 +1538,7 @@ 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: 1 addition & 2 deletions lib/dvb/dvb.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ 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 @@ -216,7 +215,7 @@ class eDVBResourceManager: public iObject, public sigc::trackable
};

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

/* allocate channel... */
RESULT allocateChannel(const eDVBChannelID &channelid, eUsePtr<iDVBChannel> &channel, bool simulate=false);
Expand Down
Loading

0 comments on commit 8b0fe75

Please sign in to comment.