mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-libstb-hal.git
synced 2025-08-26 23:12:44 +02:00
eplayer armbox: fix webtv (thx dbo)
Origin commit data
------------------
Branch: master
Commit: ddd9b1cc86
Author: TangoCash <eric@loxat.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:
@@ -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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user