git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add new after record timer event behavior "auto".. and use it as default
[enigma2.git]
/
lib
/
dvb
/
pmt.cpp
diff --git
a/lib/dvb/pmt.cpp
b/lib/dvb/pmt.cpp
index 842d6979a3e1c227af1bdd316379e5de8011cc2e..25ac54655d20e86a9da11b1cc969c968a49b2f2a 100644
(file)
--- a/
lib/dvb/pmt.cpp
+++ b/
lib/dvb/pmt.cpp
@@
-1143,8
+1143,8
@@
void eDVBCAService::sendCAPMT()
static PyObject *createTuple(int pid, const char *type)
{
PyObject *r = PyTuple_New(2);
static PyObject *createTuple(int pid, const char *type)
{
PyObject *r = PyTuple_New(2);
- PyTuple_S
etItem
(r, 0, PyInt_FromLong(pid));
- PyTuple_S
etItem
(r, 1, PyString_FromString(type));
+ PyTuple_S
ET_ITEM
(r, 0, PyInt_FromLong(pid));
+ PyTuple_S
ET_ITEM
(r, 1, PyString_FromString(type));
return r;
}
return r;
}
@@
-1154,17
+1154,18
@@
static inline void PyList_AppendSteal(PyObject *list, PyObject *item)
Py_DECREF(item);
}
Py_DECREF(item);
}
+extern void PutToDict(ePyObject &dict, const char*key, ePyObject item); // defined in dvb/frontend.cpp
+
PyObject *eDVBServicePMTHandler::program::createPythonObject()
{
PyObject *eDVBServicePMTHandler::program::createPythonObject()
{
- PyObject *r = PyDict_New();
+ ePyObject r = PyDict_New();
+ ePyObject l = PyList_New(0);
- PyObject *l = PyList_New(0);
-
PyList_AppendSteal(l, createTuple(0, "pat"));
if (pmtPid != -1)
PyList_AppendSteal(l, createTuple(pmtPid, "pmt"));
PyList_AppendSteal(l, createTuple(0, "pat"));
if (pmtPid != -1)
PyList_AppendSteal(l, createTuple(pmtPid, "pmt"));
-
+
for (std::vector<eDVBServicePMTHandler::videoStream>::const_iterator
i(videoStreams.begin());
i != videoStreams.end(); ++i)
for (std::vector<eDVBServicePMTHandler::videoStream>::const_iterator
i(videoStreams.begin());
i != videoStreams.end(); ++i)
@@
-1184,7
+1185,8
@@
PyObject *eDVBServicePMTHandler::program::createPythonObject()
if (textPid != -1)
PyList_AppendSteal(l, createTuple(textPid, "text"));
if (textPid != -1)
PyList_AppendSteal(l, createTuple(textPid, "text"));
-
- PyDict_SetItemString(r, "pids", l);
+
+ PutToDict(r, "pids", l);
+
return r;
}
return r;
}