Ticket #3986: 27_disable_deinterlacing_in_guide.dpatch

File 27_disable_deinterlacing_in_guide.dpatch, 2.4 KB (added by anonymous, 12 years ago)

patch against -fixes

Line 
1#! /bin/sh /usr/share/dpatch/dpatch-run
2## 27_disable_deinterlacing_in_guide.dpatch by Michael Haas <laga@laga.ath.cx>
3##
4## All lines beginning with `## DP:' are a description of the patch.
5## DP: Disable deinterlacer when entering EPG.
6## DP: This patch is taken from MythTV trunk (r18180 and r18172)
7## DP: Original author is danielk
8
9
10@DPATCH@
11
12Index: mythtv/libs/libmythtv/NuppelVideoPlayer.cpp
13===================================================================
14--- mythtv/libs/libmythtv/NuppelVideoPlayer.cpp (Revision 18254)
15+++ mythtv/libs/libmythtv/NuppelVideoPlayer.cpp (Arbeitskopie)
16@@ -145,6 +145,8 @@
17       m_playbackinfo(NULL),
18       // Window stuff
19       parentWidget(NULL), embedid(0), embx(-1), emby(-1), embw(-1), embh(-1),
20+      embed_saved_scan_type((FrameScanType)-2),
21+      embed_saved_scan_lock(false),
22       // State
23       eof(false),
24       m_double_framerate(false),    m_double_process(false),
25@@ -1591,6 +1593,16 @@
26 {
27     if (videoOutput)
28     {
29+        // BEGIN HACK -- Temporarily disable deinterlacing
30+        // Note: this should no longer be needed after mythtv-vid merge
31+        if ((int)embed_saved_scan_type <= kScan_Ignore)
32+        {
33+            embed_saved_scan_type = m_scan;
34+            embed_saved_scan_lock = m_scan_locked;
35+            SetScanType(kScan_Progressive);
36+        }
37+        // END HACK
38+
39         videoOutput->EmbedInWidget(wid, x, y, w, h);
40     }
41     else
42@@ -1608,6 +1620,17 @@
43     if (videoOutput)
44     {
45         videoOutput->StopEmbedding();
46+
47+        // BEGIN HACK -- Temporarily disable deinterlacing
48+        // Note: this should no longer be needed after mythtv-vid merge
49+        if ((int)embed_saved_scan_type >= kScan_Ignore)
50+        {
51+            SetScanType(embed_saved_scan_type);
52+            m_scan_locked = embed_saved_scan_lock;
53+            embed_saved_scan_type = (FrameScanType) -2;
54+        }
55+        // END HACK
56+
57         ReinitOSD();
58     }
59 }
60Index: mythtv/libs/libmythtv/NuppelVideoPlayer.h
61===================================================================
62--- mythtv/libs/libmythtv/NuppelVideoPlayer.h   (Revision 18254)
63+++ mythtv/libs/libmythtv/NuppelVideoPlayer.h   (Arbeitskopie)
64@@ -527,8 +527,9 @@
65     QWidget *parentWidget;
66     WId embedid;
67     int embx, emby, embw, embh;
68+    FrameScanType embed_saved_scan_type;
69+    bool          embed_saved_scan_lock;
70 
71-
72     // State
73     QWaitCondition decoderThreadPaused;
74     QWaitCondition videoThreadPaused;