Ticket #8387: libmythtv.3.patch
File libmythtv.3.patch, 4.0 KB (added by , 14 years ago) |
---|
-
hdhrstreamhandler.cpp
483 483 484 484 bool HDHRStreamHandler::UpdateFilters(void) 485 485 { 486 if (_tune_mode == hdhrTuneModeFrequency) 487 _tune_mode = hdhrTuneModeFrequencyPid; 488 489 if (_tune_mode != hdhrTuneModeFrequencyPid) 490 { 491 VERBOSE(VB_IMPORTANT, LOC_ERR + "UpdateFilters called in wrong tune mode"); 492 return false; 493 } 494 486 495 #ifdef DEBUG_PID_FILTERS 487 496 VERBOSE(VB_RECORD, LOC + "UpdateFilters()"); 488 497 #endif // DEBUG_PID_FILTERS … … 493 502 vector<uint> range_min; 494 503 vector<uint> range_max; 495 504 496 // FIXME497 // if (_ignore_filters)498 // return true;499 500 505 for (uint i = 0; i < _pid_info.size(); i++) 501 506 { 502 507 uint pid_min = _pid_info[i]; … … 731 736 732 737 bool HDHRStreamHandler::TuneChannel(const QString &chn) 733 738 { 739 _tune_mode = hdhrTuneModeFrequency; 740 734 741 QString current = TunerGet("channel"); 735 736 742 if (current == chn) 737 743 { 738 744 VERBOSE(VB_RECORD, QString(LOC + "Not Re-Tuning channel %1").arg(chn)); … … 746 752 747 753 bool HDHRStreamHandler::TuneProgram(uint mpeg_prog_num) 748 754 { 755 if (_tune_mode == hdhrTuneModeFrequency) 756 _tune_mode = hdhrTuneModeFrequencyProgram; 757 758 if (_tune_mode != hdhrTuneModeFrequencyProgram) 759 { 760 VERBOSE(VB_IMPORTANT, LOC_ERR + "TuneProgram called in wrong tune mode"); 761 return false; 762 } 763 749 764 VERBOSE(VB_RECORD, QString(LOC + "Tuning program %1").arg(mpeg_prog_num)); 750 765 return !TunerSet( 751 766 "program", QString::number(mpeg_prog_num), false).isEmpty(); 752 767 } 768 769 bool HDHRStreamHandler::TuneVChannel(const QString &vchn) 770 { 771 _tune_mode = hdhrTuneModeVChannel; 772 773 VERBOSE(VB_RECORD, QString(LOC + "Tuning vchannel %1").arg(vchn)); 774 return !TunerSet( 775 "vchannel", vchn).isEmpty(); 776 } -
hdhrchannel.cpp
182 182 } 183 183 else 184 184 { 185 VERBOSE(VB_IMPORTANT, LOC_ERR + 186 "dtv_multiplex data is required for tuning"); 185 if (!_stream_handler->TuneVChannel(channum)) 186 { 187 VERBOSE(VB_IMPORTANT, LOC_ERR + 188 "dtv_multiplex data is required for tuning"); 189 return false; 190 } 187 191 188 return false;192 SetSIStandard(si_std); 189 193 } 190 194 } 191 195 else if (!ChangeExternalChannel(freqid)) … … 202 206 QString tmpX = m_curchannelname; tmpX.detach(); 203 207 m_inputs[m_currentInputID]->startChanNum = tmpX; 204 208 205 // Turn on the program filtering if tuning to MPEG stream206 if (mpeg_prog_num && (GetTuningMode() == "mpeg"))207 _stream_handler->TuneProgram(mpeg_prog_num);208 209 209 return true; 210 210 } 211 211 -
hdhrstreamhandler.h
27 27 struct hdhomerun_device_t { int dummy; }; 28 28 #endif 29 29 30 enum HDHRTuneMode { 31 hdhrTuneModeNone = 0, 32 hdhrTuneModeFrequency, 33 hdhrTuneModeFrequencyPid, 34 hdhrTuneModeFrequencyProgram, 35 hdhrTuneModeVChannel 36 }; 37 30 38 typedef QMap<uint,int> FilterMap; 31 39 32 40 //#define RETUNE_TIMEOUT 5000 … … 50 58 // Commands 51 59 bool TuneChannel(const QString &chanid); 52 60 bool TuneProgram(uint mpeg_prog_num); 61 bool TuneVChannel(const QString &vchn); 53 62 bool EnterPowerSavingMode(void); 54 63 55 64 … … 91 100 92 101 private: 93 102 hdhomerun_device_t *_hdhomerun_device; 94 uint _tuner;95 QString _devicename;103 uint _tuner; 104 QString _devicename; 96 105 vector<DTVTunerType> _tuner_types; 106 HDHRTuneMode _tune_mode; // debug self check 97 107 98 108 mutable QMutex _start_stop_lock; 99 109 bool _running;