Origin commit data
------------------
Branch: master
Commit: 32258670c5
Author: vanhofen <vanhofen@gmx.de>
Date: 2017-12-25 (Mon, 25 Dec 2017)


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

------------------
This commit was generated by Migit
This commit is contained in:
vanhofen
2017-12-25 21:21:01 +01:00
14 changed files with 101 additions and 92 deletions

View File

@@ -28,12 +28,18 @@ extern cVideo *videoDecoder;
//Used by Fileplay //Used by Fileplay
bool cPlayback::Open(playmode_t PlayMode) bool cPlayback::Open(playmode_t PlayMode)
{ {
const char *aPLAYMODE[] = {
"PLAYMODE_TS",
"PLAYMODE_FILE"
};
if (PlayMode != PLAYMODE_TS) if (PlayMode != PLAYMODE_TS)
{ {
audioDecoder->closeDevice(); audioDecoder->closeDevice();
videoDecoder->closeDevice(); videoDecoder->closeDevice();
decoders_closed = true; decoders_closed = true;
} }
pm = PlayMode; pm = PlayMode;
fn_ts = ""; fn_ts = "";
fn_xml = ""; fn_xml = "";
@@ -50,7 +56,7 @@ bool cPlayback::Open(playmode_t PlayMode)
player->output = &OutputHandler; player->output = &OutputHandler;
player->container = &ContainerHandler; player->container = &ContainerHandler;
player->manager = &ManagerHandler; player->manager = &ManagerHandler;
lt_info("%s - player output name: %s\n", __func__, player->output->Name); lt_info("%s - player output name: %s PlayMode: %s\n", __func__, player->output->Name, aPLAYMODE[PlayMode]);
} }
//Registration of output devices //Registration of output devices
if (player && player->output) if (player && player->output)
@@ -65,6 +71,7 @@ void cPlayback::Close(void)
{ {
lt_info("%s\n", __func__); lt_info("%s\n", __func__);
//Dagobert: movieplayer does not call stop, it calls close ;) //Dagobert: movieplayer does not call stop, it calls close ;)
if(playing)
Stop(); Stop();
if (decoders_closed) if (decoders_closed)
{ {
@@ -649,9 +656,11 @@ cPlayback::~cPlayback()
void cPlayback::RequestAbort() void cPlayback::RequestAbort()
{ {
if (player && player->playback) if (player && player->playback && player->playback->isPlaying)
{ {
player->playback->abortRequested = 1; lt_info("%s\n", __func__);
Stop();
//player->playback->abortRequested = 1;
while (player->playback->isPlaying) while (player->playback->isPlaying)
usleep(100000); usleep(100000);
} }

View File

@@ -46,5 +46,8 @@ libeplayer3_arm_la_SOURCES = \
LIBEPLAYER3_LIBS = libeplayer3_arm.la LIBEPLAYER3_LIBS = libeplayer3_arm.la
# -lpthread -lavformat -lavcodec -lavutil -lswresample -lm
bin_PROGRAMS = eplayer3
eplayer3_SOURCES = main/exteplayer.c
eplayer3_LDADD = -leplayer3_arm -lpthread -lavformat -lavcodec -lavutil -lswresample -lz -lm
eplayer3_DEPENDENCIES = libeplayer3_arm.la

View File

@@ -1034,7 +1034,7 @@ static void FFMPEGThread(Context_t *context)
else if (audioTrack->have_aacheader == 1) else if (audioTrack->have_aacheader == 1)
{ {
ffmpeg_printf(200, "write audio aac\n"); ffmpeg_printf(200, "write audio aac\n");
ffmpeg_printf(200, ">>>>>>> %x %x %x %x %x %x\n", packet.data[0], packet.data[1], packet.data[2], packet.data[3], packet.data[4], packet.data[5], packet.data[6]); ffmpeg_printf(200, ">>>>>>> %x %x %x %x %x %x %x\n", packet.data[0], packet.data[1], packet.data[2], packet.data[3], packet.data[4], packet.data[5], packet.data[6]);
avOut.data = packet.data; avOut.data = packet.data;
avOut.len = packet.size; avOut.len = packet.size;
avOut.pts = pts; avOut.pts = pts;
@@ -1105,8 +1105,7 @@ static void FFMPEGThread(Context_t *context)
static char errbuf[256]; static char errbuf[256];
if (0 == av_strerror(ffmpegStatus, errbuf, sizeof(errbuf))) if (0 == av_strerror(ffmpegStatus, errbuf, sizeof(errbuf)))
{ {
/* In this way we inform user about error within the core /* In this way we inform user about error within the core */
*/
printf("{\"log\":\"Frame read error: '%s'\"}\n", errbuf); printf("{\"log\":\"Frame read error: '%s'\"}\n", errbuf);
} }
/* /*
@@ -1520,6 +1519,7 @@ int32_t container_ffmpeg_init_av_context(Context_t *context, char *filename, int
} }
avContextTab[AVIdx]->iformat->flags |= AVFMT_SEEK_TO_PTS; avContextTab[AVIdx]->iformat->flags |= AVFMT_SEEK_TO_PTS;
avContextTab[AVIdx]->flags = AVFMT_FLAG_GENPTS; avContextTab[AVIdx]->flags = AVFMT_FLAG_GENPTS;
printf("minimal Probe: %d\n", context->playback->noprobe);
if (context->playback->noprobe) if (context->playback->noprobe)
{ {
wrapped_set_max_analyze_duration(avContextTab[AVIdx], 1); wrapped_set_max_analyze_duration(avContextTab[AVIdx], 1);

View File

@@ -154,8 +154,7 @@ static char **ManagerList(Context_t * context __attribute__ ((unused)))
tracklist[j] = NULL; tracklist[j] = NULL;
} }
audio_mgr_printf(10, "%s::%s return %p (%d - %d)\n", FILENAME, audio_mgr_printf(10, "%s::%s return %p (%d - %d)\n", FILENAME, __FUNCTION__, tracklist, j, TrackCount);
__FUNCTION__, tracklist, j, TrackCount);
return tracklist; return tracklist;
} }

View File

@@ -112,8 +112,7 @@ static int ManagerAdd(Context_t * context __attribute__((unused)), Track_t track
} }
else else
{ {
chapter_mgr_err("%s:%s TrackCount out if range %d - %d\n", FILENAME, chapter_mgr_err("%s:%s TrackCount out if range %d - %d\n", FILENAME, __FUNCTION__, TrackCount, TRACKWRAP);
__FUNCTION__, TrackCount, TRACKWRAP);
return cERR_CHAPTER_MGR_ERROR; return cERR_CHAPTER_MGR_ERROR;
} }
@@ -175,8 +174,7 @@ static int ManagerDel(Context_t * context __attribute__((unused)))
} }
else else
{ {
chapter_mgr_err("%s::%s nothing to delete!\n", FILENAME, chapter_mgr_err("%s::%s nothing to delete!\n", FILENAME, __FUNCTION__);
__FUNCTION__);
return cERR_CHAPTER_MGR_ERROR; return cERR_CHAPTER_MGR_ERROR;
} }
@@ -222,14 +220,12 @@ static int Command(Context_t *context, ManagerCmd_t command, void *argument)
break; break;
} }
default: default:
chapter_mgr_err("%s::%s ContainerCmd %d not supported!\n", FILENAME, chapter_mgr_err("%s::%s ContainerCmd %d not supported!\n", FILENAME, __FUNCTION__, command);
__FUNCTION__, command);
ret = cERR_CHAPTER_MGR_ERROR; ret = cERR_CHAPTER_MGR_ERROR;
break; break;
} }
chapter_mgr_printf(10, "%s:%s: returning %d\n", FILENAME, __FUNCTION__, chapter_mgr_printf(10, "%s:%s: returning %d\n", FILENAME, __FUNCTION__, ret);
ret);
return ret; return ret;
} }

View File

@@ -42,7 +42,7 @@
#ifdef SUBTITLE_MGR_DEBUG #ifdef SUBTITLE_MGR_DEBUG
static short debug_level = 10; static short debug_level = 20;
#define subtitle_mgr_printf(level, x...) do { \ #define subtitle_mgr_printf(level, x...) do { \
if (debug_level >= level) printf(x); } while (0) if (debug_level >= level) printf(x); } while (0)

View File

@@ -153,8 +153,7 @@ static char **ManagerList(Context_t * context __attribute__ ((unused)))
tracklist[j] = NULL; tracklist[j] = NULL;
} }
video_mgr_printf(10, "%s::%s return %p (%d - %d)\n", FILENAME, video_mgr_printf(10, "%s::%s return %p (%d - %d)\n", FILENAME, __FUNCTION__, tracklist, j, TrackCount);
__FUNCTION__, tracklist, j, TrackCount);
return tracklist; return tracklist;
} }

View File

@@ -201,4 +201,3 @@ Writer_t *getDefaultAudioWriter()
writer_printf(1, "%s: no writer found\n", __func__); writer_printf(1, "%s: no writer found\n", __func__);
return NULL; return NULL;
} }

View File

@@ -141,4 +141,3 @@ Writer_t *getDefaultAudioWriter()
writer_printf(1, "%s: no writer found\n", __func__); writer_printf(1, "%s: no writer found\n", __func__);
return NULL; return NULL;
} }

View File

@@ -127,6 +127,7 @@ static int PlaybackOpen(Context_t *context, PlayFiles_t *pFiles)
context->playback->uri = strdup(uri); context->playback->uri = strdup(uri);
context->playback->isFile = 0; context->playback->isFile = 0;
context->playback->isHttp = 0; context->playback->isHttp = 0;
context->playback->noprobe = 0;
if (!strncmp("file://", uri, 7) || !strncmp("myts://", uri, 7)) if (!strncmp("file://", uri, 7) || !strncmp("myts://", uri, 7))
{ {
context->playback->isFile = 1; context->playback->isFile = 1;
@@ -159,6 +160,10 @@ static int PlaybackOpen(Context_t *context, PlayFiles_t *pFiles)
free(context->playback->uri); free(context->playback->uri);
context->playback->uri = tUri; context->playback->uri = tUri;
} }
if (strstr(uri, ":10000") || strstr(uri, ":31339/id="))
{
context->playback->noprobe = 1;
}
} }
else else
{ {
@@ -588,9 +593,7 @@ static int PlaybackMetadata(Context_t * context, char ***metadata)
int ret = cERR_PLAYBACK_NO_ERROR; int ret = cERR_PLAYBACK_NO_ERROR;
if (context->container && context->container->selectedContainer) if (context->container && context->container->selectedContainer)
context->container->selectedContainer->Command(context, context->container->selectedContainer->Command(context, CONTAINER_GET_METADATA, metadata);
CONTAINER_GET_METADATA,
metadata);
return ret; return ret;
} }
@@ -682,10 +685,12 @@ static int32_t Command(void *_context, PlaybackCmd_t command, void *argument)
break; break;
} }
default: default:
{
playback_err("PlaybackCmd %d not supported!\n", command); playback_err("PlaybackCmd %d not supported!\n", command);
ret = cERR_PLAYBACK_ERROR; ret = cERR_PLAYBACK_ERROR;
break; break;
} }
}
playback_printf(20, "exiting with value %d\n", ret); playback_printf(20, "exiting with value %d\n", ret);
return ret; return ret;
} }