libeplayer3: change teletext handling to directly inject packets in tuxtext

Origin commit data
------------------
Branch: master
Commit: daaa1ca8df
Author: martii <m4rtii@gmx.de>
Date: 2014-03-23 (Sun, 23 Mar 2014)


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

------------------
This commit was generated by Migit
This commit is contained in:
martii
2014-03-23 13:54:40 +01:00
parent ad7a6eb1e0
commit 7a499f35c4
7 changed files with 9 additions and 416 deletions

View File

@@ -66,7 +66,6 @@ bool cPlayback::Open(playmode_t PlayMode)
if(player && player->output) {
player->output->Command(player,OUTPUT_ADD, (void*)"audio");
player->output->Command(player,OUTPUT_ADD, (void*)"video");
player->output->Command(player,OUTPUT_ADD, (void*)"teletext");
}
return 0;
@@ -249,8 +248,6 @@ bool cPlayback::Stop(void)
if(player && player->output) {
player->output->Command(player,OUTPUT_DEL, (void*)"audio");
player->output->Command(player,OUTPUT_DEL, (void*)"video");
player->output->Command(player,OUTPUT_DEL, (void*)"subtitle");
player->output->Command(player,OUTPUT_DEL, (void*)"teletext");
}
if(player && player->playback)
@@ -572,7 +569,7 @@ void cPlayback::FindAllTeletextsubtitlePids(int *pids, unsigned int *numpids, st
printf("\t%s - %s\n", TrackList[i], TrackList[i+1]);
if (j < max_numpids) {
int _pid;
if (2 != sscanf(TrackList[i], "%d %*s %d %*d %*d", &_pid, &type))
if (2 != sscanf(TrackList[i], "%*d %d %*s %d %*d %*d", &_pid, &type))
continue;
if (type != 2 && type != 5) // return subtitles only
continue;
@@ -602,11 +599,11 @@ int cPlayback::GetTeletextPid(void)
for (i = 0; TrackList[i] != NULL; i+=2) {
int type = 0;
printf("\t%s - %s\n", TrackList[i], TrackList[i+1]);
if (!pid) {
if (2 != sscanf(TrackList[i], "%d %*s %d %*d %*d", &pid, &type))
if (pid < 0) {
if (2 != sscanf(TrackList[i], "%*d %d %*s %d %*d %*d", &pid, &type))
continue;
if (type != 1)
pid = 0;
pid = -1;
}
free(TrackList[i]);
free(TrackList[i+1]);