diff options
Diffstat (limited to 'frontend.c')
-rw-r--r-- | frontend.c | 35 |
1 files changed, 34 insertions, 1 deletions
@@ -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"); |