/** * Gets all of the SubDescriptor objects corresponding to this HeaderPartition object that are referenced by all * the source packages in this header partition * @return list of SubDescriptor objects referenced by the Source Packages in this HeaderPartition */ public List<InterchangeObject.InterchangeObjectBO> getSubDescriptors(){ List<InterchangeObject.InterchangeObjectBO> sourcePackageBOs = this.interchangeObjectBOsMap.get(SourcePackage.SourcePackageBO.class.getSimpleName()); List<InterchangeObject.InterchangeObjectBO>subDescriptors = new ArrayList<>(); for(int i=0; i<sourcePackageBOs.size(); i++){ SourcePackage.SourcePackageBO sourcePackageBO = (SourcePackage.SourcePackageBO) sourcePackageBOs.get(i); GenericDescriptor.GenericDescriptorBO genericDescriptorBO = (GenericDescriptor.GenericDescriptorBO)uidToBOs.get(sourcePackageBO.getDescriptorUID()); CompoundDataTypes.MXFCollections.MXFCollection<InterchangeObject.InterchangeObjectBO.StrongRef> strongRefsCollection = genericDescriptorBO.getSubdescriptors(); if(strongRefsCollection != null) { List<InterchangeObject.InterchangeObjectBO.StrongRef> strongRefs = strongRefsCollection.getEntries(); for (InterchangeObject.InterchangeObjectBO.StrongRef strongRef : strongRefs) { if(uidToBOs.get(strongRef.getInstanceUID()) != null) { subDescriptors.add(uidToBOs.get(strongRef.getInstanceUID())); } } } } return subDescriptors; }
sb.append(String.format("ytoSiz = %d", this.ytoSiz)); sb.append(String.format("cSiz = %d", this.cSiz)); sb.append(this.picture_component_sizing.toString()); String codingStyleDefaultString = ""; for(byte b: coding_style_default){
field.set(object, new CompoundDataTypes.MXFCollections.MXFCollection<>(cHeader, cList, fieldName)); field.set(object, new CompoundDataTypes.MXFCollections.MXFCollection<>(cHeader, cList, fieldName)); field.set(object, new CompoundDataTypes.MXFCollections.MXFCollection<>(cHeader, cList, fieldName)); field.set(object, new CompoundDataTypes.MXFCollections.MXFCollection<>(cHeader, cList, fieldName)); field.set(object, new CompoundDataTypes.MXFCollections.MXFCollection<>(cHeader, cList, fieldName));
this.essenceContainerBatch = new CompoundDataTypes.MXFCollections.MXFCollection<UL>(cHeader, cList, "EssenceContainerBatch");
if(collection.getEntries().get(0) instanceof InterchangeObject.InterchangeObjectBO.StrongRef) { CompoundDataTypes.MXFCollections.MXFCollection<InterchangeObject.InterchangeObjectBO.StrongRef> collectionStrongRefs = (CompoundDataTypes.MXFCollections.MXFCollection<InterchangeObject.InterchangeObjectBO.StrongRef>) object; for (InterchangeObject.InterchangeObjectBO.StrongRef entry : collectionStrongRefs.getEntries()) { dependentUIDs.add(entry.getInstanceUID()); else if(collection.getEntries().get(0) instanceof UL){ CompoundDataTypes.MXFCollections.MXFCollection<UL> collectionULs = (CompoundDataTypes.MXFCollections.MXFCollection<UL>) object; for (UL entry : collectionULs.getEntries()) { dependentUIDs.add(entry.getULAsMXFUid());
for (StrongRef strongRef : this.packages.getEntries()) for (StrongRef strongRef : this.essencecontainer_data.getEntries())
for (StrongRef strongRef : this.structural_components.getEntries())
for (StrongRef strongRef : this.tracks.getEntries())
if (this.video_line_map != null) sb.append(this.video_line_map.toString());
sb.append("================== PackageModifiedDate ======================\n"); sb.append(this.package_modified_date.toString()); sb.append(this.tracks.toString()); sb.append(String.format("descriptor = %s%n", this.descriptor.toString())); return sb.toString();
for (StrongRef strongRef : this.tracks.getEntries())
sb.append("================== PackageModifiedDate ======================\n"); sb.append(this.package_modified_date.toString()); sb.append(this.tracks.toString()); return sb.toString();
/** * A method that returns a string representation of a PartitionPack object * * @return string representing the object */ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("================== PartitionPack ======================\n"); sb.append(this.header.toString()); sb.append(String.format("major_version = %d%n", this.major_version)); sb.append(String.format("minor_version = %d%n", this.minor_version)); sb.append(String.format("KAG_size = %d%n", this.KAG_size)); sb.append(String.format("this_partition = 0x%x%n", this.this_partition)); sb.append(String.format("previous_partition = 0x%x%n", this.previous_partition)); sb.append(String.format("footer_partition = 0x%x%n", this.footer_partition)); sb.append(String.format("header_byte_count = 0x%x%n", this.header_byte_count)); sb.append(String.format("index_byte_count = 0x%x%n", this.index_byte_count)); sb.append(String.format("index_SID = %d%n", this.index_SID)); sb.append(String.format("body_offset = 0x%x%n", this.body_offset)); sb.append(String.format("body_SID = %d%n", this.body_SID)); sb.append(String.format("operational_pattern = 0x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%n", this.operational_pattern[0], this.operational_pattern[1], this.operational_pattern[2], this.operational_pattern[3], this.operational_pattern[4], this.operational_pattern[5], this.operational_pattern[6], this.operational_pattern[7], this.operational_pattern[8], this.operational_pattern[9], this.operational_pattern[10], this.operational_pattern[11], this.operational_pattern[12], this.operational_pattern[13], this.operational_pattern[14], this.operational_pattern[15])); sb.append(this.essenceContainerBatch.toString()); return sb.toString(); }
/** * A method that returns a string representation of a TimedTextDescriptorBO object * * @return string representing the object */ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("================== TimedTextDescriptor ======================\n"); sb.append(this.header.toString()); sb.append(String.format("instance_uid = 0x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%n", this.instance_uid[0], this.instance_uid[1], this.instance_uid[2], this.instance_uid[3], this.instance_uid[4], this.instance_uid[5], this.instance_uid[6], this.instance_uid[7], this.instance_uid[8], this.instance_uid[9], this.instance_uid[10], this.instance_uid[11], this.instance_uid[12], this.instance_uid[13], this.instance_uid[14], this.instance_uid[15])); if (this.subdescriptors != null) { sb.append(this.subdescriptors.toString()); } sb.append("================== SampleRate ======================\n"); sb.append(super.sample_rate.toString()); sb.append(String.format("essence_container = %s%n", this.essence_container.toString())); return sb.toString(); } }
/** * A method that returns a string representation of a SequenceBO object * * @return string representing the object */ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("================== Sequence ======================\n"); sb.append(this.header.toString()); sb.append(String.format("instance_uid = 0x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%n", this.instance_uid[0], this.instance_uid[1], this.instance_uid[2], this.instance_uid[3], this.instance_uid[4], this.instance_uid[5], this.instance_uid[6], this.instance_uid[7], this.instance_uid[8], this.instance_uid[9], this.instance_uid[10], this.instance_uid[11], this.instance_uid[12], this.instance_uid[13], this.instance_uid[14], this.instance_uid[15])); sb.append(String.format("data_definition = 0x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%n", this.data_definition[0], this.data_definition[1], this.data_definition[2], this.data_definition[3], this.data_definition[4], this.data_definition[5], this.data_definition[6], this.data_definition[7], this.data_definition[8], this.data_definition[9], this.data_definition[10], this.data_definition[11], this.data_definition[12], this.data_definition[13], this.data_definition[14], this.data_definition[15])); sb.append(String.format("duration = %d%n", this.duration)); sb.append(this.structural_components.toString()); return sb.toString(); } }
/** * A method that returns a string representation of a PrefaceBO object * * @return string representing the object */ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("================== Preface ======================\n"); sb.append(this.header.toString()); sb.append(String.format("instance_uid = 0x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%n", this.instance_uid[0], this.instance_uid[1], this.instance_uid[2], this.instance_uid[3], this.instance_uid[4], this.instance_uid[5], this.instance_uid[6], this.instance_uid[7], this.instance_uid[8], this.instance_uid[9], this.instance_uid[10], this.instance_uid[11], this.instance_uid[12], this.instance_uid[13], this.instance_uid[14], this.instance_uid[15])); sb.append(String.format("last_modified_date = 0x%02x%02x%02x%02x%02x%02x%02x%02x%n", this.last_modified_date[0], this.last_modified_date[1], this.last_modified_date[2], this.last_modified_date[3], this.last_modified_date[4], this.last_modified_date[5], this.last_modified_date[6], this.last_modified_date[7])); sb.append(String.format("version = 0x%02x%02x%n", this.version[0], this.version[1])); sb.append(String.format("content_storage = %s%n", this.content_storage.toString())); sb.append(String.format("operational_pattern = %s%n", this.operational_pattern.toString())); sb.append(this.essencecontainers.toString()); sb.append(this.dm_schemes.toString()); return sb.toString(); } }
/** * A method that returns a string representation of a ContentStorageBO object * * @return string representing the object */ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("================== ContentStorage ======================\n"); sb.append(this.header.toString()); sb.append(String.format("instance_uid = 0x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%02x%n", this.instance_uid[0], this.instance_uid[1], this.instance_uid[2], this.instance_uid[3], this.instance_uid[4], this.instance_uid[5], this.instance_uid[6], this.instance_uid[7], this.instance_uid[8], this.instance_uid[9], this.instance_uid[10], this.instance_uid[11], this.instance_uid[12], this.instance_uid[13], this.instance_uid[14], this.instance_uid[15])); sb.append(this.packages.toString()); sb.append(this.essencecontainer_data.toString()); return sb.toString(); } }
/** * Gets the SubDescriptors in this HeaderPartition object that correspond to the specified StrongRefCollection * @param strongRefCollection collection strong references corresponding to the SubDescriptors * @return list of SubDescriptors corresponding to the collection of strong references passed in */ List<InterchangeObject.InterchangeObjectBO> getSubDescriptors(CompoundDataTypes.MXFCollections.MXFCollection<InterchangeObject.InterchangeObjectBO.StrongRef> strongRefCollection){ List<InterchangeObject.InterchangeObjectBO>subDescriptors = new ArrayList<>(); if(strongRefCollection != null) { /*There might be essences that have no SubDescriptors*/ List<InterchangeObject.InterchangeObjectBO.StrongRef> strongRefList = strongRefCollection.getEntries(); for (InterchangeObject.InterchangeObjectBO.StrongRef strongRef : strongRefList) { if(uidToBOs.get(strongRef.getInstanceUID()) != null) { subDescriptors.add(uidToBOs.get(strongRef.getInstanceUID())); } } } return subDescriptors; }
/** * Getter for the list of tracks referred by this Source Package * @return the list of tracks referred by this Source Package represented as MXFUid objects */ public List<MXFUID> getTrackInstanceUIDs() { List<MXFUID> trackInstanceUIDs = new ArrayList<MXFUID>(); for (InterchangeObjectBO.StrongRef strongRef : this.sourcePackageBO.tracks.getEntries()) { trackInstanceUIDs.add(strongRef.getInstanceUID()); } return trackInstanceUIDs; }