libavi.c File Reference

Include dependency graph for libavi.c:


Defines

#define AVI_DEBUG   1
#define __EVEN(x)   (((x) + 1) & ~1)
#define AVI_ChunkFree(a, b)   _AVI_ChunkFree( (a), (avi_chunk_t*)(b) )
#define AVI_READCHUNK_ENTER
#define AVI_READ(res, func, size)
#define AVI_READCHUNK_EXIT(code)
#define AVI_READ1BYTE(i_byte)   AVI_READ( i_byte, GetB, 1 )
#define AVI_READ2BYTES(i_word)   AVI_READ( i_word, GetWLE, 2 )
#define AVI_READ4BYTES(i_dword)   AVI_READ( i_dword, GetDWLE, 4 )
#define AVI_READ8BYTES(i_qword)   AVI_READ( i_qword, GetQWLE, 8 )
#define AVI_READFOURCC(i_dword)   AVI_READ( i_dword, GetFOURCC, 4 )

Functions

static vlc_fourcc_t GetFOURCC (const uint8_t *p_buff)
void _AVI_ChunkFree (stream_t *, avi_chunk_t *p_chk)
static int AVI_ChunkReadCommon (stream_t *s, avi_chunk_t *p_chk)
static int AVI_NextChunk (stream_t *s, avi_chunk_t *p_chk)
static int AVI_ChunkRead_list (stream_t *s, avi_chunk_t *p_container)
static uint8_t GetB (uint8_t *ptr)
static int AVI_ChunkRead_avih (stream_t *s, avi_chunk_t *p_chk)
static int AVI_ChunkRead_strh (stream_t *s, avi_chunk_t *p_chk)
static int AVI_ChunkRead_strf (stream_t *s, avi_chunk_t *p_chk)
static void AVI_ChunkFree_strf (avi_chunk_t *p_chk)
static int AVI_ChunkRead_strd (stream_t *s, avi_chunk_t *p_chk)
static void AVI_ChunkFree_strd (avi_chunk_t *p_chk)
static int AVI_ChunkRead_idx1 (stream_t *s, avi_chunk_t *p_chk)
static void AVI_ChunkFree_idx1 (avi_chunk_t *p_chk)
static int AVI_ChunkRead_indx (stream_t *s, avi_chunk_t *p_chk)
static void AVI_ChunkFree_indx (avi_chunk_t *p_chk)
static int AVI_ChunkRead_strz (stream_t *s, avi_chunk_t *p_chk)
static void AVI_ChunkFree_strz (avi_chunk_t *p_chk)
static int AVI_ChunkRead_nothing (stream_t *s, avi_chunk_t *p_chk)
static void AVI_ChunkFree_nothing (avi_chunk_t *p_chk)
static int AVI_ChunkFunctionFind (vlc_fourcc_t i_fourcc)
int _AVI_ChunkRead (stream_t *s, avi_chunk_t *p_chk, avi_chunk_t *p_father)
static void AVI_ChunkDumpDebug_level (vlc_object_t *p_obj, avi_chunk_t *p_chk, int i_level)
int AVI_ChunkReadRoot (stream_t *s, avi_chunk_t *p_root)
void AVI_ChunkFreeRoot (stream_t *s, avi_chunk_t *p_chk)
int _AVI_ChunkCount (avi_chunk_t *p_chk, vlc_fourcc_t i_fourcc)
void * _AVI_ChunkFind (avi_chunk_t *p_chk, vlc_fourcc_t i_fourcc, int i_number)

Variables

struct {
   vlc_fourcc_t   i_fourcc
   const char *   psz_type
AVI_strz_type []
struct {
   vlc_fourcc_t   i_fourcc
   int(*   AVI_ChunkRead_function )(stream_t *s, avi_chunk_t *p_chk)
   void(*   AVI_ChunkFree_function )(avi_chunk_t *p_chk)
AVI_Chunk_Function []

Define Documentation

#define __EVEN (  )     (((x) + 1) & ~1)

#define AVI_ChunkFree ( a,
 )     _AVI_ChunkFree( (a), (avi_chunk_t*)(b) )

#define AVI_DEBUG   1

#define AVI_READ ( res,
func,
size   ) 

Value:

if( i_read < size ) { \
        free( p_buff); \
        return VLC_EGENERIC; \
    } \
    i_read -= size; \
    res = func( p_read ); \
    p_read += size \

#define AVI_READ1BYTE ( i_byte   )     AVI_READ( i_byte, GetB, 1 )

