teletext handling changes

This commit is contained in:
martii
2013-03-29 18:14:52 +01:00
parent beac99d8b0
commit 2b11ad1880
4 changed files with 58 additions and 4 deletions

View File

@@ -634,6 +634,35 @@ void cPlayback::FindAllDvbsubtitlePids(uint16_t *pids, uint16_t *numpids, std::s
}
}
}
void cPlayback::FindAllTeletextsubtitlePids(uint16_t *pids, uint16_t *numpids, std::string *language)
{
printf("%s:%s\n", FILENAME, __FUNCTION__);
if(player && player->manager && player->manager->teletext) {
char ** TrackList = NULL;
player->manager->teletext->Command(player, MANAGER_LIST, &TrackList);
if (TrackList != NULL) {
printf("Teletext List\n");
int i = 0,j=0;
for (i = 0,j=0; TrackList[i] != NULL; i+=2) {
int type = 0;
printf("\t%s - %s\n", TrackList[i], TrackList[i+1]);
if (1 != sscanf(TrackList[i], "%*d %*s %d %*d %*d", &type))
continue;
if (type != 2 && type != 5) // return subtitles only
continue;
pids[j]=j;
// atUnknown, atMPEG, atMP3, atAC3, atDTS, atAAC, atPCM, atOGG, atFLAC
language[j]=TrackList[i];
free(TrackList[i]);
free(TrackList[i+1]);
j++;
}
free(TrackList);
*numpids=j;
}
}
}
#endif
//

View File

@@ -57,6 +57,8 @@ class cPlayback
#ifdef MARTII
void FindAllSubtitlePids(uint16_t *pids, uint16_t *numpids, std::string *language);
void FindAllDvbsubtitlePids(uint16_t *pids, uint16_t *numpids, std::string *language);
void FindAllTeletextsubtitlePids(uint16_t *pids, uint16_t *numpidt, std::string *tlanguage);
void RequestAbort(void);
#endif
#if 0