/** * Returns the largest duration of all the TimelineTracks within the first (in parsing order) Material Package * associated with this HeaderPartition object * @return the largest duration of all the Timeline tracks within the first Material Package associated with this Header partition */ public BigInteger getEssenceDuration(){ MaterialPackage materialPackage = (MaterialPackage)this.getMaterialPackages().get(0); Long maxDuration = 0L; for (TimelineTrack timelineTrack : materialPackage.getTimelineTracks()) { Long duration = 0L; List<MXFUID> uids = timelineTrack.getSequence().getStructuralComponentInstanceUIDs(); List<InterchangeObject.InterchangeObjectBO> structuralComponentBOs = new ArrayList<>(); for(MXFUID uid : uids){ if(this.uidToBOs.get(uid) != null){ structuralComponentBOs.add(this.uidToBOs.get(uid)); } } for(InterchangeObject.InterchangeObjectBO interchangeObjectBO : structuralComponentBOs){ StructuralComponent.StructuralComponentBO structuralComponentBO = (StructuralComponent.StructuralComponentBO) interchangeObjectBO; duration += structuralComponentBO.getDuration(); } if(duration > maxDuration){ maxDuration = duration; } } return BigInteger.valueOf(maxDuration); }
if (headerPartition.getMaterialPackages().size() != 1) headerPartition.getMaterialPackages().size())); MaterialPackage materialPackage = (MaterialPackage)headerPartition.getMaterialPackages().get(0); MaterialPackage materialPackage = (MaterialPackage)headerPartition.getMaterialPackages().get(0); for (TimelineTrack timelineTrack : materialPackage.getTimelineTracks())