本文整理匯總了Java中org.mp4parser.tools.IsoTypeReader.readUInt24方法的典型用法代碼示例。如果您正苦於以下問題:Java IsoTypeReader.readUInt24方法的具體用法?Java IsoTypeReader.readUInt24怎麽用?Java IsoTypeReader.readUInt24使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.mp4parser.tools.IsoTypeReader
的用法示例。
在下文中一共展示了IsoTypeReader.readUInt24方法的9個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: parse
import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void parse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {
ByteBuffer buffer = ByteBuffer.allocate(4);
dataSource.read(buffer);
buffer.rewind();
version = IsoTypeReader.readUInt8(buffer);
flags = IsoTypeReader.readUInt24(buffer);
int entryCountLength = (version == 0) ? 2 : 4;
buffer = ByteBuffer.allocate(entryCountLength);
dataSource.read(buffer);
buffer.rewind();
initContainer(dataSource, contentSize - 4 - entryCountLength, boxParser);
for (ItemInfoEntry entry : getBoxes(ItemInfoEntry.class)) {
entry.parseDetails();
}
}
示例2: parse
import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void parse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {
ByteBuffer versionFlagNumOfChildBoxes = ByteBuffer.allocate(6);
dataSource.read(versionFlagNumOfChildBoxes);
versionFlagNumOfChildBoxes.rewind();
version = IsoTypeReader.readUInt8(versionFlagNumOfChildBoxes);
flags = IsoTypeReader.readUInt24(versionFlagNumOfChildBoxes);
// number of child boxes is not required
initContainer(dataSource, contentSize - 6, boxParser);
}
示例3: parse
import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void parse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {
ByteBuffer versionFlagNumOfChildBoxes = ByteBuffer.allocate(8);
dataSource.read(versionFlagNumOfChildBoxes);
versionFlagNumOfChildBoxes.rewind();
version = IsoTypeReader.readUInt8(versionFlagNumOfChildBoxes);
flags = IsoTypeReader.readUInt24(versionFlagNumOfChildBoxes);
// number of child boxes is not required
initContainer(dataSource, contentSize - 8, boxParser);
}
示例4: parse
import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void parse(ReadableByteChannel dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {
ByteBuffer versionFlagNumOfChildBoxes = ByteBuffer.allocate(8);
dataSource.read(versionFlagNumOfChildBoxes);
versionFlagNumOfChildBoxes.rewind();
version = IsoTypeReader.readUInt8(versionFlagNumOfChildBoxes);
flags = IsoTypeReader.readUInt24(versionFlagNumOfChildBoxes);
// number of child boxes is not required - ignore
initContainer(dataSource, contentSize - 8, boxParser);
}
示例5: parseDetail
import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void parseDetail(ByteBuffer bb) throws IOException {
objectTypeIndication = IsoTypeReader.readUInt8(bb);
int data = IsoTypeReader.readUInt8(bb);
streamType = data >>> 2;
upStream = (data >> 1) & 0x1;
bufferSizeDB = IsoTypeReader.readUInt24(bb);
maxBitRate = IsoTypeReader.readUInt32(bb);
avgBitRate = IsoTypeReader.readUInt32(bb);
BaseDescriptor descriptor;
while (bb.remaining() > 2) { //1byte tag + at least 1byte size
final int begin = bb.position();
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) {
//skip
configDescriptorDeadBytes = new byte[size - read];
bb.get(configDescriptorDeadBytes);
}
}
if (descriptor instanceof DecoderSpecificInfo) {
decoderSpecificInfo = (DecoderSpecificInfo) descriptor;
} else if (descriptor instanceof AudioSpecificConfig) {
audioSpecificInfo = (AudioSpecificConfig) descriptor;
} else if (descriptor instanceof ProfileLevelIndicationDescriptor) {
profileLevelIndicationDescriptors.add((ProfileLevelIndicationDescriptor) descriptor);
}
}
}
示例6: _parseDetails
import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
protected void _parseDetails(ByteBuffer content) {
content.position(6);// ignore 6 reserved bytes;
dataReferenceIndex = IsoTypeReader.readUInt16(content); // 8
reserved1 = content.getInt();
flags = IsoTypeReader.readUInt32(content);
timeScale = content.getInt();
frameDuration = content.getInt();
numberOfFrames = IsoTypeReader.readUInt8(content);
reserved2 = IsoTypeReader.readUInt24(content);
rest = new byte[content.remaining()];
content.get(rest);
}
示例7: _parseDetails
import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void _parseDetails(ByteBuffer content) {
parseVersionAndFlags(content);
if ((getFlags() & 0x1) > 0) {
algorithmId = IsoTypeReader.readUInt24(content);
ivSize = IsoTypeReader.readUInt8(content);
kid = new byte[16];
content.get(kid);
}
long numOfEntries = IsoTypeReader.readUInt32(content);
ByteBuffer parseEight = content.duplicate();
ByteBuffer parseSixteen = content.duplicate();
entries = parseEntries(parseEight, numOfEntries, 8);
if (entries == null) {
entries = parseEntries(parseSixteen, numOfEntries, 16);
content.position(content.position() + content.remaining() - parseSixteen.remaining());
} else {
content.position(content.position() + content.remaining() - parseEight.remaining());
}
if (entries == null) {
throw new RuntimeException("Cannot parse SampleEncryptionBox");
}
}
示例8: _parseDetails
import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
@Override
public void _parseDetails(ByteBuffer content) {
parseVersionAndFlags(content);
defaultAlgorithmId = IsoTypeReader.readUInt24(content);
defaultIvSize = IsoTypeReader.readUInt8(content);
default_KID = new byte[16];
content.get(default_KID);
}
示例9: parseVersionAndFlags
import org.mp4parser.tools.IsoTypeReader; //導入方法依賴的package包/類
/**
* Parses the version/flags header and returns the remaining box size.
*
* @param content the <code>ByteBuffer</code> that contains the version & flag
* @return number of bytes read
*/
protected final long parseVersionAndFlags(ByteBuffer content) {
version = IsoTypeReader.readUInt8(content);
flags = IsoTypeReader.readUInt24(content);
return 4;
}