Skip to content

Commit

Permalink
Remove 3D option as nothing is broadcast in 3D anymore and modern tv'…
Browse files Browse the repository at this point in the history
…s no longer support 3D
  • Loading branch information
Ev0-BH authored and Huevos committed Oct 22, 2024
1 parent 48398e1 commit b841beb
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 78 deletions.
2 changes: 0 additions & 2 deletions lib/python/Components/SystemInfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,6 @@ def hasInitCam():
SystemInfo["LCDMiniTVPiP"] = SystemInfo["LCDMiniTV"] and SystemInfo["boxtype"] != "gb800ueplus"
SystemInfo["LcdPowerOn"] = fileExists("/proc/stb/power/vfd")
SystemInfo["FastChannelChange"] = False
SystemInfo["3DMode"] = fileCheck("/proc/stb/fb/3dmode") or fileCheck("/proc/stb/fb/primary/3d")
SystemInfo["3DZNorm"] = fileCheck("/proc/stb/fb/znorm") or fileCheck("/proc/stb/fb/primary/zoffset")
SystemInfo["Blindscan_t2_available"] = fileCheck("/proc/stb/info/vumodel") and SystemInfo["boxtype"].startswith("vu")
SystemInfo["HasTranscoding"] = pathExists("/proc/stb/encoder/0") or fileCheck("/dev/bcm_enc0")
SystemInfo["HasH265Encoder"] = fileHas("/proc/stb/encoder/0/vcodec_choices", "h265")
Expand Down
25 changes: 1 addition & 24 deletions lib/python/Screens/ChannelSelection.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,7 @@
profile("ChannelSelection.py after imports")

FLAG_SERVICE_NEW_FOUND = 64
FLAG_IS_DEDICATED_3D = 128
FLAG_CENTER_DVB_SUBS = 2048 # define in lib/dvb/idvb.h as dxNewFound = 64 and dxIsDedicated3D = 128
FLAG_CENTER_DVB_SUBS = 2048 # define in lib/dvb/idvb.h as dxNewFound = 64


class InsertService(Setup):
Expand Down Expand Up @@ -295,11 +294,6 @@ def __init__(self, session, csel):
_append_when_current_valid(current, menu, actions, (_("Stop using as startup service"), self.unsetStartupService), level=0, key="1")
else:
_append_when_current_valid(current, menu, actions, (_("Set as startup service"), self.setStartupService), level=0, key="1")
if SystemInfo["3DMode"]:
if eDVBDB.getInstance().getFlag(eServiceReference(current.toString())) & FLAG_IS_DEDICATED_3D:
_append_when_current_valid(current, menu, actions, (_("Unmark service as a dedicated 3D service"), self.removeDedicated3DFlag), level=0, key="bullet")
else:
_append_when_current_valid(current, menu, actions, (_("Mark service as a dedicated 3D service"), self.addDedicated3DFlag), level=0, key="bullet")
if not (current_sel_path):
if Screens.InfoBar.InfoBar.instance.checkStreamrelay(current):
_append_when_current_valid(current, menu, actions, (_("Play service without streamrelay"), self.toggleStreamrelay), level=1, key="2")
Expand Down Expand Up @@ -417,23 +411,6 @@ def __init__(self, session, csel):
_append_when_current_valid(current, menu, actions, (_("Abort alternatives edit"), self.bouquetMarkAbort), level=0, key="bullet")
self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "NumberActions", "MenuActions"], actions)

def set3DMode(self, value):
if config.osd.threeDmode.value == "auto" and self.session.nav.currentlyPlayingServiceReference == self.csel.getCurrentSelection():
from Screens.VideoMode import applySettings
applySettings(value and "sidebyside" or config.osd.threeDmode.value)

def addDedicated3DFlag(self):
eDVBDB.getInstance().addFlag(eServiceReference(self.csel.getCurrentSelection().toString()), FLAG_IS_DEDICATED_3D)
eDVBDB.getInstance().reloadBouquets()
self.set3DMode(True)
self.close()

def removeDedicated3DFlag(self):
eDVBDB.getInstance().removeFlag(eServiceReference(self.csel.getCurrentSelection().toString()), FLAG_IS_DEDICATED_3D)
eDVBDB.getInstance().reloadBouquets()
self.set3DMode(False)
self.close()

def toggleVBI(self):
Screens.InfoBar.InfoBar.instance.ToggleHideVBI(self.csel.getCurrentSelection())
Screens.InfoBar.InfoBar.instance.showHideVBI()
Expand Down
14 changes: 0 additions & 14 deletions lib/python/Screens/InfoBarGenerics.py
Original file line number Diff line number Diff line change
Expand Up @@ -2774,7 +2774,6 @@ def __init__(self):

