public ByteBuffer serialize() { ByteBuffer out = ByteBuffer.allocate(getSize()); IsoTypeWriter.writeUInt8(out, tag); writeSize(out, getContentSize()); IsoTypeWriter.writeUInt8(out, objectTypeIndication); int flags = (streamType << 2) | (upStream << 1) | 1; IsoTypeWriter.writeUInt8(out, flags); IsoTypeWriter.writeUInt24(out, bufferSizeDB); IsoTypeWriter.writeUInt32(out, maxBitRate); IsoTypeWriter.writeUInt32(out, avgBitRate); if (decoderSpecificInfo != null) { ByteBuffer bb = decoderSpecificInfo.serialize(); out.put(bb); } if (audioSpecificInfo != null) { ByteBuffer bb = audioSpecificInfo.serialize(); out.put(bb); } for (ProfileLevelIndicationDescriptor profileLevelIndicationDescriptor : profileLevelIndicationDescriptors) { out.put(profileLevelIndicationDescriptor.serialize()); } return (ByteBuffer) out.rewind(); }
if (decConf != null) { DecoderSpecificInfo decInfo = decConf.getDecoderSpecificInfo(); ByteBuffer byteBuffer = decInfo.serialize(); videoDecoderBytes = new byte[byteBuffer.limit()]; byteBuffer.get(videoDecoderBytes);
if (decConf != null) { DecoderSpecificInfo decInfo = decConf.getDecoderSpecificInfo(); ByteBuffer byteBuffer = decInfo.serialize(); videoDecoderBytes = new byte[byteBuffer.limit()]; byteBuffer.get(videoDecoderBytes);
public ByteBuffer serialize() { ByteBuffer out = ByteBuffer.allocate(getSize()); IsoTypeWriter.writeUInt8(out, tag); writeSize(out, getContentSize()); IsoTypeWriter.writeUInt8(out, objectTypeIndication); int flags = (streamType << 2) | (upStream << 1) | 1; IsoTypeWriter.writeUInt8(out, flags); IsoTypeWriter.writeUInt24(out, bufferSizeDB); IsoTypeWriter.writeUInt32(out, maxBitRate); IsoTypeWriter.writeUInt32(out, avgBitRate); if (decoderSpecificInfo != null) { ByteBuffer bb = decoderSpecificInfo.serialize(); out.put(bb); } if (audioSpecificInfo != null) { ByteBuffer bb = audioSpecificInfo.serialize(); out.put(bb); } for (ProfileLevelIndicationDescriptor profileLevelIndicationDescriptor : profileLevelIndicationDescriptors) { out.put(profileLevelIndicationDescriptor.serialize()); } return (ByteBuffer) out.rewind(); }