teletext handling changes

Origin commit data
------------------
Branch: master
Commit: 2b11ad1880
Author: martii <m4rtii@gmx.de>
Date: 2013-03-29 (Fri, 29 Mar 2013)


------------------
No further description and justification available within origin commit message!

------------------
This commit was generated by Migit
This commit is contained in:
martii
2013-03-29 18:14:52 +01:00
parent c02a804944
commit e3257942df
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
//