summaryrefslogtreecommitdiff
path: root/softhddevice.cpp
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 /softhddevice.cpp
parentd24f19bc2d920e7d8cce9cbe2910c6abe25f6380 (diff)
downloadvdr-plugin-softhddevice-552a994db383d95a22536dcba0660649c6a586a3.tar.gz
vdr-plugin-softhddevice-552a994db383d95a22536dcba0660649c6a586a3.tar.bz2
Add optional argument to ATTA svdrp commmand.
Diffstat (limited to 'softhddevice.cpp')
-rw-r--r--softhddevice.cpp14
1 files changed, 12 insertions, 2 deletions
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();
}