summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Gmeiner <christian.gmeiner@gmail.com>2009-02-25 08:14:01 +0100
committerChristian Gmeiner <christian.gmeiner@gmail.com>2009-02-25 08:14:01 +0100
commitf46e7e9f536ef5a59ec30b4245d79ff0d34f0c30 (patch)
treecb80fc0afdf44913c56d1b99fd840ae29b8c529a
parent140a5487312b9212f6edb15ae3cf75f096ec992e (diff)
downloadvdr-plugin-dxr3-f46e7e9f536ef5a59ec30b4245d79ff0d34f0c30.tar.gz
vdr-plugin-dxr3-f46e7e9f536ef5a59ec30b4245d79ff0d34f0c30.tar.bz2
fixes and code style improvements
-rw-r--r--dxr3audio-oss.c5
-rw-r--r--dxr3audio-oss.h1
-rw-r--r--dxr3configdata.h103
-rw-r--r--dxr3device.c2
-rw-r--r--dxr3interface.c5
5 files changed, 27 insertions, 89 deletions
diff --git a/dxr3audio-oss.c b/dxr3audio-oss.c
index 13d4de7..9cd0241 100644
--- a/dxr3audio-oss.c
+++ b/dxr3audio-oss.c
@@ -6,6 +6,11 @@
static const char *DEV_DXR3_OSS = "_ma";
+cAudioOss::~cAudioOss()
+{
+ close(fd);
+}
+
void cAudioOss::openDevice()
{
fd = cDxr3Interface::Dxr3Open(DEV_DXR3_OSS, O_RDWR | O_NONBLOCK);
diff --git a/dxr3audio-oss.h b/dxr3audio-oss.h
index 0aaef9d..eff2a6a 100644
--- a/dxr3audio-oss.h
+++ b/dxr3audio-oss.h
@@ -26,6 +26,7 @@
class cAudioOss : public iAudio {
public:
cAudioOss() : iAudio(), fd(-1) {}
+ ~cAudioOss();
virtual void openDevice();
virtual void releaseDevice();
diff --git a/dxr3configdata.h b/dxr3configdata.h
index 0fe6b8e..ecb61df 100644
--- a/dxr3configdata.h
+++ b/dxr3configdata.h
@@ -44,93 +44,32 @@ class cDxr3ConfigData : public Singleton<cDxr3ConfigData>
{
public:
cDxr3ConfigData();
- ~cDxr3ConfigData() {}
- int GetUseDigitalOut() const
- {
- return m_digitaloutput;
- }
- int SetUseDigitalOut(int value)
- {
- return m_digitaloutput = value;
- }
- int GetDxr3Card() const
- {
- return m_card;
- }
- int SetDxr3Card(int value)
- {
- return m_card = value;
- }
- int GetForceLetterBox() const
- {
- return m_forceletterbox;
- }
- int SetForceLetterBox(int value)
- {
- return m_forceletterbox = value;
- }
+ int GetUseDigitalOut() const { return m_digitaloutput; }
+ int SetUseDigitalOut(int value) { return m_digitaloutput = value; }
+ int GetDxr3Card() const { return m_card; }
+ int SetDxr3Card(int value) { return m_card = value; }
+ int GetForceLetterBox() const { return m_forceletterbox; }
+ int SetForceLetterBox(int value) { return m_forceletterbox = value; }
- eVideoMode GetVideoMode() const
- {
- return m_videomode;
- }
- eVideoMode SetVideoMode(eVideoMode videoMode)
- {
- return m_videomode = videoMode;
- }
+ eVideoMode GetVideoMode() const { return m_videomode; }
+ eVideoMode SetVideoMode(eVideoMode m) { return m_videomode = m; }
- int GetBrightness() const
- {
- return m_brightness;
- }
- int SetBrightness(int value)
- {
- return m_brightness = value;
- }
- int GetContrast() const
- {
- return m_contrast;
- }
- int SetContrast(int value)
- {
- return m_contrast = value;
- }
- int GetSaturation() const
- {
- return m_saturation;
- }
- int SetSaturation(int value)
- {
- return m_saturation = value;
- }
+ int GetBrightness() const { return m_brightness; }
+ int SetBrightness(int value) { return m_brightness = value; }
+ int GetContrast() const { return m_contrast; }
+ int SetContrast(int value) { return m_contrast = value; }
+ int GetSaturation() const { return m_saturation; }
+ int SetSaturation(int value) { return m_saturation = value; }
- int GetHideMenu() const
- {
- return m_hidemenu;
- }
- int SetHideMenu(int value)
- {
- return m_hidemenu = value;
- }
+ int GetHideMenu() const { return m_hidemenu; }
+ int SetHideMenu(int value) { return m_hidemenu = value; }
- unsigned int GetOsdFlushRate() const
- {
- return (unsigned) m_osdflushrate;
- }
- int SetOsdFlushRate(int value)
- {
- return m_osdflushrate = value;
- }
+ unsigned int GetOsdFlushRate() const { return m_osdflushrate; }
+ int SetOsdFlushRate(unsigned int value) { return m_osdflushrate = value; }
- int GetUseWSS() const
- {
- return m_usewss;
- }
- int SetUseWSS(int value)
- {
- return m_usewss = value;
- }
+ int GetUseWSS() const { return m_usewss; }
+ int SetUseWSS(int value) { return m_usewss = value; }
protected:
eVideoMode m_videomode;
@@ -142,7 +81,7 @@ protected:
int m_contrast;
int m_saturation;
int m_hidemenu;
- int m_osdflushrate;
+ unsigned int m_osdflushrate;
};
#endif /*_DXR3_CONFIGDATA_H_*/
diff --git a/dxr3device.c b/dxr3device.c
index f8fa57f..f744254 100644
--- a/dxr3device.c
+++ b/dxr3device.c
@@ -42,7 +42,6 @@ cDxr3Device::cDxr3Device() : m_DemuxDevice(cDxr3Interface::Instance())
// where we will decide what kind of
// audio output system we will use.
audioOut = new cAudioOss();
- audioOut->openDevice();
m_DemuxDevice.setAudio(audioOut);
}
@@ -50,7 +49,6 @@ cDxr3Device::cDxr3Device() : m_DemuxDevice(cDxr3Interface::Instance())
// ==================================
cDxr3Device::~cDxr3Device()
{
- audioOut->releaseDevice();
delete audioOut;
if (m_spuDecoder)
diff --git a/dxr3interface.c b/dxr3interface.c
index c488ba6..fb3b174 100644
--- a/dxr3interface.c
+++ b/dxr3interface.c
@@ -30,11 +30,6 @@
#include "dxr3syncbuffer.h"
#include "dxr3osd.h"
-// ==================================
-const int LPCM_HEADER_LENGTH = 7;
-const int ZEROBUFFER_SIZE = 4096;
-uint8_t zerobuffer[ZEROBUFFER_SIZE] = {0};
-
static const char *DEV_DXR3_OSD = "_sp";
static const char *DEV_DXR3_VIDEO = "_mv";
static const char *DEV_DXR3_OSS = "_ma";