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


Java BoxParser类代码示例

本文整理汇总了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;未经允许,请勿转载。