1 | Deal w/ dead code |
---|
2 | |
---|
3 | From: Erik Hovland <erik@hovland.org> |
---|
4 | |
---|
5 | |
---|
6 | --- |
---|
7 | |
---|
8 | mythtv/libs/libmythtv/NuppelVideoPlayer.cpp | 8 +----- |
---|
9 | mythtv/libs/libmythtv/cc608decoder.cpp | 2 + |
---|
10 | mythtv/libs/libmythtv/cc708decoder.cpp | 28 +------------------- |
---|
11 | .../libs/libmythtv/channelscan/channelimporter.cpp | 2 + |
---|
12 | mythtv/libs/libmythtv/decoderbase.cpp | 2 + |
---|
13 | mythtv/libs/libmythtv/mpeg/mpegtables.cpp | 3 -- |
---|
14 | mythtv/libs/libmythtv/teletextdecoder.cpp | 4 +-- |
---|
15 | mythtv/libs/libmythtv/tv_play.cpp | 24 +---------------- |
---|
16 | mythtv/libs/libmythtv/vbitext/vbi.c | 16 ++++++----- |
---|
17 | mythtv/libs/libmythtv/yuv2rgb.cpp | 3 +- |
---|
18 | 10 files changed, 19 insertions(+), 73 deletions(-) |
---|
19 | |
---|
20 | |
---|
21 | diff --git a/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp b/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp |
---|
22 | index c5e3f18..1c4c8cb 100644 |
---|
23 | --- a/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp |
---|
24 | +++ b/mythtv/libs/libmythtv/NuppelVideoPlayer.cpp |
---|
25 | @@ -7513,13 +7513,9 @@ void NuppelVideoPlayer::DisplayDVDButton(void) |
---|
26 | bool numbuttons = player_ctx->buffer->DVD()->NumMenuButtons(); |
---|
27 | bool osdshown = osd->IsSetDisplaying("subtitles"); |
---|
28 | |
---|
29 | - if ((!numbuttons) || |
---|
30 | - (osdshown) || |
---|
31 | + if (!numbuttons || osdshown || |
---|
32 | (dvd_stillframe_showing && buffer->timecode > 0) || |
---|
33 | - ((!osdshown) && |
---|
34 | - (!pausevideo) && |
---|
35 | - (hidedvdbutton) && |
---|
36 | - (buffer->timecode > 0))) |
---|
37 | + (!pausevideo && hidedvdbutton && buffer->timecode > 0)) |
---|
38 | { |
---|
39 | return; |
---|
40 | } |
---|
41 | diff --git a/mythtv/libs/libmythtv/cc608decoder.cpp b/mythtv/libs/libmythtv/cc608decoder.cpp |
---|
42 | index 42aa12f..d53c516 100644 |
---|
43 | --- a/mythtv/libs/libmythtv/cc608decoder.cpp |
---|
44 | +++ b/mythtv/libs/libmythtv/cc608decoder.cpp |
---|
45 | @@ -1076,7 +1076,7 @@ void CC608Decoder::XDSDecode(int /*field*/, int b1, int b2) |
---|
46 | return; // waiting for start of XDS |
---|
47 | |
---|
48 | // Supports non-interleaved XDS packet continuation by ignoring cont. |
---|
49 | - if ((b1 < 0x0f) && (b1 > 0x0f)) |
---|
50 | + if ((b1 < 0x0f) && (b2 > 0x0f)) |
---|
51 | return; |
---|
52 | |
---|
53 | xds_buf.push_back(b1); |
---|
54 | diff --git a/mythtv/libs/libmythtv/cc708decoder.cpp b/mythtv/libs/libmythtv/cc708decoder.cpp |
---|
55 | index 7ca97da..816bfed 100644 |
---|
56 | --- a/mythtv/libs/libmythtv/cc708decoder.cpp |
---|
57 | +++ b/mythtv/libs/libmythtv/cc708decoder.cpp |
---|
58 | @@ -285,33 +285,7 @@ static int handle_cc_c0_ext1_p16(CC708Reader* cc, uint service_num, int i) |
---|
59 | { |
---|
60 | // double byte code |
---|
61 | const int blk_size = cc->buf_size[service_num]; |
---|
62 | - if (EXT1==code && ((i+1)<blk_size)) |
---|
63 | - { |
---|
64 | - const int code2 = cc->buf[service_num][i+1]; |
---|
65 | - if (code2<=0x1f) |
---|
66 | - { |
---|
67 | - // C2 code -- nothing in EIA-708-A |
---|
68 | - i = handle_cc_c2(cc, service_num, i+1); |
---|
69 | - } |
---|
70 | - else if (code2<=0x7f) |
---|
71 | - { |
---|
72 | - // G2 code -- fractions, drawing, symbols |
---|
73 | - append_character(cc, service_num, CCtableG2[code2-0x20]); |
---|
74 | - i+=2; |
---|
75 | - } |
---|
76 | - else if (code2<=0x9f) |
---|
77 | - { |
---|
78 | - // C3 code -- nothing in EIA-708-A |
---|
79 | - i = handle_cc_c3(cc, service_num, i); |
---|
80 | - } |
---|
81 | - else if (code2<=0xff) |
---|
82 | - { |
---|
83 | - // G3 code -- one symbol in EIA-708-A "[cc]" |
---|
84 | - append_character(cc, service_num, CCtableG3[code2-0xA0]); |
---|
85 | - i+=2; |
---|
86 | - } |
---|
87 | - } |
---|
88 | - else if ((i+1)<blk_size) |
---|
89 | + if ((i+1)<blk_size) |
---|
90 | i+=2; |
---|
91 | } |
---|
92 | else if (code<=0x1f) |
---|
93 | diff --git a/mythtv/libs/libmythtv/channelscan/channelimporter.cpp b/mythtv/libs/libmythtv/channelscan/channelimporter.cpp |
---|
94 | index 1685f80..2b30858 100644 |
---|
95 | --- a/mythtv/libs/libmythtv/channelscan/channelimporter.cpp |
---|
96 | +++ b/mythtv/libs/libmythtv/channelscan/channelimporter.cpp |
---|
97 | @@ -1207,7 +1207,7 @@ ChannelImporter::QueryUserDelete(const QString &msg) |
---|
98 | cin >> ret; |
---|
99 | bool ok; |
---|
100 | uint val = QString(ret.c_str()).toUInt(&ok); |
---|
101 | - if (ok && (1 <= val) && (val <= 3)) |
---|
102 | + if (ok && (1 <= val) && (val <= 4)) |
---|
103 | { |
---|
104 | action = (1 == val) ? kDeleteAll : action; |
---|
105 | action = (2 == val) ? kDeleteInvisibleAll : action; |
---|
106 | diff --git a/mythtv/libs/libmythtv/decoderbase.cpp b/mythtv/libs/libmythtv/decoderbase.cpp |
---|
107 | index e1aefc0..d20c3d8 100644 |
---|
108 | --- a/mythtv/libs/libmythtv/decoderbase.cpp |
---|
109 | +++ b/mythtv/libs/libmythtv/decoderbase.cpp |
---|
110 | @@ -1016,7 +1016,7 @@ int DecoderBase::AutoSelectTrack(uint type) |
---|
111 | } |
---|
112 | |
---|
113 | int oldTrack = currentTrack[type]; |
---|
114 | - currentTrack[type] = (selTrack < 0) ? -1 : selTrack; |
---|
115 | + currentTrack[type] = selTrack; |
---|
116 | StreamInfo tmp = tracks[type][currentTrack[type]]; |
---|
117 | selectedTrack[type] = tmp; |
---|
118 | |
---|
119 | diff --git a/mythtv/libs/libmythtv/mpeg/mpegtables.cpp b/mythtv/libs/libmythtv/mpeg/mpegtables.cpp |
---|
120 | index 21dcfa5..bee14ce 100644 |
---|
121 | --- a/mythtv/libs/libmythtv/mpeg/mpegtables.cpp |
---|
122 | +++ b/mythtv/libs/libmythtv/mpeg/mpegtables.cpp |
---|
123 | @@ -652,9 +652,6 @@ uint ProgramMapTable::FindUnusedPID(uint desired_pid) |
---|
124 | while (FindPID(desired_pid) >= 0) |
---|
125 | desired_pid += 1; |
---|
126 | |
---|
127 | - if (desired_pid <= 0x1fff) |
---|
128 | - return pid; |
---|
129 | - |
---|
130 | pid = 0x20; |
---|
131 | while (FindPID(desired_pid) >= 0) |
---|
132 | desired_pid += 1; |
---|
133 | diff --git a/mythtv/libs/libmythtv/teletextdecoder.cpp b/mythtv/libs/libmythtv/teletextdecoder.cpp |
---|
134 | index 90fda63..a3471b8 100644 |
---|
135 | --- a/mythtv/libs/libmythtv/teletextdecoder.cpp |
---|
136 | +++ b/mythtv/libs/libmythtv/teletextdecoder.cpp |
---|
137 | @@ -46,7 +46,7 @@ using namespace std; |
---|
138 | */ |
---|
139 | void TeletextDecoder::Decode(const unsigned char *buf, int vbimode) |
---|
140 | { |
---|
141 | - int err = 0, latin1 = -1, zahl1, pagenum, subpagenum, lang, flags; |
---|
142 | + int err = 0, zahl1, pagenum, subpagenum, lang, flags; |
---|
143 | uint magazine, packet, header; |
---|
144 | |
---|
145 | if (!m_teletextviewer) |
---|
146 | @@ -143,7 +143,7 @@ void TeletextDecoder::Decode(const unsigned char *buf, int vbimode) |
---|
147 | subpagenum= (b2 + b3 * 256) & 0x3f7f; |
---|
148 | pagenum = (magazine?:8)*256 + b1; |
---|
149 | |
---|
150 | - lang = "\0\4\2\6\1\5\3\7"[b4 >> 5] + (latin1 ? 0 : 8); |
---|
151 | + lang = "\0\4\2\6\1\5\3\7"[b4 >> 5]; |
---|
152 | flags = b4 & 0x1F; |
---|
153 | flags |= b3 & 0xC0; |
---|
154 | flags |= (b2 & 0x80) >> 2; |
---|
155 | diff --git a/mythtv/libs/libmythtv/tv_play.cpp b/mythtv/libs/libmythtv/tv_play.cpp |
---|
156 | index f1e071f..e1e5bdd 100644 |
---|
157 | --- a/mythtv/libs/libmythtv/tv_play.cpp |
---|
158 | +++ b/mythtv/libs/libmythtv/tv_play.cpp |
---|
159 | @@ -303,8 +303,6 @@ bool TV::StartTV(ProgramInfo *tvrec, bool startInGuide, |
---|
160 | if ((0 <= idx) && (idx < (int)reclist->size())) |
---|
161 | { |
---|
162 | p = reclist->at(idx); |
---|
163 | - if (curProgram) |
---|
164 | - delete curProgram; |
---|
165 | curProgram = new ProgramInfo(*p); |
---|
166 | } |
---|
167 | else |
---|
168 | @@ -6423,8 +6421,6 @@ void TV::SwitchCards(PlayerContext *ctx, |
---|
169 | QString("SwitchCards(%1,'%2',%3)") |
---|
170 | .arg(chanid).arg(channum).arg(inputid)); |
---|
171 | |
---|
172 | - RemoteEncoder *testrec = NULL; |
---|
173 | - |
---|
174 | if (!StateIsLiveTV(GetState(ctx))) |
---|
175 | { |
---|
176 | return; |
---|
177 | @@ -6440,26 +6436,8 @@ void TV::SwitchCards(PlayerContext *ctx, |
---|
178 | uint cardid = CardUtil::GetCardID(inputid); |
---|
179 | if (cardid) |
---|
180 | reclist.push_back(QString::number(cardid)); |
---|
181 | - |
---|
182 | - // now we need to set our channel as the starting channel.. |
---|
183 | - if (testrec && testrec->IsValidRecorder()) |
---|
184 | - { |
---|
185 | - QString inputname(""); |
---|
186 | - int cardid = testrec->GetRecorderNumber(); |
---|
187 | - int cardinputid = CardUtil::GetCardInputID( |
---|
188 | - cardid, channum, inputname); |
---|
189 | - |
---|
190 | - VERBOSE(VB_CHANNEL, LOC + "Setting startchan: " + |
---|
191 | - QString("cardid(%1) cardinputid(%2) channum(%3)") |
---|
192 | - .arg(cardid).arg(cardinputid).arg(channum)); |
---|
193 | - |
---|
194 | - if (cardid >= 0 && cardinputid >=0 && !inputname.isEmpty()) |
---|
195 | - { |
---|
196 | - CardUtil::SetStartChannel(cardinputid, channum); |
---|
197 | - CardUtil::SetStartInput(cardid, inputname); |
---|
198 | - } |
---|
199 | - } |
---|
200 | } |
---|
201 | + RemoteEncoder *testrec = NULL; |
---|
202 | if (!reclist.empty()) |
---|
203 | testrec = RemoteRequestFreeRecorderFromList(reclist); |
---|
204 | |
---|
205 | diff --git a/mythtv/libs/libmythtv/vbitext/vbi.c b/mythtv/libs/libmythtv/vbitext/vbi.c |
---|
206 | index d80541c..a99ca99 100644 |
---|
207 | --- a/mythtv/libs/libmythtv/vbitext/vbi.c |
---|
208 | +++ b/mythtv/libs/libmythtv/vbitext/vbi.c |
---|
209 | @@ -114,7 +114,7 @@ vbi_send(struct vbi *vbi, int type, int i1, int i2, int i3, void *p1) |
---|
210 | static void |
---|
211 | vbi_send_page(struct vbi *vbi, struct raw_page *rvtp, int page) |
---|
212 | { |
---|
213 | - struct vt_page *cvtp = 0; |
---|
214 | +// struct vt_page *cvtp = 0; |
---|
215 | |
---|
216 | if (rvtp->page->flags & PG_ACTIVE) |
---|
217 | { |
---|
218 | @@ -124,7 +124,7 @@ vbi_send_page(struct vbi *vbi, struct raw_page *rvtp, int page) |
---|
219 | enhance(rvtp->enh, rvtp->page); |
---|
220 | // if (vbi->cache) |
---|
221 | // cvtp = vbi->cache->op->put(vbi->cache, rvtp->page); |
---|
222 | - vbi_send(vbi, EV_PAGE, 0, 0, 0, cvtp ?: rvtp->page); |
---|
223 | + vbi_send(vbi, EV_PAGE, 0, 0, 0, rvtp->page); |
---|
224 | } |
---|
225 | } |
---|
226 | } |
---|
227 | @@ -695,21 +695,21 @@ vbi_close(struct vbi *vbi) |
---|
228 | struct vt_page * |
---|
229 | vbi_query_page(struct vbi *vbi, int pgno, int subno) |
---|
230 | { |
---|
231 | - struct vt_page *vtp = 0; |
---|
232 | +// struct vt_page *vtp = 0; |
---|
233 | |
---|
234 | (void)pgno; |
---|
235 | (void)subno; |
---|
236 | |
---|
237 | // if (vbi->cache) |
---|
238 | // vtp = vbi->cache->op->get(vbi->cache, pgno, subno); |
---|
239 | - if (vtp == 0) |
---|
240 | - { |
---|
241 | +// if (vtp == 0) |
---|
242 | +// { |
---|
243 | // EV_PAGE will come later... |
---|
244 | return 0; |
---|
245 | - } |
---|
246 | +// } |
---|
247 | |
---|
248 | - vbi_send(vbi, EV_PAGE, 1, 0, 0, vtp); |
---|
249 | - return vtp; |
---|
250 | +// vbi_send(vbi, EV_PAGE, 1, 0, 0, vtp); |
---|
251 | +// return vtp; |
---|
252 | } |
---|
253 | |
---|
254 | void |
---|
255 | diff --git a/mythtv/libs/libmythtv/yuv2rgb.cpp b/mythtv/libs/libmythtv/yuv2rgb.cpp |
---|
256 | index 0f34b8b..84847ad 100644 |
---|
257 | --- a/mythtv/libs/libmythtv/yuv2rgb.cpp |
---|
258 | +++ b/mythtv/libs/libmythtv/yuv2rgb.cpp |
---|
259 | @@ -377,9 +377,10 @@ yuv2rgb_fun yuv2rgb_init_mmx (int bpp, int mode) |
---|
260 | return mmx_rgb16; |
---|
261 | else if ((bpp == 32) && (mode == MODE_RGB)) |
---|
262 | return mmx_argb32; |
---|
263 | -#endif |
---|
264 | +#else |
---|
265 | if ((bpp == 32) && (mode == MODE_RGB)) |
---|
266 | return yuv420_argb32_non_mmx; |
---|
267 | +#endif |
---|
268 | |
---|
269 | return NULL; |
---|
270 | } |
---|