mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-27 15:32:43 +02:00
eplayer3: subtitle fixes
Origin commit data
------------------
Branch: master
Commit: e9be2bed37
Author: martii <m4rtii@gmx.de>
Date: 2013-04-01 (Mon, 01 Apr 2013)
------------------
No further description and justification available within origin commit message!
------------------
This commit was generated by Migit
This commit is contained in:
@@ -1692,8 +1692,6 @@ int container_ffmpeg_update_tracks(Context_t *context, char *filename)
|
|||||||
context->manager->audio->Command(context, MANAGER_DEL, NULL);
|
context->manager->audio->Command(context, MANAGER_DEL, NULL);
|
||||||
if (context->manager->video)
|
if (context->manager->video)
|
||||||
context->manager->video->Command(context, MANAGER_DEL, NULL);
|
context->manager->video->Command(context, MANAGER_DEL, NULL);
|
||||||
if (context->manager->subtitle)
|
|
||||||
context->manager->subtitle->Command(context, MANAGER_DEL, NULL);
|
|
||||||
if (context->manager->dvbsubtitle)
|
if (context->manager->dvbsubtitle)
|
||||||
context->manager->dvbsubtitle->Command(context, MANAGER_DEL, NULL);
|
context->manager->dvbsubtitle->Command(context, MANAGER_DEL, NULL);
|
||||||
if (context->manager->teletext)
|
if (context->manager->teletext)
|
||||||
|
@@ -180,7 +180,7 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
|||||||
}
|
}
|
||||||
case MANAGER_LIST: {
|
case MANAGER_LIST: {
|
||||||
#ifdef MARTII
|
#ifdef MARTII
|
||||||
container_ffmpeg_update_tracks(context, "current stream");
|
container_ffmpeg_update_tracks(context, context->playback->uri);
|
||||||
#endif
|
#endif
|
||||||
*((char***)argument) = (char **)ManagerList(context);
|
*((char***)argument) = (char **)ManagerList(context);
|
||||||
break;
|
break;
|
||||||
|
@@ -179,7 +179,7 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
|||||||
}
|
}
|
||||||
case MANAGER_LIST: {
|
case MANAGER_LIST: {
|
||||||
#ifdef MARTII
|
#ifdef MARTII
|
||||||
container_ffmpeg_update_tracks(context, "current stream");
|
container_ffmpeg_update_tracks(context, context->playback->uri);
|
||||||
#endif
|
#endif
|
||||||
*((char***)argument) = (char **)ManagerList(context);
|
*((char***)argument) = (char **)ManagerList(context);
|
||||||
break;
|
break;
|
||||||
|
@@ -177,7 +177,7 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
|||||||
}
|
}
|
||||||
case MANAGER_LIST: {
|
case MANAGER_LIST: {
|
||||||
#ifdef MARTII
|
#ifdef MARTII
|
||||||
container_ffmpeg_update_tracks(context, "current stream");
|
container_ffmpeg_update_tracks(context, context->playback->uri);
|
||||||
#endif
|
#endif
|
||||||
*((char***)argument) = (char **)ManagerList(context);
|
*((char***)argument) = (char **)ManagerList(context);
|
||||||
break;
|
break;
|
||||||
|
@@ -179,7 +179,7 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
|||||||
}
|
}
|
||||||
case MANAGER_LIST: {
|
case MANAGER_LIST: {
|
||||||
#ifdef MARTII
|
#ifdef MARTII
|
||||||
container_ffmpeg_update_tracks(context, "current stream");
|
container_ffmpeg_update_tracks(context, context->playback->uri);
|
||||||
#endif
|
#endif
|
||||||
*((char***)argument) = (char **)ManagerList(context);
|
*((char***)argument) = (char **)ManagerList(context);
|
||||||
break;
|
break;
|
||||||
|
@@ -174,7 +174,7 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
|||||||
}
|
}
|
||||||
case MANAGER_LIST: {
|
case MANAGER_LIST: {
|
||||||
#ifdef MARTII
|
#ifdef MARTII
|
||||||
container_ffmpeg_update_tracks(context, "current stream");
|
container_ffmpeg_update_tracks(context, context->playback->uri);
|
||||||
#endif
|
#endif
|
||||||
*((char***)argument) = (char **)ManagerList(context);
|
*((char***)argument) = (char **)ManagerList(context);
|
||||||
break;
|
break;
|
||||||
|
@@ -916,11 +916,27 @@ static int PlaybackSwitchSubtitle(Context_t *context, int* track) {
|
|||||||
if (context->manager && context->manager->subtitle) {
|
if (context->manager && context->manager->subtitle) {
|
||||||
int trackid;
|
int trackid;
|
||||||
|
|
||||||
|
#ifdef MARTII
|
||||||
|
if (context->manager->subtitle->Command(context, *track == 0xffff ? MANAGER_DEL : MANAGER_SET, track) < 0)
|
||||||
|
#else
|
||||||
if (context->manager->subtitle->Command(context, MANAGER_SET, track) < 0)
|
if (context->manager->subtitle->Command(context, MANAGER_SET, track) < 0)
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
playback_err("manager set track failed\n");
|
playback_err("manager set track failed\n");
|
||||||
}
|
}
|
||||||
|
#ifdef MARTII
|
||||||
|
if (*track == 0xffff) {
|
||||||
|
//CHECK FOR SUBTITLES
|
||||||
|
if (context->container && context->container->textSrtContainer)
|
||||||
|
context->container->textSrtContainer->Command(context, CONTAINER_INIT, context->playback->uri+7);
|
||||||
|
|
||||||
|
if (context->container && context->container->textSsaContainer)
|
||||||
|
context->container->textSsaContainer->Command(context, CONTAINER_INIT, context->playback->uri+7);
|
||||||
|
|
||||||
|
if (context->container && context->container->assContainer)
|
||||||
|
context->container->assContainer->Command(context, CONTAINER_INIT, NULL);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
context->manager->subtitle->Command(context, MANAGER_GET, &trackid);
|
context->manager->subtitle->Command(context, MANAGER_GET, &trackid);
|
||||||
|
|
||||||
/* konfetti: I make this hack a little bit nicer,
|
/* konfetti: I make this hack a little bit nicer,
|
||||||
@@ -972,7 +988,7 @@ static int PlaybackSwitchDVBSubtitle(Context_t *context, int* pid) {
|
|||||||
playback_err("no dvbsubtitle\n");
|
playback_err("no dvbsubtitle\n");
|
||||||
|
|
||||||
if (*pid == 0xffff)
|
if (*pid == 0xffff)
|
||||||
container_ffmpeg_update_tracks(context, "current stream");
|
container_ffmpeg_update_tracks(context, context->playback->uri);
|
||||||
|
|
||||||
playback_printf(10, "exiting with value %d\n", ret);
|
playback_printf(10, "exiting with value %d\n", ret);
|
||||||
|
|
||||||
@@ -990,10 +1006,10 @@ static int PlaybackSwitchTeletext(Context_t *context, int* pid) {
|
|||||||
ret = cERR_PLAYBACK_ERROR;
|
ret = cERR_PLAYBACK_ERROR;
|
||||||
}
|
}
|
||||||
} else
|
} else
|
||||||
playback_err("no dvbsubtitle\n");
|
playback_err("no ttxsubtitle\n");
|
||||||
|
|
||||||
if (*pid == 0xffff)
|
if (*pid == 0xffff)
|
||||||
container_ffmpeg_update_tracks(context, "current stream");
|
container_ffmpeg_update_tracks(context, context->playback->uri);
|
||||||
|
|
||||||
playback_printf(10, "exiting with value %d\n", ret);
|
playback_printf(10, "exiting with value %d\n", ret);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user