feedme java project

is free software, licensed under the terms of the GNU General Public License, that feeds/imports media from anywhere to xbox360 media center extenders, ipods, web servers, file servers, etc. using Java.

Please read the license here.

Sunday, September 9, 2007

AVI Header


// AVI Header
private int usecPerFrame = -1;
private float frameRate = -1.0F;
private int maxBytesPerSecond;
private int paddingGranularity;
private long avgFrameTime;
private int flags = (AVIF_HASINDEX);
private int totalDataLength = 0;
private int totalFrames = 0;
private int totalVideoFrames = 0;
private int initialFrames;
private int[] reserved = new int[4];

private Vector chunkList = new Vector(1);
private final int BUF_SIZE = 16384;
private ByteBuffer bbuf = new ByteBuffer(BUF_SIZE);
private int chunkOffset = 4; // Position of Chunk in file
private int moviOffset = 0;
private int avihOffset = 0;
private int hdrlSizeOffset = 0;
private int totalStrlLength = 0;

private int blockAlign = 1; // todo: when we support multiple audio tracks
// they may have different blockAlign

private int samplesPerBlock = -1; // todo: when we support multiple audio tracks
// they may have different samplesPerBlock

private double sampleRate = 0.; // todo: when we support multiple audio tracks
// they may have different durations

private double audioDuration = 0.; // todo: when we support multiple tracks
// they may have different durations

private int averageBytesPerSecond = -1; // todo: when we support multiple tracks
// they may have different averageBytesPerSecond

private int mp3BitRate = -1; // todo: when we support multiple audio tracks
// they may have different bit rates

private long cumulativeInterFrameTimeVideo = 0;
private long previousTimeStampVideo = 0;
final static String LISTRECORDCHUNK = "rec";
final static String VIDEO_MAGIC = "dc"; // Video
final static String VIDEO_MAGIC_JPEG = "db"; // Video
final static String VIDEO_MAGIC_IV32a = "iv"; // Indeo 3.2
final static String VIDEO_MAGIC_IV32b = "32"; // Indeo 3.2
final static String VIDEO_MAGIC_IV31 = "31"; // Indeo 3.1
final static String VIDEO_MAGIC_CVID = "id"; // Cinepak
final static String AUDIO_MAGIC = "wb"; // Audio

No comments: