ApplicationID ApplicationAttemptId::getApplicationId() { return ApplicationID(attemptIdProto.application_id()); }
QString VirtualChannelMapSubtable::toStringXML(uint indent_level) const { QString indent_0 = xml_indent(indent_level); QString indent_1 = xml_indent(indent_level + 1); QString indent_2 = xml_indent(indent_level + 2); QString str = indent_0 + "<DefinedChannelsMap "; str += QString("number_of_vc_records=\"%1\"") .arg(NumberOfVCRecords()); str += "\n" + indent_1; str += QString("descriptors_included=\"%1\" ") .arg(xml_bool_to_string(DescriptorsIncluded())); str += QString("splice=\"%1\" ") .arg(xml_bool_to_string(Splice())); str += "\n" + indent_1; str += QString("activation_time=\"%1\" actication_time_desc=\"%2\"") .arg(ActivationTimeRaw()) .arg(ActivationTimeUTC().toString(Qt::ISODate)); str += ">\n"; for (uint i = 0; i < NumberOfVCRecords(); i++) { str += indent_1 + "<Channel "; str += QString("virtual_channel_number=\"%1\" ") .arg(VirtualChannelNumber(i)); str += "\n" + indent_2; str += QString("application_virtual_channel=\"%1\" ") .arg(xml_bool_to_string(ApplicationVirtualChannel(i))); str += QString("path_select=\"%1\" ").arg(PathSelect(i)); str += "\n" + indent_2; str += QString("transport_type=\"%1\" transport_type_desc=\"%2\" ") .arg(TransportType(i)).arg(TransportTypeString(i)); str += "\n" + indent_2; str += QString("channel_type=\"%1\" channel_type_desc=\"%2\" ") .arg(ChannelType(i)).arg(ChannelTypeString(i)); if (ApplicationVirtualChannel(i)) str += QString("application_id=\"%1\" ").arg(ApplicationID(i)); else str += QString("source_id=\"%1\" ").arg(SourceID(i)); str += "\n" + indent_2; if (kMPEG2Transport == TransportType(i)) { str += QString("cds_reference=\"%1\" ").arg(CDSReference(i)); str += QString("program_number=\"%1\" ").arg(ProgramNumber(i)); str += QString("mms_reference=\"%1\" ").arg(MMSReference(i)); } else { str += QString("cds_reference=\"%1\" ").arg(CDSReference(i)); str += QString("scrampled=\"%1\" ").arg(Scrambled(i)); str += "\n" + indent_2; str += QString("video_standard=\"%1\" video_standard_desc=\"%2\" ") .arg(VideoStandard(i)).arg(VideoStandardString(i)); } if (!DescriptorsIncluded()) { str += "/>\n"; continue; } str += "\n" + indent_2; str += QString("descriptors_count=\"%1\"").arg(DescriptorsCount(i)); str += ">\n"; vector<const unsigned char*> desc = MPEGDescriptor::Parse(Descriptors(i), DescriptorsLength(i)); for (uint i = 0; i < desc.size(); i++) { str += MPEGDescriptor(desc[i], 300) .toStringXML(indent_level + 2) + "\n"; } str += indent_1 + "</Channel>"; } return str + indent_0 + "</DefinedChannelsMap>"; }