Blender
V3.3
|
Go to the source code of this file.
Classes | |
struct | _AviChunk |
struct | _AviList |
struct | _AviMainHeader |
struct | _AviStreamHeader |
struct | _AviBitmapInfoHeader |
struct | _AviMJPEGUnknown |
struct | _AviIndexEntry |
struct | _AviIndex |
struct | _AviStreamRec |
struct | _AviMovie |
Macros | |
#define | AVIF_HASINDEX 0x00000010 |
#define | AVIF_MUSTUSEINDEX 0x00000020 |
#define | AVIF_ISINTERLEAVED 0x00000100 |
#define | AVIF_TRUSTCKTYPE 0x00000800 |
#define | AVIF_WASCAPTUREFILE 0x00010000 |
#define | AVIF_COPYRIGHTED 0x00020000 |
#define | AVIST_VIDEO FCC("vids") |
#define | AVIST_AUDIO FCC("auds") |
#define | AVIST_MIDI FCC("mids") |
#define | AVIST_TEXT FCC("txts") |
#define | AVISF_DISABLED 0x00000001 |
#define | AVISF_VIDEO_PALCHANGES 0x00010000 |
#define | AVIIF_LIST 0x00000001 |
#define | AVIIF_KEYFRAME 0x00000010 |
#define | AVIIF_NO_TIME 0x00000100 |
#define | AVIIF_COMPRESSOR 0x0FFF0000 |
#define | AVI_MOVIE_READ 0 |
#define | AVI_MOVIE_WRITE 1 |
#define | AVI_RIFF_SOFF 4L |
#define | AVI_HDRL_SOFF 16L |
#define | FCC(ch4) (ch4[0] | ch4[1] << 8 | ch4[2] << 16 | ch4[3] << 24) |
#define | AVI_OPTION_TYPE_MAIN 0 |
#define | AVI_OPTION_TYPE_STRH 1 |
#define | AVI_OPTION_TYPE_STRF 2 |
Typedefs | |
typedef struct _AviChunk | AviChunk |
typedef struct _AviList | AviList |
typedef struct _AviMainHeader | AviMainHeader |
typedef struct _AviStreamHeader | AviStreamHeader |
typedef struct _AviBitmapInfoHeader | AviBitmapInfoHeader |
typedef struct _AviMJPEGUnknown | AviMJPEGUnknown |
typedef struct _AviIndexEntry | AviIndexEntry |
typedef struct _AviIndex | AviIndex |
typedef struct _AviStreamRec | AviStreamRec |
typedef struct _AviMovie | AviMovie |
Enumerations | |
enum | AviFormat { AVI_FORMAT_RGB24 , AVI_FORMAT_RGB32 , AVI_FORMAT_AVI_RGB , AVI_FORMAT_MJPEG } |
enum | AviError { AVI_ERROR_NONE = 0 , AVI_ERROR_COMPRESSION , AVI_ERROR_OPEN , AVI_ERROR_READING , AVI_ERROR_WRITING , AVI_ERROR_FORMAT , AVI_ERROR_ALLOC , AVI_ERROR_FOUND , AVI_ERROR_OPTION } |
enum | AviOption { AVI_OPTION_WIDTH = 0 , AVI_OPTION_HEIGHT , AVI_OPTION_QUALITY , AVI_OPTION_FRAMERATE } |
Functions | |
bool | AVI_is_avi (const char *name) |
AviError | AVI_open_compress (char *name, AviMovie *movie, int streams,...) |
AviError | AVI_close_compress (AviMovie *movie) |
AviError | AVI_set_compress_option (AviMovie *movie, int option_type, int stream, AviOption option, void *opt_data) |
int | AVI_get_stream (AviMovie *movie, int avist_type, int stream_num) |
AviError | AVI_open_movie (const char *name, AviMovie *movie) |
void * | AVI_read_frame (AviMovie *movie, AviFormat format, int frame, int stream) |
AviError | AVI_close (AviMovie *movie) |
AviError | AVI_write_frame (AviMovie *movie, int frame_num,...) |
AviError | AVI_print_error (AviError error) |
This is external code. It provides avi file import/export and conversions. It has been adapted to make use of Blender memory management functions, and because of this it needs module blenlib. You need to provide this lib when linking with libavi.a .
This header has not been split, since it interleaves type defines and functions. You would need the types to be able to include the function headers anyway. And, after all, it is someone else's code. So we keep it like this.
Definition in file AVI_avi.h.
#define AVI_OPTION_TYPE_MAIN 0 |
#define AVI_OPTION_TYPE_STRF 2 |
#define AVI_OPTION_TYPE_STRH 1 |
#define AVIF_COPYRIGHTED 0x00020000 |
#define AVIF_ISINTERLEAVED 0x00000100 |
#define AVIF_MUSTUSEINDEX 0x00000020 |
#define AVIF_WASCAPTUREFILE 0x00010000 |
#define FCC | ( | ch4 | ) | (ch4[0] | ch4[1] << 8 | ch4[2] << 16 | ch4[3] << 24) |
typedef struct _AviBitmapInfoHeader AviBitmapInfoHeader |
typedef struct _AviIndexEntry AviIndexEntry |
typedef struct _AviMainHeader AviMainHeader |
typedef struct _AviMJPEGUnknown AviMJPEGUnknown |
typedef struct _AviStreamHeader AviStreamHeader |
typedef struct _AviStreamRec AviStreamRec |
enum AviError |
enum AviFormat |
enum AviOption |
Close an open movie stream.
Definition at line 670 of file avi.c.
References AVI_ERROR_NONE, _AviMovie::entries, _AviMovie::fp, _AviMovie::header, MEM_freeN, NULL, _AviMovie::offset_table, _AviStreamRec::sf, _AviMainHeader::Streams, and _AviMovie::streams.
Finalize a compressed output stream.
Definition at line 989 of file avi.c.
References AVI_ERROR_FOUND, AVI_ERROR_NONE, AVI_INDEXE, AVI_RIFF_SOFF, awrite(), BLI_fseek(), BLI_ftell(), _AviMovie::entries, _AviMovie::fp, _AviMovie::header, _AviMovie::index_entries, L, MEM_freeN, _AviMovie::movi_offset, NULL, _AviMovie::offset_table, PUT_FCC, PUT_FCCN, _AviStreamRec::sf, _AviMainHeader::Streams, and _AviMovie::streams.
int AVI_get_stream | ( | AviMovie * | movie, |
int | avist_type, | ||
int | stream_num | ||
) |
Direct the streams <avist_type> to <movie>. Redirect <stream_num> streams.
Definition at line 90 of file avi.c.
References AVI_ERROR_FOUND, AVI_ERROR_OPTION, _AviMovie::header, NULL, _AviStreamRec::sh, _AviMainHeader::Streams, _AviMovie::streams, and _AviStreamHeader::Type.
bool AVI_is_avi | ( | const char * | name | ) |
Test whether this is an avi-format.
Definition at line 187 of file avi.c.
References AVI_FORMAT_AVI_RGB, AVI_FORMAT_MJPEG, AVI_MOVIE_READ, _AviBitmapInfoHeader::BitCount, BLI_fopen(), BLI_fseek(), BLI_ftell(), _AviStreamHeader::bottom, _AviBitmapInfoHeader::ClrImportant, _AviBitmapInfoHeader::ClrUsed, _AviBitmapInfoHeader::Compression, DEBUG_PRINT, _AviMainHeader::fcc, _AviStreamHeader::fcc, _AviBitmapInfoHeader::fcc, FCC, _AviMainHeader::Flags, _AviStreamHeader::Flags, _AviStreamRec::format, _AviMovie::fp, GET_FCC(), GET_TCC(), _AviStreamHeader::Handler, _AviMovie::header, _AviMainHeader::Height, _AviBitmapInfoHeader::Height, _AviMainHeader::InitialFrames, _AviStreamHeader::InitialFrames, _AviStreamHeader::Language, _AviStreamHeader::left, _AviStreamHeader::Length, _AviMainHeader::MaxBytesPerSec, MEM_calloc_arrayN, MEM_freeN, _AviMainHeader::MicroSecPerFrame, NULL, _AviMovie::offset_table, _AviMainHeader::PaddingGranularity, _AviBitmapInfoHeader::Planes, _AviStreamHeader::Priority, _AviStreamHeader::Quality, _AviStreamHeader::Rate, _AviMainHeader::Reserved, _AviStreamHeader::right, _AviStreamHeader::SampleSize, _AviStreamHeader::Scale, _AviStreamRec::sf, _AviStreamRec::sf_size, _AviStreamRec::sh, _AviMainHeader::size, _AviStreamHeader::size, _AviBitmapInfoHeader::size, _AviBitmapInfoHeader::Size, _AviMovie::size, _AviBitmapInfoHeader::SizeImage, _AviStreamHeader::Start, _AviMainHeader::Streams, _AviMovie::streams, _AviMainHeader::SuggestedBufferSize, _AviStreamHeader::SuggestedBufferSize, _AviStreamHeader::top, _AviMainHeader::TotalFrames, _AviStreamHeader::Type, _AviMovie::type, _AviMainHeader::Width, _AviBitmapInfoHeader::Width, _AviBitmapInfoHeader::XPelsPerMeter, and _AviBitmapInfoHeader::YPelsPerMeter.
Referenced by isavi().
Open a compressed file, decompress it into memory.
Definition at line 695 of file avi.c.
References AVI_BITMAPH, AVI_CHUNK, AVI_ERROR_FORMAT, AVI_ERROR_NONE, AVI_ERROR_OPEN, avi_get_format_compression(), avi_get_format_fcc(), avi_get_format_type(), AVI_HDRL_SOFF, AVI_LIST, AVI_MAINH, AVI_MOVIE_WRITE, AVI_STREAMH, AVIF_HASINDEX, AVIF_MUSTUSEINDEX, awrite(), BLI_fopen(), BLI_fseek(), BLI_ftell(), _AviStreamHeader::bottom, DEBUG_PRINT, _AviMovie::entries, _AviChunk::fcc, _AviList::fcc, _AviMainHeader::fcc, _AviStreamHeader::fcc, FCC, _AviMainHeader::Flags, _AviStreamHeader::Flags, _AviStreamRec::format, _AviMovie::fp, _AviStreamHeader::Handler, _AviMovie::header, _AviMainHeader::Height, _AviList::ids, _AviMovie::index_entries, _AviMainHeader::InitialFrames, _AviStreamHeader::InitialFrames, _AviStreamHeader::Language, _AviStreamHeader::left, _AviStreamHeader::Length, _AviMainHeader::MaxBytesPerSec, MEM_mallocN, _AviMainHeader::MicroSecPerFrame, _AviMovie::movi_offset, NULL, _AviMovie::offset_table, _AviMainHeader::PaddingGranularity, _AviStreamHeader::Priority, PUT_FCCN, _AviStreamHeader::Quality, _AviStreamHeader::Rate, _AviMainHeader::Reserved, _AviStreamHeader::right, _AviStreamHeader::SampleSize, _AviStreamHeader::Scale, _AviStreamRec::sf, _AviStreamRec::sf_size, _AviStreamRec::sh, _AviChunk::size, _AviList::size, _AviMainHeader::size, _AviStreamHeader::size, _AviStreamHeader::Start, _AviMainHeader::Streams, _AviMovie::streams, _AviMainHeader::SuggestedBufferSize, _AviStreamHeader::SuggestedBufferSize, _AviStreamHeader::top, _AviMainHeader::TotalFrames, _AviStreamHeader::Type, _AviMovie::type, and _AviMainHeader::Width.
Open a movie stream from file.
Definition at line 378 of file avi.c.
References AVI_DEBUG, AVI_ERROR_COMPRESSION, AVI_ERROR_FORMAT, AVI_ERROR_NONE, AVI_ERROR_OPEN, AVI_FORMAT_AVI_RGB, AVI_FORMAT_MJPEG, AVI_MOVIE_READ, AVIF_HASINDEX, _AviBitmapInfoHeader::BitCount, BLI_fopen(), BLI_fseek(), BLI_ftell(), _AviStreamHeader::bottom, _AviIndexEntry::ChunkId, _AviBitmapInfoHeader::ClrImportant, _AviBitmapInfoHeader::ClrUsed, _AviBitmapInfoHeader::Compression, DEBUG_PRINT, _AviMovie::entries, _AviMainHeader::fcc, _AviStreamHeader::fcc, _AviBitmapInfoHeader::fcc, FCC, fcc_to_char(), _AviMainHeader::Flags, _AviStreamHeader::Flags, _AviIndexEntry::Flags, _AviStreamRec::format, _AviMovie::fp, GET_FCC(), GET_TCC(), _AviStreamHeader::Handler, _AviMovie::header, _AviMainHeader::Height, _AviBitmapInfoHeader::Height, _AviMovie::index_entries, _AviMainHeader::InitialFrames, _AviStreamHeader::InitialFrames, _AviStreamHeader::Language, _AviStreamHeader::left, _AviStreamHeader::Length, _AviMainHeader::MaxBytesPerSec, MEM_calloc_arrayN, MEM_mallocN, _AviMainHeader::MicroSecPerFrame, _AviMovie::movi_offset, NULL, _AviIndexEntry::Offset, _AviMovie::offset_table, _AviMainHeader::PaddingGranularity, _AviBitmapInfoHeader::Planes, _AviStreamHeader::Priority, _AviStreamHeader::Quality, _AviStreamHeader::Rate, _AviMovie::read_offset, _AviMainHeader::Reserved, _AviStreamHeader::right, _AviStreamHeader::SampleSize, _AviStreamHeader::Scale, _AviStreamRec::sf, _AviStreamRec::sf_size, _AviStreamRec::sh, size(), _AviMainHeader::size, _AviStreamHeader::size, _AviBitmapInfoHeader::size, _AviBitmapInfoHeader::Size, _AviIndexEntry::Size, _AviMovie::size, _AviBitmapInfoHeader::SizeImage, _AviStreamHeader::Start, _AviMainHeader::Streams, _AviMovie::streams, _AviMainHeader::SuggestedBufferSize, _AviStreamHeader::SuggestedBufferSize, _AviStreamHeader::top, _AviMainHeader::TotalFrames, _AviStreamHeader::Type, _AviMovie::type, _AviMainHeader::Width, _AviBitmapInfoHeader::Width, _AviBitmapInfoHeader::XPelsPerMeter, and _AviBitmapInfoHeader::YPelsPerMeter.
Unused but still external
Definition at line 142 of file avi.c.
References AVI_ERROR_ALLOC, AVI_ERROR_COMPRESSION, AVI_ERROR_FORMAT, AVI_ERROR_FOUND, AVI_ERROR_NONE, AVI_ERROR_OPEN, AVI_ERROR_OPTION, AVI_ERROR_READING, AVI_ERROR_WRITING, and error().
Read a frame from a movie stream.
Definition at line 623 of file avi.c.
References avi_format_convert(), BLI_fseek(), buffer, _AviIndexEntry::ChunkId, _AviMovie::entries, fcc_get_stream(), fcc_is_data(), _AviStreamRec::format, _AviMovie::fp, GET_FCC(), MEM_freeN, MEM_mallocN, NULL, _AviIndexEntry::Offset, _AviMovie::read_offset, size(), _AviIndexEntry::Size, and _AviMovie::streams.
AviError AVI_set_compress_option | ( | AviMovie * | movie, |
int | option_type, | ||
int | stream, | ||
AviOption | option, | ||
void * | opt_data | ||
) |
Choose a compression option for <movie>. Possible options are AVI_OPTION_TYPE_MAIN, AVI_OPTION_TYPE_STRH, AVI_OPTION_TYPE_STRF
Definition at line 22 of file avi_options.c.
References AVI_BITMAPH, AVI_ERROR_NONE, AVI_ERROR_OPTION, avi_get_format_type(), AVI_MAINH, AVI_OPTION_FRAMERATE, AVI_OPTION_HEIGHT, AVI_OPTION_QUALITY, AVI_OPTION_TYPE_MAIN, AVI_OPTION_TYPE_STRF, AVI_OPTION_TYPE_STRH, AVI_OPTION_WIDTH, awrite(), BLI_fseek(), _AviStreamHeader::bottom, FCC, _AviStreamRec::format, _AviMovie::fp, _AviMovie::header, _AviMainHeader::Height, _AviMainHeader::MicroSecPerFrame, _AviMovie::offset_table, _AviStreamHeader::Quality, _AviStreamHeader::right, _AviStreamHeader::Scale, _AviStreamRec::sf, _AviStreamRec::sf_size, _AviStreamRec::sh, _AviMainHeader::Streams, _AviMovie::streams, _AviMainHeader::SuggestedBufferSize, _AviStreamHeader::SuggestedBufferSize, _AviMainHeader::TotalFrames, void, and _AviMainHeader::Width.
Write frames to a movie stream.
Definition at line 881 of file avi.c.
References AVI_CHUNK, AVI_ERROR_NONE, AVI_ERROR_OPTION, avi_format_convert(), avi_get_data_id(), AVI_LIST, AVI_MAINH, AVI_RAW, AVI_STREAMH, AVIIF_KEYFRAME, AVIIF_LIST, awrite(), BLI_fseek(), BLI_ftell(), buffer, _AviMovie::entries, _AviChunk::fcc, _AviList::fcc, FCC, _AviIndexEntry::Flags, _AviStreamRec::format, _AviMovie::fp, _AviMovie::header, _AviList::ids, _AviMovie::index_entries, L, _AviStreamHeader::Length, MEM_freeN, MEM_recallocN, _AviMovie::movi_offset, _AviMovie::offset_table, PUT_FCCN, _AviStreamRec::sh, size(), _AviChunk::size, _AviList::size, _AviIndexEntry::Size, _AviMainHeader::Streams, _AviMovie::streams, and _AviMainHeader::TotalFrames.