working on avi parsers
This commit is contained in:
104
data/formats/avi/structs.h
Normal file
104
data/formats/avi/structs.h
Normal file
@@ -0,0 +1,104 @@
|
||||
#pragma once
|
||||
|
||||
typedef uint8_t FOURCC[4];
|
||||
|
||||
struct AVICommonHeader {
|
||||
FOURCC fourcc;
|
||||
uint32_t length;
|
||||
};
|
||||
|
||||
struct AVITypeHeader {
|
||||
FOURCC fourcc;
|
||||
uint32_t length;
|
||||
FOURCC type;
|
||||
};
|
||||
|
||||
struct AVIMainHeader {
|
||||
uint32_t ms_per_frame;
|
||||
uint32_t max_bytes_per_sec;
|
||||
uint32_t padding_granularity;
|
||||
uint32_t flags;
|
||||
uint32_t total_frames;
|
||||
uint32_t initial_frames;
|
||||
uint32_t streams;
|
||||
uint32_t suggested_buffer_size;
|
||||
uint32_t width;
|
||||
uint32_t height;
|
||||
uint32_t reserved[4];
|
||||
};
|
||||
|
||||
struct AVIStreamHeader {
|
||||
//FOURCC fourcc;
|
||||
//uint32_t length;
|
||||
FOURCC type;
|
||||
FOURCC fcc_handler;
|
||||
uint32_t flags;
|
||||
uint16_t priority;
|
||||
uint16_t language;
|
||||
uint32_t initial_frames;
|
||||
uint32_t scale;
|
||||
uint32_t rate;
|
||||
uint32_t start;
|
||||
uint32_t length;
|
||||
uint32_t suggested_buffer_size;
|
||||
uint32_t quality;
|
||||
uint32_t sample_size;
|
||||
struct {
|
||||
uint16_t left;
|
||||
uint16_t top;
|
||||
uint16_t right;
|
||||
uint16_t bottom;
|
||||
} rcFrame;
|
||||
};
|
||||
|
||||
struct BitMapInfoHeader {
|
||||
uint32_t biSize;
|
||||
int32_t biWidth;
|
||||
int32_t biHeight;
|
||||
int16_t biPlanes;
|
||||
uint16_t biBitCount;
|
||||
uint32_t biCompression;
|
||||
uint32_t biSizeImage;
|
||||
int32_t biXPelsPerMeter;
|
||||
int32_t biYPelsPerMeter;
|
||||
uint32_t biClrUsed;
|
||||
uint32_t biClrImportant;
|
||||
};
|
||||
|
||||
struct RGBQUAD {
|
||||
uint8_t rgbBlue;
|
||||
uint8_t rgbGreen;
|
||||
uint8_t rgbRed;
|
||||
uint8_t rgbReserved;
|
||||
};
|
||||
|
||||
struct BitMapInfo {
|
||||
BitMapInfoHeader bmi_header;
|
||||
RGBQUAD bmi_colors[1];
|
||||
};
|
||||
|
||||
struct WaveFormat {
|
||||
uint16_t format_tag;
|
||||
uint16_t channels;
|
||||
uint32_t samples_per_sec;
|
||||
uint32_t avg_bytes_per_sec;
|
||||
uint16_t block_align;
|
||||
uint16_t size;
|
||||
};
|
||||
|
||||
struct AVIIndexEntry {
|
||||
uint32_t ckid;
|
||||
uint32_t flags;
|
||||
uint32_t chunk_offset;
|
||||
uint32_t chunk_length;
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
struct ChunkInfo {
|
||||
uint32_t offset;
|
||||
uint32_t entry_offset;
|
||||
uint32_t size;
|
||||
};
|
||||
Reference in New Issue
Block a user