summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dxr3.c58
-rw-r--r--dxr3device.h10
2 files changed, 31 insertions, 37 deletions
diff --git a/dxr3.c b/dxr3.c
index 98edf37..6c60f18 100644
--- a/dxr3.c
+++ b/dxr3.c
@@ -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;