Skip to content
Browse files

Fixes #10649. Add toString() medthod to TeletextDescriptor.

Signed-off-by: Daniel Kristjansson <danielk@cuymedia.net>
  • Loading branch information...
1 parent 6b60b23 commit bf7b8386c21a98d12861fe19a7dcf2891eb47f59 @dekarl dekarl committed with daniel-kristjansson Feb 25, 2012
Showing with 14 additions and 0 deletions.
  1. +12 −0 mythtv/libs/libmythtv/mpeg/dvbdescriptors.h
  2. +2 −0 mythtv/libs/libmythtv/mpeg/mpegdescriptors.cpp
View
12 mythtv/libs/libmythtv/mpeg/dvbdescriptors.h
@@ -1797,6 +1797,18 @@ class TeletextDescriptor : public MPEGDescriptor
uint TeletextPageNum(uint i) const
{ return _data[6 + (i*5)]; }
// } 5.0
+ QString toString(void) const
+ {
+ QString str = QString("Teletext Descriptor: %1 pages\n")
+ .arg(StreamCount());
+ for (uint i=0; i<StreamCount(); i++)
+ {
+ if (i!=0) str.append("\n");
+ str.append(QString(" Type (%1) Magazine (%2) Page (%3) Language (%4)").arg(TeletextType(i))
+ .arg(TeletextMagazineNum(i), 0, 16).arg(TeletextPageNum(i), 2, 16, QChar('0')).arg(LanguageString(i)));
+ }
+ return str;
+ }
};
// DVB Bluebook A038 (Sept 2011) p 89
View
2 mythtv/libs/libmythtv/mpeg/mpegdescriptors.cpp
@@ -429,6 +429,8 @@ QString MPEGDescriptor::toString() const
SET_STRING(CueIdentifierDescriptor);
else if (DescriptorID::scte_revision_detection == DescriptorTag())
SET_STRING(RevisionDetectionDescriptor);
+ else if (DescriptorID::teletext == DescriptorTag())
+ SET_STRING(TeletextDescriptor);
/// POSSIBLY UNSAFE ! -- begin
else if (PrivateDescriptorID::dvb_uk_channel_list == DescriptorTag())
SET_STRING(UKChannelListDescriptor);

0 comments on commit bf7b838

Please sign in to comment.
Something went wrong with that request. Please try again.