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


Java RIFFChunk类代码示例

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


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

示例1: putExtraHeader

import org.monte.media.riff.RIFFChunk; //导入依赖的package包/类
/**
 * Returns the contents of the extra track header. Returns null if the
 * header is not present. <p> Note: this method can only be performed before
 * media data has been written into the tracks.
 *
 * @param track
 * @param fourcc
 * @param data the extra header as a byte array
 * @throws java.io.IOException
 */
public void putExtraHeader(int track, String fourcc, byte[] data) throws IOException {
    if (state == States.STARTED) {
        throw new IllegalStateException("Stream headers have already been written!");
    }
    Track tr = tracks.get(track);
    int id = RIFFParser.stringToID(fourcc);
    // Remove duplicate entries
    for (int i = tr.extraHeaders.size() - 1; i >= 0; i--) {
        if (tr.extraHeaders.get(i).getID() == id) {
            tr.extraHeaders.remove(i);
        }
    }

    // Add new entry
    RIFFChunk chunk = new RIFFChunk(STRH_ID, id, data.length, -1);
    chunk.setData(data);
    tr.extraHeaders.add(chunk);
}
 
开发者ID:pojosontheweb,项目名称:selenium-utils,代码行数:29,代码来源:AVIOutputStream.java

示例2: putExtraHeader

import org.monte.media.riff.RIFFChunk; //导入依赖的package包/类
/**
 * Returns the contents of the extra track header. Returns null if the
 * header is not present. <p> Note: this method can only be performed before
 * media data has been written into the tracks.
 *
 * @param track
 * @param fourcc
 * @param data the extra header as a byte array
 * @throws IOException
 */
public void putExtraHeader(int track, String fourcc, byte[] data) throws IOException {
    if (state == States.STARTED) {
        throw new IllegalStateException("Stream headers have already been written!");
    }
    Track tr = tracks.get(track);
    int id = RIFFParser.stringToID(fourcc);
    // Remove duplicate entries
    for (int i = tr.extraHeaders.size() - 1; i >= 0; i--) {
        if (tr.extraHeaders.get(i).getID() == id) {
            tr.extraHeaders.remove(i);
        }
    }

    // Add new entry
    RIFFChunk chunk = new RIFFChunk(STRH_ID, id, data.length, -1);
    chunk.setData(data);
    tr.extraHeaders.add(chunk);
}
 
开发者ID:jindrapetrik,项目名称:jpexs-decompiler,代码行数:29,代码来源:AVIOutputStream.java

示例3: getExtraHeader

import org.monte.media.riff.RIFFChunk; //导入依赖的package包/类
/**
 * Returns the contents of the extra track header. Returns null if the
 * header is not present.
 *
 * @param track
 * @param fourcc
 * @return The extra header as a byte array
 * @throws java.io.IOException
 */
public byte[] getExtraHeader(int track, String fourcc) throws IOException {
    ensureRealized();
    int id = RIFFParser.stringToID(fourcc);
    for (RIFFChunk c : tracks.get(track).extraHeaders) {
        if (c.getID() == id) {
            return c.getData();
        }
    }
    return null;
}
 
开发者ID:pojosontheweb,项目名称:selenium-utils,代码行数:20,代码来源:AVIInputStream.java

示例4: Track

import org.monte.media.riff.RIFFChunk; //导入依赖的package包/类
public Track(int trackIndex, AVIMediaType mediaType, int fourCC) {
    this.mediaType = mediaType;
    twoCC = (('0'+trackIndex/10)<<24) | (('0'+trackIndex%10)<<16);
    
    this.fccHandler = fourCC;
    this.samples = new ArrayList<Sample>();
    this.extraHeaders = new ArrayList<RIFFChunk>();
}
 
开发者ID:pojosontheweb,项目名称:selenium-utils,代码行数:9,代码来源:AbstractAVIStream.java

示例5: getExtraHeader

import org.monte.media.riff.RIFFChunk; //导入依赖的package包/类
/**
 * Returns the contents of the extra track header. Returns null if the
 * header is not present.
 *
 * @param track
 * @param fourcc
 * @return The extra header as a byte array
 * @throws IOException
 */
public byte[] getExtraHeader(int track, String fourcc) throws IOException {
    ensureRealized();
    int id = RIFFParser.stringToID(fourcc);
    for (RIFFChunk c : tracks.get(track).extraHeaders) {
        if (c.getID() == id) {
            return c.getData();
        }
    }
    return null;
}
 
开发者ID:sebkur,项目名称:montemedia,代码行数:20,代码来源:AVIInputStream.java


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