mirror of
https://projects.vdr-developer.org/git/vdr-plugin-softhddevice.git
synced 2023-10-10 19:16:51 +02:00
Add support for svdr command "stat".
This commit is contained in:
parent
3e39ffd5e0
commit
24a8c7f763
@ -1,6 +1,14 @@
|
|||||||
User johns
|
User johns
|
||||||
Date:
|
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.
|
Made showing black picture configurable.
|
||||||
Show black picture, if no video stream is available.
|
Show black picture, if no video stream is available.
|
||||||
Setup split into foldable sections.
|
Setup split into foldable sections.
|
||||||
|
@ -734,8 +734,8 @@ eOSState cMenuSetupSoft::ProcessKey(eKeys key)
|
|||||||
if (key != kNone) {
|
if (key != kNone) {
|
||||||
// update menu only, if something on the structure has changed
|
// update menu only, if something on the structure has changed
|
||||||
// this needed because VDR menus are evil slow
|
// this needed because VDR menus are evil slow
|
||||||
if (old_general != General || old_video != Video
|
if (old_general != General || old_video != Video || old_audio != Audio
|
||||||
|| old_audio != Audio || old_video_format != VideoFormat) {
|
|| old_video_format != VideoFormat) {
|
||||||
Create(); // update menu
|
Create(); // update menu
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < RESOLUTIONS; ++i) {
|
for (i = 0; i < RESOLUTIONS; ++i) {
|
||||||
@ -843,8 +843,9 @@ void cMenuSetupSoft::Store(void)
|
|||||||
SetupStore("VideoFormat", Setup.VideoFormat);
|
SetupStore("VideoFormat", Setup.VideoFormat);
|
||||||
if (Setup.VideoDisplayFormat != VideoDisplayFormat) {
|
if (Setup.VideoDisplayFormat != VideoDisplayFormat) {
|
||||||
Setup.VideoDisplayFormat = VideoDisplayFormat;
|
Setup.VideoDisplayFormat = VideoDisplayFormat;
|
||||||
cDevice::PrimaryDevice()->SetVideoDisplayFormat(
|
cDevice::
|
||||||
eVideoDisplayFormat(Setup.VideoDisplayFormat));
|
PrimaryDevice()->SetVideoDisplayFormat(eVideoDisplayFormat
|
||||||
|
(Setup.VideoDisplayFormat));
|
||||||
printf("video-display-format\n");
|
printf("video-display-format\n");
|
||||||
}
|
}
|
||||||
SetupStore("VideoDisplayFormat", Setup.VideoDisplayFormat);
|
SetupStore("VideoDisplayFormat", Setup.VideoDisplayFormat);
|
||||||
@ -907,17 +908,20 @@ void cMenuSetupSoft::Store(void)
|
|||||||
CodecSetAudioPassthrough(ConfigAudioPassthrough);
|
CodecSetAudioPassthrough(ConfigAudioPassthrough);
|
||||||
SetupStore("AudioDownmix", ConfigAudioDownmix = AudioDownmix);
|
SetupStore("AudioDownmix", ConfigAudioDownmix = AudioDownmix);
|
||||||
CodecSetAudioDownmix(ConfigAudioDownmix);
|
CodecSetAudioDownmix(ConfigAudioDownmix);
|
||||||
SetupStore("AudioSoftvol", ConfigAudioSoftvol = AudioSoftvol );
|
SetupStore("AudioSoftvol", ConfigAudioSoftvol = AudioSoftvol);
|
||||||
AudioSetSoftvol(ConfigAudioSoftvol);
|
AudioSetSoftvol(ConfigAudioSoftvol);
|
||||||
SetupStore("AudioNormalize", ConfigAudioNormalize = AudioNormalize );
|
SetupStore("AudioNormalize", ConfigAudioNormalize = AudioNormalize);
|
||||||
SetupStore("AudioMaxNormalize", ConfigAudioMaxNormalize = AudioMaxNormalize );
|
SetupStore("AudioMaxNormalize", ConfigAudioMaxNormalize =
|
||||||
|
AudioMaxNormalize);
|
||||||
AudioSetNormalize(ConfigAudioNormalize, ConfigAudioMaxNormalize);
|
AudioSetNormalize(ConfigAudioNormalize, ConfigAudioMaxNormalize);
|
||||||
SetupStore("AudioCompression", ConfigAudioCompression = AudioCompression );
|
SetupStore("AudioCompression", ConfigAudioCompression = AudioCompression);
|
||||||
SetupStore("AudioMaxCompression", ConfigAudioMaxCompression = AudioMaxCompression );
|
SetupStore("AudioMaxCompression", ConfigAudioMaxCompression =
|
||||||
|
AudioMaxCompression);
|
||||||
AudioSetCompression(ConfigAudioCompression, ConfigAudioMaxCompression);
|
AudioSetCompression(ConfigAudioCompression, ConfigAudioMaxCompression);
|
||||||
SetupStore("AudioStereoDescent", ConfigAudioStereoDescent = AudioStereoDescent );
|
SetupStore("AudioStereoDescent", ConfigAudioStereoDescent =
|
||||||
|
AudioStereoDescent);
|
||||||
AudioSetStereoDescent(ConfigAudioStereoDescent);
|
AudioSetStereoDescent(ConfigAudioStereoDescent);
|
||||||
SetupStore("AudioBufferTime", ConfigAudioBufferTime = AudioBufferTime );
|
SetupStore("AudioBufferTime", ConfigAudioBufferTime = AudioBufferTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
@ -2113,6 +2117,12 @@ static const char *SVDRPHelpText[] = {
|
|||||||
" 30: stretch 4:3 to 16:9\n 31: pillar box 4:3 in 16:9\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"
|
" 32: center cut-out 4:3 to 16:9\n"
|
||||||
" 39: rotate 4:3 to 16:9 zoom mode\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
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -2137,6 +2147,19 @@ const char **cPluginSoftHdDevice::SVDRPHelpPages(void)
|
|||||||
cString cPluginSoftHdDevice::SVDRPCommand(const char *command,
|
cString cPluginSoftHdDevice::SVDRPCommand(const char *command,
|
||||||
const char *option, __attribute__ ((unused)) int &reply_code)
|
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 (!strcasecmp(command, "SUSP")) {
|
||||||
if (cSoftHdControl::Player) { // already suspended
|
if (cSoftHdControl::Player) { // already suspended
|
||||||
return "SoftHdDevice already suspended";
|
return "SoftHdDevice already suspended";
|
||||||
|
Loading…
Reference in New Issue
Block a user