diff options
| author | Thomas Reufer <thomas@reufer.ch> | 2015-05-02 17:11:51 +0200 |
|---|---|---|
| committer | Thomas Reufer <thomas@reufer.ch> | 2015-05-22 19:15:21 +0200 |
| commit | 1129ef4d34d0bf4c6d0b74dd76094b7cc36aa151 (patch) | |
| tree | 3752f67a4fe3079865033f1add81150b459e36a9 | |
| parent | 0405214fbb93580ddad245b3a046bf51d410cb72 (diff) | |
| download | vdr-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-- | HISTORY | 3 | ||||
| -rw-r--r-- | display.c | 9 | ||||
| -rw-r--r-- | display.h | 2 | ||||
| -rw-r--r-- | omxdevice.c | 3 |
4 files changed, 17 insertions, 0 deletions
@@ -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: @@ -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(); @@ -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() |
