data/skin_default/icons/Makefile
data/skin_default/buttons/Makefile
data/skin_default/spinner/Makefile
+data/rc/Makefile
include/Makefile
lib/Makefile
lib/actions/Makefile
-SUBDIRS = countries fonts defaults extensions keymaps skin_default
+SUBDIRS = countries fonts defaults extensions keymaps skin_default rc
dist_pkgdata_DATA = \
defaultsatlists.xml \
<!-- available types: "directories" -->
<files type="directories">
<!--file type="skin" directory="test_skin/" flag="default" name="Default Skin" /-->
- <file type="config" name="settings.500hd" />
<!--file type="services" name="lamedb.192">
<prerequisites>
<bcastsystem type="DVB-S" />
<!-- available types: "directories" -->
<files type="directories">
<!--file type="skin" directory="test_skin/" flag="default" name="Default Skin" /-->
- <file type="config" name="settings.8000" />
<!--file type="services" name="lamedb.192">
<prerequisites>
<bcastsystem type="DVB-S" />
<key id="KEY_POWER" mapto="power_long" flags="l" />
<key id="KEY_POWER" mapto="power_down" flags="m" />
<key id="KEY_POWER" mapto="power_up" flags="b" />
+ <key id="KEY_EDIT" mapto="timer_down" flags="m" />
+ <key id="KEY_EDIT" mapto="timer_up" flags="b" />
<device name="dreambox front panel">
<key id="KEY_POWER" mapto="deepstandby" flags="l" />
</device>
--- /dev/null
+installdir = $(pkgdatadir)/rc
+
+dist_install_DATA = \
+ rc_0.png rc_1.png rc_2.png
<button name="DREAMSELECT" pos="54,53" />
<button name="TVSELECT" pos="98,53" />
<button name="SUBTITLE" pos="60,70" />
+ <button name="EDIT" pos="75,340" />
<button name="1" pos="43,98" />
<button name="2" pos="74,98" />
<button name="3" pos="106,98" />
<button name="DREAMSELECT" pos="51,55" />
<button name="TVSELECT" pos="97,55" />
<button name="SUBTITLE" pos="64,73" />
+ <button name="EDIT" pos="75,340" />
<button name="1" pos="40,100" />
<button name="2" pos="76,100" />
<button name="3" pos="102,100" />
<button name="HELP" pos="108,370" />
<button name="PLAY" pos="64,394" />
</rc>
+ <rc id="2">
+ <button name="POWER" pos="107,25" />
+ <button name="TEXT" pos="31,45" />
+ <button name="SUBTITLE" pos="57,45" />
+ <button name="HELP" pos="109,45" />
+ <button name="1" pos="36,65" />
+ <button name="2" pos="70,65" />
+ <button name="3" pos="106,65" />
+ <button name="4" pos="36,86" />
+ <button name="5" pos="70,86" />
+ <button name="6" pos="106,86" />
+ <button name="7" pos="36,107" />
+ <button name="8" pos="70,107" />
+ <button name="9" pos="106,107" />
+ <button name="ARROWLEFT" pos="35,128" />
+ <button name="0" pos="70,128" />
+ <button name="ARROWRIGHT" pos="105,128" />
+ <button name="RED" pos="31,148" />
+ <button name="GREEN" pos="57,148" />
+ <button name="YELLOW" pos="83,148" />
+ <button name="BLUE" pos="109,148" />
+ <button name="VIDEO" pos="33,170" />
+ <button name="MENU" pos="107,170" />
+ <button name="OK" pos="70,201" />
+ <button name="UP" pos="70,177" />
+ <button name="DOWN" pos="70,227" />
+ <button name="LEFT" pos="46,201" />
+ <button name="RIGHT" pos="94,201" />
+ <button name="INFO" pos="33,232" />
+ <button name="EXIT" pos="107,232" />
+ <button name="VOL+" pos="36,260" />
+ <button name="VOL-" pos="36,291" />
+ <button name="AUDIO" pos="70,255" />
+ <button name="MUTE" pos="70,275" />
+ <button name="TIMER" pos="70,295" />
+ <button name="CH+" pos="104,260" />
+ <button name="CH-" pos="104,291" />
+ <button name="REWIND" pos="31,314" />
+ <button name="PLAY" pos="57,314" />
+ <button name="PAUSE" pos="83,314" />
+ <button name="FASTFORWARD" pos="109,314" />
+ <button name="TV" pos="31,333" />
+ <button name="RECORD" pos="57,333" />
+ <button name="STOP" pos="83,333" />
+ <button name="RADIO" pos="109,333" />
+ </rc>
</rcs>
case 168: // RW
case 167: // record
case 174: // exit
+ case 176: // timer edit
case 207: // play
case 352: // ok
case 358: // epg
eMPEGStreamInformation::~eMPEGStreamInformation()
{
+ readClose();
+ writeClose();
+}
+
+void eMPEGStreamInformation::readClose()
+{
if (m_structure_read)
+ {
fclose(m_structure_read);
+ m_structure_read = 0;
+ }
+}
+
+void eMPEGStreamInformation::writeClose()
+{
if (m_structure_write)
+ {
fclose(m_structure_write);
+ m_structure_write = 0;
+ }
}
int eMPEGStreamInformation::startSave(const char *filename)
int eMPEGStreamInformation::load(const char *filename)
{
m_filename = filename;
- if (m_structure_read)
- fclose(m_structure_read);
+ readClose();
m_structure_read = fopen((std::string(m_filename) + ".sc").c_str(), "rb");
m_access_points.clear();
m_pts_to_offset.clear();
public:
eMPEGStreamInformation();
~eMPEGStreamInformation();
+
+ void writeClose();
+ void readClose();
/* we order by off_t here, since the timestamp may */
/* wrap around. */
/* we only record sequence start's pts values here. */
{
if (m_source)
closeSource();
+
+ m_streaminfo.readClose();
}
void eDVBTSTools::setSyncPID(int pid)
if self.name:
if self.name == 'dreambox front panel':
continue
- if self.name == "dreambox advanced remote control (native)" and config.misc.rcused.value != 0:
+ if self.name == "dreambox advanced remote control (native)" and config.misc.rcused.value == 1:
continue
- if self.name == "dreambox remote control (native)" and config.misc.rcused.value == 0:
+ if self.name == "dreambox remote control (native)" and config.misc.rcused.value != 1:
continue
self.Devices[evdev] = {'name': self.name, 'type': self.getInputDeviceType(self.name),'enabled': False, 'configuredName': None }
return sorted(self.Devices.iterkeys())
def getDefaultRCdeviceName(self):
- if config.misc.rcused.value == 0:
+ if config.misc.rcused.value != 1:
for device in self.Devices.iterkeys():
if self.Devices[device]["name"] == "dreambox advanced remote control (native)":
return device
SystemInfo["FrontpanelDisplay"] = fileExists("/dev/dbox/oled0") or fileExists("/dev/dbox/lcd0")
SystemInfo["FrontpanelDisplayGrayscale"] = fileExists("/dev/dbox/oled0")
SystemInfo["DeepstandbySupport"] = HardwareInfo().get_device_name() != "dm800"
-SystemInfo["HdmiInSupport"] = HardwareInfo().get_vu_device_name() == "ultimo4k"
+SystemInfo["HdmiInSupport"] = HardwareInfo().get_vu_device_name() in ("ultimo4k", "uno4kse")
SystemInfo["WOWLSupport"] = HardwareInfo().get_vu_device_name() == "ultimo4k"
SystemInfo["ScrambledPlayback"] = HardwareInfo().get_vu_device_name() in ("solo4k", "ultimo4k")
SystemInfo["FastChannelChange"] = fileExists("/proc/stb/frontend/fbc/fcc")
}
widescreen_modes = set(["720p", "1080i", "1080p", "2160p"])
- hdmi_hw_types = set(["dm500", "dm800se", "dm7020hd", "bm750", "solo", "uno", "ultimo", "solo2", "duo2", "solose", "zero", "solo4k", "ultimo4k", "uno4k"])
- hdmi_pc_hw_types = set(["dm500", "dm800se", "dm7020hd", "bm750", "solo", "uno", "ultimo", "solo2", "duo2", "solose", "zero", "solo4k", "ultimo4k", "uno4k"])
- noscart_hw_types = set(["zero", "solo4k", "ultimo4k", "uno4k"])
- noypbpr_hw_types = set(["solose", "zero", "solo4k", "ultimo4k", "uno4k"])
+ hdmi_hw_types = set(["dm500", "dm800se", "dm7020hd", "bm750", "solo", "uno", "ultimo", "solo2", "duo2", "solose", "zero", "solo4k", "ultimo4k", "uno4k", "uno4kse", "zero4k"])
+ hdmi_pc_hw_types = set(["dm500", "dm800se", "dm7020hd", "bm750", "solo", "uno", "ultimo", "solo2", "duo2", "solose", "zero", "solo4k", "ultimo4k", "uno4k", "uno4kse", "zero4k"])
+ noscart_hw_types = set(["zero", "solo4k", "ultimo4k", "uno4k", "uno4kse", "zero4k"])
+ noypbpr_hw_types = set(["solose", "zero", "solo4k", "ultimo4k", "uno4k", "uno4kse", "zero4k"])
def getDeviceName(self):
device_name = "unknown"
return device_name
def isVumodel(self, hw_type):
- return hw_type in set(["bm750", "solo", "uno", "ultimo", "solo2", "duo2", "solose", "zero", "solo4k", "ultimo4k", "uno4k"])
+ return hw_type in set(["bm750", "solo", "uno", "ultimo", "solo2", "duo2", "solose", "zero", "solo4k", "ultimo4k", "uno4k", "uno4kse", "zero4k"])
def isVumodel4K(self, hw_type):
- return hw_type in set(["solo4k", "ultimo4k", "uno4k"])
+ return hw_type in set(["solo4k", "ultimo4k", "uno4k", "uno4kse", "zero4k"])
# re-define AVSwitch.getOutputAspect
def getOutputAspect(self):
self["RecordingPossible"] = Boolean(fixed=harddiskmanager.HDDCount() > 0 and config.misc.rcused.value == 1)
self["TimeshiftPossible"] = self["RecordingPossible"]
- self["ShowTimeshiftOnYellow"] = Boolean(fixed=(not config.misc.rcused.value == 0))
- self["ShowAudioOnYellow"] = Boolean(fixed=config.misc.rcused.value == 0)
+ self["ShowTimeshiftOnYellow"] = Boolean(fixed=(config.misc.rcused.value == 1))
+ self["ShowAudioOnYellow"] = Boolean(fixed=config.misc.rcused.value != 1)
self["ShowRecordOnRed"] = Boolean(fixed=config.misc.rcused.value == 1)
self["ExtensionsAvailable"] = Boolean(fixed=1)
enabled = iInputDevices.getDeviceAttribute(device, 'enabled')
if type == 'remote':
- if config.misc.rcused.value == 0:
+ if config.misc.rcused.value != 1:
if enabled:
devicepng = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/input_rcnew-configured.png"))
else:
from Tools.Directories import resolveFilename, SCOPE_SKIN
from xml.etree.ElementTree import ElementTree
from Components.config import config, ConfigInteger
+from Tools.HardwareInfo import HardwareInfo
+import skin
config.misc.rcused = ConfigInteger(default = 1)
self["arrowdown2"] = MovingPixmap()
self["arrowup"] = MovingPixmap()
self["arrowup2"] = MovingPixmap()
-
- config.misc.rcused = ConfigInteger(default = 1)
-
- self.rcheight = 500
- self.rcheighthalf = 250
+
+ (rcArrowDownW, rcArrowDownH, rcArrowUpW, rcArrowUpH, rcheight, rcheighthalf) = skin.parameters.get("RcArrow", (18, 70, 18, 0, 500, 250))
+
+ self.rcheight = rcheight
+ self.rcheighthalf = rcheighthalf
self.selectpics = []
- self.selectpics.append((self.rcheighthalf, ["arrowdown", "arrowdown2"], (-18,-70)))
- self.selectpics.append((self.rcheight, ["arrowup", "arrowup2"], (-18,0)))
+ self.selectpics.append((self.rcheighthalf, ["arrowdown", "arrowdown2"], (-rcArrowDownW, -rcArrowDownH)))
+ self.selectpics.append((self.rcheight, ["arrowup", "arrowup2"], (-rcArrowUpW, rcArrowUpH)))
+
+ self.initRcused()
self.readPositions()
self.clearSelectedKeys()
self.onShown.append(self.initRc)
+ def initRcused(self):
+ if config.misc.firstrun.value:
+ boxType = HardwareInfo().get_vu_device_name()
+
+ if boxType == 'solo':
+ config.misc.rcused.value = 0
+ elif boxType in ('duo', 'uno', 'ultimo', 'solo2', 'duo2', 'solose', 'zero', 'solo4k', 'uno4k', 'ultimo4k'):
+ config.misc.rcused.value = 1
+ else:
+ config.misc.rcused.value = 2
+ config.misc.rcused.save()
+
def initRc(self):
self["rc"].setPixmapNum(config.misc.rcused.value)
KEYIDS["KEY_EXIT"]: ("EXIT",),
KEYIDS["KEY_STOP"]: ("STOP",),
KEYIDS["KEY_RECORD"]: ("RECORD",),
- KEYIDS["KEY_SUBTITLE"]: ("SUBTITLE",)
+ KEYIDS["KEY_SUBTITLE"]: ("SUBTITLE",),
+ KEYIDS["KEY_EDIT"]: ("KEY_EDIT",)
},
{
KEYIDS["BTN_0"]: ("UP", "fp"),
KEYIDS["KEY_EXIT"]: ("EXIT",),
KEYIDS["KEY_STOP"]: ("TV", "SHIFT"),
KEYIDS["KEY_RECORD"]: ("RECORD",),
- KEYIDS["KEY_SUBTITLE"]: ("SUBTITLE",)
+ KEYIDS["KEY_SUBTITLE"]: ("SUBTITLE",),
+ KEYIDS["KEY_EDIT"]: ("EDIT",)
+ },
+ {
+ KEYIDS["KEY_POWER"]: ("POWER",),
+ KEYIDS["KEY_TEXT"]: ("TEXT",),
+ KEYIDS["KEY_SUBTITLE"]: ("SUBTITLE",),
+ KEYIDS["KEY_HELP"]: ("HELP",),
+ KEYIDS["KEY_0"]: ("0",),
+ KEYIDS["KEY_1"]: ("1",),
+ KEYIDS["KEY_2"]: ("2",),
+ KEYIDS["KEY_3"]: ("3",),
+ KEYIDS["KEY_4"]: ("4",),
+ KEYIDS["KEY_5"]: ("5",),
+ KEYIDS["KEY_6"]: ("6",),
+ KEYIDS["KEY_7"]: ("7",),
+ KEYIDS["KEY_8"]: ("8",),
+ KEYIDS["KEY_9"]: ("9",),
+ KEYIDS["KEY_PREVIOUS"]: ("ARROWLEFT",),
+ KEYIDS["KEY_NEXT"]: ("ARROWRIGHT",),
+ KEYIDS["KEY_RED"]: ("RED",),
+ KEYIDS["KEY_GREEN"]: ("GREEN",),
+ KEYIDS["KEY_YELLOW"]: ("YELLOW",),
+ KEYIDS["KEY_BLUE"]: ("BLUE",),
+ KEYIDS["KEY_VIDEO"]: ("VIDEO",),
+ KEYIDS["KEY_MENU"]: ("MENU",),
+ KEYIDS["KEY_OK"]: ("OK", ""),
+ KEYIDS["KEY_UP"]: ("UP",),
+ KEYIDS["KEY_DOWN"]: ("DOWN",),
+ KEYIDS["KEY_LEFT"]: ("LEFT",),
+ KEYIDS["KEY_RIGHT"]: ("RIGHT",),
+ KEYIDS["KEY_INFO"]: ("INFO",),
+ KEYIDS["KEY_EXIT"]: ("EXIT",),
+ KEYIDS["KEY_VOLUMEUP"]: ("VOL+",),
+ KEYIDS["KEY_VOLUMEDOWN"]: ("VOL-",),
+ KEYIDS["KEY_AUDIO"]: ("AUDIO",),
+ KEYIDS["KEY_MUTE"]: ("MUTE",),
+ KEYIDS["KEY_EDIT"]: ("TIMER",),
+ KEYIDS["KEY_TV"]: ("TV",),
+ KEYIDS["KEY_RADIO"]: ("RADIO",),
+ KEYIDS["KEY_CHANNELUP"]: ("CH+",),
+ KEYIDS["KEY_CHANNELDOWN"]: ("CH-",),
+ KEYIDS["KEY_PREVIOUSSONG"]: ("REWIND",),
+ KEYIDS["KEY_PLAY"]: ("PLAY",),
+ KEYIDS["KEY_PLAYPAUSE"]: ("PAUSE",),
+ KEYIDS["KEY_NEXTSONG"]: ("FASTFORWARD",),
+ KEYIDS["KEY_TV"]: ("TV",),
+ KEYIDS["KEY_RECORD"]: ("RECORD",),
+ KEYIDS["KEY_STOP"]: ("STOP",),
+ KEYIDS["KEY_RADIO"]: ("RADIO",),
}
]
def getRCUName():
if not Screens.Standby.inStandby and self.session.current_dialog and self.session.current_dialog.ALLOW_SUSPEND and self.session.in_exec:
self.session.open(Screens.Standby.Standby)
+class TimerKey:
+ def __init__(self, session):
+ self.session = session
+ globalActionMap.actions["timer_down"]=self.timerDown
+ globalActionMap.actions["timer_up"]=self.timerUp
+ self.timerblocked = 1
+
+ def MenuClosed(self, *val):
+ self.session.infobar = None
+
+ def doAction(self):
+ self.timerblocked = 1
+
+ if self.session.current_dialog and not self.session.current_dialog.ALLOW_SUSPEND:
+ return
+
+ self.session.infobar = self
+ from Screens.TimerEdit import TimerEditList
+ menu_screen = self.session.openWithCallback(self.MenuClosed, TimerEditList)
+ return
+
+ def timerDown(self):
+ self.timerblocked = 0
+
+ def timerUp(self):
+ if self.timerblocked == 0:
+ self.doAction()
+
profile("Scart")
from Screens.Scart import Scart
profile("Init:PowerKey")
power = PowerKey(session)
+ profile("Init:TimerKey")
+ timer = TimerKey(session)
+
# we need session.scart to access it from within menu.xml
session.scart = AutoScartControl(session)
if size is not None:
skinAttributes.append(('size', size))
+def morphRcImagePath(value):
+ if value.startswith('/usr/share/enigma2') and path.basename(value) in ('rc.png', 'rcold.png'):
+ value = resolveFilename(SCOPE_SKIN, 'rc/' + 'rc_%d.png' % config.misc.rcused.value)
+ return value
+
def loadPixmap(path, desktop):
cached = False
option = path.find("#")
options = path[option+1:].split(',')
path = path[:option]
cached = "cached" in options
- ptr = LoadPixmap(path, desktop, cached)
+ ptr = LoadPixmap(morphRcImagePath(path), desktop, cached)
if ptr is None:
raise SkinError("pixmap file %s not found!" % (path))
return ptr