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 vector<const unsigned char*> desc =
45 for (
size_t i = 0; i < desc.size(); i++)
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 vector<const unsigned char*> desc =
69 for (
size_t j = 0; j < desc.size(); j++)
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 vector<const unsigned char*> desc =
153 for (
size_t j = 0; j < desc.size(); j++)
156 str.append(QString(
" %1\n")
170 const unsigned char *desc =
203 QString(
"BAT: BouquetID(0x%1) transports(%2)\n")
206 str.append(QString(
"Section (%1) Last Section (%2) IsCurrent (%3)\n")
211 str.append(QString(
"Bouquet descriptors length: %1\n")
213 vector<const unsigned char*> desc =
217 for (
size_t i = 0; i < desc.size(); i++)
220 str.append(QString(
" %1\n")
227 str.append(QString(
" Transport #%1 TSID(0x%2) ")
228 .arg(i, 2, 10).arg(
TSID(i), 0, 16));
229 str.append(QString(
"original_network_id(0x%2) desc_len(%3)\n")
235 str.append(QString(
" Transport descriptors length: %1\n")
237 vector<const unsigned char*> desc =
241 for (
size_t j = 0; j < desc.size(); j++)
244 str.append(QString(
" %1\n")
292 uint mjd = (buf[0] << 8) | buf[1];
297 uint secsSince1970 = (mjd - 40587) * 86400;
301 #if QT_VERSION < QT_VERSION_CHECK(5,8,0) 302 return MythDate::fromTime_t(secsSince1970);
313 const auto tmpA = (float)(1.0 / 365.25);
314 const auto tmpB = (float)(1.0 / 30.6001);
317 int year = (int) truncf((mjdf - 15078.2F) * tmpA);
318 int month = (int) truncf(
319 (mjdf - 14956.1F - truncf(year * 365.25F)) * tmpB);
320 int day = (int) truncf(
321 (mjdf - 14956.0F - truncf(year * 365.25F) - truncf(month * 30.6001F)));
322 int i = (month == 14 || month == 15) ? 1 : 0;
324 QDate date(1900 + year + i, month - 1 - i * 12, day);
328 return QDateTime(date, time, Qt::UTC);
338 uint mjd = (buf[0] << 8) | buf[1];
342 uint secsSince1970 = (mjd - 40587) * 86400;
346 return secsSince1970;
354 uint dt = (((
uint)buf[0]) << 24) | (((
uint)buf[1]) << 16);
358 return (dt | (tm>>1)) ^ ((tm & 1)<<31);
const unsigned char * pesdata() const
const unsigned char * psipdata(void) const
const unsigned char * TransportDescriptors(uint i) const
for(j=0;j<N;j++) x 6.0+p { descriptor() }
bool Mutate(void)
mutates a SDTo into a SDTa (vice versa) and recalculates the CRC
QString toString(void) const override
uint TransportDescriptorsLength(uint i) const
bool HasEITPresentFollowing(uint i) const
bool IsEncrypted(uint i) const
free_CA_mode 1 3.3+p
time_t dvbdate2unix(const unsigned char *buf)
uint BouquetDescriptorsLength(void) const
uint ServiceID(uint i) const
service_id 16 0.0+p
uint LastSection(void) const
vector< const unsigned char * > _ptrs
uint ServiceDescriptorsLength(uint i) const
desc_loop_length 12 3.4+p
uint TSID() const
transport_stream_id 16 3.0 0x0000
vector< const unsigned char * > desc_list_t
bool IsCurrent(void) const
const unsigned char * ServiceDescriptors(uint i) const
for (j=0;j<N;j++) x 5.0+p { descriptor() }
vector< const unsigned char * > _ptrs
static uint GetPrivateDataSpecifier(const unsigned char *desc, uint priv_dsid)
uint OriginalNetworkID() const
original_network_id 16 8.0
MBASE_PUBLIC QDateTime fromSecsSinceEpoch(uint seconds)
This function takes the number of seconds since the start of the epoch and returns a QDateTime with t...
const unsigned char * BouquetDescriptors(void) const
uint ServiceCount() const
Number of services.
uint TransportStreamDataLength(void) const
uint OriginalNetworkID(uint i) const
bool HasEITSchedule(uint i) const
static const unsigned char * Find(const desc_list_t &parsed, uint desc_tag)
uint TransportStreamCount(void) const
uint32_t PrivateDataSpecifier(void) const
ServiceDescriptor * GetServiceDescriptor(uint i) const
uint32_t dvbdate2key(const unsigned char *buf)
const unsigned char * _tsc_ptr
QString toString(void) const override
bool VerifyCRC(void) const
static desc_list_t Parse(const unsigned char *data, uint len)
QDateTime dvbdate2qt(const unsigned char *buf)