from Screens.Screen import Screen
from Screens.InfoBar import InfoBar
from Screens.MessageBox import MessageBox
+from Screens.PictureInPicture import on_pip_start_stop
from Components.NimManager import nimmanager
from Components.config import config, getConfigListEntry, ConfigSubsection, ConfigYesNo, ConfigSelection
self.fccEventTimer.callback.append(self.FCCApplyEvent)
self.fccForceStartTimer = eTimer()
- self.fccForceStartTimer.callback.append(self.FCCForceStartForREC)
+ self.fccForceStartTimer.callback.append(self.FCCForceStart)
self.fccResetTimer = eTimer()
self.fccResetTimer.callback.append(self.FCCResetTimerForREC)
self.onClose = []
self.changeEventTracker()
+ on_pip_start_stop.append(self.FCCForceStopforPIP)
+
def setProcFCC(self, value):
procPath = "/proc/stb/frontend/fbc/fcc"
if os.access(procPath, os.W_OK):
elif event == iRecordableService.evEnd:
self.getRecordings()
if not self.recordings:
- self.FCCForceStartForREC()
+ self.FCCForceStart()
else:
if event == iRecordableService.evTuneStart:
- self.fccResetTimer.stop()
- self.FCCForceStopForREC()
- self.fccForceStartTimer.start(2000, True)
+ self.FCCForceStopAndStart()
elif event == iRecordableService.evEnd:
self.fccForceStartTimer.stop()
self.fccResetTimer.start(2000, True)
- def FCCForceStopForREC(self):
+ def FCCForceStart(self):
+ self.enableEventTracker(True)
+ self.getEvStart()
+ self.getEvTunedIn()
+
+ def FCCForceStop(self):
self.enableEventTracker(False)
self.FCCDisableServices()
self.FCCStopAllServices()
- def FCCForceStartForREC(self):
- self.enableEventTracker(True)
- self.FCCForceStart()
+ def FCCForceStopAndStart(self):
+ self.fccResetTimer.stop()
+ self.FCCForceStop()
+ self.fccForceStartTimer.start(2000, True)
+
+ def FCCForceStopforPIP(self):
+ self.FCCForceStopAndStart()
+
+ def FCCForceStopForREC(self):
+ self.FCCForceStop()
def FCCResetTimerForREC(self):
self.FCCForceStopForREC()
- self.FCCForceStartForREC()
+ self.FCCForceStart()
def FCCSetupChanged(self):
fcc_changed = False
self.fccmgr.stopFCCService()
self.eventList = []
- def FCCForceStart(self):
- self.getEvStart()
- self.getEvTunedIn()
-
def FCCCheckNoLocked(self):
for (sref, value) in self.fccmgr.getFCCServiceList().items():
state = value[0]
pip_config_initialized = False
+on_pip_start_stop = []
+
class PictureInPicture(Screen):
def __init__(self, session):
global pip_config_initialized
config.av.pip = ConfigPosition(default=[-1, -1, -1, -1], args = (719, 567, 720, 568))
pip_config_initialized = True
self.onLayoutFinish.append(self.LayoutFinished)
+ self.dvbPipStarted = False
+
+ def __del__(self):
+ if self.dvbPipStarted:
+ self.onPipStartAndStop()
def LayoutFinished(self):
self.onLayoutFinish.remove(self.LayoutFinished)
if ref:
self.pipservice = eServiceCenter.getInstance().play(ref)
if self.pipservice and not self.pipservice.setTarget(1):
+ if ref.type == 1: # dvb service
+ self.dvbPipStarted = True
+ self.onPipStartAndStop()
+
self.pipservice.start()
self.currentService = service
return True
def getCurrentService(self):
return self.currentService
+ def onPipStartAndStop(self):
+ global on_pip_start_stop
+ for x in on_pip_start_stop:
+ x()
\ No newline at end of file