mirror of
https://github.com/tuxbox-neutrino/libstb-hal.git
synced 2025-08-26 23:13:16 +02:00
eplayer armbox: fix webtv (thx dbo)
This commit is contained in:
@@ -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,7 +71,8 @@ void cPlayback::Close(void)
|
||||
{
|
||||
lt_info("%s\n", __func__);
|
||||
//Dagobert: movieplayer does not call stop, it calls close ;)
|
||||
Stop();
|
||||
if(playing)
|
||||
Stop();
|
||||
if (decoders_closed)
|
||||
{
|
||||
audioDecoder->openDevice();
|
||||
@@ -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);
|
||||
}
|
||||
|
@@ -1520,6 +1520,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);
|
||||
|
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user