/*---------------------------------------------------------------------- | AP4_Expandable::Inspect +---------------------------------------------------------------------*/ AP4_Result AP4_Expandable::Inspect(AP4_AtomInspector& inspector) { char name[6]; AP4_FormatString(name, sizeof(name), "[#:%02x]", m_ClassId); char info[64]; AP4_FormatString(info, sizeof(info), "size=%ld+%ld", GetHeaderSize(), m_PayloadSize); inspector.StartElement(name, info); inspector.EndElement(); return AP4_SUCCESS; }
/*---------------------------------------------------------------------- | AP4_IpmpDescriptor::Inspect +---------------------------------------------------------------------*/ AP4_Result AP4_IpmpDescriptor::Inspect(AP4_AtomInspector& inspector) { char info[64]; AP4_FormatString(info, sizeof(info), "size=%ld+%ld", GetHeaderSize(),m_PayloadSize); inspector.StartElement("[IPMP_Descriptor]", info); inspector.AddField("IPMP_DescriptorID", m_DescriptorId); inspector.AddField("IPMPS_Type", m_IpmpsType, AP4_AtomInspector::HINT_HEX); if (m_DescriptorId == 0xFF && m_IpmpsType == 0xFFFF) { inspector.AddField("IPMP_DescriptorIDEx", m_DescriptorIdEx); inspector.AddField("IPMP_ToolID", (const unsigned char*)(&m_ToolId[0]), 16, AP4_AtomInspector::HINT_HEX); inspector.AddField("controlPointCode", m_ControlPointCode); if (m_ControlPointCode > 0) { inspector.AddField("sequenceCode", m_SequenceCode); } } else if (m_IpmpsType == 0) { inspector.AddField("URL", m_Url.GetChars()); } else { inspector.AddField("data size", m_Data.GetDataSize()); } inspector.EndElement(); return AP4_SUCCESS; }
/*---------------------------------------------------------------------- | AP4_SgpdAtom::InspectFields +---------------------------------------------------------------------*/ AP4_Result AP4_SgpdAtom::InspectFields(AP4_AtomInspector& inspector) { char fourcc[5]; AP4_FormatFourChars(fourcc, m_GroupingType); inspector.AddField("grouping_type", fourcc); if (m_Version >= 1) { inspector.AddField("default_length", m_DefaultLength); } inspector.AddField("entry_count", m_Entries.ItemCount()); // inspect entries char header[32]; unsigned int i=0; for (AP4_List<AP4_DataBuffer>::Item* item = m_Entries.FirstItem(); item; item = item->GetNext()) { AP4_DataBuffer* entry = item->GetData(); AP4_FormatString(header, sizeof(header), "entry %02d", i); ++i; inspector.AddField(header, entry->GetData(), entry->GetDataSize()); } return AP4_SUCCESS; }
/*---------------------------------------------------------------------- | AP4_CttsAtom::InspectFields +---------------------------------------------------------------------*/ AP4_Result AP4_CttsAtom::InspectFields(AP4_AtomInspector& inspector) { inspector.AddField("entry_count", m_Entries.ItemCount()); if (inspector.GetVerbosity() >= 2) { char header[32]; char value[64]; for (AP4_Ordinal i=0; i<m_Entries.ItemCount(); i++) { AP4_FormatString(header, sizeof(header), "entry %8d", i); AP4_FormatString(value, sizeof(value), "count=%d, offset=%d", m_Entries[i].m_SampleCount, m_Entries[i].m_SampleOffset); inspector.AddField(header, value); } } return AP4_SUCCESS; }
/*---------------------------------------------------------------------- | AP4_Expandable::Inspect +---------------------------------------------------------------------*/ AP4_Result AP4_Expandable::Inspect(AP4_AtomInspector& inspector) { char name[64]; AP4_FormatString(name, sizeof(name), "#:%02x", m_ClassId); inspector.StartDescriptor(name, GetHeaderSize(), GetSize()); inspector.EndDescriptor(); return AP4_SUCCESS; }
/*---------------------------------------------------------------------- | AP4_StcoAtom::InspectFields +---------------------------------------------------------------------*/ AP4_Result AP4_StcoAtom::InspectFields(AP4_AtomInspector& inspector) { inspector.AddField("entry_count", m_EntryCount); if (inspector.GetVerbosity() >= 1) { char header[32]; for (AP4_Ordinal i=0; i<m_EntryCount; i++) { AP4_FormatString(header, sizeof(header), "entry %8d", i); inspector.AddField(header, m_Entries[i]); } } return AP4_SUCCESS; }
/*---------------------------------------------------------------------- | AP4_StscAtom::InspectFields +---------------------------------------------------------------------*/ AP4_Result AP4_StscAtom::InspectFields(AP4_AtomInspector& inspector) { inspector.AddField("entry_count", m_Entries.ItemCount()); // dump table entries if (inspector.GetVerbosity() >= 1) { char header[32]; char value[256]; for (unsigned int i=0; i<m_Entries.ItemCount(); i++) { AP4_FormatString(header, sizeof(header), "entry %8d", i); AP4_FormatString(value, sizeof(value), "first_chunk=%d, first_sample*=%d, chunk_count*=%d, samples_per_chunk=%d, sample_desc_index=%d", m_Entries[i].m_FirstChunk, m_Entries[i].m_FirstSample, m_Entries[i].m_ChunkCount, m_Entries[i].m_SamplesPerChunk, m_Entries[i].m_SampleDescriptionIndex); inspector.AddField(header, value); } } return AP4_SUCCESS; }
/*---------------------------------------------------------------------- | AP4_IpmpDescriptorPointer::Inspect +---------------------------------------------------------------------*/ AP4_Result AP4_IpmpDescriptorPointer::Inspect(AP4_AtomInspector& inspector) { char info[64]; AP4_FormatString(info, sizeof(info), "size=%ld+%ld", GetHeaderSize(),m_PayloadSize); inspector.StartElement("[IPMP_DescriptorPointer]", info); inspector.AddField("IPMP_DescriptorID", m_DescriptorId); if (m_DescriptorId == 0xFF) { inspector.AddField("IPMP_DescriptorIDEx", m_DescriptorIdEx); inspector.AddField("IPMP_ES_ID", m_EsId); } inspector.EndElement(); return AP4_SUCCESS; }
/*---------------------------------------------------------------------- | AP4_SaizAtom::InspectFields +---------------------------------------------------------------------*/ AP4_Result AP4_SaizAtom::InspectFields(AP4_AtomInspector& inspector) { if (m_Flags&1) { inspector.AddField("aux info type", m_AuxInfoType, AP4_AtomInspector::HINT_HEX); inspector.AddField("aux info type parameter", m_AuxInfoTypeParameter, AP4_AtomInspector::HINT_HEX); } inspector.AddField("default sample info size", m_DefaultSampleInfoSize); inspector.AddField("sample count", m_SampleCount); if (inspector.GetVerbosity() >= 2) { char header[32]; for (AP4_Ordinal i=0; i<m_Entries.ItemCount(); i++) { AP4_FormatString(header, sizeof(header), "entry %8d", i); inspector.AddField(header, m_Entries[i]); } } return AP4_SUCCESS; }