Exemple #1
0
	def __init__(self):
		self._cec = eCec.getInstance()
		self._cec.handleExternal(True)
		self.session = None
		self.__msg_conn = self._cec.receivedMessage.connect(self._onMessage)
		self._logicalAddress = self._cec.logicalAddress()
		self._physicalAddress = tuple(self._cec.physicalAddress())
		self._activeSource = None
		self._vendor = eCec.VENDOR_DREAM
		self._powerState = eCec.POWER_STATE_ON
		self._devices = {}
		self._checkDevicesTimer = eTimer()
		self.__check_devices_connection = self._checkDevicesTimer.timeout.connect(self.onCheckDevices)
		self._audioStatusTimer = eTimer()
		self.__audio_status_connection = self._audioStatusTimer.timeout.connect(self.giveAudioStatus)
		config.misc.standbyCounter.addNotifier(self._onStandby, initial_call = False)

		#Volume control
		self._volumeDest = eCec.ADDR_TV
		self._volume = -1
		self._muted = False
		self.onVolumeChanged = []

		#Remote control
		self.onKeyPressed = []
		self.onKeyReleased = []
		self._remote = CecRemote(self)
	def reload(self):
		cec = eCec.getInstance()
		deviceList = cec.getKnownDevices()
		devices = []
		for device in deviceList:
			deviceType = self.DEVICE_TYPE.get(device.logicalAddress(), _("Other"))
			text = "{0} - {1} {2}".format(deviceType, device.readableVendor(), device.deviceName())
			Log.i(text)
			devices.append(text)
		self["list"].setList(devices)
Exemple #3
0
	def reload(self):
		cec = eCec.getInstance()
		deviceList = cec.getKnownDevices()
		devices = []
		for device in deviceList:
			deviceType = self.DEVICE_TYPE.get(device.logicalAddress(), _("Other"))
			text = "{0} - {1} {2}".format(deviceType, device.readableVendor(), device.deviceName())
			Log.i(text)
			devices.append(text)
		self["list"].setList(devices)
Exemple #4
0
    def __init__(self):
        self._cec = eCec.getInstance()
        self._cec.handleExternal(True)
        self.session = None
        self.__msg_conn = self._cec.receivedMessage.connect(self._onMessage)
        self.__ready_conn = self._cec.ready.connect(self._onReady)
        self._logicalAddress = -1
        self._physicalAddress = (0xff, 0xff)
        self._activeSource = (0, 0)
        self._vendor = eCec.VENDOR_DREAM
        self._powerState = eCec.POWER_STATE_ON
        self._devices = {}
        self._checkDevicesTimer = eTimer()
        self.__check_devices_connection = self._checkDevicesTimer.timeout.connect(
            self.onCheckDevices)
        config.misc.standbyCounter.addNotifier(self._onStandby,
                                               initial_call=False)
        self._onReady(self._cec.logicalAddress(), self._cec.physicalAddress())

        self._volumeDest = eCec.ADDR_TV
        self.onKeyPressed = []
        self.onKeyReleased = []
        self._remote = CecRemote(self)
Exemple #5
0
	def __init__(self):
		self.instance = eCec.getInstance()
		self.instance.setName(config.cec.name.value)
Exemple #6
0
	def __init__(self):
		self.instance = eCec.getInstance()
		self.instance.setName(config.cec.name.value)
Exemple #7
0
	def __init__(self):
		self.instance = eCec.getInstance()