当前位置: 首页>>代码示例>>Java>>正文


Java IsoTypeWriter.writeUInt16方法代码示例

本文整理汇总了Java中com.coremedia.iso.IsoTypeWriter.writeUInt16方法的典型用法代码示例。如果您正苦于以下问题:Java IsoTypeWriter.writeUInt16方法的具体用法?Java IsoTypeWriter.writeUInt16怎么用?Java IsoTypeWriter.writeUInt16使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.coremedia.iso.IsoTypeWriter的用法示例。


在下文中一共展示了IsoTypeWriter.writeUInt16方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: 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

示例2: 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:lisnstatic,项目名称:live_master,代码行数:27,代码来源:SegmentIndexBox.java

示例3: getContent

import com.coremedia.iso.IsoTypeWriter; //导入方法依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
    _writeReservedAndDataReferenceIndex(byteBuffer);
    byteBuffer.putInt(displayFlags);
    byteBuffer.putInt(textJustification);
    IsoTypeWriter.writeUInt16(byteBuffer, backgroundR);
    IsoTypeWriter.writeUInt16(byteBuffer, backgroundG);
    IsoTypeWriter.writeUInt16(byteBuffer, backgroundB);
    IsoTypeWriter.writeUInt64(byteBuffer, defaultTextBox);
    IsoTypeWriter.writeUInt64(byteBuffer, reserved1);
    byteBuffer.putShort(fontNumber);
    byteBuffer.putShort(fontFace);
    byteBuffer.put(reserved2);
    byteBuffer.putShort(reserved3);

    IsoTypeWriter.writeUInt16(byteBuffer, foregroundR);
    IsoTypeWriter.writeUInt16(byteBuffer, foregroundG);
    IsoTypeWriter.writeUInt16(byteBuffer, foregroundB);
    if (fontName != null) {
        IsoTypeWriter.writeUInt8(byteBuffer, fontName.length());
        byteBuffer.put(fontName.getBytes());
    }

}
 
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:25,代码来源:QuicktimeTextSampleEntry.java

示例4: 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:lisnstatic,项目名称:live_master,代码行数:19,代码来源:ItemLocationBox.java

示例5: 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

示例6: 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

示例7: getContent

import com.coremedia.iso.IsoTypeWriter; //导入方法依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
    writeVersionAndFlags(byteBuffer);
    IsoTypeWriter.writeUInt16(byteBuffer, maxPduSize);
    IsoTypeWriter.writeUInt16(byteBuffer, avgPduSize);
    IsoTypeWriter.writeUInt32(byteBuffer, maxBitrate);
    IsoTypeWriter.writeUInt32(byteBuffer, avgBitrate);
    IsoTypeWriter.writeUInt32(byteBuffer, 0);
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:10,代码来源:HintMediaHeaderBox.java

示例8: 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

示例9: getContent

