src/libtsduck/dtv/descriptors/tsHEVCTimingAndHRDDescriptor.cpp
void ts::HEVCTimingAndHRDDescriptor::DisplayDescriptor(TablesDisplay& display, DID did, const uint8_t* data, size_t size, int indent, TID tid, PDS pds)
{
    // Important: With extension descriptors, the DisplayDescriptor() function is called
    // with extension payload. Meaning that data points after descriptor_tag_extension.
    // See ts::TablesDisplay::displayDescriptorData()

    std::ostream& strm(display.duck().out());
    const std::string margin(indent, ' ');

    if (size >= 1) {
        strm << margin << "HRD management valid: " << UString::TrueFalse((data[0] & 0x80) != 0) << std::endl;
        bool info_present = (data[0] & 0x01) != 0;
        if ((data[0] & 0x40) == 0) {
            const uint8_t idx = (data[0] >> 1) & 0x1F;
            strm << margin << UString::Format(u"Target schedule idx: 0x%x (%d)", {idx, idx}) << std::endl;
        }
        data++; size--;

        bool ok = size >= 1;
        if (info_present) {
            const bool has_90kHz = (data[0] & 0x80) != 0;
            data++; size--;
            if (has_90kHz) {
                ok = size >= 8;
                if (ok) {
                    strm << margin << UString::Format(u"90 kHz: N = %'d, K = %'d", {GetUInt32(data), GetUInt32(data + 4)}) << std::endl;
                    data += 8; size -= 8;
                }
            }
            ok = ok && size >= 4;
            if (ok) {
                strm << margin << UString::Format(u"Num. units in tick: %'d", {GetUInt32(data)}) << std::endl;
                data += 4; size -= 4;
            }
        }
    }

    display.displayExtraData(data, size, indent);
}
//----------------------------------------------------------------------------
// Static method to display a descriptor.
//----------------------------------------------------------------------------
Static method to display a descriptor.
Static method to display a descriptor .
void ts::HEVCTimingAndHRDDescriptor::DisplayDescriptor(TablesDisplay& display, DID did, const uint8_t* data, size_t size, int indent, TID tid, PDS pds)
{
    std::ostream& strm(display.duck().out());
    const std::string margin(indent, ' ');
    if (size >= 1) {
        strm << margin << "HRD management valid: " << UString::TrueFalse((data[0] & 0x80) != 0) << std::endl;
        bool info_present = (data[0] & 0x01) != 0;
        if ((data[0] & 0x40) == 0) {
            const uint8_t idx = (data[0] >> 1) & 0x1F;
            strm << margin << UString::Format(u"Target schedule idx: 0x%x (%d)", {idx, idx}) << std::endl;
        }
        data++; size--;
        bool ok = size >= 1;
        if (info_present) {
            const bool has_90kHz = (data[0] & 0x80) != 0;
            data++; size--;
            if (has_90kHz) {
                ok = size >= 8;
                if (ok) {
                    strm << margin << UString::Format(u"90 kHz: N = %'d, K = %'d", {GetUInt32(data), GetUInt32(data + 4)}) << std::endl;
                    data += 8; size -= 8;
                }
            }
            ok = ok && size >= 4;
            if (ok) {
                strm << margin << UString::Format(u"Num. units in tick: %'d", {GetUInt32(data)}) << std::endl;
                data += 4; size -= 4;
            }
        }
    }
    display.displayExtraData(data, size, indent);
}
void ts :: HEVCTimingAndHRDDescriptor :: DisplayDescriptor ( TablesDisplay & display , DID did , const uint8_t * data , size_t size , int indent , TID tid , PDS pds ) { std :: ostream & strm ( display . duck ( ) . out ( ) ) ; const std :: string margin ( indent , ' ' ) ; if ( size >= 1 ) { strm << margin << " " << UString :: TrueFalse ( ( data [ 0 ] & 0x80 ) != 0 ) << std :: endl ; bool info_present = ( data [ 0 ] & 0x01 ) != 0 ; if ( ( data [ 0 ] & 0x40 ) == 0 ) { const uint8_t idx = ( data [ 0 ] >> 1 ) & 0x1F ; strm << margin << UString :: Format ( u" " , { idx , idx } ) << std :: endl ; } data ++ ; size -- ; bool ok = size >= 1 ; if ( info_present ) { const bool has_90kHz = ( data [ 0 ] & 0x80 ) != 0 ; data ++ ; size -- ; if ( has_90kHz ) { ok = size >= 8 ; if ( ok ) { strm << margin << UString :: Format ( u" " , { GetUInt32 ( data ) , GetUInt32 ( data + 4 ) } ) << std :: endl ; data += 8 ; size -= 8 ; } } ok = ok && size >= 4 ; if ( ok ) { strm << margin << UString :: Format ( u" " , { GetUInt32 ( data ) } ) << std :: endl ; data += 4 ; size -= 4 ; } } } display . displayExtraData ( data , size , indent ) ; }
Static method to display a descriptor.
Static method to display a descriptor .
// Important: With extension descriptors, the DisplayDescriptor() function is called // with extension payload. Meaning that data points after descriptor_tag_extension. // See ts::TablesDisplay::displayDescriptorData()