Resume plugin, if dummy player looses control.

This commit is contained in:
Johns 2012-08-09 16:22:06 +02:00
parent 9efc73144d
commit ecb48a5d63
4 changed files with 12 additions and 11 deletions

2
.gitignore vendored
View File

@ -4,7 +4,7 @@
.*.swp
.gdb_history
# work directory
chaos
.chaos
# generated files
.dependencies
libvdr-softhddevice.so*

View File

@ -1,6 +1,7 @@
User johns
Date:
Resume plugin, if suspend control stops.
Removes old audio code (!USE_AUDIORING).
Use -DOSD_DEBUG to debug OSD.

View File

@ -1984,7 +1984,8 @@ int64_t GetSTC(void)
if (MyHwDecoder) {
return VideoGetClock(MyHwDecoder);
}
Error(_("softhddev: %s called without hw decoder\n"), __FUNCTION__);
// could happen during dettached
Warning(_("softhddev: %s called without hw decoder\n"), __FUNCTION__);
return AV_NOPTS_VALUE;
}

View File

@ -1117,11 +1117,8 @@ eOSState cSoftHdControl::ProcessKey(eKeys key)
{
if (SuspendMode == SUSPEND_NORMAL && (!ISMODELESSKEY(key)
|| key == kMenu || key == kBack || key == kStop)) {
if (Player) {
delete Player;
Player = NULL;
}
delete Player;
Player = NULL;
Resume();
SuspendMode = NOT_SUSPENDED;
return osEnd;
@ -1142,10 +1139,12 @@ cSoftHdControl::cSoftHdControl(void)
*/
cSoftHdControl::~cSoftHdControl()
{
if (Player) {
delete Player;
Player = NULL;
delete Player;
Player = NULL;
// loose control resume
if (SuspendMode == SUSPEND_NORMAL) {
Resume();
SuspendMode = NOT_SUSPENDED;
}
dsyslog("[softhddev]%s: dummy player stopped\n", __FUNCTION__);