public int getSize() { return getContentSize() + getSizeSize() + 1; }
baseDescriptor.parse(tag, bb);
public final void parse(int tag, ByteBuffer bb) throws IOException { this.tag = tag; int i = 0; int tmp = IsoTypeReader.readUInt8(bb); i++; sizeOfInstance = tmp & 0x7f; while (tmp >>> 7 == 1) { //nextbyte indicator bit tmp = IsoTypeReader.readUInt8(bb); i++; //sizeOfInstance = sizeOfInstance<<7 | sizeByte; sizeOfInstance = sizeOfInstance << 7 | tmp & 0x7f; } sizeBytes = i; ByteBuffer detailSource = bb.slice(); detailSource.limit(sizeOfInstance); parseDetail(detailSource); assert detailSource.remaining() == 0 : this.getClass().getSimpleName() + " has not been fully parsed"; bb.position(bb.position() + sizeOfInstance); }
descriptor = ObjectDescriptorFactory.createFrom(objectTypeIndication, bb); final int read = bb.position() - begin; LOG.trace("{} - DecoderConfigDescr1 read: {}, size: {}", descriptor, read, descriptor != null ? descriptor.getSize() : null); if (descriptor != null) { final int size = descriptor.getSize(); if (read < size) {
public int getSizeSize() { int size = getContentSize(); int i = 0; while (size > 0 || i < sizeBytes) { size >>>= 7; i++; } return i; }
public void writeSize(ByteBuffer bb, int size) { int pos = bb.position(); int i = 0; while (size > 0 || i < sizeBytes) { i++; if (size > 0) { bb.put(pos + getSizeSize() - i, (byte) (size & 0x7f)); } else { bb.put(pos + getSizeSize() - i, (byte) (0x80)); } size >>>= 7; } bb.position(pos + getSizeSize()); }
public String getDescriptorAsString() { return descriptor.toString(); }
sizeLeft = sizeLeft - descriptor.getSize(); if (descriptor instanceof ESDescriptor) { esDescriptors.add((ESDescriptor) descriptor);
public int getSizeSize() { int size = getContentSize(); int i = 0; while (size > 0 || i < sizeBytes) { size >>>= 7; i++; } return i; }
public void writeSize(ByteBuffer bb, int size) { int pos = bb.position(); int i = 0; while (size > 0 || i < sizeBytes) { i++; if (size > 0) { bb.put(pos + getSizeSize() - i, (byte) (size & 0x7f)); } else { bb.put(pos + getSizeSize() - i, (byte) (0x80)); } size >>>= 7; } bb.position(pos + getSizeSize()); }
public String getDescriptorAsString() { return descriptor.toString(); }
public int getSize() { return getContentSize() + getSizeSize() + 1; }
descriptor = ObjectDescriptorFactory.createFrom(objectTypeIndication, bb); final int read = bb.position() - begin; LOG.trace("{} - DecoderConfigDescr1 read: {}, size: {}", descriptor, read, descriptor != null ? descriptor.getSize() : null); if (descriptor != null) { final int size = descriptor.getSize(); if (read < size) {
public final void parse(int tag, ByteBuffer bb) throws IOException { this.tag = tag; int i = 0; int tmp = IsoTypeReader.readUInt8(bb); i++; sizeOfInstance = tmp & 0x7f; while (tmp >>> 7 == 1) { //nextbyte indicator bit tmp = IsoTypeReader.readUInt8(bb); i++; //sizeOfInstance = sizeOfInstance<<7 | sizeByte; sizeOfInstance = sizeOfInstance << 7 | tmp & 0x7f; } sizeBytes = i; ByteBuffer detailSource = bb.slice(); detailSource.limit(sizeOfInstance); parseDetail(detailSource); assert detailSource.remaining() == 0 : this.getClass().getSimpleName() + " has not been fully parsed"; bb.position(bb.position() + sizeOfInstance); }
baseDescriptor.parse(tag, bb);
sizeLeft = sizeLeft - descriptor.getSize(); if (descriptor instanceof ESDescriptor) { esDescriptors.add((ESDescriptor) descriptor);