Main Page   Modules   Data Structures   Data Fields   Related Pages  

AVI - functions, types and macros

Handle the load of avi file. More...

Data Structures

struct  AVI_CHUNK
 A chunk of the avi file. More...

struct  AVI_INDEX
 All the index of the movie. More...

struct  AVI_INDEX_ENTRY
 Each index entry of the file. More...

struct  AVI_MAIN_HEADER
 Main header of the avi file. More...

struct  AVI_MOVIE
 AVI movie. More...

struct  AVI_STREAM
 Contain all the information necessary to handle a stream. More...

struct  AVI_STREAM_DATA
 Information about the aditional data for stream format. More...

struct  AVI_STREAM_FORMAT
 Information about the format of one stream of the file. More...

struct  AVI_STREAM_HEADER
 Stream header, with information about one stream of the file. More...


Defines

#define FCC_RIFF   AL_ID('F', 'F', 'I', 'R')
 First code in the avi.

#define FCC_AVI   AL_ID(' ', 'I', 'V', 'A')
 After 'RIFF', this is need to be a valid avi file.

#define FCC_LIST   AL_ID('T', 'S', 'I', 'L')
 Start of the list of chunks.

#define FCC_hdrl   AL_ID('l', 'r', 'd', 'h')
 Start the list of headers.

#define FCC_avih   AL_ID('h', 'i', 'v', 'a')
 Main avi header.

#define FCC_strl   AL_ID('l', 'r', 't', 's')
 List of stream informations.

#define FCC_strh   AL_ID('h', 'r', 't', 's')
 Header of the stream.

#define FCC_strf   AL_ID('f', 'r', 't', 's')
 Stream format.

#define FCC_strd   AL_ID('d', 'r', 't', 's')
 Additional stream data (not used).

#define FCC_movi   AL_ID('i', 'v', 'o', 'm')
 List of frames in the movie.

#define FCC_idx1   AL_ID('1', 'x', 'd', 'i')
 Index of the movie.

#define FCC_vids   AL_ID('s', 'd', 'i', 'v')
 Type of the stream of video.

#define FCC_auds   AL_ID('s', 'd', 'u', 'a')
 Type of the stream of audio.

#define FCC_JUNK   AL_ID('K', 'N', 'U', 'J')
 Just for align data.

#define FCC_DIVX   AL_ID('x', 'v', 'i', 'd')
 FCC of DivX codec.

#define FCC_XVID   AL_ID('d', 'i', 'v', 'x')
 FCC of XviD codec.

#define FCC_DIVX_OTHER   AL_ID('f', 'v', 'i', 'd')
 One of my DivX movies has this codec.


Functions

AVI_MOVIEavi_open (const char *name)
 Opens the file name and verifies if it is a valid avi.

void avi_destroy (AVI_MOVIE *avi)
 Frees the memory allocated and close the file.

AVI_CHUNKavi_chunk_read_header (AVI_MOVIE *avi)
 Reads the fcc, size and sub-type of the next chunk in the file.

AVI_CHUNKavi_chunk_read (AVI_MOVIE *avi)
 Reads the fcc, size, sub-type and data of the next chunk in the file.

void avi_chunk_destroy (AVI_CHUNK *ac)
 Frees the memory allocated to a chunk.

void avi_chunk_skip (AVI_MOVIE *avi)
 Skip the next chunk.

int avi_read_frame_video (AVI_MOVIE *avi, int frame)
 Read a frame of video.


Detailed Description

Handle the load of avi file.

You can use this module separately of MJpgAlleg, to implement your own AVI library.

Author:
Eduardo "Dudaskank"
Date:

Function Documentation

void avi_chunk_destroy AVI_CHUNK   ac
 

Frees the memory allocated to a chunk.

The avi is a valid AVI_MOVIE pointer.

Returns:
Nothing
See also:
avi_chunk_read_header(), avi_chunk_read()
Author:
Eduardo "Dudaskank"
Date:
  • Created : 19/09/2002
  • Updated : -

AVI_CHUNK* avi_chunk_read AVI_MOVIE   avi
 

Reads the fcc, size, sub-type and data of the next chunk in the file.

The subtype is read for RIFF and LIST fcc.

The avi is a valid AVI_MOVIE pointer.

Returns:
Pointer to AVI_CHUNK struct if ok, NULL on error
See also:
avi_chunk_read_header(), avi_chunk_destroy(), avi_chunk_skip()
Author:
Eduardo "Dudaskank"
Date:
  • Created : 19/09/2002
  • Updated : -

AVI_CHUNK* avi_chunk_read_header AVI_MOVIE   avi
 

Reads the fcc, size and sub-type of the next chunk in the file.

The subtype is read for RIFF and LIST fcc.

The avi is a valid AVI_MOVIE pointer.

Returns:
Pointer to AVI_CHUNK struct if ok, NULL on error
See also:
avi_chunk_read(), avi_chunk_destroy(), avi_chunk_skip()
Author:
Eduardo "Dudaskank"
Date:
  • Created : 19/09/2002
  • Updated : -

void avi_chunk_skip AVI_MOVIE   avi
 

Skip the next chunk.

The avi is a valid AVI_MOVIE pointer.

Returns:
Nothing
See also:
avi_chunk_read_header(), avi_chunk_read()
Author:
Eduardo "Dudaskank"
Date:
  • Created : 19/09/2002
  • Updated : -

void avi_destroy AVI_MOVIE   avi
 

Frees the memory allocated and close the file.

The avi is a valid AVI_MOVIE pointer

Returns:
Nothing
See also:
avi_open()
Author:
Eduardo "Dudaskank"
Date:
  • Created : 19/09/2002
  • Updated : 22/10/2002

AVI_MOVIE* avi_open const char *    name
 

Opens the file name and verifies if it is a valid avi.

This function will see if it's a valid RIFF file, of type AVI, and will load the header of the avi, the stream info, the offset of movi list and the index of the file

Returns:
pointer to a AVI_MOVIE struct if ok, NULL on error
See also:
avi_destroy(), avi_chunk_read_header(), avi_chunk_read()
Author:
Eduardo "Dudaskank"
Date:
  • Created : 19/09/2002
  • Updated : 23/09/2002

int avi_read_frame_video AVI_MOVIE   avi,
int    frame
 

Read a frame of video.

Stores the data in the buffer of video stream and the size of frame in frame_size.

The avi is a valid AVI_MOVIE pointer, and frame is the number of the frame to read.

Returns:
0 is ok, non zero is error
See also:
avi_chunk_read_header(), avi_chunk_read()
Author:
Eduardo "Dudaskank"
Date:
  • Created : 23/09/2002
  • Updated : 22/10/2002


Generated on Mon Apr 7 00:19:25 2003 for MJpgAlleg by doxygen1.2.18