summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormini73 <>2012-04-20 16:51:04 +0200
committerJohns <johns98@gmx.net>2012-04-20 16:51:04 +0200
commit24a8c7f763050a1054eef2f13faa9e584052fe8d (patch)
tree9b946aba11f3ddfaac6d696a6cb86b86ad4f745b
parent3e39ffd5e0e342a667389de8d73943d74e8d098d (diff)
downloadvdr-plugin-softhddevice-24a8c7f763050a1054eef2f13faa9e584052fe8d.tar.gz
vdr-plugin-softhddevice-24a8c7f763050a1054eef2f13faa9e584052fe8d.tar.bz2
Add support for svdr command "stat".
-rw-r--r--ChangeLog8
-rw-r--r--softhddevice.cpp55
2 files changed, 47 insertions, 16 deletions
diff --git a/ChangeLog b/ChangeLog
index bca69c6..21a8dd6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
User johns
Date:
+User mini73
+Date: Fri Apr 20 16:51:14 CEST 2012
+
+ Add support for svdr command "stat".
+
+User johns
+Date: Fri Apr 20 16:05:40 CEST 2012
+
Made showing black picture configurable.
Show black picture, if no video stream is available.
Setup split into foldable sections.
diff --git a/softhddevice.cpp b/softhddevice.cpp
index 608edac..955a520 100644
--- a/softhddevice.cpp
+++ b/softhddevice.cpp
@@ -624,10 +624,10 @@ void cMenuSetupSoft::Create(void)
&VideoFormat, "4:3", "16:9"));
if (VideoFormat) {
Add(new cMenuEditStraItem(trVDR("Setup.DVB$Video display format"),
- &VideoDisplayFormat, 3, video_display_formats_16_9));
+ &VideoDisplayFormat, 3, video_display_formats_16_9));
} else {
Add(new cMenuEditStraItem(trVDR("Setup.DVB$Video display format"),
- &VideoDisplayFormat, 3, video_display_formats_4_3));
+ &VideoDisplayFormat, 3, video_display_formats_4_3));
}
// FIXME: switch config gray/color configuration
@@ -734,8 +734,8 @@ eOSState cMenuSetupSoft::ProcessKey(eKeys key)
if (key != kNone) {
// update menu only, if something on the structure has changed
// this needed because VDR menus are evil slow
- if (old_general != General || old_video != Video
- || old_audio != Audio || old_video_format != VideoFormat) {
+ if (old_general != General || old_video != Video || old_audio != Audio
+ || old_video_format != VideoFormat) {
Create(); // update menu
} else {
for (i = 0; i < RESOLUTIONS; ++i) {
@@ -843,8 +843,9 @@ void cMenuSetupSoft::Store(void)
SetupStore("VideoFormat", Setup.VideoFormat);
if (Setup.VideoDisplayFormat != VideoDisplayFormat) {
Setup.VideoDisplayFormat = VideoDisplayFormat;
- cDevice::PrimaryDevice()->SetVideoDisplayFormat(
- eVideoDisplayFormat(Setup.VideoDisplayFormat));
+ cDevice::
+ PrimaryDevice()->SetVideoDisplayFormat(eVideoDisplayFormat
+ (Setup.VideoDisplayFormat));
printf("video-display-format\n");
}
SetupStore("VideoDisplayFormat", Setup.VideoDisplayFormat);
@@ -907,17 +908,20 @@ void cMenuSetupSoft::Store(void)
CodecSetAudioPassthrough(ConfigAudioPassthrough);
SetupStore("AudioDownmix", ConfigAudioDownmix = AudioDownmix);
CodecSetAudioDownmix(ConfigAudioDownmix);
- SetupStore("AudioSoftvol", ConfigAudioSoftvol = AudioSoftvol );
+ SetupStore("AudioSoftvol", ConfigAudioSoftvol = AudioSoftvol);
AudioSetSoftvol(ConfigAudioSoftvol);
- SetupStore("AudioNormalize", ConfigAudioNormalize = AudioNormalize );
- SetupStore("AudioMaxNormalize", ConfigAudioMaxNormalize = AudioMaxNormalize );
+ SetupStore("AudioNormalize", ConfigAudioNormalize = AudioNormalize);
+ SetupStore("AudioMaxNormalize", ConfigAudioMaxNormalize =
+ AudioMaxNormalize);
AudioSetNormalize(ConfigAudioNormalize, ConfigAudioMaxNormalize);
- SetupStore("AudioCompression", ConfigAudioCompression = AudioCompression );
- SetupStore("AudioMaxCompression", ConfigAudioMaxCompression = AudioMaxCompression );
+ SetupStore("AudioCompression", ConfigAudioCompression = AudioCompression);
+ SetupStore("AudioMaxCompression", ConfigAudioMaxCompression =
+ AudioMaxCompression);
AudioSetCompression(ConfigAudioCompression, ConfigAudioMaxCompression);
- SetupStore("AudioStereoDescent", ConfigAudioStereoDescent = AudioStereoDescent );
+ SetupStore("AudioStereoDescent", ConfigAudioStereoDescent =
+ AudioStereoDescent);
AudioSetStereoDescent(ConfigAudioStereoDescent);
- SetupStore("AudioBufferTime", ConfigAudioBufferTime = AudioBufferTime );
+ SetupStore("AudioBufferTime", ConfigAudioBufferTime = AudioBufferTime);
}
//////////////////////////////////////////////////////////////////////////////
@@ -2019,7 +2023,7 @@ bool cPluginSoftHdDevice::SetupParse(const char *name, const char *value)
return true;
}
if (!strcasecmp(name, "AudioSoftvol")) {
- AudioSetSoftvol(ConfigAudioSoftvol = atoi(value));
+ AudioSetSoftvol(ConfigAudioSoftvol = atoi(value));
return true;
}
if (!strcasecmp(name, "AudioNormalize")) {
@@ -2106,13 +2110,19 @@ static const char *SVDRPHelpText[] = {
" 12: toggle audio pass-through\n"
" 13: decrease audio delay by 10ms\n"
" 14: increase audio delay by 10ms\n"
- " 20: disable fullscreen\n 21: enable fullscreen\n"
+ " 20: disable fullscreen\n 21: enable fullscreen\n"
" 22: toggle fullscreen\n"
- " 23: disable auto-crop\n 24: enable auto-crop\n"
+ " 23: disable auto-crop\n 24: enable auto-crop\n"
" 25: toggle auto-crop\n"
" 30: stretch 4:3 to 16:9\n 31: pillar box 4:3 in 16:9\n"
" 32: center cut-out 4:3 to 16:9\n"
" 39: rotate 4:3 to 16:9 zoom mode\n",
+ "STAT\n" " Display SuspendMode of the plugin.\n\n"
+ " reply code is 910 + SuspendMode\n"
+ " SUSPEND_EXTERNAL == -1 (909)\n"
+ " NOT_SUSPENDED == 0 (910)\n"
+ " SUSPEND_NORMAL == 1 (911)\n"
+ " SUSPEND_DETACHED == 2 (912)\n",
NULL
};
@@ -2137,6 +2147,19 @@ const char **cPluginSoftHdDevice::SVDRPHelpPages(void)
cString cPluginSoftHdDevice::SVDRPCommand(const char *command,
const char *option, __attribute__ ((unused)) int &reply_code)
{
+ if (!strcasecmp(command, "STAT")) {
+ reply_code = 910 + SuspendMode;
+ switch (SuspendMode) {
+ case SUSPEND_EXTERNAL:
+ return "SuspendMode is SUSPEND_EXTERNAL";
+ case NOT_SUSPENDED:
+ return "SuspendMode is NOT_SUSPENDED";
+ case SUSPEND_NORMAL:
+ return "SuspendMode is SUSPEND_NORMAL";
+ case SUSPEND_DETACHED:
+ return "SuspendMode is SUSPEND_DETACHED";
+ }
+ }
if (!strcasecmp(command, "SUSP")) {
if (cSoftHdControl::Player) { // already suspended
return "SoftHdDevice already suspended";