Reduce errors during suspend mode.

This commit is contained in:
Johns 2012-05-13 16:58:45 +02:00
parent 541754a619
commit 43e70b6a3f

View File

@ -698,8 +698,8 @@ void cMenuSetupSoft::Create(void)
audiodrift)); audiodrift));
Add(new cMenuEditStraItem(tr("Audio pass-through"), &AudioPassthrough, Add(new cMenuEditStraItem(tr("Audio pass-through"), &AudioPassthrough,
2, passthrough)); 2, passthrough));
Add(new cMenuEditBoolItem(tr("Enable AC-3 downmix"), &AudioDownmix, Add(new cMenuEditBoolItem(tr("Enable AC-3 (decoder) downmix"),
trVDR("no"), trVDR("yes"))); &AudioDownmix, trVDR("no"), trVDR("yes")));
Add(new cMenuEditBoolItem(tr("Volume control"), &AudioSoftvol, Add(new cMenuEditBoolItem(tr("Volume control"), &AudioSoftvol,
tr("Hardware"), tr("Software"))); tr("Hardware"), tr("Software")));
Add(new cMenuEditBoolItem(tr("Enable normalize volume"), Add(new cMenuEditBoolItem(tr("Enable normalize volume"),
@ -848,17 +848,15 @@ void cMenuSetupSoft::Store(void)
if (Setup.VideoFormat != VideoFormat) { if (Setup.VideoFormat != VideoFormat) {
Setup.VideoFormat = VideoFormat; Setup.VideoFormat = VideoFormat;
cDevice::PrimaryDevice()->SetVideoFormat(Setup.VideoFormat); cDevice::PrimaryDevice()->SetVideoFormat(Setup.VideoFormat);
printf("video-format\n");
} }
SetupStore("VideoFormat", Setup.VideoFormat); //SetupStore("VideoFormat", Setup.VideoFormat);
if (Setup.VideoDisplayFormat != VideoDisplayFormat) { if (Setup.VideoDisplayFormat != VideoDisplayFormat) {
Setup.VideoDisplayFormat = VideoDisplayFormat; Setup.VideoDisplayFormat = VideoDisplayFormat;
cDevice:: cDevice::
PrimaryDevice()->SetVideoDisplayFormat(eVideoDisplayFormat PrimaryDevice()->SetVideoDisplayFormat(eVideoDisplayFormat
(Setup.VideoDisplayFormat)); (Setup.VideoDisplayFormat));
printf("video-display-format\n");
} }
SetupStore("VideoDisplayFormat", Setup.VideoDisplayFormat); //SetupStore("VideoDisplayFormat", Setup.VideoDisplayFormat);
ConfigVideoBackground = Background << 8 | (BackgroundAlpha & 0xFF); ConfigVideoBackground = Background << 8 | (BackgroundAlpha & 0xFF);
SetupStore("Background", ConfigVideoBackground); SetupStore("Background", ConfigVideoBackground);
@ -1686,6 +1684,10 @@ uchar *cSoftHdDevice::GrabImage(int &size, bool jpeg, int quality, int width,
dsyslog("[softhddev]%s: %d, %d, %d, %dx%d\n", __FUNCTION__, size, jpeg, dsyslog("[softhddev]%s: %d, %d, %d, %dx%d\n", __FUNCTION__, size, jpeg,
quality, width, height); quality, width, height);
if (SuspendMode != NOT_SUSPENDED) {
return NULL;
}
return::GrabImage(&size, jpeg, quality, width, height); return::GrabImage(&size, jpeg, quality, width, height);
} }
@ -2094,6 +2096,10 @@ bool cPluginSoftHdDevice::Service(const char *id, void *data)
return true; return true;
} }
if (SuspendMode != NOT_SUSPENDED) {
return false;
}
SoftHDDevice_AtmoGrabService_v1_0_t *r = SoftHDDevice_AtmoGrabService_v1_0_t *r =
(SoftHDDevice_AtmoGrabService_v1_0_t *) data; (SoftHDDevice_AtmoGrabService_v1_0_t *) data;
if (r->structSize != sizeof(SoftHDDevice_AtmoGrabService_v1_0_t) if (r->structSize != sizeof(SoftHDDevice_AtmoGrabService_v1_0_t)