示例#1
0
	def start(self, session):
		if self._started:
			return
		self.session = session
		config.misc.standbyCounter.addNotifier(self._onStandby, initial_call = False)
		self._cec_recvStandby_conn = hdmi_cec.instance.receivedStandby.connect(self.__receivedStandby)
		self._cec_isNowActive_conn = hdmi_cec.instance.isNowActive.connect(self.__receivedNowActive)
		self._cec_ready_conn = hdmi_cec.instance.ready.connect(self.ready)
		self.actionSlot = eActionMap.getInstance().bindAction('', -0x7FFFFFFF, self._onKeyPress) #highest prio
		self._remoteHandler = CecRemoteHandler() #the handler registeres all cec stuff itself, so no need to do anything else here
		self._started = True
		hdmi_cec.setPowerState(eCec.POWER_STATE_ON)
示例#2
0
文件: plugin.py 项目: OpenDMM/enigma2
	def start(self, session):
		if self._started:
			return
		self.session = session
		config.misc.standbyCounter.addNotifier(self._onStandby, initial_call = False)
		self._cec_recvStandby_conn = hdmi_cec.instance.receivedStandby.connect(self.__receivedStandby)
		self._cec_isNowActive_conn = hdmi_cec.instance.isNowActive.connect(self.__receivedNowActive)
		self._cec_ready_conn = hdmi_cec.instance.ready.connect(self.ready)
		self.actionSlot = eActionMap.getInstance().bindAction('', -0x7FFFFFFF, self._onKeyPress) #highest prio
		self._remoteHandler = CecRemoteHandler() #the handler registeres all cec stuff itself, so no need to do anything else here
		self._started = True
		hdmi_cec.setPowerState(eCec.POWER_STATE_ON)
示例#3
0
文件: plugin.py 项目: popazerty/12
	def powerOff(self):
		if self._idle_to_standby:
			return
		hdmi_cec.setPowerState(hdmi_cec.POWER_STATE_STANDBY)
		if config.cec.sendpower.value:
			print "[Cec] power off"
			if self._skip_next_poweroff_message:
				self._skip_next_poweroff_message = False
			else:
				hdmi_cec.systemStandby()
				if config.cec.avr_power_explicit.value:
					self._remoteHandler.sendKey(5, eCec.RC_POWER_OFF)
					hdmi_cec.systemStandby(target=5)
示例#4
0
 def powerOff(self):
     if self._idle_to_standby:
         return
     if config.cec.sendpower.value:
         print "[Cec] power off"
         if self._skip_next_poweroff_message:
             self._skip_next_poweroff_message = False
         else:
             hdmi_cec.systemStandby()
             if config.cec.avr_power_explicit.value:
                 self._remoteHandler.sendKey(5, eCec.RC_POWER_OFF)
                 hdmi_cec.systemStandby(target=5)
     hdmi_cec.setPowerState(hdmi_cec.POWER_STATE_STANDBY)
示例#5
0
文件: plugin.py 项目: popazerty/12
	def powerOn(self, forceOtp=False):
		if self._skip_next_poweron_message:
			self._skip_next_poweron_message = False
			return
		if self.session.shutdown:
			self._idle_to_standby = True
			return
		hdmi_cec.setPowerState(hdmi_cec.POWER_STATE_ON)
		if config.cec.sendpower.value or forceOtp:
			print "[Cec] power on"
			hdmi_cec.otpEnable()
			if config.cec.avr_power_explicit.value:
				self._remoteHandler.sendKey(5, eCec.RC_POWER_ON)
				hdmi_cec.systemAudioRequest()
示例#6
0
 def powerOn(self, forceOtp=False):
     if self._skip_next_poweron_message:
         self._skip_next_poweron_message = False
         return
     if self.session.shutdown:
         self._idle_to_standby = True
         return
     hdmi_cec.setPowerState(hdmi_cec.POWER_STATE_ON)
     if config.cec.sendpower.value or forceOtp:
         print "[Cec] power on"
         hdmi_cec.otpEnable()
         if config.cec.avr_power_explicit.value:
             self._remoteHandler.sendKey(5, eCec.RC_POWER_ON)
         if config.cec.enable_avr.value:
             hdmi_cec.systemAudioRequest()