@Override public String toString() { return "AvcNalUnitStorageBox{" + "SPS=" + avcDecoderConfigurationRecord.getSequenceParameterSetsAsStrings() + ",PPS=" + avcDecoderConfigurationRecord.getPictureParameterSetsAsStrings() + ",lengthSize=" + (avcDecoderConfigurationRecord.lengthSizeMinusOne + 1) + '}'; } }
@Override protected void _parseDetails(ByteBuffer content) { hevcDecoderConfigurationRecord.parse(content); }
@Override protected long getContentSize() { return avcDecoderConfigurationRecord.getContentSize(); }
public long getSize() { int spsPpsSize = 0; for (ByteBuffer bytes : avcC.getSequenceParameterSets()) { spsPpsSize += len + bytes.limit(); } for (ByteBuffer bytes : avcC.getSequenceParameterSetExts()) { spsPpsSize += len + bytes.limit(); } for (ByteBuffer bytes : avcC.getPictureParameterSets()) { spsPpsSize += len + bytes.limit(); } return orignalSample.getSize() + spsPpsSize; }
private GroupEntry parseGroupEntry(ByteBuffer content, String groupingType) { GroupEntry groupEntry; if (RollRecoveryEntry.TYPE.equals(groupingType)) { groupEntry = new RollRecoveryEntry(); } else if (RateShareEntry.TYPE.equals(groupingType)) { groupEntry = new RateShareEntry(); } else if (VisualRandomAccessEntry.TYPE.equals(groupingType)) { groupEntry = new VisualRandomAccessEntry(); } else if (TemporalLevelEntry.TYPE.equals(groupingType)) { groupEntry = new TemporalLevelEntry(); } else if (SyncSampleEntry.TYPE.equals(groupingType)) { groupEntry = new SyncSampleEntry(); } else if (TemporalLayerSampleGroup.TYPE.equals(groupingType)) { groupEntry = new TemporalLayerSampleGroup(); } else if (TemporalSubLayerSampleGroup.TYPE.equals(groupingType)) { groupEntry = new TemporalSubLayerSampleGroup(); } else if (StepwiseTemporalLayerEntry.TYPE.equals(groupingType)) { groupEntry = new StepwiseTemporalLayerEntry(); } else { if (this.getVersion() == 0) { throw new RuntimeException("SampleGroupDescriptionBox with UnknownEntry are only supported in version 1"); } groupEntry = new UnknownEntry(groupingType); } groupEntry.parse(content); return groupEntry; }
@Override protected void getContent(ByteBuffer byteBuffer) { this.avcDecoderConfigurationRecord.getContent(byteBuffer); }
public AvcNalUnitStorageBox(AvcConfigurationBox avcConfigurationBox) { super(TYPE); this.avcDecoderConfigurationRecord = avcConfigurationBox.getavcDecoderConfigurationRecord(); }
@Override public void _parseDetails(ByteBuffer content) { avcDecoderConfigurationRecord = new AvcDecoderConfigurationRecord(content); }
@Override protected void getContent(ByteBuffer byteBuffer) { hevcDecoderConfigurationRecord.write(byteBuffer); }
public HevcConfigurationBox() { super(TYPE); hevcDecoderConfigurationRecord = new HevcDecoderConfigurationRecord(); }
public List<String> getSequenceParameterSetExtsAsStrings() { return avcDecoderConfigurationRecord.getSequenceParameterSetExtsAsStrings(); }
public List<String> getPictureParameterSetsAsStrings() { return avcDecoderConfigurationRecord.getPictureParameterSetsAsStrings(); }
@Override protected long getContentSize() { return hevcDecoderConfigurationRecord.getSize(); }
@Override public int hashCode() { return hevcDecoderConfigurationRecord != null ? hevcDecoderConfigurationRecord.hashCode() : 0; }
public List<String> getSequenceParameterSetsAsStrings() { return avcDecoderConfigurationRecord.getSequenceParameterSetsAsStrings(); }
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; HevcConfigurationBox that = (HevcConfigurationBox) o; if (hevcDecoderConfigurationRecord != null ? !hevcDecoderConfigurationRecord.equals(that.hevcDecoderConfigurationRecord) : that.hevcDecoderConfigurationRecord != null) return false; return true; }
public void writeTo(WritableByteChannel channel) throws IOException { for (ByteBuffer bytes : avcC.getSequenceParameterSets()) { IsoTypeWriterVariable.write(bytes.limit(), (ByteBuffer) buf.rewind(), len); channel.write((ByteBuffer) buf.rewind()); channel.write(bytes); } for (ByteBuffer bytes : avcC.getSequenceParameterSetExts()) { IsoTypeWriterVariable.write(bytes.limit(), (ByteBuffer) buf.rewind(), len); channel.write((ByteBuffer) buf.rewind()); channel.write((bytes)); } for (ByteBuffer bytes : avcC.getPictureParameterSets()) { IsoTypeWriterVariable.write(bytes.limit(), (ByteBuffer) buf.rewind(), len); channel.write((ByteBuffer) buf.rewind()); channel.write((bytes)); } orignalSample.writeTo(channel); }
@Override public long getContentSize() { return avcDecoderConfigurationRecord.getContentSize(); }
@Override public void getContent(ByteBuffer byteBuffer) { avcDecoderConfigurationRecord.getContent(byteBuffer); }
@Override public void _parseDetails(ByteBuffer content) { this.avcDecoderConfigurationRecord = new AvcDecoderConfigurationRecord(content); }