本文整理汇总了Java中com.coremedia.iso.IsoTypeWriter类的典型用法代码示例。如果您正苦于以下问题:Java IsoTypeWriter类的具体用法?Java IsoTypeWriter怎么用?Java IsoTypeWriter使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IsoTypeWriter类属于com.coremedia.iso包,在下文中一共展示了IsoTypeWriter类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: getBox
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
public void getBox(WritableByteChannel writableByteChannel) throws IOException {
ByteBuffer bb = ByteBuffer.allocate(16);
long size = getSize();
if (isSmallBox(size)) {
IsoTypeWriter.writeUInt32(bb, size);
} else {
IsoTypeWriter.writeUInt32(bb, 1);
}
bb.put(IsoFile.fourCCtoBytes("mdat"));
if (isSmallBox(size)) {
bb.put(new byte[8]);
} else {
IsoTypeWriter.writeUInt64(bb, size);
}
bb.rewind();
writableByteChannel.write(bb);
}
开发者ID:MLNO,项目名称:airgram,代码行数:18,代码来源:MP4Builder.java
示例2: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
IsoTypeWriter.writeUInt32(byteBuffer, DTSSamplingFrequency);
IsoTypeWriter.writeUInt32(byteBuffer, maxBitRate);
IsoTypeWriter.writeUInt32(byteBuffer, avgBitRate);
IsoTypeWriter.writeUInt8(byteBuffer, pcmSampleDepth);
BitWriterBuffer bwb = new BitWriterBuffer(byteBuffer);
bwb.writeBits(frameDuration, 2);
bwb.writeBits(streamConstruction, 5);
bwb.writeBits(coreLFEPresent, 1);
bwb.writeBits(coreLayout, 6);
bwb.writeBits(coreSize, 14);
bwb.writeBits(stereoDownmix, 1);
bwb.writeBits(representationType, 3);
bwb.writeBits(channelLayout, 16);
bwb.writeBits(multiAssetFlag, 1);
bwb.writeBits(LBRDurationMod, 1);
bwb.writeBits(reservedBoxPresent, 1);
bwb.writeBits(reserved, 5);
}
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:22,代码来源:DTSSpecificBox.java
示例3: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
protected void getContent(ByteBuffer byteBuffer) {
writeVersionAndFlags(byteBuffer);
if (getVersion() == 1) {
IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(creationTime));
IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(modificationTime));
IsoTypeWriter.writeUInt32(byteBuffer, timescale);
IsoTypeWriter.writeUInt64(byteBuffer, duration);
} else {
IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(creationTime));
IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(modificationTime));
IsoTypeWriter.writeUInt32(byteBuffer, timescale);
IsoTypeWriter.writeUInt32(byteBuffer, duration);
}
IsoTypeWriter.writeIso639(byteBuffer, language);
IsoTypeWriter.writeUInt16(byteBuffer, 0);
}
开发者ID:lisnstatic,项目名称:live_master,代码行数:17,代码来源:MediaHeaderBox.java
示例4: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
writeVersionAndFlags(byteBuffer);
IsoTypeWriter.writeUInt32(byteBuffer, referenceId);
IsoTypeWriter.writeUInt32(byteBuffer, timeScale);
if (getVersion() == 0) {
IsoTypeWriter.writeUInt32(byteBuffer, earliestPresentationTime);
IsoTypeWriter.writeUInt32(byteBuffer, firstOffset);
} else {
IsoTypeWriter.writeUInt64(byteBuffer, earliestPresentationTime);
IsoTypeWriter.writeUInt64(byteBuffer, firstOffset);
}
IsoTypeWriter.writeUInt16(byteBuffer, reserved);
IsoTypeWriter.writeUInt16(byteBuffer, entries.size());
for (Entry entry : entries) {
BitWriterBuffer b = new BitWriterBuffer(byteBuffer);
b.writeBits(entry.getReferenceType(), 1);
b.writeBits(entry.getReferencedSize(), 31);
IsoTypeWriter.writeUInt32(byteBuffer, entry.getSubsegmentDuration());
b = new BitWriterBuffer(byteBuffer);
b.writeBits(entry.getStartsWithSap(), 1);
b.writeBits(entry.getSapType(), 3);
b.writeBits(entry.getSapDeltaTime(), 28);
}
}
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:27,代码来源:SegmentIndexBox.java
示例5: getBox
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
public void getBox(WritableByteChannel writableByteChannel) throws IOException {
header = ByteBuffer.allocate(16);
long size = getSize();
if (isSmallBox(size)) {
IsoTypeWriter.writeUInt32(header, size);
} else {
IsoTypeWriter.writeUInt32(header, 1);
}
header.put(IsoFile.fourCCtoBytes("mdat"));
if (isSmallBox(size)) {
header.put(new byte[8]);
} else {
IsoTypeWriter.writeUInt64(header, size);
}
header.rewind();
writableByteChannel.write(header);
}
开发者ID:lisnstatic,项目名称:live_master,代码行数:18,代码来源:SrsMp4Muxer.java
示例6: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
writeVersionAndFlags(byteBuffer);
IsoTypeWriter.writeUInt32(byteBuffer, trackId);
long temp;
temp = reserved << 6;
temp = temp | (((lengthSizeOfTrafNum - 1) & 0x3) << 4);
temp = temp | (((lengthSizeOfTrunNum - 1) & 0x3) << 2);
temp = temp | ((lengthSizeOfSampleNum - 1) & 0x3);
IsoTypeWriter.writeUInt32(byteBuffer, temp);
IsoTypeWriter.writeUInt32(byteBuffer, entries.size());
for (Entry entry : entries) {
if (getVersion() == 1) {
IsoTypeWriter.writeUInt64(byteBuffer, entry.time);
IsoTypeWriter.writeUInt64(byteBuffer, entry.moofOffset);
} else {
IsoTypeWriter.writeUInt32(byteBuffer, entry.time);
IsoTypeWriter.writeUInt32(byteBuffer, entry.moofOffset);
}
IsoTypeWriterVariable.write(entry.trafNumber, byteBuffer, lengthSizeOfTrafNum);
IsoTypeWriterVariable.write(entry.trunNumber, byteBuffer, lengthSizeOfTrunNum);
IsoTypeWriterVariable.write(entry.sampleNumber, byteBuffer, lengthSizeOfSampleNum);
}
}
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:27,代码来源:TrackFragmentRandomAccessBox.java
示例7: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
protected void getContent(ByteBuffer byteBuffer) {
writeVersionAndFlags(byteBuffer);
IsoTypeWriter.writeUInt32(byteBuffer, trackId);
if ((getFlags() & 0x1) == 1) { //baseDataOffsetPresent
IsoTypeWriter.writeUInt64(byteBuffer, getBaseDataOffset());
}
if ((getFlags() & 0x2) == 0x2) { //sampleDescriptionIndexPresent
IsoTypeWriter.writeUInt32(byteBuffer, getSampleDescriptionIndex());
}
if ((getFlags() & 0x8) == 0x8) { //defaultSampleDurationPresent
IsoTypeWriter.writeUInt32(byteBuffer, getDefaultSampleDuration());
}
if ((getFlags() & 0x10) == 0x10) { //defaultSampleSizePresent
IsoTypeWriter.writeUInt32(byteBuffer, getDefaultSampleSize());
}
if ((getFlags() & 0x20) == 0x20) { //defaultSampleFlagsPresent
defaultSampleFlags.getContent(byteBuffer);
}
}
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:21,代码来源:TrackFragmentHeaderBox.java
示例8: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
public void getContent(ByteBuffer bb) {
IsoTypeWriter.writeUInt16(bb, itemId);
if (getVersion() == 1) {
IsoTypeWriter.writeUInt16(bb, constructionMethod);
}
IsoTypeWriter.writeUInt16(bb, dataReferenceIndex);
if (baseOffsetSize > 0) {
IsoTypeWriterVariable.write(baseOffset, bb, baseOffsetSize);
}
IsoTypeWriter.writeUInt16(bb, extents.size());
for (Extent extent : extents) {
extent.getContent(bb);
}
}
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:19,代码来源:ItemLocationBox.java
示例9: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
writeVersionAndFlags(byteBuffer);
if ((getFlags() & 1) == 1) {
byteBuffer.put(IsoFile.fourCCtoBytes(auxInfoType));
byteBuffer.put(IsoFile.fourCCtoBytes(auxInfoTypeParameter));
}
IsoTypeWriter.writeUInt8(byteBuffer, defaultSampleInfoSize);
if (defaultSampleInfoSize == 0) {
IsoTypeWriter.writeUInt32(byteBuffer, sampleInfoSizes.size());
for (short sampleInfoSize : sampleInfoSizes) {
IsoTypeWriter.writeUInt8(byteBuffer, sampleInfoSize);
}
} else {
IsoTypeWriter.writeUInt32(byteBuffer, sampleCount);
}
}
开发者ID:lisnstatic,项目名称:live_master,代码行数:20,代码来源:SampleAuxiliaryInformationSizesBox.java
示例10: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
writeVersionAndFlags(byteBuffer);
IsoTypeWriter.writeUInt32(byteBuffer, entries.size());
for (SampleEntry sampleEntry : entries) {
IsoTypeWriter.writeUInt32(byteBuffer, sampleEntry.getSampleDelta());
IsoTypeWriter.writeUInt16(byteBuffer, sampleEntry.getSubsampleCount());
List<SampleEntry.SubsampleEntry> subsampleEntries = sampleEntry.getSubsampleEntries();
for (SampleEntry.SubsampleEntry subsampleEntry : subsampleEntries) {
if (getVersion() == 1) {
IsoTypeWriter.writeUInt32(byteBuffer, subsampleEntry.getSubsampleSize());
} else {
IsoTypeWriter.writeUInt16(byteBuffer, l2i(subsampleEntry.getSubsampleSize()));
}
IsoTypeWriter.writeUInt8(byteBuffer, subsampleEntry.getSubsamplePriority());
IsoTypeWriter.writeUInt8(byteBuffer, subsampleEntry.getDiscardable());
IsoTypeWriter.writeUInt32(byteBuffer, subsampleEntry.getReserved());
}
}
}
开发者ID:lisnstatic,项目名称:live_master,代码行数:21,代码来源:SubSampleInformationBox.java
示例11: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
public void getContent(ByteBuffer byteBuffer) {
writeVersionAndFlags(byteBuffer);
if (getVersion() == 1) {
IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(creationTime));
IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(modificationTime));
IsoTypeWriter.writeUInt32(byteBuffer, trackId);
IsoTypeWriter.writeUInt32(byteBuffer, 0);
IsoTypeWriter.writeUInt64(byteBuffer, duration);
} else {
IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(creationTime));
IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(modificationTime));
IsoTypeWriter.writeUInt32(byteBuffer, trackId);
IsoTypeWriter.writeUInt32(byteBuffer, 0);
IsoTypeWriter.writeUInt32(byteBuffer, duration);
} // 196
IsoTypeWriter.writeUInt32(byteBuffer, 0);
IsoTypeWriter.writeUInt32(byteBuffer, 0);
IsoTypeWriter.writeUInt16(byteBuffer, layer);
IsoTypeWriter.writeUInt16(byteBuffer, alternateGroup);
IsoTypeWriter.writeFixedPont88(byteBuffer, volume);
IsoTypeWriter.writeUInt16(byteBuffer, 0);
matrix.getContent(byteBuffer);
IsoTypeWriter.writeFixedPoint1616(byteBuffer, width);
IsoTypeWriter.writeFixedPoint1616(byteBuffer, height);
}
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:26,代码来源:TrackHeaderBox.java
示例12: serialize
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
public ByteBuffer serialize() {
ByteBuffer out = ByteBuffer.allocate(serializedSize()); // Usually is around 30 bytes, so 200 should be enough...
IsoTypeWriter.writeUInt8(out, 3);
IsoTypeWriter.writeUInt8(out, serializedSize() - 2); // Not OK for longer sizes!
IsoTypeWriter.writeUInt16(out, esId);
int flags = (streamDependenceFlag << 7) | (URLFlag << 6) | (oCRstreamFlag << 5) | (streamPriority & 0x1f);
IsoTypeWriter.writeUInt8(out, flags);
if (streamDependenceFlag > 0) {
IsoTypeWriter.writeUInt16(out, dependsOnEsId);
}
if (URLFlag > 0) {
IsoTypeWriter.writeUInt8(out, URLLength);
IsoTypeWriter.writeUtf8String(out, URLString);
}
if (oCRstreamFlag > 0) {
IsoTypeWriter.writeUInt16(out, oCREsId);
}
ByteBuffer dec = decoderConfigDescriptor.serialize();
ByteBuffer sl = slConfigDescriptor.serialize();
out.put(dec.array());
out.put(sl.array());
// Doesn't handle other descriptors yet
return out;
}
开发者ID:lisnstatic,项目名称:live_master,代码行数:28,代码来源:ESDescriptor.java
示例13: getBox
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
public void getBox(WritableByteChannel writableByteChannel) throws IOException {
ByteBuffer bb = ByteBuffer.allocate(16);
long size = getSize();
if (isSmallBox(size)) {
IsoTypeWriter.writeUInt32(bb, size);
} else {
IsoTypeWriter.writeUInt32(bb, 1);
}
bb.put(IsoFile.fourCCtoBytes("mdat"));
if (isSmallBox(size)) {
bb.put(new byte[8]);
} else {
IsoTypeWriter.writeUInt64(bb, size);
}
bb.rewind();
writableByteChannel.write(bb);
if (writableByteChannel instanceof GatheringByteChannel) {
List<ByteBuffer> nuSamples = unifyAdjacentBuffers(samples);
for (int i = 0; i < Math.ceil((double) nuSamples.size() / STEPSIZE); i++) {
List<ByteBuffer> sublist = nuSamples.subList(
i * STEPSIZE, // start
(i + 1) * STEPSIZE < nuSamples.size() ? (i + 1) * STEPSIZE : nuSamples.size()); // end
ByteBuffer sampleArray[] = sublist.toArray(new ByteBuffer[sublist.size()]);
do {
((GatheringByteChannel) writableByteChannel).write(sampleArray);
} while (sampleArray[sampleArray.length - 1].remaining() > 0);
}
//System.err.println(bytesWritten);
} else {
for (ByteBuffer sample : samples) {
sample.rewind();
writableByteChannel.write(sample);
}
}
}
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:38,代码来源:DefaultMp4Builder.java
示例14: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
public void getContent(ByteBuffer byteBuffer) {
IsoTypeWriter.writeFixedPoint1616(byteBuffer, a);
IsoTypeWriter.writeFixedPoint1616(byteBuffer, b);
IsoTypeWriter.writeFixedPoint0230(byteBuffer, u);
IsoTypeWriter.writeFixedPoint1616(byteBuffer, c);
IsoTypeWriter.writeFixedPoint1616(byteBuffer, d);
IsoTypeWriter.writeFixedPoint0230(byteBuffer, v);
IsoTypeWriter.writeFixedPoint1616(byteBuffer, tx);
IsoTypeWriter.writeFixedPoint1616(byteBuffer, ty);
IsoTypeWriter.writeFixedPoint0230(byteBuffer, w);
}
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:15,代码来源:Matrix.java
示例15: get
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
@Override
public ByteBuffer get() {
ByteBuffer byteBuffer = ByteBuffer.allocate(20);
IsoTypeWriter.writeUInt24(byteBuffer, isEncrypted);
IsoTypeWriter.writeUInt8(byteBuffer, ivSize);
byteBuffer.put(kid);
byteBuffer.rewind();
return byteBuffer;
}
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:10,代码来源:CencSampleEncryptionInformationGroupEntry.java
示例16: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
writeVersionAndFlags(byteBuffer);
if (getVersion() == 1) {
IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(creationTime));
IsoTypeWriter.writeUInt64(byteBuffer, DateHelper.convert(modificationTime));
IsoTypeWriter.writeUInt32(byteBuffer, timescale);
IsoTypeWriter.writeUInt64(byteBuffer, duration);
} else {
IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(creationTime));
IsoTypeWriter.writeUInt32(byteBuffer, DateHelper.convert(modificationTime));
IsoTypeWriter.writeUInt32(byteBuffer, timescale);
IsoTypeWriter.writeUInt32(byteBuffer, duration);
}
IsoTypeWriter.writeFixedPoint1616(byteBuffer, rate);
IsoTypeWriter.writeFixedPont88(byteBuffer, volume);
IsoTypeWriter.writeUInt16(byteBuffer, 0);
IsoTypeWriter.writeUInt32(byteBuffer, 0);
IsoTypeWriter.writeUInt32(byteBuffer, 0);
matrix.getContent(byteBuffer);
byteBuffer.putInt(previewTime);
byteBuffer.putInt(previewDuration);
byteBuffer.putInt(posterTime);
byteBuffer.putInt(selectionTime);
byteBuffer.putInt(selectionDuration);
byteBuffer.putInt(currentTime);
IsoTypeWriter.writeUInt32(byteBuffer, nextTrackId);
}
开发者ID:lisnstatic,项目名称:live_master,代码行数:32,代码来源:MovieHeaderBox.java
示例17: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
writeVersionAndFlags(byteBuffer);
byteBuffer.put(groupingType.getBytes());
if (this.getVersion() == 1) {
byteBuffer.put(groupingTypeParameter.getBytes());
}
IsoTypeWriter.writeUInt32(byteBuffer, entries.size());
for (Entry entry : entries) {
IsoTypeWriter.writeUInt32(byteBuffer, entry.getSampleCount());
IsoTypeWriter.writeUInt32(byteBuffer, entry.getGroupDescriptionIndex());
}
}
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:15,代码来源:SampleToGroupBox.java
示例18: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
writeVersionAndFlags(byteBuffer);
if (getVersion() == 1) {
IsoTypeWriter.writeUInt64(byteBuffer, baseMediaDecodeTime);
} else {
IsoTypeWriter.writeUInt32(byteBuffer, baseMediaDecodeTime);
}
}
开发者ID:lisnstatic,项目名称:live_master,代码行数:10,代码来源:TrackFragmentBaseMediaDecodeTimeBox.java
示例19: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
writeVersionAndFlags(byteBuffer);
IsoTypeWriter.writeUInt32(byteBuffer, shouldBeZeroButAppleWritesHereSomeValue);
byteBuffer.put(IsoFile.fourCCtoBytes(handlerType));
IsoTypeWriter.writeUInt32(byteBuffer, a);
IsoTypeWriter.writeUInt32(byteBuffer, b);
IsoTypeWriter.writeUInt32(byteBuffer, c);
if (name != null) {
byteBuffer.put(Utf8.convert(name));
}
if (zeroTerm) {
byteBuffer.put((byte) 0);
}
}
开发者ID:lisnstatic,项目名称:live_master,代码行数:16,代码来源:HandlerBox.java
示例20: getContent
import com.coremedia.iso.IsoTypeWriter; //导入依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
writeVersionAndFlags(byteBuffer);
IsoTypeWriter.writeUInt32(byteBuffer, sampleNumber.length);
for (long aSampleNumber : sampleNumber) {
IsoTypeWriter.writeUInt32(byteBuffer, aSampleNumber);
}
}
开发者ID:lisnstatic,项目名称:live_master,代码行数:12,代码来源:SyncSampleBox.java
注:本文中的com.coremedia.iso.IsoTypeWriter类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论