summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2012-03-15 15:42:51 +0100
committerJohns <johns98@gmx.net>2012-03-15 15:42:51 +0100
commit552a994db383d95a22536dcba0660649c6a586a3 (patch)
tree39a81f9ad82bacdd5ff17834046a3562dd4cb428
parentd24f19bc2d920e7d8cce9cbe2910c6abe25f6380 (diff)
downloadvdr-plugin-softhddevice-552a994db383d95a22536dcba0660649c6a586a3.tar.gz
vdr-plugin-softhddevice-552a994db383d95a22536dcba0660649c6a586a3.tar.bz2
Add optional argument to ATTA svdrp commmand.
-rw-r--r--ChangeLog1
-rw-r--r--softhddev.c2
-rw-r--r--softhddevice.cpp14
3 files changed, 14 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index f4de4ba..fab7dbf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
User johns
Date:
+ Add optional argument (display) to ATTA svdrp commmand.
Wakeup display to show OSD for remote learning mode.
Support switching the primary device with svdrp.
Disable and reenable screen saver and DPMS.
diff --git a/softhddev.c b/softhddev.c
index a6dca5f..c0ca0d6 100644
--- a/softhddev.c
+++ b/softhddev.c
@@ -1136,7 +1136,7 @@ static VideoHwDecoder *MyHwDecoder; ///< video hw decoder
static VideoDecoder *MyVideoDecoder; ///< video decoder
static enum CodecID VideoCodecID; ///< current codec id
-static const char *X11DisplayName; ///< x11 display name
+const char *X11DisplayName; ///< x11 display name
static volatile char Usr1Signal; ///< true got usr1 signal
#define VIDEO_BUFFER_SIZE (512 * 1024) ///< video PES buffer default size
diff --git a/softhddevice.cpp b/softhddevice.cpp
index aaa94a4..232d43b 100644
--- a/softhddevice.cpp
+++ b/softhddevice.cpp
@@ -36,6 +36,8 @@
extern "C"
{
#include "video.h"
+ extern const char *X11DisplayName; ///< x11 display name
+
extern void AudioPoller(void);
extern void CodecSetAudioPassthrough(int);
extern void CodecSetAudioDownmix(int);
@@ -1726,8 +1728,9 @@ static const char *SVDRPHelpText[] = {
"DETA\n" " Detach plugin.\n\n"
" The plugin will be detached from the audio, video and DVB\n"
" devices. Other programs or plugins can use them now.\n",
- "ATTA\n" " Attach plugin.\n\n"
- " Attach the plugin to audio, video and DVB devices.\n",
+ "ATTA <-d display>\n" " Attach plugin.\n\n"
+ " Attach the plugin to audio, video and DVB devices.\n"
+ " Use -d display (f.e. -d :0.0) to use another X11 display.\n",
"PRIM <n>\n" " Make <n> the primary device.\n\n"
" <n> is the number of device. Without number softhddevice becomes\n"
" the primary device. If becoming primary, the plugin is attached\n"
@@ -1809,6 +1812,13 @@ cString cPluginSoftHdDevice::SVDRPCommand(const char *command,
if (SuspendMode != SUSPEND_DETACHED) {
return "can't attach SoftHdDevice not detached";
}
+ if ( !strncmp(option, "-d ", 3) ) {
+ // FIXME: loose memory here
+ X11DisplayName = strdup(option + 3);
+ } else if ( !strncmp(option, "-d", 2) ) {
+ // FIXME: loose memory here
+ X11DisplayName = strdup(option + 2);
+ }
if (ShutdownHandler.GetUserInactiveTime()) {
ShutdownHandler.SetUserInactiveTimeout();
}