本文整理汇总了Java中com.coremedia.iso.boxes.sampleentry.VisualSampleEntry.setWidth方法的典型用法代码示例。如果您正苦于以下问题:Java VisualSampleEntry.setWidth方法的具体用法?Java VisualSampleEntry.setWidth怎么用?Java VisualSampleEntry.setWidth使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.coremedia.iso.boxes.sampleentry.VisualSampleEntry
的用法示例。
在下文中一共展示了VisualSampleEntry.setWidth方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: parse
import com.coremedia.iso.boxes.sampleentry.VisualSampleEntry; //导入方法依赖的package包/类
private void parse(InputStream inputStream) throws IOException {
this.reader = new ReaderWrapper(inputStream);
stts = new LinkedList<TimeToSampleBox.Entry>();
ctts = new LinkedList<CompositionTimeToSample.Entry>();
sdtp = new LinkedList<SampleDependencyTypeBox.Entry>();
stss = new LinkedList<Integer>();
samples = new LinkedList<ByteBuffer>();
if (!readSamples()) {
throw new IOException();
}
if (!readVariables()) {
throw new IOException();
}
sampleDescriptionBox = new SampleDescriptionBox();
VisualSampleEntry visualSampleEntry = new VisualSampleEntry("avc1");
visualSampleEntry.setDataReferenceIndex(1);
visualSampleEntry.setDepth(24);
visualSampleEntry.setFrameCount(1);
visualSampleEntry.setHorizresolution(72);
visualSampleEntry.setVertresolution(72);
visualSampleEntry.setWidth(width);
visualSampleEntry.setHeight(height);
visualSampleEntry.setCompressorname("AVC Coding");
AvcConfigurationBox avcConfigurationBox = new AvcConfigurationBox();
avcConfigurationBox.setSequenceParameterSets(seqParameterSetList);
avcConfigurationBox.setPictureParameterSets(pictureParameterSetList);
avcConfigurationBox.setAvcLevelIndication(seqParameterSet.level_idc);
avcConfigurationBox.setAvcProfileIndication(seqParameterSet.profile_idc);
avcConfigurationBox.setBitDepthLumaMinus8(seqParameterSet.bit_depth_luma_minus8);
avcConfigurationBox.setBitDepthChromaMinus8(seqParameterSet.bit_depth_chroma_minus8);
avcConfigurationBox.setChromaFormat(seqParameterSet.chroma_format_idc.getId());
avcConfigurationBox.setConfigurationVersion(1);
avcConfigurationBox.setLengthSizeMinusOne(3);
avcConfigurationBox.setProfileCompatibility(seqParameterSetList.get(0)[1]);
visualSampleEntry.addBox(avcConfigurationBox);
sampleDescriptionBox.addBox(visualSampleEntry);
trackMetaData.setCreationTime(new Date());
trackMetaData.setModificationTime(new Date());
trackMetaData.setLanguage(lang);
trackMetaData.setTimescale(timescale);
trackMetaData.setWidth(width);
trackMetaData.setHeight(height);
}