summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorphintuka <phintuka>2006-10-18 13:01:14 +0000
committerphintuka <phintuka>2006-10-18 13:01:14 +0000
commit8e335816cd7d240ab91b7224dd016b90a4278f72 (patch)
treed24ea47ad074459a7d20912aa0afda7faeb61d45
parent345ce8f5f0aceefa1a614e8228dec4bf90ee6328 (diff)
downloadxineliboutput-8e335816cd7d240ab91b7224dd016b90a4278f72.tar.gz
xineliboutput-8e335816cd7d240ab91b7224dd016b90a4278f72.tar.bz2
Handle DVD SPU track maps
-rw-r--r--frontend.c35
1 files changed, 34 insertions, 1 deletions
diff --git a/frontend.c b/frontend.c
index 5bfa713c..81cead2e 100644
--- a/frontend.c
+++ b/frontend.c
@@ -4,7 +4,7 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: frontend.c,v 1.18 2006-09-20 12:30:48 phintuka Exp $
+ * $Id: frontend.c,v 1.19 2006-10-18 13:01:14 phintuka Exp $
*
*/
@@ -31,6 +31,7 @@
#include "logdefs.h"
#include "config.h"
#include "frontend.h"
+#include "device.h"
#include "tools/pes.h"
#include "tools/general_remote.h"
@@ -83,6 +84,38 @@ void cXinelibThread::KeypressHandler(const char *keymap, const char *key,
}
}
+void cXinelibThread::InfoHandler(const char *info)
+{
+ char *pmap = strdup(info), *map = pmap;
+
+ if(!strncmp(info, "TRACKMAP SPU", 12)) {
+ map += 13;
+ if(strchr(map, '\r'))
+ *strchr(map, '\r') = 0;
+ cXinelibDevice::Instance().ClrAvailableDvdSpuTracks();
+ while(*map) {
+ while(*map == ' ') map++;
+ int id = atoi(map);
+ while(*map && *map != ':') map++;
+ if(*map == ':') map++;
+ char *lang = map;
+ while(*map && *map != ' ') map++;
+ if(*map == ' ') { *map = 0; map++; };
+ cXinelibDevice::Instance().SetAvailableDvdSpuTrack(id, *lang ? lang : NULL);
+ }
+ }
+
+ else if(!strncmp(info, "TRACKMAP AUDIO", 14)) {
+ map += 15;
+ if(strchr(map, '\r'))
+ *strchr(map, '\r') = 0;
+
+ /* #warning TODO: audio tracks -> device */
+ }
+
+ free(pmap);
+}
+
cXinelibThread::cXinelibThread(const char *Description) : cThread(Description)
{
TRACEF("cXinelibThread::cXinelibThread");