libeplayer3: dynamically update pid list

Origin commit data
------------------
Branch: master
Commit: beac99d8b0
Author: martii <m4rtii@gmx.de>
Date: 2013-03-25 (Mon, 25 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-25 20:42:36 +01:00
parent 1fa46d1d08
commit c02a804944
7 changed files with 41 additions and 0 deletions

View File

@@ -1539,7 +1539,11 @@ static int interrupt_cb(void *ctx)
int container_ffmpeg_init(Context_t *context, char * filename)
{
#ifdef MARTII
int err;
#else
int n, err;
#endif
ffmpeg_printf(10, ">\n");
@@ -1675,6 +1679,25 @@ int container_ffmpeg_init(Context_t *context, char * filename)
}
#endif
//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
ffmpeg_printf(20, "dump format\n");

View File

@@ -14,4 +14,7 @@ typedef struct Context_s {
ManagerHandler_t * manager;
} Context_t;
#ifdef MARTII
int container_ffmpeg_update_tracks(Context_t *context, char *filename);
#endif
#endif

View File

@@ -179,6 +179,9 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
break;
}
case MANAGER_LIST: {
#ifdef MARTII
container_ffmpeg_update_tracks(context, "current stream");
#endif
*((char***)argument) = (char **)ManagerList(context);
break;
}

View File

@@ -178,6 +178,9 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
break;
}
case MANAGER_LIST: {
#ifdef MARTII
container_ffmpeg_update_tracks(context, "current stream");
#endif
*((char***)argument) = (char **)ManagerList(context);
break;
}

View File

@@ -176,6 +176,9 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
break;
}
case MANAGER_LIST: {
#ifdef MARTII
container_ffmpeg_update_tracks(context, "current stream");
#endif
*((char***)argument) = (char **)ManagerList(context);
break;
}

View File

@@ -178,6 +178,9 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
break;
}
case MANAGER_LIST: {
#ifdef MARTII
container_ffmpeg_update_tracks(context, "current stream");
#endif
*((char***)argument) = (char **)ManagerList(context);
break;
}

View File

@@ -173,6 +173,9 @@ static int Command(void *_context, ManagerCmd_t command, void * argument) {
break;
}
case MANAGER_LIST: {
#ifdef MARTII
container_ffmpeg_update_tracks(context, "current stream");
#endif
*((char***)argument) = (char **)ManagerList(context);
break;
}