Ticket #6274: HDHR-DVB.0-21.patch
File HDHR-DVB.0-21.patch, 6.9 KB (added by , 17 years ago) |
---|
-
libs/libmythtv/hdhrchannel.h
1 1 /** -*- Mode: c++ -*- 2 * Dbox2Channel3 * Copyright (c) 2006 by Silicondust Engineering Ltd.2 * HDHRChannel 3 * Copyright (c) 2006-2009 by Silicondust Engineering Ltd. 4 4 * Distributed as part of MythTV under GPL v2 and later. 5 5 */ 6 6 … … 52 52 bool DelAllPIDs(void); 53 53 bool UpdateFilters(void); 54 54 55 // ATSC scanning stuff55 // ATSC/DVB scanning/tuning stuff 56 56 bool TuneMultiplex(uint mplexid, QString inputname); 57 57 bool Tune(const DTVMultiplex &tuning, QString inputname); 58 58 -
libs/libmythtv/hdhrrecorder.h
18 18 typedef vector<uint> uint_vec_t; 19 19 20 20 class HDHRRecorder : public DTVRecorder, 21 public DVBMainStreamListener, 22 public ATSCMainStreamListener, 21 23 public MPEGStreamListener, 22 24 public MPEGSingleProgramStreamListener 23 25 { 24 friend class ATSCStreamData;25 26 26 public: 27 27 HDHRRecorder(TVRec *rec, HDHRChannel *channel); 28 28 ~HDHRRecorder(); … … 52 52 void HandleSingleProgramPAT(ProgramAssociationTable *pat); 53 53 void HandleSingleProgramPMT(ProgramMapTable *pmt); 54 54 55 /*56 55 // ATSC 57 56 void HandleSTT(const SystemTimeTable*) {} 58 void HandleMGT(const MasterGuideTable *mgt);57 void HandleMGT(const MasterGuideTable*) {} 59 58 void HandleVCT(uint, const VirtualChannelTable*) {} 60 */61 59 60 // DVB 61 void HandleTDT(const TimeDateTable*) {} 62 void HandleNIT(const NetworkInformationTable*) {} 63 void HandleSDT(uint /*tsid*/, const ServiceDescriptionTable*) {} 64 62 65 private: 63 66 bool AdjustFilters(void); 64 67 bool AdjustEITPIDs(void); -
libs/libmythtv/hdhrchannel.cpp
1 1 /** 2 * DBox2Channel3 * Copyright (c) 2006 by Silicondust Engineering Ltd.2 * HDHRChannel 3 * Copyright (c) 2006-2009 by Silicondust Engineering Ltd. 4 4 * Distributed as part of MythTV under GPL v2 and later. 5 5 */ 6 6 … … 24 24 #include "hdhrchannel.h" 25 25 #include "videosource.h" 26 26 #include "channelutil.h" 27 #include "frequencytables.h"28 27 29 28 #define DEBUG_PID_FILTERS 30 29 … … 384 383 385 384 bool HDHRChannel::Tune(const DTVMultiplex &tuning, QString inputname) 386 385 { 386 QString modulation; 387 QString si_std = tuning.sistandard; 388 389 390 switch (tuning.modulation) 391 { 392 case DTVModulation::kModulation8VSB: modulation = "8vsb"; break; 393 case DTVModulation::kModulationQAM16: modulation = "qam16"; break; 394 case DTVModulation::kModulationQAM32: modulation = "qam32"; break; 395 case DTVModulation::kModulationQAM64: modulation = "qam64"; break; 396 case DTVModulation::kModulationQAM128: modulation = "qam128"; break; 397 case DTVModulation::kModulationQAM256: modulation = "qam256"; break; 398 default: modulation = "auto"; 399 } 400 401 if (modulation == "auto" && si_std == "dvb") 402 switch (tuning.bandwidth) 403 { 404 case DTVBandwidth::kBandwidth6MHz: modulation = "auto6t"; break; 405 case DTVBandwidth::kBandwidth7MHz: modulation = "auto7t"; break; 406 case DTVBandwidth::kBandwidth8MHz: modulation = "auto8t"; break; 407 } 408 //else if (modulation == "auto" && si_std == "atsc") 409 else if (si_std == "dvb") 410 switch (tuning.bandwidth) 411 { 412 case DTVBandwidth::kBandwidth6MHz: modulation.prepend("t6"); break; 413 case DTVBandwidth::kBandwidth7MHz: modulation.prepend("t7"); break; 414 case DTVBandwidth::kBandwidth8MHz: modulation.prepend("t8"); break; 415 } 416 417 387 418 return Tune(tuning.frequency, inputname, 388 tuning.modulation.toString(), tuning.sistandard);419 modulation, si_std); 389 420 } 390 421 391 422 bool HDHRChannel::Tune(uint frequency, QString /*input*/, 392 423 QString modulation, QString si_std) 393 424 { 394 bool ok = false;425 QString channel = modulation + ':' + QString::number(frequency); 395 426 396 VERBOSE(VB_CHANNEL, LOC + 397 QString("TuneTo(%1,%2)").arg(frequency).arg(modulation)); 427 VERBOSE(VB_CHANNEL, LOC + "Tune() to " + channel); 398 428 399 if (modulation == "8vsb") 400 ok = TunerSet("channel", QString("8vsb:%1").arg(frequency)); 401 else if (modulation == "qam_64") 402 ok = TunerSet("channel", QString("qam64:%1").arg(frequency)); 403 else if (modulation == "qam_256") 404 ok = TunerSet("channel", QString("qam256:%1").arg(frequency)); 405 406 if (ok) 429 if (TunerSet("channel", channel).length()) 430 { 407 431 SetSIStandard(si_std); 432 return true; 433 } 408 434 409 return ok;435 return false; 410 436 } 411 437 412 438 bool HDHRChannel::AddPID(uint pid, bool do_update) -
libs/libmythtv/hdhrrecorder.cpp
27 27 #include "hdhrrecorder.h" 28 28 #include "atsctables.h" 29 29 #include "atscstreamdata.h" 30 #include "dvbstreamdata.h" 30 31 #include "eithelper.h" 31 32 #include "tv_rec.h" 32 33 … … 176 177 data->AddMPEGListener(this); 177 178 178 179 ATSCStreamData *atsc = dynamic_cast<ATSCStreamData*>(data); 180 DVBStreamData *dvb = dynamic_cast<DVBStreamData*>(data); 179 181 180 182 if (atsc && atsc->DesiredMinorChannel()) 181 183 atsc->SetDesiredChannel(atsc->DesiredMajorChannel(), 182 184 atsc->DesiredMinorChannel()); 185 else if (dvb) 186 dvb->AddDVBMainListener(this); 183 187 else if (data->DesiredProgram() >= 0) 184 188 data->SetDesiredProgram(data->DesiredProgram()); 185 189 } -
libs/libmythtv/scanwizardhelpers.cpp
394 394 addSelection(tr("Import channels.conf"), 395 395 QString::number(DVBUtilsImport)); 396 396 break; 397 case CardUtil::HDHOMERUN: 398 addSelection(tr("Full Scan (ATSC)"), 399 QString::number(FullScan_ATSC), true); 400 addSelection(tr("Full Scan (DVB)"), 401 QString::number(FullScan_OFDM), true); 402 addSelection(tr("Full Scan (DVB, tuned)"), 403 QString::number(NITAddScan_OFDM)); 397 404 case CardUtil::ATSC: 398 case CardUtil::HDHOMERUN:399 405 addSelection(tr("Full Scan"), 400 406 QString::number(FullScan_ATSC), true); 401 407 addSelection(tr("Import channels.conf"),