Merge branch 'bug_440_dvdplayer_audioselection' into experimental [fixes ##440+441...
authorFraxinas <andreas.frisch@multimedia-labs.de>
Fri, 28 Jan 2011 10:42:26 +0000 (11:42 +0100)
committerFraxinas <andreas.frisch@multimedia-labs.de>
Fri, 28 Jan 2011 10:46:53 +0000 (11:46 +0100)
Conflicts:
lib/python/Screens/AudioSelection.py

1  2 
lib/python/Plugins/Extensions/DVDPlayer/plugin.py
lib/python/Plugins/Extensions/DVDPlayer/src/servicedvd.cpp
lib/python/Screens/AudioSelection.py

@@@ -659,8 -736,26 +736,26 @@@ RESULT eServiceDVD::disableSubtitles(eW
  
  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()
Simple merge