From 9de556dad6c509437abcb0e0a02b7f5e2ac09a4b Mon Sep 17 00:00:00 2001 From: Marten Richter Date: Sat, 17 Nov 2012 19:40:43 +0100 Subject: [PATCH] Updates on mode switching code, still turned off --- videoomx.cc | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/videoomx.cc b/videoomx.cc index c3456d9..695c547 100644 --- a/videoomx.cc +++ b/videoomx.cc @@ -682,27 +682,30 @@ int VideoOMX::sync() void VideoOMX::interlaceSwitch4Demux() { return; Demuxer *demux=Demuxer::getInstance(); - if ( (outputinterlaced && !demux->getInterlaced()) - || (!outputinterlaced && demux->getInterlaced())) { - if (hdmi && (demux->getHorizontalSize()>720 || demux->getInterlaced() )) { // only switch if hdmi and HD or interlaced SD material - Log::getInstance()->log("Video", Log::NOTICE, "switch interlacing %d",demux->getInterlaced()); - - //OMX_Deinit(); - int set_interlaced=0; - if (demux->getHorizontalSize()>720 && demux->getInterlaced()) { - set_interlaced=1; - } + + if (hdmi) { // only switch if hdmi and HD or interlaced SD material + + + //OMX_Deinit(); + int set_interlaced=0; + if (demux->getHorizontalSize()>720 && demux->getInterlaced()) { + set_interlaced=1; + } + Log::getInstance()->log("Video", Log::NOTICE, "switch interlacing %d %d %d",demux->getInterlaced(),outputinterlaced,set_interlaced); + if (outputinterlaced!=set_interlaced) { selectVideoMode(set_interlaced); - //OMX_Init(); Osd::getInstance()->shutdown(); Osd::getInstance()->restore(); Osd::getInstance()->init((void*)""); BoxStack::getInstance()->redrawAllBoxes(); initted=1; - } + //OMX_Init(); + } + + } -- 2.39.5