PyObject *eServiceDVD::getSubtitleList()
{
- eDebug("eServiceDVD::getSubtitleList nyi");
- Py_RETURN_NONE;
+ ePyObject l = PyList_New(0);
+ unsigned int spu_count = 0;
+ ddvd_get_spu_count(m_ddvdconfig, &spu_count);
+
+ for ( unsigned int spu_id = 0; spu_id < spu_count; spu_id++ )
+ {
+ uint16_t spu_lang;
+ ddvd_get_spu_byid(m_ddvdconfig, spu_id, &spu_lang);
+ char spu_string[3]={spu_lang >> 8, spu_lang, 0};
+
+ ePyObject tuple = PyTuple_New(5);
+ PyTuple_SetItem(tuple, 0, PyInt_FromLong(2));
+ PyTuple_SetItem(tuple, 1, PyInt_FromLong(spu_id+1));
- PyTuple_SetItem(tuple, 2, PyInt_FromLong(3));
++ PyTuple_SetItem(tuple, 2, PyInt_FromLong(5));
+ PyTuple_SetItem(tuple, 3, PyInt_FromLong(0));
+ PyTuple_SetItem(tuple, 4, PyString_FromString(spu_string));
+ PyList_Append(l, tuple);
+ Py_DECREF(tuple);
+ }
+ return l;
}
PyObject *eServiceDVD::getCachedSubtitle()