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
bool cPlayback::Open(playmode_t PlayMode)
{
const char *aPLAYMODE[] = {
"PLAYMODE_TS",
"PLAYMODE_FILE"
};
if (PlayMode != PLAYMODE_TS)
{
audioDecoder->closeDevice();
videoDecoder->closeDevice();
decoders_closed = true;
}
pm = PlayMode;
fn_ts = "";
fn_xml = "";
@@ -50,7 +56,7 @@ bool cPlayback::Open(playmode_t PlayMode)
player->output = &OutputHandler;
player->container = &ContainerHandler;
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
if (player && player->output)
@@ -65,6 +71,7 @@ void cPlayback::Close(void)
{
lt_info("%s\n", __func__);
//Dagobert: movieplayer does not call stop, it calls close ;)
if(playing)
Stop();
if (decoders_closed)
{
@@ -649,9 +656,11 @@ cPlayback::~cPlayback()
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)
usleep(100000);
}

View File

@@ -46,5 +46,8 @@ libeplayer3_arm_la_SOURCES = \
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)
{
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.len = packet.size;
avOut.pts = pts;
@@ -1105,8 +1105,7 @@ static void FFMPEGThread(Context_t *context)
static char errbuf[256];
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);
}
/*
@@ -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]->flags = AVFMT_FLAG_GENPTS;
printf("minimal Probe: %d\n", context->playback->noprobe);
if (context->playback->noprobe)
{
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;
}
audio_mgr_printf(10, "%s::%s return %p (%d - %d)\n", FILENAME,
__FUNCTION__, tracklist, j, TrackCount);
audio_mgr_printf(10, "%s::%s return %p (%d - %d)\n", FILENAME, __FUNCTION__, tracklist, j, TrackCount);
return tracklist;
}

View File

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

View File

@@ -42,7 +42,7 @@
#ifdef SUBTITLE_MGR_DEBUG
static short debug_level = 10;
static short debug_level = 20;
#define subtitle_mgr_printf(level, x...) do { \
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;
}
video_mgr_printf(10, "%s::%s return %p (%d - %d)\n", FILENAME,
__FUNCTION__, tracklist, j, TrackCount);
video_mgr_printf(10, "%s::%s return %p (%d - %d)\n", FILENAME, __FUNCTION__, tracklist, j, TrackCount);
return tracklist;
}

View File

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

View File

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

View File

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