diff -rup mythtv.orig/libs/libmythtv/guidegrid.cpp mythtv/libs/libmythtv/guidegrid.cpp
old
|
new
|
uint GuideGrid::GetAlternateChannelIndex |
638 | 638 | if (with_same_channum != same_channum) |
639 | 639 | continue; |
640 | 640 | |
641 | | if (!ciinfo || !m_player->IsTunable(ciinfo->chanid)) |
| 641 | if (!ciinfo || !m_player->IsTunable(ciinfo->chanid, true)) |
642 | 642 | continue; |
643 | 643 | |
644 | 644 | if (with_same_channum || |
… |
… |
bool GuideGrid::paintChannels(QPainter * |
1335 | 1335 | |
1336 | 1336 | PixmapChannel *chinfo = GetChannelInfo(m_currentStartChannel); |
1337 | 1337 | |
| 1338 | if (m_player) |
| 1339 | m_player->ClearTunableCache(); |
| 1340 | |
1338 | 1341 | bool showChannelIcon = gContext->GetNumSetting("EPGShowChannelIcon", 0); |
1339 | 1342 | |
1340 | 1343 | for (unsigned int y = 0; (y < (unsigned int)DISPLAY_CHANS) && chinfo; y++) |
… |
… |
bool GuideGrid::paintChannels(QPainter * |
1348 | 1351 | chinfo = GetChannelInfo(chanNumber); |
1349 | 1352 | |
1350 | 1353 | bool unavailable = false; |
1351 | | if (m_player && !m_player->IsTunable(chinfo->chanid)) |
| 1354 | if (m_player && !m_player->IsTunable(chinfo->chanid, true)) |
1352 | 1355 | { |
1353 | 1356 | unavailable = true; |
1354 | 1357 | |
diff -rup mythtv.orig/libs/libmythtv/tv_play.cpp mythtv/libs/libmythtv/tv_play.cpp
old
|
new
|
void TV::GetNextProgram(RemoteEncoder *e |
5592 | 5592 | infoMap["programid"] = programid; |
5593 | 5593 | } |
5594 | 5594 | |
5595 | | bool TV::IsTunable(uint chanid) |
| 5595 | bool TV::IsTunable(uint chanid, bool use_cache) |
5596 | 5596 | { |
5597 | 5597 | VERBOSE(VB_PLAYBACK, QString("IsTunable(%1)").arg(chanid)); |
5598 | 5598 | |
… |
… |
bool TV::IsTunable(uint chanid) |
5618 | 5618 | |
5619 | 5619 | for (uint i = 0; i < cardids.size(); i++) |
5620 | 5620 | { |
5621 | | vector<InputInfo> inputs = |
5622 | | RemoteRequestFreeInputList(cardids[i], excluded_cards); |
| 5621 | vector<InputInfo> inputs; |
| 5622 | if (!use_cache || !free_inputs.contains(cardids[i])) |
| 5623 | { |
| 5624 | inputs = RemoteRequestFreeInputList(cardids[i], excluded_cards); |
| 5625 | free_inputs[cardids[i]] = inputs; |
| 5626 | } |
| 5627 | else |
| 5628 | inputs = free_inputs[cardids[i]]; |
5623 | 5629 | |
5624 | 5630 | #if 0 |
5625 | 5631 | cout << "inputs[" << cardids[i] << "]: "; |
… |
… |
bool TV::IsTunable(uint chanid) |
5649 | 5655 | return false; |
5650 | 5656 | } |
5651 | 5657 | |
| 5658 | void TV::ClearTunableCache(void) |
| 5659 | { |
| 5660 | free_inputs.clear(); |
| 5661 | } |
| 5662 | |
5652 | 5663 | void TV::EmbedOutput(WId wid, int x, int y, int w, int h) |
5653 | 5664 | { |
5654 | 5665 | embedWinID = wid; |
diff -rup mythtv.orig/libs/libmythtv/tv_play.h mythtv/libs/libmythtv/tv_play.h
old
|
new
|
|
19 | 19 | #include "programinfo.h" |
20 | 20 | #include "channelutil.h" |
21 | 21 | #include "videoouttypes.h" |
| 22 | #include "inputinfo.h" |
22 | 23 | |
23 | 24 | #include <qobject.h> |
24 | 25 | |
… |
… |
class MPUBLIC TV : public QObject |
138 | 139 | void EmbedOutput(WId wid, int x, int y, int w, int h); |
139 | 140 | void StopEmbeddingOutput(void); |
140 | 141 | bool IsEmbedding(void); |
141 | | bool IsTunable(uint chanid); |
| 142 | bool IsTunable(uint chanid, bool use_cache=false); |
| 143 | void ClearTunableCache(void); |
142 | 144 | void ChangeChannel(const DBChanList &options); |
143 | 145 | |
144 | 146 | void DrawUnusedRects(bool sync); |
… |
… |
class MPUBLIC TV : public QObject |
451 | 453 | bool jumped_back; ///< Used by PromptDeleteRecording |
452 | 454 | vector<int> ff_rew_speeds; |
453 | 455 | |
| 456 | QMap< uint,vector<InputInfo> > free_inputs; |
| 457 | |
454 | 458 | uint vbimode; |
455 | 459 | |
456 | 460 | // State variables |