self.addExtension(extension=self.getSoftwareUpdate, type=InfoBarExtensions.EXTENSION_LIST)
self.addExtension(extension=self.getLogManager, type=InfoBarExtensions.EXTENSION_LIST)
self.addExtension(extension=self.getOsd3DSetup, type=InfoBarExtensions.EXTENSION_LIST)
self.addExtension(extension=self.getCCcamInfo, type=InfoBarExtensions.EXTENSION_LIST)
self.addExtension(extension=self.getOScamInfo, type=InfoBarExtensions.EXTENSION_LIST)

Expand All @@ -2796,15 +2795,6 @@ def getLogManager(self):
else:
return []

def get3DSetupname(self):
return _("OSD 3D Setup")

def getOsd3DSetup(self):
if config.osd.show3dextensions .value:
return [((boundFunction(self.get3DSetupname), boundFunction(self.open3DSetup), lambda: True), None)]
else:
return []

def getCCname(self):
return _("CCcam Info")

Expand Down Expand Up @@ -2907,10 +2897,6 @@ def openLogManager(self):
from Screens.LogManager import LogManager
self.session.open(LogManager)

def open3DSetup(self):
from Screens.UserInterfacePositioner import OSD3DSetupScreen
self.session.open(OSD3DSetupScreen)

@staticmethod
def _getAutoTimerPluginFunc():
# Use the WHERE_MENU descriptor because it's the only
Expand Down
38 changes: 0 additions & 38 deletions lib/python/Screens/UserInterfacePositioner.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,34 +37,12 @@ def setPositionParameter(parameter, configElement):


def InitOsd():
SystemInfo["CanChange3DOsd"] = (access('/proc/stb/fb/3dmode', R_OK) or access('/proc/stb/fb/primary/3d', R_OK)) and True or False

config.osd.dst_left = ConfigSelectionNumber(default=0, stepwidth=1, min=0, max=720, wraparound=False)
config.osd.dst_width = ConfigSelectionNumber(default=720, stepwidth=1, min=0, max=720, wraparound=False)
config.osd.dst_top = ConfigSelectionNumber(default=0, stepwidth=1, min=0, max=576, wraparound=False)
config.osd.dst_height = ConfigSelectionNumber(default=576, stepwidth=1, min=0, max=576, wraparound=False)
config.osd.alpha = ConfigSelectionNumber(default=255, stepwidth=1, min=0, max=255, wraparound=False)
config.misc.osd_alpha = NoSave(ConfigNumber(default=255))
config.osd.threeDmode = ConfigSelection([("off", _("Off")), ("auto", _("Auto")), ("sidebyside", _("Side by Side")), ("topandbottom", _("Top and Bottom"))], "auto")
config.osd.threeDznorm = ConfigSlider(default=50, increment=1, limits=(0, 100))
config.osd.show3dextensions = ConfigYesNo(default=False)

def set3DMode(configElement):
if SystemInfo["CanChange3DOsd"] and SystemInfo["boxtype"] not in ('spycat'):
print('[UserInterfacePositioner] Setting 3D mode:', configElement.value)
file3d = fileCheck('/proc/stb/fb/3dmode') or fileCheck('/proc/stb/fb/primary/3d')
f = open(file3d, "w")
f.write(configElement.value)
f.close()
config.osd.threeDmode.addNotifier(set3DMode)

def set3DZnorm(configElement):
if SystemInfo["CanChange3DOsd"] and SystemInfo["boxtype"] not in ('spycat'):
print('[UserInterfacePositioner] Setting 3D depth:', configElement.value)
f = open("/proc/stb/fb/znorm", "w")
f.write('%d' % int(configElement.value))
f.close()
config.osd.threeDznorm.addNotifier(set3DZnorm)


def InitOsdPosition():
Expand Down Expand Up @@ -225,19 +203,3 @@ def run(self):
configfile.save()
self.close()


class OSD3DSetupScreen(ConfigListScreen, Screen):
def __init__(self, session):
Screen.__init__(self, session)
self.skinName = "Setup"
self.setTitle(_("3D"))
self["description"] = StaticText()

self.onChangedEntry = []
self.list = []
ConfigListScreen.__init__(self, self.list, session=self.session, on_change=self.changedEntry, fullUI=True)
self.list.append(getConfigListEntry(_("3D Mode"), config.osd.threeDmode, _("This option lets you choose the 3D mode")))
self.list.append(getConfigListEntry(_("Depth"), config.osd.threeDznorm, _("This option lets you adjust the 3D depth")))
self.list.append(getConfigListEntry(_("Show in extensions list ?"), config.osd.show3dextensions, _("This option lets you show the option in the extension screen")))
self["config"].list = self.list
self["config"].l.setList(self.list)

0 comments on commit b841beb

Please sign in to comment.