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

Java BoxParser类代码示例

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

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



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

示例1: parse

import com.coremedia.iso.BoxParser; //导入依赖的package包/类
/**
 * Read the box's content from a byte channel without parsing it. Parsing is done on-demand.
 *
 * @param readableByteChannel the (part of the) iso file to parse
 * @param contentSize         expected contentSize of the box
 * @param boxParser           creates inner boxes
 * @throws IOException in case of an I/O error.
 */
@DoNotParseDetail
public void parse(ReadableByteChannel readableByteChannel, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {
    if (readableByteChannel instanceof FileChannel && contentSize > MEM_MAP_THRESHOLD) {
        // todo: if I map this here delayed I could use transferFrom/transferTo in the getBox method
        // todo: potentially this could speed up writing.
        //
        // It's quite expensive to map a file into the memory. Just do it when the box is larger than a MB.
        content = ((FileChannel) readableByteChannel).map(FileChannel.MapMode.READ_ONLY, ((FileChannel) readableByteChannel).position(), contentSize);
        ((FileChannel) readableByteChannel).position(((FileChannel) readableByteChannel).position() + contentSize);
    } else {
        assert contentSize < Integer.MAX_VALUE;
        content = ChannelHelper.readFully(readableByteChannel, contentSize);
    }
    if (isParsed() == false) {
        parseDetails();
    }

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


示例2: listBoxes

import com.coremedia.iso.BoxParser; //导入依赖的package包/类
private static void listBoxes(Object box, BoxParser boxParser, int level) {
    StringBuilder space = new StringBuilder();
    for (int i = 0; i < level; i++) {
        System.out.print("  ");
    }

    if (box instanceof Container) {
        System.out.println(space.toString() + boxSize(box) + box);
        Container container = (Container) box;
        for (Box item : container.getBoxes()) {
            listBoxes(item, boxParser, level + 1);
        }
    } else if (box instanceof Box) {
        System.out.println(boxSize((Box) box) + space.toString() + box);
    } else {
        System.out.println("---->" + box);
    }
}
 
开发者ID:chenxiuheng,项目名称:httpstreams,代码行数:19,代码来源:ListBoxes.java


示例3: parse

import com.coremedia.iso.BoxParser; //导入依赖的package包/类
public void parse(ReadableByteChannel readableByteChannel, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {
    if (readableByteChannel instanceof FileChannel && contentSize > 1024 * 1024) {
        // It's quite expensive to map a file into the memory. Just do it when the box is larger than a MB.
        data = ((FileChannel) readableByteChannel).map(FileChannel.MapMode.READ_ONLY, ((FileChannel) readableByteChannel).position(), contentSize);
        ((FileChannel) readableByteChannel).position(((FileChannel) readableByteChannel).position() + contentSize);
    } else {
        assert contentSize < Integer.MAX_VALUE;
        data = ChannelHelper.readFully(readableByteChannel, contentSize);
    }
}
 
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:11,代码来源:FreeBox.java


示例4: parse

import com.coremedia.iso.BoxParser; //导入依赖的package包/类
public void parse(ReadableByteChannel readableByteChannel, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {
    this.header = header;
    this.contentSize = contentSize;

    if (readableByteChannel instanceof FileChannel && (contentSize > AbstractBox.MEM_MAP_THRESHOLD)) {
        this.fileChannel = ((FileChannel) readableByteChannel);
        this.startPosition = ((FileChannel) readableByteChannel).position();
        ((FileChannel) readableByteChannel).position(((FileChannel) readableByteChannel).position() + contentSize);
    } else {
        content = ChannelHelper.readFully(readableByteChannel, l2i(contentSize));
        cache.put(0l, new SoftReference<ByteBuffer>(content));
    }
}
 
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:14,代码来源:MediaDataBox.java


示例5: main

import com.coremedia.iso.BoxParser; //导入依赖的package包/类
public static void main(String[] args) throws IOException {
    IsoFile file =
            new IsoFile("D:/Thunisoft/MyEclipse/workspaces/ͳһ����Ƶƽ̨/streamer/web/mp4/test1.mp4");


    BoxParser boxParser = new PropertyBoxParserImpl();
    listBoxes(file, boxParser, 1);
}
 
开发者ID:chenxiuheng,项目名称:httpstreams,代码行数:9,代码来源:ListBoxes.java


示例6: parse

import com.coremedia.iso.BoxParser; //导入依赖的package包/类
@Override
public void parse(ReadableByteChannel readableByteChannel, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {
    this.boxParser = boxParser;
    super.parse(readableByteChannel, header, contentSize, boxParser);

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


示例7: parse

import com.coremedia.iso.BoxParser; //导入依赖的package包/类
@Override
public void parse(ReadableByteChannel readableByteChannel, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {
    this.boxParser = boxParser;
    super.parse(readableByteChannel, header, contentSize, boxParser);
}
 
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:6,代码来源:AbstractContainerBox.java


示例8: parse

import com.coremedia.iso.BoxParser; //导入依赖的package包/类
public void parse(ReadableByteChannel readableByteChannel, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {
}
 
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:3,代码来源:DefaultMp4Builder.java


示例9: parse

import com.coremedia.iso.BoxParser; //导入依赖的package包/类
@Override
public void parse(ReadableByteChannel readableByteChannel, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {
    super.parse(readableByteChannel, header, contentSize, boxParser);    //To change body of overridden methods use File | Settings | File Templates.
}
 
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:5,代码来源:UserDataBox.java


示例10: setBoxParser

import com.coremedia.iso.BoxParser; //导入依赖的package包/类
public void setBoxParser(BoxParser boxParser) {
    this.boxParser = boxParser;
}
 
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:4,代码来源:AudioSampleEntry.java


示例11: parse

import com.coremedia.iso.BoxParser; //导入依赖的package包/类
@Override
public void parse(ReadableByteChannel readableByteChannel, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {
}
 
开发者ID:lisnstatic,项目名称:live_master,代码行数:4,代码来源:SrsMp4Muxer.java


示例12: parse

import com.coremedia.iso.BoxParser; //导入依赖的package包/类
@Override
public void parse(DataSource dataSource, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException {

}
 
开发者ID:MLNO,项目名称:airgram,代码行数:5,代码来源:MP4Builder.java


示例13: parse

import com.coremedia.iso.BoxParser; //导入依赖的package包/类
void parse(ReadableByteChannel readableByteChannel, ByteBuffer header, long contentSize, BoxParser boxParser) throws IOException; 
开发者ID:begeekmyfriend,项目名称:mp4parser_android,代码行数:2,代码来源:Box.java



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
Java SessionCreatedEvent类代码示例发布时间:2022-05-22
下一篇:
Java PdfAnnotation类代码示例发布时间: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