summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-03-02 00:05:03 +0100
committerJohns <johns98@gmx.net>2012-03-02 00:05:03 +0100
commit0df8e8a5fc5473eee0e427dd5acfe81e3668a5a4 (patch)
tree36514b6e26e6c78a63526ac9628dc7bd424d2018
parent6a28064dcebfb0cf6f3d36d3567a33d0620a7686 (diff)
downloadvdr-plugin-softhddevice-0df8e8a5fc5473eee0e427dd5acfe81e3668a5a4.tar.gz
vdr-plugin-softhddevice-0df8e8a5fc5473eee0e427dd5acfe81e3668a5a4.tar.bz2
Handle initial suspend mode like normal suspend.
-rw-r--r--softhddev.c8
-rw-r--r--softhddev.h2
-rw-r--r--softhddevice.cpp4
3 files changed, 9 insertions, 5 deletions
diff --git a/softhddev.c b/softhddev.c
index a9c3910..ee22552 100644
--- a/softhddev.c
+++ b/softhddev.c
@@ -57,8 +57,8 @@ static char ConfigVdpauDecoder = 1; ///< use vdpau decoder, if possible
#define ConfigVdpauDecoder 0 ///< no vdpau decoder configured
#endif
-static char ConfigFullscreen; ///< fullscreen modus
static char ConfigStartSuspended; ///< flag to start in suspend mode
+static char ConfigFullscreen; ///< fullscreen modus
static char ConfigStartX11Server; ///< flag start the x11 server
static pthread_mutex_t SuspendLockMutex; ///< suspend lock mutex
@@ -2328,7 +2328,7 @@ void SoftHdDeviceExit(void)
/**
** Prepare plugin.
*/
-void Start(void)
+int Start(void)
{
if (ConfigStartX11Server) {
StartXServer();
@@ -2356,7 +2356,9 @@ void Start(void)
#ifdef USE_TS_AUDIO
PesInit(PesDemuxAudio);
#endif
- // FIXME: some good message here.
+ Info(_("[softhddev] ready%s\n"), ConfigStartSuspended ? " suspended" : "");
+
+ return !ConfigStartSuspended;
}
/**
diff --git a/softhddev.h b/softhddev.h
index 60bca89..50d7538 100644
--- a/softhddev.h
+++ b/softhddev.h
@@ -76,7 +76,7 @@ extern "C"
/// C plugin exit + cleanup
extern void SoftHdDeviceExit(void);
/// C plugin start code
- extern void Start(void);
+ extern int Start(void);
/// C plugin stop code
extern void Stop(void);
/// C plugin main thread hook
diff --git a/softhddevice.cpp b/softhddevice.cpp
index 97c252a..3ccce1c 100644
--- a/softhddevice.cpp
+++ b/softhddevice.cpp
@@ -1405,7 +1405,9 @@ bool cPluginSoftHdDevice::Start(void)
}
}
- ::Start();
+ if (!::Start()) {
+ SuspendMode = SUSPEND_NORMAL;
+ }
return true;
}