Go to the documentation of this file.
32 QString str = QString(
"NIT: NetID(%1) transports(%2)\n")
34 str.append(QString(
"Section (%1) Last Section (%2) IsCurrent (%3)\n")
39 str.append(QString(
"Network descriptors length: %1\n")
41 std::vector<const unsigned char*> desc =
48 str.append(QString(
" %1\n")
55 str.append(QString(
" Transport #%1 TSID(0x%2) ")
56 .arg(i, 2, 10).arg(
TSID(i), 0, 16));
57 str.append(QString(
"original_network_id(0x%2) desc_len(%3)\n")
63 str.append(QString(
" Transport descriptors length: %1\n")
65 std::vector<const unsigned char*> desc =
72 str.append(QString(
" %1\n")
88 const unsigned char *desc =
130 QString(
"SDT: TSID(0x%1) original_network_id(0x%2) services(%3)\n")
133 str.append(QString(
"Section (%1) Last Section (%2) IsCurrent (%3)\n")
138 str.append(QString(
" Service #%1 SID(0x%2) ")
139 .arg(i, 2, 10).arg(
ServiceID(i), 0, 16));
140 str.append(QString(
"eit_schd(%1) eit_pf(%2) encrypted(%3)\n")
147 str.append(QString(
" Service descriptors length: %1\n")
149 std::vector<const unsigned char*> desc =
153 for (
auto & j : desc)
156 str.append(QString(
" %1\n")
170 const unsigned char *desc =
185 const unsigned char *desc =
218 QString(
"BAT: BouquetID(0x%1) transports(%2)\n")
221 str.append(QString(
"Section (%1) Last Section (%2) IsCurrent (%3)\n")
226 str.append(QString(
"Bouquet descriptors length: %1\n")
228 std::vector<const unsigned char*> desc =
232 for (
auto & i : desc)
235 str.append(QString(
" %1\n")
242 str.append(QString(
" Transport #%1 TSID(0x%2) ")
243 .arg(i, 2, 10).arg(
TSID(i), 0, 16));
244 str.append(QString(
"original_network_id(0x%2) desc_len(%3)\n")
250 str.append(QString(
" Transport descriptors length: %1\n")
252 std::vector<const unsigned char*> desc =
256 for (
auto & j : desc)
259 str.append(QString(
" %1\n")
307 uint mjd = (buf[0] << 8) | buf[1];
312 uint secsSince1970 = (mjd - 40587) * 86400;
324 const auto tmpA = (float)(1.0 / 365.25);
325 const auto tmpB = (float)(1.0 / 30.6001);
328 int year = (int) truncf((mjdf - 15078.2F) * tmpA);
329 int month = (int) truncf(
330 (mjdf - 14956.1F - truncf(year * 365.25F)) * tmpB);
331 int day = (int) truncf(
332 (mjdf - 14956.0F - truncf(year * 365.25F) - truncf(month * 30.6001F)));
333 int i = (month == 14 || month == 15) ? 1 : 0;
335 QDate date(1900 + year + i, month - 1 - (i * 12), day);
339 return {date, time, Qt::UTC};
349 uint mjd = (buf[0] << 8) | buf[1];
353 uint secsSince1970 = (mjd - 40587) * 86400;
357 return secsSince1970;
365 uint dt = (((
uint)buf[0]) << 24) | (((
uint)buf[1]) << 16);
369 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