Ticket #1861: 1861.patch

File 1861.patch, 7.3 KB (added by danielk, 18 years ago)

patch that fixes this and some other issues (Untested).

  • libs/libmythtv/dvbrecorder.cpp

     
    5858#include "iso639.h"
    5959#include "atscstreamdata.h"
    6060#include "cardutil.h"
     61#include "tv_rec.h"
    6162
    6263// MythTV DVB includes
    6364#include "dvbtypes.h"
  • libs/libmythtv/dvbtypes.cpp

     
    970970#undef LOC_WARN
    971971#undef LOC_ERR
    972972
    973 bool dvb_channel_t::Parse(
    974     fe_type_t type,
    975     QString frequency,         QString inversion,      QString symbolrate,
    976     QString fec,               QString polarity,       QString dvb_diseqc_type,
    977     QString diseqc_port,       QString diseqc_pos,     QString lnb_lof_switch,
    978     QString lnb_lof_hi,        QString lnb_lof_lo,     QString _sistandard,
    979     QString hp_code_rate,      QString lp_code_rate,   QString constellation,
    980     QString trans_mode,        QString guard_interval, QString hierarchy,
    981     QString modulation,        QString bandwidth,      QString _input_id)
    982 {
    983     lock.lock();
    984        
    985     bool ok = false;
    986     if (FE_QPSK == type)
    987         ok = tuning.parseQPSK(
    988             frequency,       inversion,     symbolrate,   fec,   polarity,
    989             dvb_diseqc_type, diseqc_port,   diseqc_pos,
    990             lnb_lof_switch,  lnb_lof_hi,    lnb_lof_lo);
    991     else if (FE_QAM == type)
    992         ok = tuning.parseQAM(
    993             frequency,       inversion,     symbolrate,   fec,   modulation);
    994     else if (FE_OFDM == type)
    995         ok = tuning.parseOFDM(
    996             frequency,       inversion,     bandwidth,    hp_code_rate,
    997             lp_code_rate,    constellation, trans_mode,   guard_interval,
    998             hierarchy);
    999     else if (FE_ATSC == type)
    1000         ok = tuning.parseATSC(frequency, modulation);
    1001 #ifdef FE_GET_EXTENDED_INFO
    1002     else if (FE_DVB_S2 == type)
    1003         ok = tuning.parseDVBS2(
    1004             frequency,       inversion,     symbolrate,   fec,   polarity,
    1005             dvb_diseqc_type, diseqc_port,   diseqc_pos,
    1006             lnb_lof_switch,  lnb_lof_hi,    lnb_lof_lo, modulation);
    1007 #endif
    1008        
    1009     sistandard = _sistandard;
    1010     input_id   = _input_id.toInt();
    1011 
    1012     lock.unlock();
    1013     return ok;
    1014 }
    1015 
    1016973static QString mod2str(fe_modulation mod)
    1017974{
    1018975    switch (mod)
  • libs/libmythtv/scanwizardscanner.cpp

     
    354354        startChan["hierarchy"]      = pane->hierarchy();
    355355
    356356#ifdef USING_DVB
    357         dvb_channel_t chan_opts;
    358         nit_scan_parse_failed = !chan_opts.tuning.parseOFDM(
     357        DVBTuning tuning;
     358        nit_scan_parse_failed = !tuning.parseOFDM(
    359359            startChan["frequency"],   startChan["inversion"],
    360360            startChan["bandwidth"],   startChan["coderate_hp"],
    361361            startChan["coderate_lp"], startChan["constellation"],
     
    380380#ifdef USING_DVB
    381381        if (!nit_scan_parse_failed)
    382382        {
    383             dvb_channel_t chan_opts;
    384             nit_scan_parse_failed = !chan_opts.tuning.parseQPSK(
     383            DVBTuning tuning;
     384            nit_scan_parse_failed = !tuning.parseQPSK(
    385385                startChan["frequency"],   startChan["inversion"],
    386386                startChan["symbolrate"],  startChan["fec"],
    387387                startChan["polarity"],
     
    403403        startChan["modulation"] = pane->modulation();
    404404
    405405#ifdef USING_DVB
    406         dvb_channel_t chan_opts;
    407         nit_scan_parse_failed = !chan_opts.tuning.parseQAM(
     406        DVBTuning tuning;
     407        nit_scan_parse_failed = !tuning.parseQAM(
    408408            startChan["frequency"],   startChan["inversion"],
    409409            startChan["symbolrate"],  startChan["fec"],
    410410            startChan["modulation"]);
  • libs/libmythtv/dvbchannel.h

     
    1717#include "channelbase.h"
    1818#include "streamlisteners.h"
    1919
    20 #include "dvbdiseqc.h"
     20#ifdef USING_DVB
     21#include "dvbtypes.h"
     22#else // if !USING_DVB
     23typedef int fe_type_t;
     24typedef int fe_modulation_t;
     25typedef int fe_code_rate_t;
     26typedef int DVBTuning;
     27typedef struct { QString name; fe_type_t type; } dvb_frontend_info;
     28#endif //!USING_DVB
    2129
    2230class TVRec;
    2331class DVBCam;
    2432class DVBRecorder;
     33class DVBDiSEqC;
    2534
    2635class DVBChannel : public ChannelBase
    2736{
  • libs/libmythtv/dvbtypes.h

     
    3939#if (DVB_API_VERSION >= 3 && DVB_API_VERSION_MINOR >= 1)
    4040#    define USE_ATSC
    4141#else
    42 #warning DVB API version < 3.1, ATSC over DVB will not be supported.
     42#warning DVB API version < 3.1
     43#warning ATSC will not be supported using the Linux DVB drivers
    4344#    define FE_ATSC       (FE_OFDM+1)
    4445#    define FE_CAN_8VSB   0x200000
    4546#    define FE_CAN_16VSB  0x400000
     
    411412#endif
    412413};
    413414
    414 class dvb_channel_t
    415 {
    416   public:
    417     dvb_channel_t() :
    418         pmtpid(0),          pmt(NULL),
    419         serviceID(0xffff),  networkID(0xffff),
    420         providerID(0xffff), transportID(0xffff),
    421         sistandard(""),     version(255) {;}
    422    ~dvb_channel_t()
    423     {
    424         if (pmt)
    425             delete pmt;
    426     }
    427 
    428     bool IsPMTSet() const
    429     {
    430         QMutexLocker locker(&lock);
    431         return pmt;
    432     }
    433 
    434     void SetPMT(uint pid, const ProgramMapTable *_pmt)
    435     {
    436         QMutexLocker locker(&lock);
    437         if (pmt)
    438         {
    439             pmtpid = 0;
    440             delete pmt;
    441             pmt = NULL;
    442         }
    443         if (_pmt)
    444         {
    445             pmtpid = pid;
    446             pmt = new ProgramMapTable(*_pmt);
    447         }
    448     }
    449 
    450     bool Parse(
    451         fe_type_t type,
    452         QString frequency,         QString inversion,      QString symbolrate,
    453         QString fec,               QString polarity,       QString dvb_diseqc_type,
    454         QString diseqc_port,       QString diseqc_pos,     QString lnb_lof_switch,
    455         QString lnb_lof_hi,        QString lnb_lof_lo,     QString _sistandard,
    456         QString hp_code_rate,      QString lp_code_rate,   QString constellation,
    457         QString transmission_mode, QString guard_interval, QString hierarchy,
    458         QString modulation,        QString bandwidth,      QString _input_id);
    459 
    460     DVBTuning       tuning;
    461 
    462     uint            pmtpid;
    463     ProgramMapTable *pmt;
    464     bool            PMTSet;
    465 
    466     uint16_t        serviceID; /// program number in PAT
    467     uint16_t        networkID; /// network ID from PAT
    468     uint16_t        providerID;
    469     uint16_t        transportID;
    470 
    471     QString         sistandard;
    472     int             input_id;
    473     uint8_t         version;
    474   private:
    475     mutable QMutex  lock;
    476 };
    477 
    478415#endif // DVB_TYPES_H
  • libs/libmythtv/eitscanner.h

     
    1616class ChannelBase;
    1717class DVBSIParser;
    1818class EITHelper;
    19 class dvb_channel_t;
    2019class ProgramMapTable;
    2120
    2221class EITSource