mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-27 15:33:00 +02:00
libeplayer3: dynamically update pid list
This commit is contained in:
@@ -1500,7 +1500,11 @@ static int interrupt_cb(void *ctx)
|
|||||||
|
|
||||||
int container_ffmpeg_init(Context_t *context, char * filename)
|
int container_ffmpeg_init(Context_t *context, char * filename)
|
||||||
{
|
{
|
||||||
|
#ifdef MARTII
|
||||||
|
int err;
|
||||||
|
#else
|
||||||
int n, err;
|
int n, err;
|
||||||
|
#endif
|
||||||
|
|
||||||
ffmpeg_printf(10, ">\n");
|
ffmpeg_printf(10, ">\n");
|
||||||
|
|
||||||
@@ -1636,6 +1640,25 @@ int container_ffmpeg_init(Context_t *context, char * filename)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
//for buffered io (end)
|
//for buffered io (end)
|
||||||
|
#endif
|
||||||
|
#ifdef MARTII
|
||||||
|
return container_ffmpeg_update_tracks(context, filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
int container_ffmpeg_update_tracks(Context_t *context, char *filename)
|
||||||
|
{
|
||||||
|
int n;
|
||||||
|
|
||||||
|
if (context->manager->audio)
|
||||||
|
context->manager->audio->Command(context, MANAGER_DEL, NULL);
|
||||||
|
if (context->manager->video)
|
||||||
|
context->manager->video->Command(context, MANAGER_DEL, NULL);
|
||||||
|
if (context->manager->subtitle)
|
||||||
|
context->manager->subtitle->Command(context, MANAGER_DEL, NULL);
|
||||||
|
if (context->manager->dvbsubtitle)
|
||||||
|
context->manager->dvbsubtitle->Command(context, MANAGER_DEL, NULL);
|
||||||
|
if (context->manager->teletext)
|
||||||
|
context->manager->teletext->Command(context, MANAGER_DEL, NULL);
|
||||||
#endif
|
#endif
|
||||||
ffmpeg_printf(20, "dump format\n");
|
ffmpeg_printf(20, "dump format\n");
|
||||||
|
|
||||||
|
@@ -14,4 +14,7 @@ typedef struct Context_s {
|
|||||||
ManagerHandler_t * manager;
|
ManagerHandler_t * manager;
|
||||||
} Context_t;
|
} Context_t;
|
||||||
|
|
||||||
|
#ifdef MARTII
|
||||||
|
int container_ffmpeg_update_tracks(Context_t *context, char *filename);
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
@@ -179,6 +179,9 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MANAGER_LIST: {
|
case MANAGER_LIST: {
|
||||||
|
#ifdef MARTII
|
||||||
|
container_ffmpeg_update_tracks(context, "current stream");
|
||||||
|
#endif
|
||||||
*((char***)argument) = (char **)ManagerList(context);
|
*((char***)argument) = (char **)ManagerList(context);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -178,6 +178,9 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MANAGER_LIST: {
|
case MANAGER_LIST: {
|
||||||
|
#ifdef MARTII
|
||||||
|
container_ffmpeg_update_tracks(context, "current stream");
|
||||||
|
#endif
|
||||||
*((char***)argument) = (char **)ManagerList(context);
|
*((char***)argument) = (char **)ManagerList(context);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -176,6 +176,9 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MANAGER_LIST: {
|
case MANAGER_LIST: {
|
||||||
|
#ifdef MARTII
|
||||||
|
container_ffmpeg_update_tracks(context, "current stream");
|
||||||
|
#endif
|
||||||
*((char***)argument) = (char **)ManagerList(context);
|
*((char***)argument) = (char **)ManagerList(context);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -178,6 +178,9 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MANAGER_LIST: {
|
case MANAGER_LIST: {
|
||||||
|
#ifdef MARTII
|
||||||
|
container_ffmpeg_update_tracks(context, "current stream");
|
||||||
|
#endif
|
||||||
*((char***)argument) = (char **)ManagerList(context);
|
*((char***)argument) = (char **)ManagerList(context);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@@ -173,6 +173,9 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case MANAGER_LIST: {
|
case MANAGER_LIST: {
|
||||||
|
#ifdef MARTII
|
||||||
|
container_ffmpeg_update_tracks(context, "current stream");
|
||||||
|
#endif
|
||||||
*((char***)argument) = (char **)ManagerList(context);
|
*((char***)argument) = (char **)ManagerList(context);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user