Go to the documentation of this file.
3 #ifndef ATSC_DESCRIPTORS_H
4 #define ATSC_DESCRIPTORS_H
14 using IntToBuf = QMap<int, const unsigned char*>;
43 QString CompressionTypeString(
uint i,
uint j)
const;
45 int Mode(
int i,
int j)
const {
return *(Offset(i,j)+1); }
47 int Bytes(
int i,
int j)
const {
return *(Offset(i,j)+2); }
53 uint GetIndexOfBestMatch(QMap<uint,uint> &langPrefs)
const;
54 QString GetBestMatch(QMap<uint,uint> &langPrefs)
const;
56 QString GetSegment(
uint i,
uint j)
const;
57 QString GetFullString(
uint i)
const;
59 void Parse(
void)
const;
64 static QString Uncompressed(
const unsigned char *buf,
int len,
int mode);
65 static uint Index(
int i,
int j) {
return (i<<8)|(j&0xff); }
66 const unsigned char *
Offset(
int i,
int j)
const
67 {
return m_ptrs[Index(i,j)]; }
101 {
return (((
Offset(i,-1)[3])>>7) & 1) != 0; }
111 {
return ((
Offset(i,-1)[3])) & 0x3f; }
124 static int Index(
int i,
int j) {
return (i<<8) | (j & 0xff); }
125 const unsigned char *
Offset(
int i,
int j)
const
153 {
return *(
Offset(i,-1) + 1); }
161 {
return (*(
Offset(i,j) + 1)) & 0xf; }
177 static int Index(
int i,
int j) {
return (i<<8)|(j&0xff); }
178 const unsigned char *
Offset(
int i,
int j)
const
180 IntToBuf::const_iterator it =
m_ptrs.find(
Index(i,j));
181 return (it !=
m_ptrs.end()) ? *it :
nullptr;
199 return QString(
"Component Name Descriptor %1")
298 const unsigned short* ustr =
299 reinterpret_cast<const unsigned short*
>(buf);
300 for (
int j=0; j<(len>>1); j++)
301 str.append( QChar( (ustr[j]<<8) | (ustr[j]>>8) ) );
350 #endif // ATSC_DESCRIPTORS_H
AC3AudioStreamDescriptor(const unsigned char *data, int len=300)
QString toString() const override
uint LanguageCode2(void) const
int iso639_key_to_canonical_key(int iso639_2)
QString toString(const QDateTime &raw_dt, uint format)
Returns formatted string representing the time.
QString LanguageString(uint i) const
const unsigned char * Offset(int i, int j) const
bool IsTextLatin1(void) const
bool EasyReader(int i) const
uint RatingDimension(uint i, uint j) const
Provides the long channel name for the virtual channel containing this descriptor.
static int Index(int i, int j)
QMap< int, const unsigned char * > IntToBuf
uint RatingRegion(uint i) const
static uint Index(int i, int j)
uint RatedDimensions(uint i) const
int Mode(int i, int j) const
uint LanguageCode(void) const
uint RatingDescriptionLength(uint i) const
CaptionServiceDescriptor(const unsigned char *data, int len=300)
MultipleStringStructure RatingDescription(uint i) const
MultipleStringStructure ComponentNameStrings() const
MultipleStringStructure(const unsigned char *data)
int LanguageKey(uint i) const
uint StringCount(void) const
const unsigned char * Offset(int i, int j) const
ExtendedChannelNameDescriptor(const unsigned char *data, int len=300)
ComponentNameDescriptor(const unsigned char *data, int len=300)
bool WideAspectRatio(int i) const
uint RatingRegionCount(void) const
MultipleStringStructure LongChannelName(void) const
Returns a MultipleStringStructure representing the long name of the associated channel.
bool Line21Field(int i) const
uint BitRateCode(void) const
uint BasicServiceMode(void) const
QString CanonicalLanguageString(int i) const
QString CanonicalLanguageString(uint i) const
uint SurroundMode(void) const
const unsigned char * m_data
QString SurroundModeString(void) const
uint SegmentCount(uint i) const
uint TextLength(void) const
QString ChannelsString(void) const
int LanguageKey(int i) const
uint RatingValue(uint i, uint j) const
static QString iso639_key_to_str3(int code)
int CaptionServiceNumber(int i) const
QString toString() const override
ContentIdentifierDescriptor(const unsigned char *data, int len=300)
QString toString() const override
uint CompressionType(uint i, uint j) const
int Bytes(int i, int j) const
QString toString() const override
uint AServiceFlags(void) const
QString LanguageString(int i) const
const unsigned char * m_data
QString toString() const override
QString SampleRateCodeString(void) const
uint ServicesCount() const
int CanonicalLanguageKey(uint i) const
ContentAdvisoryDescriptor(const unsigned char *data, int len=300)
static int iso639_str3_to_key(const unsigned char *iso639_2)
QString BitRateCodeString(void) const
uint Channels(void) const
bool FullService(void) const
QString LongChannelNameString(void) const
Convenience function that returns a QString comprising a concatenation of all the segments in the Lon...
int CanonicalLanguageKey(int i) const
const unsigned char * Offset(int i, int j) const
uint SampleRateCode(void) const
static int Index(int i, int j)