summaryrefslogtreecommitdiff
path: root/softhddevice.cpp
diff options
context:
space:
mode:
authorJohns <johns98@gmx.net>2011-12-12 17:06:05 +0100
committerJohns <johns98@gmx.net>2011-12-12 17:06:05 +0100
commitedfb9932c0cd99616b43ba3541c538659456ae6d (patch)
treea911e0081c9bf6a2aa6044e13f87acf8d63bbc03 /softhddevice.cpp
parentfa970400f1f2c8d0620ddccdb27c814ef7f23258 (diff)
downloadvdr-plugin-softhddevice-edfb9932c0cd99616b43ba3541c538659456ae6d.tar.gz
vdr-plugin-softhddevice-edfb9932c0cd99616b43ba3541c538659456ae6d.tar.bz2
Add deinterlace/scaling modes to setup.
Diffstat (limited to 'softhddevice.cpp')
-rw-r--r--softhddevice.cpp38
1 files changed, 30 insertions, 8 deletions
diff --git a/softhddevice.cpp b/softhddevice.cpp
index d017c0c..dfaddbd 100644
--- a/softhddevice.cpp
+++ b/softhddevice.cpp
@@ -33,10 +33,13 @@
#include "softhddev.h"
#include "softhddevice.h"
+extern "C" {
+ #include "video.h"
+}
//////////////////////////////////////////////////////////////////////////////
-static const char *const VERSION = "0.0.9";
+static const char *const VERSION = "0.1.0";
static const char *const DESCRIPTION =
trNOOP("A software and GPU emulated HD device");
@@ -254,6 +257,8 @@ class cMenuSetupSoft:public cMenuSetupPage
{
protected:
int MakePrimary;
+ int Deinterlace;
+ int Scaling;
protected:
virtual void Store(void);
public:
@@ -265,10 +270,17 @@ class cMenuSetupSoft:public cMenuSetupPage
*/
cMenuSetupSoft::cMenuSetupSoft(void)
{
+ static const char * const deinterlace[] = {
+ "Bob", "Weave", "Temporal", "TemporalSpatial", "Software" };
+ static const char * const scaling[] = {
+ "Normal", "Fast", "HQ", "Anamorphic" };
+
// cMenuEditBoolItem cMenuEditBitItem cMenuEditNumItem
// cMenuEditStrItem cMenuEditStraItem cMenuEditIntItem
Add(new cMenuEditBoolItem(tr("Make primary device"), &MakePrimary,
tr("no"), tr("yes")));
+ Add(new cMenuEditStraItem(tr("Deinterlace"), &Deinterlace, 5, deinterlace));
+ Add(new cMenuEditStraItem(tr("Scaling"), &Scaling, 4, scaling));
}
/**
@@ -277,6 +289,8 @@ cMenuSetupSoft::cMenuSetupSoft(void)
void cMenuSetupSoft::Store(void)
{
SetupStore("MakePrimary", MakePrimary);
+ SetupStore("Deinterlace", Deinterlace);
+ SetupStore("Scaling", Scaling);
}
//////////////////////////////////////////////////////////////////////////////
@@ -451,11 +465,11 @@ void cSoftHdDevice::StillPicture(
}
bool cSoftHdDevice::Poll(
- __attribute__ ((unused)) cPoller & poller, __attribute__ ((unused))
- int timeout_ms)
+ __attribute__ ((unused)) cPoller & poller, int timeout_ms)
{
- dsyslog("[softhddev]%s:\n", __FUNCTION__);
- return true;
+ dsyslog("[softhddev]%s: %d\n", __FUNCTION__, timeout_ms);
+
+ return ::Poll(timeout_ms);
}
bool cSoftHdDevice::Flush( __attribute__ ((unused)) int timeout_ms)
@@ -518,9 +532,7 @@ int cSoftHdDevice::PlayVideo(const uchar * data, int length)
{
//dsyslog("[softhddev]%s: %p %d\n", __FUNCTION__, data, length);
- ::PlayVideo(data, length);
-
- return length;
+ return ::PlayVideo(data, length);
}
#if 0
@@ -728,6 +740,16 @@ bool cPluginSoftHdDevice::SetupParse(const char *name, const char *value)
ConfigMakePrimary = atoi(value);
return true;
}
+ if (!strcmp(name, "Deinterlace")) {
+ printf("Deinterlace: %d\n", atoi(value));
+ VideoSetDeinterlace(atoi(value));
+ return true;
+ }
+ if (!strcmp(name, "Scaling")) {
+ printf("Scaling: %d\n", atoi(value));
+ VideoSetScaling(atoi(value));
+ return true;
+ }
return false;
}