=== programs/mythbackend/eitactivescanner.cpp
==================================================================
|
|
|
|
| 59 | 59 | if (ismaster) |
| 60 | 60 | StartActiveScan(); |
| 61 | 61 | |
| 62 | | |
| 63 | | |
| 64 | 62 | while (!exitThread) |
| 65 | 63 | { |
| 66 | 64 | QDateTime now = QDateTime::currentDateTime(); |
| … |
… |
|
| 88 | 86 | .arg(nextCard.key())); |
| 89 | 87 | continue; |
| 90 | 88 | } |
| | 89 | uint sid = *source; |
| 91 | 90 | int cardid = nextCard.key(); |
| 92 | 91 | |
| 93 | 92 | |
| 94 | | if (!(*(nextChan[*source])).isEmpty() && |
| 95 | | (*cardList)[cardid]->StartEITScan(*(nextChan[*source]))) |
| | 93 | if (!(*(nextChan[sid])).isEmpty() && |
| | 94 | (*cardList)[cardid]->StartEITScan(*(nextChan[sid]))) |
| 96 | 95 | { |
| 97 | 96 | VERBOSE(VB_GENERAL, QString("DVB(%1): Now looking for EIT " |
| 98 | 97 | "data on multiplex of channel %2 " |
| 99 | 98 | "of source %3") |
| 100 | | .arg(cardid).arg(*(nextChan[*source])).arg(*source)); |
| | 99 | .arg(cardid).arg(*(nextChan[sid])).arg(sid)); |
| 101 | 100 | /* advace to the next channel and test for valid iterator. |
| 102 | 101 | needed to simplify selection of the source |
| 103 | 102 | with the highest priority. */ |
| 104 | | nextChan[*source]++; |
| 105 | | if (nextChan[*source] == channels[*source].end()) |
| | 103 | nextChan[sid]++; |
| | 104 | if (nextChan[sid] == channels[sid].end()) |
| 106 | 105 | { |
| 107 | | nextChan[*source] = channels[*source].begin(); |
| 108 | | sources.push_back(*source); |
| | 106 | nextChan[sid] = channels[sid].begin(); |
| 109 | 107 | sources.erase(source); |
| | 108 | sources.push_back(sid); |
| | 109 | //cerr << "Moved source " << sid << " to the back of the queue." << endl; |
| 110 | 110 | } |
| 111 | 111 | } |
| 112 | 112 | else |
| … |
… |
|
| 114 | 114 | VERBOSE(VB_GENERAL, QString("Skipping card %1 in scan for EIT " |
| 115 | 115 | "data on multiplex of channel %2 " |
| 116 | 116 | "of source %3") |
| 117 | | .arg(cardid).arg(*(nextChan[*source])).arg(*source)); |
| | 117 | .arg(cardid).arg(*(nextChan[sid])).arg(sid)); |
| 118 | 118 | } |
| 119 | 119 | |
| 120 | 120 | nextTriggerTime = QDateTime::currentDateTime().addSecs(triggerTime); |