import com.coremedia.iso.IsoTypeWriter; //导入方法依赖的package包/类
public void getContent(ByteBuffer bb) {
    IsoTypeWriter.writeUInt16(bb, startChar);
    IsoTypeWriter.writeUInt16(bb, endChar);
    IsoTypeWriter.writeUInt16(bb, fontId);
    IsoTypeWriter.writeUInt8(bb, faceStyleFlags);
    IsoTypeWriter.writeUInt8(bb, fontSize);
    IsoTypeWriter.writeUInt8(bb, textColor[0]);
    IsoTypeWriter.writeUInt8(bb, textColor[1]);
    IsoTypeWriter.writeUInt8(bb, textColor[2]);
    IsoTypeWriter.writeUInt8(bb, textColor[3]);
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:12,代码来源:TextSampleEntry.java

示例10: setValue

import com.coremedia.iso.IsoTypeWriter; //导入方法依赖的package包/类
public void setValue(String value) {
    if (appleDataBox.getFlags() == 1) {
        appleDataBox = new AppleDataBox();
        appleDataBox.setVersion(0);
        appleDataBox.setFlags(1);
        appleDataBox.setFourBytes(new byte[4]);
        appleDataBox.setData(Utf8.convert(value));
    } else if (appleDataBox.getFlags() == 21) {
        byte[] content = appleDataBox.getData();
        appleDataBox = new AppleDataBox();
        appleDataBox.setVersion(0);
        appleDataBox.setFlags(21);
        appleDataBox.setFourBytes(new byte[4]);

        ByteBuffer bb = ByteBuffer.allocate(content.length);
        if (content.length == 1) {
            IsoTypeWriter.writeUInt8(bb, (Byte.parseByte(value) & 0xFF));
        } else if (content.length == 2) {
            IsoTypeWriter.writeUInt16(bb, Integer.parseInt(value));
        } else if (content.length == 4) {
            IsoTypeWriter.writeUInt32(bb, Long.parseLong(value));
        } else if (content.length == 8) {
            IsoTypeWriter.writeUInt64(bb, Long.parseLong(value));
        } else {
            throw new Error("The content length within the appleDataBox is neither 1, 2, 4 or 8. I can't handle that!");
        }
        appleDataBox.setData(bb.array());
    } else if (appleDataBox.getFlags() == 0) {
        appleDataBox = new AppleDataBox();
        appleDataBox.setVersion(0);
        appleDataBox.setFlags(0);
        appleDataBox.setFourBytes(new byte[4]);
        appleDataBox.setData(hexStringToByteArray(value));

    } else {
        LOG.warning("Don't know how to handle appleDataBox with flag=" + appleDataBox.getFlags());
    }
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:39,代码来源:AbstractAppleMetaDataBox.java

示例11: getContent

import com.coremedia.iso.IsoTypeWriter; //导入方法依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
    byteBuffer.put(IsoFile.fourCCtoBytes(classificationEntity));
    IsoTypeWriter.writeUInt16(byteBuffer, classificationTableIndex);
    IsoTypeWriter.writeIso639(byteBuffer, language);
    byteBuffer.put(Utf8.convert(classificationInfo));
    byteBuffer.put((byte) 0);
}
 
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:9,代码来源:ClassificationBox.java

示例12: getContent

import com.coremedia.iso.IsoTypeWriter; //导入方法依赖的package包/类
public void getContent(ByteBuffer byteBuffer) {
    IsoTypeWriter.writeUInt8(byteBuffer, configurationVersion);
    IsoTypeWriter.writeUInt8(byteBuffer, avcProfileIndication);
    IsoTypeWriter.writeUInt8(byteBuffer, profileCompatibility);
    IsoTypeWriter.writeUInt8(byteBuffer, avcLevelIndication);
    BitWriterBuffer bwb = new BitWriterBuffer(byteBuffer);
    bwb.writeBits(lengthSizeMinusOnePaddingBits, 6);
    bwb.writeBits(lengthSizeMinusOne, 2);
    bwb.writeBits(numberOfSequenceParameterSetsPaddingBits, 3);
    bwb.writeBits(pictureParameterSets.size(), 5);
    for (byte[] sequenceParameterSetNALUnit : sequenceParameterSets) {
        IsoTypeWriter.writeUInt16(byteBuffer, sequenceParameterSetNALUnit.length);
        byteBuffer.put(sequenceParameterSetNALUnit);
    }
    IsoTypeWriter.writeUInt8(byteBuffer, pictureParameterSets.size());
    for (byte[] pictureParameterSetNALUnit : pictureParameterSets) {
        IsoTypeWriter.writeUInt16(byteBuffer, pictureParameterSetNALUnit.length);
        byteBuffer.put(pictureParameterSetNALUnit);
    }
    if (hasExts && (avcProfileIndication == 100 || avcProfileIndication == 110 || avcProfileIndication == 122 || avcProfileIndication == 144)) {

        bwb = new BitWriterBuffer(byteBuffer);
        bwb.writeBits(chromaFormatPaddingBits, 6);
        bwb.writeBits(chromaFormat, 2);
        bwb.writeBits(bitDepthLumaMinus8PaddingBits, 5);
        bwb.writeBits(bitDepthLumaMinus8, 3);
        bwb.writeBits(bitDepthChromaMinus8PaddingBits, 5);
        bwb.writeBits(bitDepthChromaMinus8, 3);
        for (byte[] sequenceParameterSetExtNALUnit : sequenceParameterSetExts) {
            IsoTypeWriter.writeUInt16(byteBuffer, sequenceParameterSetExtNALUnit.length);
            byteBuffer.put(sequenceParameterSetExtNALUnit);
        }
    }
}
 
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:35,代码来源:AvcConfigurationBox.java

示例13: getContent

import com.coremedia.iso.IsoTypeWriter; //导入方法依赖的package包/类
public void getContent(ByteBuffer byteBuffer) {
    byteBuffer.put(IsoFile.fourCCtoBytes(vendor));
    IsoTypeWriter.writeUInt8(byteBuffer, decoderVersion);
    IsoTypeWriter.writeUInt16(byteBuffer, modeSet);
    IsoTypeWriter.writeUInt8(byteBuffer, modeChangePeriod);
    IsoTypeWriter.writeUInt8(byteBuffer, framesPerSample);
}
 
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:8,代码来源:AmrSpecificBox.java

示例14: getContent

import com.coremedia.iso.IsoTypeWriter; //导入方法依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
    writeVersionAndFlags(byteBuffer);
    IsoTypeWriter.writeUInt16(byteBuffer, recordingYear);
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:6,代码来源:RecordingYearBox.java

示例15: getContent

import com.coremedia.iso.IsoTypeWriter; //导入方法依赖的package包/类
@Override
protected void getContent(ByteBuffer byteBuffer) {
    writeVersionAndFlags(byteBuffer);
    IsoTypeWriter.writeUInt16(byteBuffer, getBoxes().size());
    writeChildBoxes(byteBuffer);
}
 
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:7,代码来源:ItemProtectionBox.java


注:本文中的com.coremedia.iso.IsoTypeWriter.writeUInt16方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。