Blender V2.61 - r43446
|
#include "MEM_sys_types.h"
#include <stdio.h>
Go to the source code of this file.
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_HDRL_SOFF 16L |
Definition at line 228 of file AVI_avi.h.
Referenced by AVI_open_compress().
#define AVI_MOVIE_READ 0 |
Definition at line 184 of file AVI_avi.h.
Referenced by AVI_is_avi(), and AVI_open_movie().
#define AVI_MOVIE_WRITE 1 |
Definition at line 185 of file AVI_avi.h.
Referenced by AVI_open_compress().
#define AVI_OPTION_TYPE_MAIN 0 |
Compression option, for use in avi_set_compress_option
Definition at line 264 of file AVI_avi.h.
Referenced by alloc_proxy_output_avi(), AVI_set_compress_option(), and start_avi().
#define AVI_OPTION_TYPE_STRF 2 |
Compression option, for use in avi_set_compress_option
Definition at line 272 of file AVI_avi.h.
Referenced by AVI_set_compress_option().
#define AVI_OPTION_TYPE_STRH 1 |
Compression option, for use in avi_set_compress_option
Definition at line 268 of file AVI_avi.h.
Referenced by AVI_set_compress_option().
#define AVI_RIFF_SOFF 4L |
Definition at line 227 of file AVI_avi.h.
Referenced by AVI_close_compress().
#define AVIF_HASINDEX 0x00000010 |
Definition at line 77 of file AVI_avi.h.
Referenced by AVI_open_compress(), and AVI_open_movie().
#define AVIF_MUSTUSEINDEX 0x00000020 |
Definition at line 78 of file AVI_avi.h.
Referenced by AVI_open_compress().
#define AVIIF_KEYFRAME 0x00000010 |
Definition at line 153 of file AVI_avi.h.
Referenced by AVI_write_frame().
#define AVIIF_LIST 0x00000001 |
Definition at line 152 of file AVI_avi.h.
Referenced by AVI_write_frame().
#define AVIST_VIDEO FCC("vids") |
Definition at line 97 of file AVI_avi.h.
Referenced by avi_fetchibuf().
#define FCC | ( | ch4 | ) | (ch4[0] | ch4[1]<<8 | ch4[2]<<16 | ch4[3] << 24) |
This is a sort of MAKE_ID thing. Used in imbuf :( It is used through options in the AVI header (AviStreamHeader).
Definition at line 233 of file AVI_avi.h.
Referenced by avi_get_data_id(), avi_get_format_compression(), avi_get_format_fcc(), avi_get_format_type(), AVI_is_avi(), AVI_open_compress(), AVI_open_movie(), AVI_set_compress_option(), AVI_write_frame(), GET_FCC(), and GET_TCC().
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 701 of file avi.c.
References AVI_ERROR_NONE, _AviMovie::entries, _AviMovie::fp, _AviMovie::header, i, MEM_freeN(), NULL, _AviMovie::offset_table, _AviStreamRec::sf, _AviMovie::streams, and _AviMainHeader::Streams.
Referenced by free_anim_avi().
Finalize a compressed output stream.
Definition at line 1022 of file avi.c.
References AVI_ERROR_NONE, AVI_INDEXE, AVI_RIFF_SOFF, awrite(), _AviMovie::entries, _AviMovie::fp, _AviMovie::header, i, _AviMovie::index_entries, L, MEM_freeN(), _AviMovie::movi_offset, NULL, _AviMovie::offset_table, PUT_FCC, PUT_FCCN, _AviStreamRec::sf, _AviMovie::streams, and _AviMainHeader::Streams.
Referenced by end_avi(), and index_rebuild_fallback().
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 110 of file avi.c.
References AVI_ERROR_FOUND, AVI_ERROR_OPTION, _AviMovie::header, NULL, _AviStreamRec::sh, _AviMovie::streams, _AviMainHeader::Streams, and _AviStreamHeader::Type.
Referenced by avi_fetchibuf().
int AVI_is_avi | ( | const char * | name | ) |
Test whether this is an avi-format.
Definition at line 229 of file avi.c.
References AVI_FORMAT_AVI_RGB, AVI_FORMAT_MJPEG, AVI_MOVIE_READ, _AviBitmapInfoHeader::BitCount, _AviStreamHeader::bottom, _AviBitmapInfoHeader::ClrImportant, _AviBitmapInfoHeader::ClrUsed, _AviBitmapInfoHeader::Compression, DEBUG_PRINT, _AviStreamHeader::fcc, _AviMainHeader::fcc, FCC, _AviBitmapInfoHeader::fcc, _AviStreamHeader::Flags, _AviMainHeader::Flags, _AviStreamRec::format, _AviMovie::fp, GET_FCC(), GET_TCC(), _AviStreamHeader::Handler, _AviMovie::header, _AviMainHeader::Height, _AviBitmapInfoHeader::Height, _AviStreamHeader::InitialFrames, _AviMainHeader::InitialFrames, L, _AviStreamHeader::Language, _AviStreamHeader::left, _AviStreamHeader::Length, _AviMainHeader::MaxBytesPerSec, MEM_callocN(), 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, _AviStreamHeader::size, _AviBitmapInfoHeader::Size, _AviMovie::size, _AviMainHeader::size, _AviBitmapInfoHeader::size, _AviBitmapInfoHeader::SizeImage, _AviStreamHeader::Start, _AviMovie::streams, _AviMainHeader::Streams, _AviStreamHeader::SuggestedBufferSize, _AviMainHeader::SuggestedBufferSize, _AviStreamHeader::top, _AviMainHeader::TotalFrames, _AviMovie::type, _AviStreamHeader::Type, _AviMainHeader::Width, _AviBitmapInfoHeader::Width, _AviBitmapInfoHeader::XPelsPerMeter, and _AviBitmapInfoHeader::YPelsPerMeter.
Referenced by isavi().
Open a compressed file, decompress it into memory.
Definition at line 724 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(), _AviStreamHeader::bottom, _AviMovie::entries, _AviStreamHeader::fcc, _AviChunk::fcc, _AviMainHeader::fcc, FCC, _AviList::fcc, _AviStreamHeader::Flags, _AviMainHeader::Flags, _AviStreamRec::format, _AviMovie::fp, _AviStreamHeader::Handler, _AviMovie::header, _AviMainHeader::Height, i, _AviList::ids, _AviMovie::index_entries, _AviStreamHeader::InitialFrames, _AviMainHeader::InitialFrames, L, _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, _AviStreamHeader::size, _AviChunk::size, _AviMainHeader::size, _AviList::size, _AviStreamHeader::Start, _AviMovie::streams, _AviMainHeader::Streams, _AviStreamHeader::SuggestedBufferSize, _AviMainHeader::SuggestedBufferSize, _AviStreamHeader::top, _AviMainHeader::TotalFrames, _AviMovie::type, _AviStreamHeader::Type, and _AviMainHeader::Width.
Referenced by alloc_proxy_output_avi(), and start_avi().
Open a movie stream from file.
Definition at line 421 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, _AviStreamHeader::bottom, _AviIndexEntry::ChunkId, _AviBitmapInfoHeader::ClrImportant, _AviBitmapInfoHeader::ClrUsed, _AviBitmapInfoHeader::Compression, DEBUG_PRINT, _AviMovie::entries, _AviStreamHeader::fcc, _AviMainHeader::fcc, FCC, _AviBitmapInfoHeader::fcc, fcc_to_char(), _AviStreamHeader::Flags, _AviMainHeader::Flags, _AviIndexEntry::Flags, _AviStreamRec::format, _AviMovie::fp, GET_FCC(), GET_TCC(), _AviStreamHeader::Handler, _AviMovie::header, _AviMainHeader::Height, _AviBitmapInfoHeader::Height, _AviMovie::index_entries, _AviStreamHeader::InitialFrames, _AviMainHeader::InitialFrames, L, _AviStreamHeader::Language, _AviStreamHeader::left, _AviStreamHeader::Length, _AviMainHeader::MaxBytesPerSec, MEM_callocN(), 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, _AviStreamHeader::size, _AviBitmapInfoHeader::Size, _AviMovie::size, _AviIndexEntry::Size, _AviMainHeader::size, size(), _AviBitmapInfoHeader::size, _AviBitmapInfoHeader::SizeImage, _AviStreamHeader::Start, _AviMovie::streams, _AviMainHeader::Streams, _AviStreamHeader::SuggestedBufferSize, _AviMainHeader::SuggestedBufferSize, _AviStreamHeader::top, _AviMainHeader::TotalFrames, _AviMovie::type, _AviStreamHeader::Type, _AviMainHeader::Width, _AviBitmapInfoHeader::Width, _AviBitmapInfoHeader::XPelsPerMeter, and _AviBitmapInfoHeader::YPelsPerMeter.
Referenced by startavi().
Unused but still external
Definition at line 158 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().
Referenced by startavi().
Read a frame from a movie stream.
Definition at line 656 of file avi.c.
References avi_format_convert(), _AviIndexEntry::ChunkId, _AviMovie::entries, fcc_get_stream(), fcc_is_data(), _AviStreamRec::format, _AviMovie::fp, GET_FCC(), i, MEM_freeN(), MEM_mallocN(), NULL, _AviIndexEntry::Offset, _AviMovie::read_offset, _AviIndexEntry::Size, and _AviMovie::streams.
Referenced by avi_fetchibuf().
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 46 of file 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(), _AviStreamHeader::bottom, FCC, _AviStreamRec::format, _AviMovie::fp, _AviMovie::header, _AviMainHeader::Height, i, _AviMainHeader::MicroSecPerFrame, _AviMovie::offset_table, _AviStreamHeader::Quality, _AviStreamHeader::right, _AviStreamHeader::Scale, _AviStreamRec::sf, _AviStreamRec::sf_size, _AviStreamRec::sh, _AviMovie::streams, _AviMainHeader::Streams, _AviStreamHeader::SuggestedBufferSize, _AviMainHeader::SuggestedBufferSize, _AviMainHeader::TotalFrames, and _AviMainHeader::Width.
Referenced by alloc_proxy_output_avi(), and start_avi().
void AVI_set_debug | ( | int | mode | ) |
Write frames to a movie stream.
Definition at line 914 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(), _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_mallocN(), _AviMovie::movi_offset, NULL, _AviMovie::offset_table, PUT_FCCN, _AviStreamRec::sh, _AviChunk::size, _AviIndexEntry::Size, size(), _AviList::size, _AviMovie::streams, _AviMainHeader::Streams, and _AviMainHeader::TotalFrames.
Referenced by append_avi(), and index_rebuild_fallback().