Ticket #10649: 0001-add-toString-to-TeletextDescriptor.patch

File 0001-add-toString-to-TeletextDescriptor.patch, 2.1 KB (added by dekarl@…, 8 years ago)
  • mythtv/libs/libmythtv/mpeg/dvbdescriptors.h

    From 93b0f1af144aaf16cd9c728ff7a472207500d469 Mon Sep 17 00:00:00 2001
    From: Karl Dietz <dekarl@users.sourceforge.net>
    Date: Sat, 25 Feb 2012 00:07:04 +0100
    Subject: [PATCH 1/7] add toString to TeletextDescriptor
    
    ---
     mythtv/libs/libmythtv/mpeg/dvbdescriptors.h    |   12 ++++++++++++
     mythtv/libs/libmythtv/mpeg/mpegdescriptors.cpp |    2 ++
     2 files changed, 14 insertions(+), 0 deletions(-)
    
    diff --git a/mythtv/libs/libmythtv/mpeg/dvbdescriptors.h b/mythtv/libs/libmythtv/mpeg/dvbdescriptors.h
    index d290f9e..c253d65 100644
    a b class TeletextDescriptor : public MPEGDescriptor 
    17971797    uint TeletextPageNum(uint i) const
    17981798        { return _data[6 + (i*5)]; }
    17991799    // }                           5.0
     1800    QString toString(void) const
     1801    {
     1802        QString str = QString("Teletext Descriptor: %1 pages\n")
     1803            .arg(StreamCount());
     1804        for (uint i=0; i<StreamCount(); i++)
     1805        {
     1806            if (i!=0) str.append("\n");
     1807            str.append(QString("      Type (%1) Magazine (%2) Page (%3) Language (%4)").arg(TeletextType(i))
     1808                .arg(TeletextMagazineNum(i), 0, 16).arg(TeletextPageNum(i), 2, 16, QChar('0')).arg(LanguageString(i)));
     1809        }
     1810        return str;
     1811    }
    18001812};
    18011813
    18021814// DVB Bluebook A038 (Sept 2011) p 89
  • mythtv/libs/libmythtv/mpeg/mpegdescriptors.cpp

    diff --git a/mythtv/libs/libmythtv/mpeg/mpegdescriptors.cpp b/mythtv/libs/libmythtv/mpeg/mpegdescriptors.cpp
    index 4e4d36b..87c2c96 100644
    a b QString MPEGDescriptor::toString() const 
    429429        SET_STRING(CueIdentifierDescriptor);
    430430    else if (DescriptorID::scte_revision_detection == DescriptorTag())
    431431        SET_STRING(RevisionDetectionDescriptor);
     432    else if (DescriptorID::teletext == DescriptorTag())
     433        SET_STRING(TeletextDescriptor);
    432434    /// POSSIBLY UNSAFE ! -- begin
    433435    else if (PrivateDescriptorID::dvb_uk_channel_list == DescriptorTag())
    434436        SET_STRING(UKChannelListDescriptor);