PyDict_SetItem(tp_dict, sat_pos, tplist);
for (ElementConstIterator it(sat_elements.begin()); it != sat_elements.end(); ++it)
{
-// eDebug("\telement: %s", (*it)->name().c_str());
+ //eDebug("\telement: %s", (*it)->name().c_str());
const AttributeList &tp_attributes = (*it)->getAttributeList();
AttributeConstIterator end = tp_attributes.end();
modulation = eDVBFrontendParametersSatellite::Modulation_QPSK;
for (AttributeConstIterator it(tp_attributes.begin()); it != end; ++it)
{
- //eDebug("\t\tattr: %s", at->name().c_str());
at = *it;
+ //eDebug("\t\tattr: %s", at->name().c_str());
name = at->name();
if (name == "modulation") dest = &modulation;
else if (name == "system") dest = &system;
else if (name == "onid") dest = &onid;
if (dest)
{
+ //eDebug("\t\t\tvalue: %s", at->value().c_str());
tmp = strtol(at->value().c_str(), &end_ptr, 10);
if (!*end_ptr)
*dest = tmp;
DEFINE_REF(eDVBLocalTimeHandler);
eDVBLocalTimeHandler::eDVBLocalTimeHandler()
- :m_updateNonTunedTimer(eTimer::create(eApp)), m_time_ready(false)
+ :m_use_dvb_time(false), m_updateNonTunedTimer(eTimer::create(eApp)), m_time_ready(false)
{
if ( !instance )
instance=this;
}
}
+void eDVBLocalTimeHandler::setUseDVBTime(bool b)
+{
+ if (m_use_dvb_time != b) {
+ if (m_use_dvb_time) {
+ eDebug("[eDVBLocalTimeHandler] disable sync local time with transponder time!");
+ std::map<iDVBChannel*, channel_data>::iterator it =
+ m_knownChannels.begin();
+ for (; it != m_knownChannels.end(); ++it) {
+ if (it->second.m_prevChannelState == iDVBChannel::state_ok)
+ it->second.tdt = 0;
+ }
+ }
+ else {
+ eDebug("[eDVBLocalTimeHandler] enable sync local time with transponder time!");
+ std::map<iDVBChannel*, channel_data>::iterator it =
+ m_knownChannels.begin();
+ for (; it != m_knownChannels.end(); ++it) {
+ if (it->second.m_prevChannelState == iDVBChannel::state_ok) {
+ it->second.tdt = new TDT(it->second.channel);
+ it->second.tdt->start();
+ }
+ }
+ }
+ m_use_dvb_time = b;
+ }
+}
+
void eDVBLocalTimeHandler::updateNonTuned()
{
updateTime(-1, 0, 0);
case iDVBChannel::state_ok:
eDebug("[eDVBLocalTimerHandler] channel %p running", chan);
m_updateNonTunedTimer->stop();
- it->second.tdt = new TDT(it->second.channel);
- it->second.tdt->start();
+ if (m_use_dvb_time) {
+ it->second.tdt = new TDT(it->second.channel);
+ it->second.tdt->start();
+ }
break;
case iDVBChannel::state_release:
eDebug("[eDVBLocalTimerHandler] remove channel %p", chan);
ePtr<eConnection> m_stateChangedConn;
int m_prevChannelState;
};
+ bool m_use_dvb_time;
ePtr<eTimer> m_updateNonTunedTimer;
friend class TDT;
std::map<iDVBChannel*, channel_data> m_knownChannels;
eDVBLocalTimeHandler();
~eDVBLocalTimeHandler();
#endif
+ bool getUseDVBTime() { return m_use_dvb_time; }
+ void setUseDVBTime(bool b);
PSignal0<void> m_timeUpdated;
bool ready() const { return m_time_ready; }
static eDVBLocalTimeHandler *getInstance() { return instance; }
eDebug("'%s' is in service list of slot %d... so use it", ref.toString().c_str(), ci_it->getSlotID());
useThis = true;
}
+ else // check parent
+ {
+ eServiceReferenceDVB parent_ref = ref.getParentServiceReference();
+ if (parent_ref)
+ {
+ it = ci_it->possible_services.find(ref);
+ if (it != ci_it->possible_services.end())
+ {
+ eDebug("parent '%s' of '%s' is in service list of slot %d... so use it",
+ parent_ref.toString().c_str(), ref.toString().c_str(), ci_it->getSlotID());
+ useThis = true;
+ }
+ }
+ }
}
if (!useThis && !ci_it->possible_providers.empty())
{
}
if (!useThis && !ci_it->possible_caids.empty())
{
+ mask |= 4;
for (CAID_LIST::iterator ca(caids.begin()); ca != caids.end(); ++ca)
{
caidSet::iterator it = ci_it->possible_caids.find(*ca);
# check for tsid != -1 and onid != -1
print "index:", index
print "len(self.transponderlist):", len(self.transponderlist)
- while (index < len(self.transponderlist) and (self.transponderlist[index][8] == -1 or self.transponderlist[index][9] == -1)):
+ while (index < len(self.transponderlist) and (self.transponderlist[index][10] == -1 or self.transponderlist[index][11] == -1)):
index += 1
print "FirstTransponder final index:", index
return index
# check for tsid != -1 and onid != -1
print "index:", index
print "len(self.transponderlist):", len(self.transponderlist)
- while (index < len(self.transponderlist) and (self.transponderlist[index][8] == -1 or self.transponderlist[index][9] == -1)):
+ while (index < len(self.transponderlist) and (self.transponderlist[index][10] == -1 or self.transponderlist[index][11] == -1)):
index += 1
print "next transponder index:", index
<screen name="FileBrowser" position="100,100" size="520,376" title="DVD File Browser" >
<widget name="filelist" position="0,0" size="520,376" scrollbarMode="showOnDemand" />
</screen>"""
- def __init__(self, session, scope, settings):
+ def __init__(self, session, scope, configRef):
Screen.__init__(self, session)
HelpableScreen.__init__(self)
self.scope = scope
pattern = ""
+ self.configRef = configRef
currDir = "/"
if self.scope == "project":
currDir = self.getDir()
currDir = self.getDir()
pattern = "(?i)^.*\.(ddvdm\.xml)"
if self.scope == "menubg":
- currDir = self.getDir(settings.menubg)
+ currDir = self.getDir(configRef.getValue())
pattern = "(?i)^.*\.(jpeg|jpg|jpe|png|bmp)"
elif self.scope == "menuaudio":
- currDir = self.getDir(settings.menuaudio)
+ currDir = self.getDir(configRef.getValue())
pattern = "(?i)^.*\.(mp2|m2a|ac3)"
elif self.scope == "vmgm":
- currDir = self.getDir(settings.vmgm)
+ currDir = self.getDir(configRef.getValue())
pattern = "(?i)^.*\.(mpg|mpeg)"
elif self.scope == "font_face":
- currDir = self.getDir(settings.font_face, resolveFilename(SCOPE_FONTS))
+ currDir = self.getDir(configRef.getValue(), resolveFilename(SCOPE_FONTS))
pattern = "(?i)^.*\.(ttf)"
elif self.scope == "isopath":
- currDir = settings.isopath.getValue()
+ currDir = configRef.getValue()
elif self.scope == "image":
currDir = resolveFilename(SCOPE_HDD)
pattern = "(?i)^.*\.(iso)"
"cancel": self.exit
})
- def getDir(self, key=None, defaultDir=None):
- if key:
- settingDir = key.getValue()
- if len(settingDir) > 1:
- return (settingDir.rstrip("/").rsplit("/",1))[0]
+ def getDir(self, currentVal=None, defaultDir=None):
+ if currentVal:
+ return (currentVal.rstrip("/").rsplit("/",1))[0]
return defaultDir or (resolveFilename(SCOPE_PLUGINS)+"Extensions/DVDBurn/")
def ok(self):
if self.scope == "image":
path = self["filelist"].getCurrentDirectory() or ""
if fileExists(path+"VIDEO_TS"):
- self.close(path,self.scope)
+ self.close(path,self.scope,self.configRef)
else:
ret = self["filelist"].getCurrentDirectory() + '/' + self["filelist"].getFilename()
- self.close(ret,self.scope)
+ self.close(ret,self.scope,self.configRef)
def exit(self):
if self.scope == "isopath":
- self.close(self["filelist"].getCurrentDirectory(),self.scope)
- self.close(None,False)
+ self.close(self["filelist"].getCurrentDirectory(),self.scope,self.configRef)
+ self.close(None,False,None)
class ProjectSettings(Screen,ConfigListScreen):
skin = """
infotext = ""
self["info"] = StaticText(infotext)
+ self.keydict = {}
self.settings = project.settings
ConfigListScreen.__init__(self, [])
self.initConfigList()
-
- self.keydict = {}
- for key, val in self.settings.dict().iteritems():
- self.keydict[val] = key
self["setupActions"] = ActionMap(["SetupActions", "ColorActions"],
{
self.list.append(getConfigListEntry(("DVD data format"), self.settings.dataformat))
self["config"].setList(self.list)
+ self.keydict = {}
+ for key, val in self.settings.dict().iteritems():
+ self.keydict[val] = key
+ for key, val in self.project.menutemplate.settings.dict().iteritems():
+ self.keydict[val] = key
def keyLeft(self):
ConfigListScreen.keyLeft(self)
def ok(self):
key = self.keydict[self["config"].getCurrent()[1]]
- if key in self.project.filekeys:
- self.session.openWithCallback(self.FileBrowserClosed, FileBrowser, key, self.settings)
+ from DVDProject import ConfigFilename
+ if type(self["config"].getCurrent()[1]) == ConfigFilename:
+ self.session.openWithCallback(self.FileBrowserClosed, FileBrowser, key, self["config"].getCurrent()[1])
def cancel(self):
self.close(False)
text = _("Save")+' '+_('Error')
self.session.open(MessageBox,text,type = MessageBox.TYPE_ERROR)
- def FileBrowserClosed(self, path, scope):
+ def FileBrowserClosed(self, path, scope, configRef):
if scope == "menutemplate":
- if not self.project.menutemplate.loadTemplate(path):
- self.session.open(MessageBox,self.project.error,MessageBox.TYPE_ERROR)
- else:
+ if self.project.menutemplate.loadTemplate(path):
print "[ProjectSettings] menu template loaded"
-
- if scope in self.project.filekeys:
- self.settings.dict()[scope].setValue(path)
- elif scope == "project":
- if not self.project.loadProject(path):
- self.session.open(MessageBox,self.project.error,MessageBox.TYPE_ERROR)
+ configRef.setValue(path)
+ self.initConfigList()
else:
+ self.session.open(MessageBox,self.project.error,MessageBox.TYPE_ERROR)
+ elif scope == "project":
+ if self.project.loadProject(path):
+ configRef.setValue(path)
self.initConfigList()
+ else:
+ self.session.open(MessageBox,self.project.error,MessageBox.TYPE_ERROR)
+ elif scope:
+ configRef.setValue(path)
+ self.initConfigList()
"titleProperties": (self.titleProperties, _("Properties of current title"), _("Title properties")),
"removeCurrentTitle": (self.removeCurrentTitle, _("Remove currently selected title"), _("Remove title")),
"settings": (self.settings, _("Collection settings"), _("Settings")),
- "burnProject": (self.burnProject, _("Burn DVD"), _("Burn DVD")),
+ "burnProject": (self.askBurnProject, _("Burn DVD"), _("Burn DVD")),
})
self["MovieSelectionActions"] = HelpableActionMap(self, "MovieSelectionActions",
menu.append((_("DVD media toolbox"), self.toolbox))
menu.append((_("Preview menu"), self.previewMenu))
if self.project.settings.output.getValue() == "dvd":
- menu.append((_("Burn DVD"), self.burnProject))
+ if len(self["titles"].list):
+ menu.append((_("Burn DVD"), self.burnProject))
elif self.project.settings.output.getValue() == "iso":
menu.append((_("Create DVD-ISO"), self.burnProject))
menu.append((_("Burn existing image to DVD"), self.selectImage))
self["error_label"].show()
return False
- def burnProject(self):
+ def askBurnProject(self):
+ if len(self["titles"].list):
+ self.session.openWithCallback(self.burnProject,MessageBox,text = _("Do you want to burn this collection to DVD medium?"), type = MessageBox.TYPE_YESNO)
+
+ def burnProject(self, answer=True):
+ if not answer:
+ return
if self.project.settings.authormode.getValue() == "data_ts":
job = Process.DVDdataJob(self.project)
job_manager.AddJob(job)
job_manager.in_background = False
self.session.openWithCallback(self.JobViewCB, JobView, job)
- def burnISO(self, path, scope):
+ def burnISO(self, path, scope, configRef):
if path:
job = Process.DVDisoJob(self.project, path)
job_manager.AddJob(job)
text += " ==> "
text += str(transponder[0])
text += "\n"
+ if reason == "pids_failed":
+ text += "(tsid, onid): "
+ text += str(transponder[3]['real'])
+ text += "(read from sat) != "
+ text += str(transponder[3]['expected'])
+ text += "(read from file)"
+ text += "\n"
+ text += "\n"
if countsuccessful > 0:
text += "\n"
text += "Successfully tuned transponders' previous planes:\n"
print "after:\n", self.recording
def setEndtime(self, entry):
- if entry is not None:
+ if entry is not None and entry >= 0:
self.selectedEntry = entry
self.endtime=ConfigClock(default = self.recording[self.selectedEntry].end)
dlg = self.session.openWithCallback(self.TimeDateInputClosed, TimeDateInput, self.endtime)
self.session.nav.RecordTimer.timeChanged(self.recording[self.selectedEntry])
def changeDuration(self, entry):
- if entry is not None:
+ if entry is not None and entry >= 0:
self.selectedEntry = entry
self.session.openWithCallback(self.inputCallback, InputBox, title=_("How many minutes do you want to record?"), text="5", maxSize=False, type=Input.NUMBER)
switch (sourceinfo.containertype)
{
case ctMPEGTS:
- demux_type = "flutsdemux";
+ demux_type = "mpegtsdemux";
break;
case ctMPEGPS:
case ctVCD:
- demux_type = "flupsdemux";
+ demux_type = "mpegpsdemux";
break;
case ctMKV:
demux_type = "matroskademux";
config.misc.radiopic = ConfigText(default = resolveFilename(SCOPE_SKIN_IMAGE)+"radio.mvi")
config.misc.isNextRecordTimerAfterEventActionAuto = ConfigYesNo(default=False)
+config.misc.useTransponderTime = ConfigYesNo(default=True)
+
+def useTransponderTimeChanged(configElement):
+ enigma.eDVBLocalTimeHandler.getInstance().setUseDVBTime(configElement.value)
+config.misc.useTransponderTime.addNotifier(useTransponderTimeChanged)
profile("Twisted")
try: