1 | Index: libs/libmythtv/NuppelVideoPlayer.cpp
|
---|
2 | ===================================================================
|
---|
3 | --- libs/libmythtv/NuppelVideoPlayer.cpp (revision 10210)
|
---|
4 | +++ libs/libmythtv/NuppelVideoPlayer.cpp (working copy)
|
---|
5 | @@ -2439,8 +2439,30 @@
|
---|
6 |
|
---|
7 | // handle Interactive TV
|
---|
8 | if (GetInteractiveTV() && GetDecoder())
|
---|
9 | - itvVisible = GetDecoder()->ITVUpdate(itvVisible);
|
---|
10 | + {
|
---|
11 | + QMutexLocker locker(&itvLock);
|
---|
12 |
|
---|
13 | + OSD *osd = GetOSD();
|
---|
14 | + if (osd)
|
---|
15 | + {
|
---|
16 | + OSDSet *itvosd = osd->GetSet("interactive");
|
---|
17 | +
|
---|
18 | + if (itvosd)
|
---|
19 | + {
|
---|
20 | + bool visible = false;
|
---|
21 | + if (interactiveTV->ImageHasChanged() || !itvVisible)
|
---|
22 | + {
|
---|
23 | + interactiveTV->UpdateOSD(itvosd);
|
---|
24 | + visible = true;
|
---|
25 | + itvVisible = true;
|
---|
26 | + }
|
---|
27 | +
|
---|
28 | + if (visible)
|
---|
29 | + osd->SetVisible(itvosd, 0);
|
---|
30 | + }
|
---|
31 | + }
|
---|
32 | + }
|
---|
33 | +
|
---|
34 | // handle EIA-608 and Teletext
|
---|
35 | if (textDisplayMode & kDisplayNUVCaptions)
|
---|
36 | ShowText();
|
---|
37 | @@ -5711,7 +5733,11 @@
|
---|
38 | QMutexLocker locker(&decoder_change_lock);
|
---|
39 |
|
---|
40 | if (GetDecoder())
|
---|
41 | - return GetDecoder()->ITVHandleAction(action);
|
---|
42 | + {
|
---|
43 | + QMutexLocker locker(&itvLock);
|
---|
44 | + if (GetInteractiveTV())
|
---|
45 | + return interactiveTV->OfferKey(action);
|
---|
46 | + }
|
---|
47 |
|
---|
48 | return false;
|
---|
49 | }
|
---|
50 | @@ -5734,8 +5760,12 @@
|
---|
51 | return;
|
---|
52 | }
|
---|
53 |
|
---|
54 | - GetDecoder()->ITVRestart(chanid, cardid, isLiveTV);
|
---|
55 | -
|
---|
56 | + {
|
---|
57 | + QMutexLocker locker(&itvLock);
|
---|
58 | + if (GetInteractiveTV())
|
---|
59 | + interactiveTV->Restart(chanid, cardid, isLiveTV);
|
---|
60 | + }
|
---|
61 | +
|
---|
62 | osd->ClearAll("interactive");
|
---|
63 | itvosd->Display();
|
---|
64 | osd->SetVisible(itvosd, 0);
|
---|
65 | Index: libs/libmythtv/avformatdecoder.cpp
|
---|
66 | ===================================================================
|
---|
67 | --- libs/libmythtv/avformatdecoder.cpp (revision 10210)
|
---|
68 | +++ libs/libmythtv/avformatdecoder.cpp (working copy)
|
---|
69 | @@ -2204,54 +2204,6 @@
|
---|
70 | return ccd608->GetXDS(key);
|
---|
71 | }
|
---|
72 |
|
---|
73 | -bool AvFormatDecoder::ITVUpdate(bool itvVisible)
|
---|
74 | -{
|
---|
75 | - QMutexLocker locker(&itvLock);
|
---|
76 | -
|
---|
77 | - OSD *osd = GetNVP()->GetOSD();
|
---|
78 | - if (!osd)
|
---|
79 | - return itvVisible;
|
---|
80 | -
|
---|
81 | - OSDSet *itvosd = osd->GetSet("interactive");
|
---|
82 | - if (!itvosd)
|
---|
83 | - return itvVisible;
|
---|
84 | -
|
---|
85 | - if (!itv)
|
---|
86 | - return itvVisible;
|
---|
87 | -
|
---|
88 | - bool visible = false;
|
---|
89 | - if (itv->ImageHasChanged() || !itvVisible)
|
---|
90 | - {
|
---|
91 | - itv->UpdateOSD(itvosd);
|
---|
92 | - visible = true;
|
---|
93 | - itvVisible = true;
|
---|
94 | - }
|
---|
95 | -
|
---|
96 | - if (visible)
|
---|
97 | - osd->SetVisible(itvosd, 0);
|
---|
98 | -
|
---|
99 | - return itvVisible;
|
---|
100 | -}
|
---|
101 | -
|
---|
102 | -bool AvFormatDecoder::ITVHandleAction(const QString &action)
|
---|
103 | -{
|
---|
104 | - QMutexLocker locker(&itvLock);
|
---|
105 | - if (itv)
|
---|
106 | - return itv->OfferKey(action);
|
---|
107 | - return false;
|
---|
108 | -}
|
---|
109 | -
|
---|
110 | -/** \fn AvFormatDecoder::ITVRestart(uint,uint,bool)
|
---|
111 | - * \brief Restart the MHEG/MHP engine.
|
---|
112 | - */
|
---|
113 | -void AvFormatDecoder::ITVRestart(uint chanid, uint cardid, bool isLiveTV)
|
---|
114 | -{
|
---|
115 | - QMutexLocker locker(&itvLock);
|
---|
116 | - itv = GetNVP()->GetInteractiveTV();
|
---|
117 | - if (itv)
|
---|
118 | - itv->Restart(chanid, cardid, isLiveTV);
|
---|
119 | -}
|
---|
120 | -
|
---|
121 | bool AvFormatDecoder::SetAudioByComponentTag(int tag)
|
---|
122 | {
|
---|
123 | for (uint i = 0; i < tracks[kTrackTypeAudio].size(); i++)
|
---|
124 | Index: libs/libmythtv/decoderbase.h
|
---|
125 | ===================================================================
|
---|
126 | --- libs/libmythtv/decoderbase.h (revision 10210)
|
---|
127 | +++ libs/libmythtv/decoderbase.h (working copy)
|
---|
128 | @@ -129,11 +129,6 @@
|
---|
129 | virtual QString GetXDS(const QString&) const { return QString::null; }
|
---|
130 |
|
---|
131 | // MHEG/MHI stuff
|
---|
132 | - virtual bool ITVUpdate(bool /*visible*/) { return false; }
|
---|
133 | - virtual bool ITVHandleAction(const QString& /*action*/) { return false; }
|
---|
134 | - virtual void ITVRestart(uint /*chanid*/, uint /*cardid*/,
|
---|
135 | - bool /*livetv*/) { }
|
---|
136 | -
|
---|
137 | virtual bool SetAudioByComponentTag(int) { return false; }
|
---|
138 | virtual bool SetVideoByComponentTag(int) { return false; }
|
---|
139 |
|
---|
140 | Index: libs/libmythtv/NuppelVideoPlayer.h
|
---|
141 | ===================================================================
|
---|
142 | --- libs/libmythtv/NuppelVideoPlayer.h (revision 10210)
|
---|
143 | +++ libs/libmythtv/NuppelVideoPlayer.h (working copy)
|
---|
144 | @@ -643,6 +643,7 @@
|
---|
145 | bool itvVisible;
|
---|
146 | InteractiveTV *interactiveTV;
|
---|
147 | bool itvEnabled;
|
---|
148 | + QMutex itvLock;
|
---|
149 |
|
---|
150 | // OSD stuff
|
---|
151 | OSD *osd;
|
---|
152 | Index: libs/libmythtv/avformatdecoder.h
|
---|
153 | ===================================================================
|
---|
154 | --- libs/libmythtv/avformatdecoder.h (revision 10210)
|
---|
155 | +++ libs/libmythtv/avformatdecoder.h (working copy)
|
---|
156 | @@ -136,10 +136,6 @@
|
---|
157 | virtual QString GetXDS(const QString&) const;
|
---|
158 |
|
---|
159 | // MHEG stuff
|
---|
160 | - virtual bool ITVUpdate(bool itvVisible);
|
---|
161 | - virtual bool ITVHandleAction(const QString&);
|
---|
162 | - virtual void ITVRestart(uint chanid, uint cardid, bool livetv);
|
---|
163 | -
|
---|
164 | virtual bool SetAudioByComponentTag(int tag);
|
---|
165 | virtual bool SetVideoByComponentTag(int tag);
|
---|
166 |
|
---|
167 | @@ -239,7 +235,6 @@
|
---|
168 | // MHEG
|
---|
169 | InteractiveTV *itv; ///< MHEG/MHP decoder
|
---|
170 | int selectedVideoIndex; ///< MHEG/MHP video stream to use.
|
---|
171 | - QMutex itvLock;
|
---|
172 |
|
---|
173 | // Audio
|
---|
174 | short int *audioSamples;
|
---|