MythTV  master
dtvmultiplex.h
Go to the documentation of this file.
1 /* -*- Mode: c++ -*-
2  * DTVMultiplex
3  * Copyright (c) 2005,2006 by Daniel Kristjansson
4  * Digital multiplexes info class
5  */
6 
7 #ifndef _DTVMULTIPLEX_H_
8 #define _DTVMULTIPLEX_H_
9 
10 // C++ headers
11 #include <cstdint>
12 
13 // Qt headers
14 #include <QString>
15 
16 // MythTV headers
17 #include "dtvconfparserhelpers.h"
18 #include "channelinfo.h"
19 #include "iptvtuningdata.h"
20 #include "mythtvexp.h"
21 
22 class MPEGDescriptor;
23 
25 {
26  public:
27  DTVMultiplex() = default;
28  DTVMultiplex(const DTVMultiplex &/*other*/) = default;
29  DTVMultiplex &operator=(const DTVMultiplex &/*other*/) = default;
30  virtual ~DTVMultiplex() = default;
31 
32  bool operator==(const DTVMultiplex &m) const;
33 
34  void Clear(void) { (*this) = DTVMultiplex(); }
35 
36  virtual bool FillFromDB(DTVTunerType type, uint mplexid);
37 
38  bool FillFromDeliverySystemDesc(DTVTunerType type, const MPEGDescriptor &desc);
39 
40  bool IsEqual(DTVTunerType type, const DTVMultiplex& other,
41  uint freq_range = 0, bool fuzzy = false) const;
42 
43  bool ParseATSC(const QString &frequency, const QString &modulation);
44 
45  bool ParseDVB_T(
46  const QString &frequency, const QString &inversion,
47  const QString &bandwidth, const QString &coderate_hp,
48  const QString &coderate_lp, const QString &modulation,
49  const QString &trans_mode, const QString &guard_interval,
50  const QString &hierarchy);
51 
52  bool ParseDVB_S_and_C(
53  const QString &frequency, const QString &inversion,
54  const QString &symbol_rate, const QString &fec_inner,
55  const QString &modulation, const QString &polarity);
56 
57  bool ParseDVB_S(
58  const QString &frequency, const QString &inversion,
59  const QString &symbol_rate, const QString &fec_inner,
60  const QString &modulation, const QString &polarity);
61 
62  bool ParseDVB_C(
63  const QString &frequency, const QString &inversion,
64  const QString &symbol_rate, const QString &fec_inner,
65  const QString &modulation, const QString &polarity,
66  const QString &mod_sys);
67 
68  bool ParseDVB_S2(
69  const QString &frequency, const QString &inversion,
70  const QString &symbol_rate, const QString &fec_inner,
71  const QString &modulation, const QString &polarity,
72  const QString &mod_sys, const QString &rolloff);
73 
74  bool ParseDVB_T2(
75  const QString &frequency, const QString &inversion,
76  const QString &bandwidth, const QString &coderate_hp,
77  const QString &coderate_lp, const QString &modulation,
78  const QString &trans_mode, const QString &guard_interval,
79  const QString &hierarchy, const QString &mod_sys);
80 
81  bool ParseTuningParams(
83  const QString& frequency, const QString& inversion, const QString& symbolrate,
84  const QString& fec, const QString& polarity,
85  const QString& hp_code_rate, const QString& lp_code_rate, const QString& ofdm_modulation,
86  const QString& trans_mode, const QString& guard_interval, const QString& hierarchy,
87  const QString& modulation, const QString& bandwidth, const QString& mod_sys,
88  const QString& rolloff);
89 
90  QString toString() const;
91 
92  public:
93  // Basic tuning
94  uint64_t m_frequency {0};
95  uint64_t m_symbolrate {0};
108 
109  // Optional additional info
110  uint m_mplex {0};
111  QString m_sistandard;
113 };
114 
116 {
117  public:
119  DTVMultiplex() { }
121  DTVMultiplex(mplex), m_tuner_type(tt), m_cardid(cid) { }
122  virtual ~ScanDTVTransport() = default;
123 
124  bool FillFromDB(DTVTunerType type, uint mplexid) override; // DTVMultiplex
125  uint SaveScan(uint scanid) const;
126 
127  bool ParseTuningParams(
129  QString frequency, QString inversion, QString symbolrate,
130  QString fec, QString polarity,
131  QString hp_code_rate, QString lp_code_rate, QString ofdm_modulation,
132  QString trans_mode, QString guard_interval, QString hierarchy,
133  QString modulation, QString bandwidth,
134  QString mod_sys, QString rolloff);
135 
136  public:
138  uint m_cardid {0};
140 };
141 typedef vector<ScanDTVTransport> ScanDTVTransportList;
142 
143 #endif // _DTVMULTIPLEX_H_
DTVGuardInterval m_guard_interval
Definition: dtvmultiplex.h:102
uint SaveScan(const ScanDTVTransportList &scan)
Definition: scaninfo.cpp:21
DTVBandwidth m_bandwidth
Definition: dtvmultiplex.h:97
QString toString(MarkTypes type)
DTVHierarchy m_hierarchy
Definition: dtvmultiplex.h:103
DTVPolarity m_polarity
Definition: dtvmultiplex.h:104
static const int kTunerTypeUnknown
vector< ScanDTVTransport > ScanDTVTransportList
Definition: dtvmultiplex.h:141
bool operator==(MusicMetadata &a, MusicMetadata &b)
unsigned int uint
Definition: compat.h:140
DTVInversion m_inversion
Definition: dtvmultiplex.h:96
DTVCodeRate m_lp_code_rate
Low Priority FEC rate.
Definition: dtvmultiplex.h:99
ChannelInsertInfoList m_channels
Definition: dtvmultiplex.h:139
DTVCodeRate m_fec
Inner Forward Error Correction rate.
Definition: dtvmultiplex.h:105
ScanDTVTransport(const DTVMultiplex &mplex, DTVTunerType tt, uint cid)
Definition: dtvmultiplex.h:120
DTVCodeRate m_hp_code_rate
High Priority FEC rate.
Definition: dtvmultiplex.h:98
DTVModulation m_modulation
Definition: dtvmultiplex.h:100
#define MTV_PUBLIC
Definition: mythtvexp.h:15
bool ParseTuningParams(DTVTunerType type, const QString &frequency, const QString &inversion, const QString &symbolrate, const QString &fec, const QString &polarity, const QString &hp_code_rate, const QString &lp_code_rate, const QString &ofdm_modulation, const QString &trans_mode, const QString &guard_interval, const QString &hierarchy, const QString &modulation, const QString &bandwidth, const QString &mod_sys, const QString &rolloff)
QString m_sistandard
Definition: dtvmultiplex.h:111
vector< ChannelInsertInfo > ChannelInsertInfoList
Definition: channelinfo.h:240
DTVRollOff m_rolloff
Definition: dtvmultiplex.h:107
IPTVTuningData m_iptv_tuning
Definition: dtvmultiplex.h:112
void Clear(void)
Definition: dtvmultiplex.h:34
DTVModulationSystem m_mod_sys
Modulation system.
Definition: dtvmultiplex.h:106
virtual bool FillFromDB(DTVTunerType type, uint mplexid)
DTVTransmitMode m_trans_mode
Definition: dtvmultiplex.h:101