diff options
author | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-02-25 07:49:39 +0100 |
---|---|---|
committer | Christian Gmeiner <christian.gmeiner@gmail.com> | 2009-02-25 07:49:39 +0100 |
commit | 725a69ec5d96b1538f95e420026ef14f124ac880 (patch) | |
tree | 9117aee835d504b86facb624973cbe8cde9c27d8 | |
parent | 81b574d4f37cdc390def2f78fd5d5cb6484b4a3f (diff) | |
download | vdr-plugin-dxr3-725a69ec5d96b1538f95e420026ef14f124ac880.tar.gz vdr-plugin-dxr3-725a69ec5d96b1538f95e420026ef14f124ac880.tar.bz2 |
get some SVDRPCommand working again
-rw-r--r-- | dxr3.c | 58 | ||||
-rw-r--r-- | dxr3device.h | 10 |
2 files changed, 31 insertions, 37 deletions
@@ -271,50 +271,42 @@ const char **cPluginDxr3::SVDRPHelpPages(void) cString cPluginDxr3::SVDRPCommand(const char *Command, const char *Option, int &ReplyCode) { - if (!strcasecmp(Command, "DON")) - { - cDxr3Interface::Instance().ExternalReopenDevices(); - return "DXR3 started"; + if (!strcasecmp(Command, "DON")) { + cDxr3Interface::Instance().ExternalReopenDevices(); + return "DXR3 started"; } - if (!strcasecmp(Command, "DOF")) - { - cDxr3Interface::Instance().ExternalReleaseDevices(); - return "DXR3 stopped"; + if (!strcasecmp(Command, "DOF")) { + cDxr3Interface::Instance().ExternalReleaseDevices(); + return "DXR3 stopped"; } - if (!strcasecmp(Command, "BRI")) - { - cDxr3Interface::Instance().SetBrightness(atoi(Option)); - return cString::sprintf("Brightness set to %d", + if (!strcasecmp(Command, "BRI")) { + cDxr3Interface::Instance().SetBrightness(atoi(Option)); + return cString::sprintf("Brightness set to %d", cDxr3Interface::Instance().GetBrightness()); } - if (!strcasecmp(Command, "CON")) - { - cDxr3Interface::Instance().SetContrast(atoi(Option)); - return cString::sprintf("Contrast set to %d", + if (!strcasecmp(Command, "CON")) { + cDxr3Interface::Instance().SetContrast(atoi(Option)); + return cString::sprintf("Contrast set to %d", cDxr3Interface::Instance().GetContrast()); } - if (!strcasecmp(Command, "SAT")) - { - cDxr3Interface::Instance().SetSaturation(atoi(Option)); - return cString::sprintf("Saturation set to %d", + if (!strcasecmp(Command, "SAT")) { + cDxr3Interface::Instance().SetSaturation(atoi(Option)); + return cString::sprintf("Saturation set to %d", cDxr3Interface::Instance().GetSaturation()); } -/* if (!strcasecmp(Command, "SDO")) - { - cDxr3Interface::Instance().SetAudioDigitalPCM(); - return "Switched to digital PCM audio output"; + if (!strcasecmp(Command, "SDO")) { + device->getAudioOutput()->setAudioMode(iAudio::DigitalPcm); + return "Switched to digital PCM audio output"; } - if (!strcasecmp(Command, "SAO")) - { - cDxr3Interface::Instance().SetAudioAnalog(); - return "Switched to analog audio output"; + if (!strcasecmp(Command, "SAO")) { + device->getAudioOutput()->setAudioMode(iAudio::Analog); + return "Switched to analog audio output"; } - if (!strcasecmp(Command, "SAC3")) - { - cDxr3Interface::Instance().SetAudioDigitalAC3(); - return "Switched to digital AC3 audio output"; + if (!strcasecmp(Command, "SAC3")) { + device->getAudioOutput()->setAudioMode(iAudio::Ac3); + return "Switched to digital AC3 audio output"; } -*/ + return NULL; } diff --git a/dxr3device.h b/dxr3device.h index d58319f..9dd825c 100644 --- a/dxr3device.h +++ b/dxr3device.h @@ -23,13 +23,13 @@ #ifndef _DXR3_DEVICE_H_ #define _DXR3_DEVICE_H_ -#include "dxr3interface.h" -#include "dxr3demuxdevice.h" -#include "dxr3spudecoder.h" #include <string> #include <vdr/device.h> -class iAudio; +#include "dxr3interface.h" +#include "dxr3demuxdevice.h" +#include "dxr3spudecoder.h" +#include "dxr3audio.h" // ================================== // our device :) @@ -76,6 +76,8 @@ public: m_CalledBySet = false; } + iAudio *getAudioOutput() const { return audioOut; } + protected: ePlayMode m_PlayMode; cDxr3DemuxDevice m_DemuxDevice; |