Skip to content

Commit

Permalink
Fixes #10649. Add toString() medthod to TeletextDescriptor.
Browse files Browse the repository at this point in the history
Signed-off-by: Daniel Kristjansson <danielk@cuymedia.net>
  • Loading branch information
dekarl authored and daniel-kristjansson committed Jun 14, 2012
1 parent 6b60b23 commit bf7b838
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
12 changes: 12 additions & 0 deletions mythtv/libs/libmythtv/mpeg/dvbdescriptors.h
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions mythtv/libs/libmythtv/mpeg/mpegdescriptors.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit bf7b838

Please sign in to comment.