Go to the documentation of this file.
34 QString str = QString(
"NIT: NetID(%1) transports(%2)\n")
36 str.append(QString(
"Section (%1) Last Section (%2) IsCurrent (%3)\n")
41 str.append(QString(
"Network descriptors length: %1\n")
43 std::vector<const unsigned char*> desc =
50 str.append(QString(
" %1\n")
57 str.append(QString(
" Transport #%1 TSID(0x%2) ")
58 .arg(i, 2, 10).arg(
TSID(i), 0, 16));
59 str.append(QString(
"original_network_id(0x%2) desc_len(%3)\n")
65 str.append(QString(
" Transport descriptors length: %1\n")
67 std::vector<const unsigned char*> desc =
74 str.append(QString(
" %1\n")
90 const unsigned char *desc =
132 QString(
"SDT: TSID(0x%1) original_network_id(0x%2) services(%3)\n")
135 str.append(QString(
"Section (%1) Last Section (%2) IsCurrent (%3)\n")
140 str.append(QString(
" Service #%1 SID(0x%2) ")
141 .arg(i, 2, 10).arg(
ServiceID(i), 0, 16));
142 str.append(QString(
"eit_schd(%1) eit_pf(%2) encrypted(%3)\n")
149 str.append(QString(
" Service descriptors length: %1\n")
151 std::vector<const unsigned char*> desc =
155 for (
auto & j : desc)
158 str.append(QString(
" %1\n")
172 const unsigned char *desc =
187 const unsigned char *desc =
220 QString(
"BAT: BouquetID(0x%1) transports(%2)\n")
223 str.append(QString(
"Section (%1) Last Section (%2) IsCurrent (%3)\n")
228 str.append(QString(
"Bouquet descriptors length: %1\n")
230 std::vector<const unsigned char*> desc =
234 for (
auto & i : desc)
237 str.append(QString(
" %1\n")
244 str.append(QString(
" Transport #%1 TSID(0x%2) ")
245 .arg(i, 2, 10).arg(
TSID(i), 0, 16));
246 str.append(QString(
"original_network_id(0x%2) desc_len(%3)\n")
252 str.append(QString(
" Transport descriptors length: %1\n")
254 std::vector<const unsigned char*> desc =
258 for (
auto & j : desc)
261 str.append(QString(
" %1\n")
309 uint mjd = (buf[0] << 8) | buf[1];
314 uint secsSince1970 = (mjd - 40587) * 86400;
326 const auto tmpA = (float)(1.0 / 365.25);
327 const auto tmpB = (float)(1.0 / 30.6001);
330 int year = (int) truncf((mjdf - 15078.2F) * tmpA);
331 int month = (int) truncf(
332 (mjdf - 14956.1F - truncf(year * 365.25F)) * tmpB);
333 int day = (int) truncf(
334 (mjdf - 14956.0F - truncf(year * 365.25F) - truncf(month * 30.6001F)));
335 int i = (month == 14 || month == 15) ? 1 : 0;
337 QDate date(1900 + year + i, month - 1 - (i * 12), day);
341 #if QT_VERSION < QT_VERSION_CHECK(6,5,0)
342 return {date, time, Qt::UTC};
344 return {date, time, QTimeZone(QTimeZone::UTC)};
355 uint mjd = (buf[0] << 8) | buf[1];
359 uint secsSince1970 = (mjd - 40587) * 86400;
363 return secsSince1970;
371 uint dt = (((
uint)buf[0]) << 24) | (((
uint)buf[1]) << 16);
375 return (dt | (tm>>1)) ^ ((tm & 1)<<31);
bool IsCurrent(void) const
const unsigned char * m_tscPtr
const unsigned char * TransportDescriptors(uint i) const
for(j=0;j<N;j++) x 6.0+p { descriptor() }
const unsigned char * pesdata() const
uint TransportDescriptorsLength(uint i) const
uint BouquetDescriptorsLength(void) const
uint ServiceID(uint i) const
service_id 16 0.0+p
std::vector< const unsigned char * > m_ptrs
static const unsigned char * FindExtension(const desc_list_t &parsed, uint desc_tag)
const unsigned char * BouquetDescriptors(void) const
uint ServiceCount() const
Number of services.
MBASE_PUBLIC QDateTime fromSecsSinceEpoch(int64_t seconds)
This function takes the number of seconds since the start of the epoch and returns a QDateTime with t...
ServiceDescriptor * GetServiceDescriptor(uint i) const
uint32_t dvbdate2key(const unsigned char *buf)
static desc_list_t Parse(const unsigned char *data, uint len)
QString toString(void) const override
uint OriginalNetworkID() const
original_network_id 16 8.0
uint TransportStreamDataLength(void) const
std::vector< const unsigned char * > desc_list_t
uint OriginalNetworkID(uint i) const
static constexpr uint8_t byteBCD2int(uint8_t i)
static uint GetPrivateDataSpecifier(const unsigned char *desc, uint priv_dsid)
uint32_t PrivateDataSpecifier(void) const
bool VerifyCRC(void) const
bool Mutate(void)
mutates a SDTo into a SDTa (vice versa) and recalculates the CRC
uint LastSection(void) const
bool IsEncrypted(uint i) const
free_CA_mode 1 3.3+p
std::vector< const unsigned char * > m_ptrs
uint TransportStreamCount(void) const
bool HasEITPresentFollowing(uint i) const
QString toString(void) const override
QDateTime dvbdate2qt(const unsigned char *buf)
ServiceRelocatedDescriptor * GetServiceRelocatedDescriptor(uint i) const
time_t dvbdate2unix(const unsigned char *buf)
uint ServiceDescriptorsLength(uint i) const
desc_loop_length 12 3.4+p
bool HasEITSchedule(uint i) const
static const unsigned char * Find(const desc_list_t &parsed, uint desc_tag)
const unsigned char * ServiceDescriptors(uint i) const
for (j=0;j<N;j++) x 5.0+p { descriptor() }
uint TSID() const
transport_stream_id 16 3.0 0x0000
const unsigned char * psipdata(void) const