== .meta FILES ==
-.meta files have currently 4 lines:
+.meta files have currently up to 7 lines:
<service reference>
<name>
<description>
<recording time>
+[<tags>]
+[<length>]
+[<filesize>]
The service reference contains the Service-ID of the recorded service. With
that ID, you can find the PMT and the elementary streams.
Strings are always UTF-8 encoded.
+tags is a space-delimited list of tags assigned to this movie.
+
+length is the length of the recording, in PTS-units (1/90000s). filesize was
+the filesize at the time the length was calculated, so you can validate if
+this is still up-to-date or must be recalculated.
+
== .ap FILES ==
Stored offsets and PTS values. They are collected while recording. Only
if (PyInt_Check(pstring) && data) /* if the string is in fact a number, it refers to the 'data' list. */
pstring = PyTuple_GetItem(data, PyInt_AsLong(pstring));
+ /* don't do anything if we have 'None' as string */
+ if (pstring == Py_None)
+ continue;
+
const char *string = (PyString_Check(pstring)) ? PyString_AsString(pstring) : "<not-a-string>";
int x = PyInt_AsLong(px) + offset.x();
int y = PyInt_AsLong(py) + offset.y();
if (PyInt_Check(ppixmap) && data) /* if the pixemap is in fact a number, it refers to the 'data' list. */
ppixmap = PyTuple_GetItem(data, PyInt_AsLong(ppixmap));
+ /* don't do anything if we have 'None' as pixmap */
+ if (ppixmap == Py_None)
+ continue;
+
int x = PyInt_AsLong(px) + offset.x();
int y = PyInt_AsLong(py) + offset.y();
int width = PyInt_AsLong(pwidth);
from socket import *
from enigma import eConsoleAppContainer
from Components.Console import Console
+from Components.PluginComponent import plugins
+from Plugins.Plugin import PluginDescriptor
class Network:
def __init__(self):
self.activateConsole = Console()
self.resetNetworkConsole = Console()
self.DnsConsole = Console()
+ self.config_ready = None
self.getInterfaces()
def getInterfaces(self, callback = None):
self.loadNameserverConfig()
print "read configured interfac:", ifaces
print "self.ifaces after loading:", self.ifaces
+ self.config_ready = True
+ self.msgPlugins()
if callback is not None:
callback(True)
def restartNetwork(self,callback = None):
self.restartConsole = Console()
+ self.config_ready = False
+ self.msgPlugins()
self.commands = []
self.commands.append("/etc/init.d/avahi-daemon stop")
for iface in self.ifaces.keys():
def stopLinkStateConsole(self):
if self.LinkConsole is not None:
- self.LinkConsole = None
-
+ if len(self.LinkConsole.appContainers):
+ for name in self.LinkConsole.appContainers.keys():
+ self.LinkConsole.kill(name)
+
def stopDNSConsole(self):
if self.DnsConsole is not None:
- self.DnsConsole = None
-
+ if len(self.DnsConsole.appContainers):
+ for name in self.DnsConsole.appContainers.keys():
+ self.DnsConsole.kill(name)
+
def stopRestartConsole(self):
if self.restartConsole is not None:
- self.restartConsole = None
-
+ if len(self.restartConsole.appContainers):
+ for name in self.restartConsole.appContainers.keys():
+ self.restartConsole.kill(name)
+
def stopGetInterfacesConsole(self):
if self.Console is not None:
- self.Console = None
-
+ if len(self.Console.appContainers):
+ for name in self.Console.appContainers.keys():
+ self.Console.kill(name)
+
def stopDeactivateInterfaceConsole(self):
- if self.deactivateInterfaceConsole:
- self.deactivateInterfaceConsole = None
-
+ if self.deactivateInterfaceConsole is not None:
+ if len(self.deactivateInterfaceConsole.appContainers):
+ for name in self.deactivateInterfaceConsole.appContainers.keys():
+ self.deactivateInterfaceConsole.kill(name)
+
def checkforInterface(self,iface):
if self.getAdapterAttribute(iface, 'up') is True:
return True
netmask = str(inet_ntoa(pack('>L', nm)))
return netmask
+ def msgPlugins(self):
+ if self.config_ready is not None:
+ for p in plugins.getPlugins(PluginDescriptor.WHERE_NETWORKCONFIG_READ):
+ p(reason=self.config_ready)
+
iNetwork = Network()
def InitNetwork():
def askLeavePlayer(self):
choices = [(_("Exit"), "exit"), (_("Continue playing"), "play")]
- if not self.physicalDVD:
+ if True or not self.physicalDVD:
choices.insert(1,(_("Return to file browser"), "browser"))
self.session.openWithCallback(self.exitCB, ChoiceBox, title=_("Leave DVD Player?"), list = choices)
# or return a function which is called with session and the interface name for extended setup of this interface
WHERE_EVENTINFO = 11
+ # reason (True: Networkconfig read finished, False: Networkconfig reload initiated )
+ WHERE_NETWORKCONFIG_READ = 12
+
def __init__(self, name = "Plugin", where = [ ], description = "", icon = None, fnc = None, wakeupfnc = None, internal = False):
self.name = name
self.internal = internal
class VideoWizardSummary(WizardSummary):
skin = """
<screen position="0,0" size="132,64">
- <widget name="text" position="6,4" size="120,42" font="Regular;14" transparent="1" />
- <widget source="parent.list" render="Label" position="6,25" size="120,21" font="Regular;16">
+ <widget name="text" position="6,4" size="120,40" font="Regular;12" transparent="1" />
+ <widget source="parent.list" render="Label" position="6,40" size="120,21" font="Regular;14">
<convert type="StringListSelection" />
</widget>
<!--widget name="pic" pixmap="%s" position="6,22" zPosition="10" size="64,64" transparent="1" alphatest="on"/-->
<wizard>
- <step id="inputselection" nextstep="modeselection" timeout="10" timeoutaction="selectnext">
+ <step id="inputselection" nextstep="modeselection" timeout="20" timeoutaction="selectnext">
<text value="Video input selection\n\nPlease press OK if you can see this page on your TV (or select a different input port).\n\nThe next input port will be automatically probed in 10 seconds." />
- <displaytext value="Select video input" />
+ <displaytext value="Select video input with up/down buttons" />
<list type="dynamic" source="listInputChannels" evaluation="inputSelectionMade" onselect="inputSelectionMoved" />
<code>
self["portpic"].show()
self.selectKey("OK")
</code>
</step>
- <step id="modeselection" nextstep="rateselection" timeout="10" timeoutaction="selectnext">
+ <step id="modeselection" nextstep="rateselection" timeout="20" timeoutaction="selectnext">
<text value="Video mode selection." />
<displaytext value="Select video mode" />
<list type="dynamic" source="listModes" evaluation="modeSelectionMade" onselect="modeSelectionMoved" />
self["portpic"].hide()
</code>
</step>
- <step id="rateselection" nextstep="dvirateintroduction" timeout="10" timeoutaction="selectnext">
+ <step id="rateselection" nextstep="dvirateintroduction" timeout="20" timeoutaction="selectnext">
<condition>
self.condition = (self.port != "DVI" or self.mode == "PC")
</condition>
self.rateSelect("60Hz")
</code>
</step>
- <step id="dvirateselection" timeout="10" timeoutaction="changestep" timeoutstep="notworking50Hz">
+ <step id="dvirateselection" timeout="20" timeoutaction="changestep" timeoutstep="notworking50Hz">
<condition>
self.condition = (self.port == "DVI" and self.mode in ["720p", "1080i"])
</condition>
self.selectKey("DOWN")
</code>
</step>
- <step id="working50Hz" nextstep="end" timeout="10" timeoutaction="nextstep">
+ <step id="working50Hz" nextstep="end" timeout="20" timeoutaction="nextstep">
<condition>
self.condition = (self.port == "DVI" and self.mode in ["720p", "1080i"])
</condition>
self.currStep += 1
self.updateValues()
else:
+ if self.wizard[self.currStep].has_key("displaytext"):
+ displaytext = self.wizard[self.currStep]["displaytext"]
+ print "set LCD text"
+ for x in self.lcdCallbacks:
+ x(displaytext)
if len(self.stepHistory) == 0 or self.stepHistory[-1] != self.currStep:
self.stepHistory.append(self.currStep)
print "wizard step:", self.wizard[self.currStep]