/** * Create an instance of {@link TimecodeType } * */ public TimecodeType createTimecodeType() { return new TimecodeType(); }
TimecodeType lineUpStart = new TimecodeType(); lineUpStart.setValue(LINE_UP_START); TimecodeType identClockStart = new TimecodeType(); identClockStart.setValue(IDENT_CLOCK_START); DurationType zeroDuration = new DurationType(); zeroDuration.setValue("00:00:00:00"); segment.setPartNumber(1); segment.setPartTotal(1); TimecodeType firstPartSOM = new TimecodeType(); firstPartSOM.setValue(FIRST_PART_SOM); segment.setPartSOM(firstPartSOM); segment.setPartDuration(zeroDuration);
private void fillTcp() { TCP.fillEmptyValue(); if (metadata.getTechnical().getTimecodes() == null) { return; } if (metadata.getTechnical().getTimecodes().getParts() == null) { return; } if (metadata.getTechnical().getTimecodes().getParts().getPart() == null) { return; } if (metadata.getTechnical().getTimecodes().getParts().getPart().isEmpty()) { return; } TimecodeType tc = metadata.getTechnical().getTimecodes().getParts().getPart().get(0).getPartSOM(); String[] parts = tc.getValue().split("[:;]"); StringBuilder sb = new StringBuilder(); for (String part : parts) { if (part.length() == 1) { sb.append("0"); sb.append(part); } else if (part.length() > 2) { sb.append(part.substring(part.length() - 2, part.length())); } else { sb.append(part); } } TCP.setValue(sb.toString()); }
/** * Create an instance of {@link TimecodeType } * */ public TimecodeType createTimecodeType() { return new TimecodeType(); }