aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2010-03-30 17:49:15 +0200
committerFraxinas <andreas.frisch@multimedia-labs.de>2010-03-30 17:49:15 +0200
commit525b031d2b8401750293fde4e334dfc8a5193517 (patch)
tree8ea3a5b3bcae27b81993ee8e4360509c3157df30 /lib/python/Components
parent58630f7b0de796e3589d2c1eaeb3e9d531d60d37 (diff)
downloadenigma2-525b031d2b8401750293fde4e334dfc8a5193517.tar.gz
enigma2-525b031d2b8401750293fde4e334dfc8a5193517.zip
add transfer bps to service interface (requires touching enigma_python.i)
Diffstat (limited to 'lib/python/Components')
-rw-r--r--lib/python/Components/Converter/ServiceInfo.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/python/Components/Converter/ServiceInfo.py b/lib/python/Components/Converter/ServiceInfo.py
index 5014fde6..fa3518ce 100644
--- a/lib/python/Components/Converter/ServiceInfo.py
+++ b/lib/python/Components/Converter/ServiceInfo.py
@@ -19,6 +19,7 @@ class ServiceInfo(Converter, object):
ONID = 13
SID = 14
FRAMERATE = 15
+ TRANSFERBPS = 16
def __init__(self, type):
@@ -40,6 +41,7 @@ class ServiceInfo(Converter, object):
"OnId": (self.ONID, (iPlayableService.evUpdatedInfo,)),
"Sid": (self.SID, (iPlayableService.evUpdatedInfo,)),
"Framerate": (self.FRAMERATE, (iPlayableService.evVideoSizeChanged,iPlayableService.evUpdatedInfo,)),
+ "TransferBPS": (self.TRANSFERBPS, (iPlayableService.evUpdatedInfo,)),
}[type]
def getServiceInfoString(self, info, what, convert = lambda x: "%d" % x):
@@ -112,6 +114,8 @@ class ServiceInfo(Converter, object):
return self.getServiceInfoString(info, iServiceInformation.sSID)
elif self.type == self.FRAMERATE:
return self.getServiceInfoString(info, iServiceInformation.sFrameRate, lambda x: "%d fps" % ((x+500)/1000))
+ elif self.type == self.TRANSFERBPS:
+ return self.getServiceInfoString(info, iServiceInformation.sTransferBPS, lambda x: "%d kB/s" % (x/1024))
return ""
text = property(getText)