+ config.pep.configsteps = NoSave(ConfigSelection(choices=[1, 5, 10, 25], default = 1))
+
+ if os_path.exists("/proc/stb/vmpeg/0/pep_contrast"):
+ def setContrast(config):
+ myval = int(config.value*256)
+ try:
+ print "--> setting contrast to: %0.8X" % myval
+ open("/proc/stb/vmpeg/0/pep_contrast", "w").write("%0.8X" % myval)
+ except IOError:
+ print "couldn't write pep_contrast."
+
+ if not VideoEnhancement.firstRun:
+ self.setConfiguredValues()
+
+ config.pep.contrast = ConfigSlider(default=128, limits=(0,256))
+ config.pep.contrast.addNotifier(setContrast)
+ else:
+ config.pep.contrast = NoSave(ConfigNothing())
+
+ if os_path.exists("/proc/stb/vmpeg/0/pep_saturation"):
+ def setSaturation(config):
+ myval = int(config.value*256)
+ try:
+ print "--> setting saturation to: %0.8X" % myval
+ open("/proc/stb/vmpeg/0/pep_saturation", "w").write("%0.8X" % myval)
+ except IOError:
+ print "couldn't write pep_saturaion."
+
+ if not VideoEnhancement.firstRun:
+ self.setConfiguredValues()
+
+ config.pep.saturation = ConfigSlider(default=128, limits=(0,256))
+ config.pep.saturation.addNotifier(setSaturation)
+ else:
+ config.pep.saturation = NoSave(ConfigNothing())
+
+ if os_path.exists("/proc/stb/vmpeg/0/pep_hue"):
+ def setHue(config):
+ myval = int(config.value*256)
+ try:
+ print "--> setting hue to: %0.8X" % myval
+ open("/proc/stb/vmpeg/0/pep_hue", "w").write("%0.8X" % myval)
+ except IOError:
+ print "couldn't write pep_hue."
+
+ if not VideoEnhancement.firstRun:
+ self.setConfiguredValues()
+
+ config.pep.hue = ConfigSlider(default=128, limits=(0,256))
+ config.pep.hue.addNotifier(setHue)
+ else:
+ config.pep.hue = NoSave(ConfigNothing())
+
+ if os_path.exists("/proc/stb/vmpeg/0/pep_brightness"):
+ def setBrightness(config):
+ myval = int(config.value*256)
+ try:
+ print "--> setting brightness to: %0.8X" % myval
+ open("/proc/stb/vmpeg/0/pep_brightness", "w").write("%0.8X" % myval)
+ except IOError:
+ print "couldn't write pep_brightness."
+
+ if not VideoEnhancement.firstRun:
+ self.setConfiguredValues()
+
+ config.pep.brightness = ConfigSlider(default=128, limits=(0,256))
+ config.pep.brightness.addNotifier(setBrightness)
+ else:
+ config.pep.brightness = NoSave(ConfigNothing())
+
+ if os_path.exists("/proc/stb/vmpeg/0/pep_block_noise_reduction"):
+ def setBlock_noise_reduction(config):
+ myval = int(config.value)
+ try:
+ print "--> setting block_noise_reduction to: %0.8X" % myval
+ open("/proc/stb/vmpeg/0/pep_block_noise_reduction", "w").write("%0.8X" % myval)
+ except IOError:
+ print "couldn't write pep_block_noise_reduction."
+
+ if not VideoEnhancement.firstRun:
+ self.setConfiguredValues()
+
+ config.pep.block_noise_reduction = ConfigSlider(default=0, limits=(0,5))
+ config.pep.block_noise_reduction.addNotifier(setBlock_noise_reduction)
+ else:
+ config.pep.block_noise_reduction = NoSave(ConfigNothing())
+
+ if os_path.exists("/proc/stb/vmpeg/0/pep_mosquito_noise_reduction"):
+ def setMosquito_noise_reduction(config):
+ myval = int(config.value)
+ try:
+ print "--> setting mosquito_noise_reduction to: %0.8X" % myval
+ open("/proc/stb/vmpeg/0/pep_mosquito_noise_reduction", "w").write("%0.8X" % myval)
+ except IOError:
+ print "couldn't write pep_mosquito_noise_reduction."
+
+ if not VideoEnhancement.firstRun:
+ self.setConfiguredValues()
+
+ config.pep.mosquito_noise_reduction = ConfigSlider(default=0, limits=(0,5))
+ config.pep.mosquito_noise_reduction.addNotifier(setMosquito_noise_reduction)
+ else:
+ config.pep.mosquito_noise_reduction = NoSave(ConfigNothing())