• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java SampleDescriptionBox类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



SampleDescriptionBox类属于com.coremedia.iso.boxes包,在下文中一共展示了SampleDescriptionBox类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: TextTrackImpl

import com.coremedia.iso.boxes.SampleDescriptionBox; //导入依赖的package包/类
public TextTrackImpl() {
    sampleDescriptionBox = new SampleDescriptionBox();
    TextSampleEntry tx3g = new TextSampleEntry("tx3g");
    tx3g.setDataReferenceIndex(1);
    tx3g.setStyleRecord(new TextSampleEntry.StyleRecord());
    tx3g.setBoxRecord(new TextSampleEntry.BoxRecord());
    sampleDescriptionBox.addBox(tx3g);

    FontTableBox ftab = new FontTableBox();
    ftab.setEntries(Collections.singletonList(new FontTableBox.FontRecord(1, "Serif")));

    tx3g.addBox(ftab);


    trackMetaData.setCreationTime(new Date());
    trackMetaData.setModificationTime(new Date());
    trackMetaData.setTimescale(1000); // Text tracks use millieseconds


}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:21,代码来源:TextTrackImpl.java


示例2: getSampleDescriptionBox

import com.coremedia.iso.boxes.SampleDescriptionBox; //导入依赖的package包/类
public SampleDescriptionBox getSampleDescriptionBox() {
    SampleDescriptionBox stsd = new SampleDescriptionBox();
    ActionMessageFormat0SampleEntryBox amf0 = new ActionMessageFormat0SampleEntryBox();
    amf0.setDataReferenceIndex(1);
    stsd.addBox(amf0);
    return stsd;
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:8,代码来源:Amf0Track.java


示例3: parse

import com.coremedia.iso.boxes.SampleDescriptionBox; //导入依赖的package包/类
private void parse(InputStream fin) throws IOException {
    inputStream = fin;
    bitRateAndFrameSizeTable = new int[19][2][3][2];
    stts = new LinkedList<TimeToSampleBox.Entry>();
    initBitRateAndFrameSizeTable();
    if (!readVariables()) {
        throw new IOException();
    }

    sampleDescriptionBox = new SampleDescriptionBox();
    AudioSampleEntry audioSampleEntry = new AudioSampleEntry("ac-3");
    audioSampleEntry.setChannelCount(2);  // According to  ETSI TS 102 366 Annex F
    audioSampleEntry.setSampleRate(samplerate);
    audioSampleEntry.setDataReferenceIndex(1);
    audioSampleEntry.setSampleSize(16);

    AC3SpecificBox ac3 = new AC3SpecificBox();
    ac3.setAcmod(acmod);
    ac3.setBitRateCode(frmsizecod >> 1);
    ac3.setBsid(bsid);
    ac3.setBsmod(bsmod);
    ac3.setFscod(fscod);
    ac3.setLfeon(lfeon);
    ac3.setReserved(0);

    audioSampleEntry.addBox(ac3);
    sampleDescriptionBox.addBox(audioSampleEntry);

    trackMetaData.setCreationTime(new Date());
    trackMetaData.setModificationTime(new Date());
    trackMetaData.setLanguage(lang);
    trackMetaData.setTimescale(samplerate); // Audio tracks always use samplerate as timescale

    samples = new LinkedList<ByteBuffer>();
    if (!readSamples()) {
        throw new IOException();
    }
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:39,代码来源:AC3TrackImpl.java


示例4: AppendTrack

import com.coremedia.iso.boxes.SampleDescriptionBox; //导入依赖的package包/类
public AppendTrack(Track... tracks) throws IOException {
    this.tracks = tracks;

    for (Track track : tracks) {

        if (stsd == null) {
            stsd = track.getSampleDescriptionBox();
        } else {
            ByteArrayOutputStream curBaos = new ByteArrayOutputStream();
            ByteArrayOutputStream refBaos = new ByteArrayOutputStream();
            track.getSampleDescriptionBox().getBox(Channels.newChannel(curBaos));
            stsd.getBox(Channels.newChannel(refBaos));
            byte[] cur = curBaos.toByteArray();
            byte[] ref = refBaos.toByteArray();

            if (!Arrays.equals(ref, cur)) {
                SampleDescriptionBox curStsd = track.getSampleDescriptionBox();
                if (stsd.getBoxes().size() == 1 && curStsd.getBoxes().size() == 1) {
                    if (stsd.getBoxes().get(0) instanceof AudioSampleEntry && curStsd.getBoxes().get(0) instanceof AudioSampleEntry) {
                        AudioSampleEntry aseResult = mergeAudioSampleEntries((AudioSampleEntry) stsd.getBoxes().get(0), (AudioSampleEntry) curStsd.getBoxes().get(0));
                        if (aseResult != null) {
                            stsd.setBoxes(Collections.<Box>singletonList(aseResult));
                            return;
                        }
                    }
                }
                throw new IOException("Cannot append " + track + " to " + tracks[0] + " since their Sample Description Boxes differ: \n" + track.getSampleDescriptionBox() + "\n vs. \n" + tracks[0].getSampleDescriptionBox());
            }
        }
    }
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:32,代码来源:AppendTrack.java


示例5: getSampleDescriptionBox

import com.coremedia.iso.boxes.SampleDescriptionBox; //导入依赖的package包/类
public SampleDescriptionBox getSampleDescriptionBox() {
    return sampleDescriptionBox;
}
 
开发者ID:MLNO,项目名称:airgram,代码行数:4,代码来源:Track.java


示例6: parse

import com.coremedia.iso.boxes.SampleDescriptionBox; //导入依赖的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);
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:51,代码来源:H264TrackImpl.java


示例7: getSampleDescriptionBox

import com.coremedia.iso.boxes.SampleDescriptionBox; //导入依赖的package包/类
public SampleDescriptionBox getSampleDescriptionBox() {
    return source.getSampleDescriptionBox();
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:4,代码来源:MultiplyTimeScaleTrack.java


示例8: getSampleDescriptionBox

import com.coremedia.iso.boxes.SampleDescriptionBox; //导入依赖的package包/类
public SampleDescriptionBox getSampleDescriptionBox() {
    return origTrack.getSampleDescriptionBox();
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:4,代码来源:CroppedTrack.java


示例9: getSampleDescriptionBox

import com.coremedia.iso.boxes.SampleDescriptionBox; //导入依赖的package包/类
public SampleDescriptionBox getSampleDescriptionBox() {
    return stsd;
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:4,代码来源:AppendTrack.java


示例10: LoadSpecificBox

import com.coremedia.iso.boxes.SampleDescriptionBox; //导入依赖的package包/类
private void LoadSpecificBox( SampleDescriptionBox box ) {
   addViewForValue( "Version:", box.getVersion() );
   addViewForValue( "Flags:", box.getFlags() );
   addViewForValue( "Size:", box.getSize() );
}
 
开发者ID:hoolrory,项目名称:VideoInfoViewer,代码行数:6,代码来源:BoxInfoView.java


示例11: QuicktimeTextTrackImpl

import com.coremedia.iso.boxes.SampleDescriptionBox; //导入依赖的package包/类
public QuicktimeTextTrackImpl() {
    sampleDescriptionBox = new SampleDescriptionBox();
    QuicktimeTextSampleEntry textTrack = new QuicktimeTextSampleEntry();
    textTrack.setDataReferenceIndex(1);
    sampleDescriptionBox.addBox(textTrack);


    trackMetaData.setCreationTime(new Date());
    trackMetaData.setModificationTime(new Date());
    trackMetaData.setTimescale(1000);


}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:14,代码来源:QuicktimeTextTrackImpl.java


示例12: getSampleDescriptionBox

import com.coremedia.iso.boxes.SampleDescriptionBox; //导入依赖的package包/类
SampleDescriptionBox getSampleDescriptionBox(); 
开发者ID:lisnstatic,项目名称:live_master,代码行数:2,代码来源:Track.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java UMessage类代码示例发布时间:2022-05-22
下一篇:
Java RMNodeEvent类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap