summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Reufer <thomas@reufer.ch>2015-05-02 17:11:51 +0200
committerThomas Reufer <thomas@reufer.ch>2015-05-22 19:15:21 +0200
commit1129ef4d34d0bf4c6d0b74dd76094b7cc36aa151 (patch)
tree3752f67a4fe3079865033f1add81150b459e36a9
parent0405214fbb93580ddad245b3a046bf51d410cb72 (diff)
downloadvdr-plugin-rpihddevice-1129ef4d34d0bf4c6d0b74dd76094b7cc36aa151.tar.gz
vdr-plugin-rpihddevice-1129ef4d34d0bf4c6d0b74dd76094b7cc36aa151.tar.bz2
set field sync when output interlaced material at interlaced display mode
-rw-r--r--HISTORY3
-rw-r--r--display.c9
-rw-r--r--display.h2
-rw-r--r--omxdevice.c3
4 files changed, 17 insertions, 0 deletions
diff --git a/HISTORY b/HISTORY
index 0006722..d638dde 100644
--- a/HISTORY
+++ b/HISTORY
@@ -1,6 +1,9 @@
VDR Plugin 'rpihddevice' Revision History
-----------------------------------------
+- fixed:
+ - set field sync when output interlaced material at interlaced display mode
+
2015-04-29: Version 0.1.0
-------------------------
- new:
diff --git a/display.c b/display.c
index c839d59..b15e259 100644
--- a/display.c
+++ b/display.c
@@ -16,6 +16,8 @@ extern "C" {
#include "interface/vmcs_host/vc_dispmanx.h"
}
+#include <bcm_host.h>
+
cRpiDisplay* cRpiDisplay::s_instance = 0;
cRpiDisplay* cRpiDisplay::GetInstance(void)
@@ -53,6 +55,7 @@ cRpiDisplay* cRpiDisplay::GetInstance(void)
void cRpiDisplay::DropInstance(void)
{
+ SetSyncField(0);
delete s_instance;
s_instance = 0;
}
@@ -106,6 +109,12 @@ int cRpiDisplay::SetVideoFormat(int width, int height, int frameRate,
return -1;
}
+int cRpiDisplay::SetSyncField(int field)
+{
+ char response[64];
+ return vc_gencmd(response, sizeof(response), "hvs_update_fields %d", field);
+}
+
cRpiVideoPort::ePort cRpiDisplay::GetVideoPort(void)
{
cRpiDisplay* instance = GetInstance();
diff --git a/display.h b/display.h
index d954a2e..4388d13 100644
--- a/display.h
+++ b/display.h
@@ -28,6 +28,8 @@ public:
static int SetVideoFormat(int width, int height, int frameRate,
bool interlaced);
+ static int SetSyncField(int field);
+
protected:
cRpiDisplay(int width, int height, int frameRate,
diff --git a/omxdevice.c b/omxdevice.c
index a470be6..5ad3672 100644
--- a/omxdevice.c
+++ b/omxdevice.c
@@ -165,6 +165,7 @@ bool cOmxDevice::SetPlayMode(ePlayMode PlayMode)
m_hasVideo = false;
m_videoCodec = cVideoCodec::eInvalid;
m_playMode = pmNone;
+ cRpiDisplay::SetSyncField(0);
break;
case pmAudioVideo:
@@ -668,6 +669,8 @@ void cOmxDevice::HandleStreamStart()
width, height, frameRate, interlaced ? "i" : "p");
cRpiDisplay::SetVideoFormat(width, height, frameRate, interlaced);
+ if (!cRpiDisplay::IsProgressive() && interlaced)
+ cRpiDisplay::SetSyncField(1);
}
void cOmxDevice::HandleVideoSetupChanged()