add transfer bps to service interface (requires touching enigma_python.i)
authorFraxinas <andreas.frisch@multimedia-labs.de>
Tue, 30 Mar 2010 15:49:15 +0000 (17:49 +0200)
committerFraxinas <andreas.frisch@multimedia-labs.de>
Tue, 30 Mar 2010 15:49:15 +0000 (17:49 +0200)
lib/python/Components/Converter/ServiceInfo.py
lib/service/iservice.h

index 5014fde605268f6f8e683a8f0db2fff3ab38aeb6..fa3518cedb1aa8542edf3495e519cef0fc74de9e 100644 (file)
@@ -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)
index d80733df265be1439ba67ec9bc007eaa2fef7915..2ba7cb461b9abc0b46983d24a6b82c6ffa2ca5b0 100644 (file)
@@ -356,6 +356,8 @@ public:
                sTagCRC,
                sTagChannelMode,
 
+               sTransferBPS,
+
                sUser = 0x100
        };
        enum {