#define AVI_READ2BYTES ( i_word   )     AVI_READ( i_word, GetWLE, 2 )

#define AVI_READ4BYTES ( i_dword   )     AVI_READ( i_dword, GetDWLE, 4 )

#define AVI_READ8BYTES ( i_qword   )     AVI_READ( i_qword, GetQWLE, 8 )

#define AVI_READCHUNK_ENTER

Value:

int64_t i_read = __EVEN(p_chk->common.i_chunk_size ) + 8; \
    uint8_t  *p_read, *p_buff;    \
    if( !( p_read = p_buff = malloc(i_read ) ) ) \
    { \
        return VLC_EGENERIC; \
    } \
    i_read = stream_Read( s, p_read, i_read ); \
    if( i_read < (int64_t)__EVEN(p_chk->common.i_chunk_size ) + 8 ) \
    { \
        free( p_buff ); \
        return VLC_EGENERIC; \
    }\
    p_read += 8; \
    i_read -= 8

#define AVI_READCHUNK_EXIT ( code   ) 

Value:

free( p_buff ); \
    return code

#define AVI_READFOURCC ( i_dword   )     AVI_READ( i_dword, GetFOURCC, 4 )


Function Documentation

int _AVI_ChunkCount ( avi_chunk_t p_chk,
vlc_fourcc_t  i_fourcc 
)

void* _AVI_ChunkFind ( avi_chunk_t p_chk,
vlc_fourcc_t  i_fourcc,
int  i_number 
)

void _AVI_ChunkFree ( stream_t ,
avi_chunk_t p_chk 
)

int _AVI_ChunkRead ( stream_t s,
avi_chunk_t p_chk,
avi_chunk_t p_father 
)

static void AVI_ChunkDumpDebug_level ( vlc_object_t p_obj,
avi_chunk_t p_chk,
int  i_level 
) [static]

static void AVI_ChunkFree_idx1 ( avi_chunk_t p_chk  )  [static]

static void AVI_ChunkFree_indx ( avi_chunk_t p_chk  )  [static]

static void AVI_ChunkFree_nothing ( avi_chunk_t p_chk  )  [static]

static void AVI_ChunkFree_strd ( avi_chunk_t p_chk  )  [static]

static void AVI_ChunkFree_strf ( avi_chunk_t p_chk  )  [static]

static void AVI_ChunkFree_strz ( avi_chunk_t p_chk  )  [static]

void AVI_ChunkFreeRoot ( stream_t s,
avi_chunk_t p_chk 
)

static int AVI_ChunkFunctionFind ( vlc_fourcc_t  i_fourcc  )  [static]

static int AVI_ChunkRead_avih ( stream_t s,
avi_chunk_t p_chk 
) [static]

static int AVI_ChunkRead_idx1 ( stream_t s,
avi_chunk_t p_chk 
) [static]

static int AVI_ChunkRead_indx ( stream_t s,
avi_chunk_t p_chk 
) [static]

static int AVI_ChunkRead_list ( stream_t s,
avi_chunk_t p_container 
) [static]

static int AVI_ChunkRead_nothing ( stream_t s,
avi_chunk_t p_chk 
) [static]

static int AVI_ChunkRead_strd ( stream_t s,
avi_chunk_t p_chk 
) [static]

static int AVI_ChunkRead_strf ( stream_t s,
avi_chunk_t p_chk 
) [static]

static int AVI_ChunkRead_strh ( stream_t s,
avi_chunk_t p_chk 
) [static]

static int AVI_ChunkRead_strz ( stream_t s,
avi_chunk_t p_chk 
) [static]

static int AVI_ChunkReadCommon ( stream_t s,
avi_chunk_t p_chk 
) [static]

int AVI_ChunkReadRoot ( stream_t s,
avi_chunk_t p_root 
)

static int AVI_NextChunk ( stream_t s,
avi_chunk_t p_chk 
) [static]

static uint8_t GetB ( uint8_t *  ptr  )  [inline, static]

static vlc_fourcc_t GetFOURCC ( const uint8_t *  p_buff  )  [static]


Variable Documentation

struct { ... } AVI_Chunk_Function[] [static]

void(* AVI_ChunkFree_function)(avi_chunk_t *p_chk)

int(* AVI_ChunkRead_function)(stream_t *s, avi_chunk_t *p_chk)

struct { ... } AVI_strz_type[] [static]

vlc_fourcc_t i_fourcc

vlc_fourcc_t i_fourcc

const char* psz_type


Generated on Wed Aug 13 08:03:23 2008 for VLC by  doxygen 1.5.1