zenilib  0.5.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
alffmpeg.h File Reference
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>

Go to the source code of this file.

Typedefs

typedef struct MyFile * FilePtr
 
typedef struct MyStream * StreamPtr
 

Functions

void closeAVFile (FilePtr file)
 
voiddecodeAVAudioStream (StreamPtr stream, size_t *length)
 
uint8_tgetAVAudioData (StreamPtr stream, size_t *length)
 
int getAVAudioInfo (StreamPtr stream, ALuint *rate, ALenum *channels, ALenum *type)
 
StreamPtr getAVAudioStream (FilePtr file, int streamnum)
 
int getAVFileInfo (FilePtr file, int *numaudiostreams)
 
FilePtr openAVCustom (const char *name, void *user_data, int(*read_packet)(void *user_data, uint8_t *buf, int buf_size), int(*write_packet)(void *user_data, uint8_t *buf, int buf_size), int64_t(*seek)(void *user_data, int64_t offset, int whence))
 
FilePtr openAVData (const char *name, char *buffer, size_t buffer_len)
 
FilePtr openAVFile (const char *fname)
 
size_t readAVAudioData (StreamPtr stream, void *data, size_t length)
 

Typedef Documentation

typedef struct MyFile* FilePtr

Definition at line 13 of file alffmpeg.h.

typedef struct MyStream* StreamPtr

Definition at line 14 of file alffmpeg.h.

Function Documentation

void closeAVFile ( FilePtr  file)

Definition at line 271 of file alffmpeg.c.

References free, and i.

Referenced by ClosePlayerFile(), LoadSound(), and OpenPlayerFile().

void* decodeAVAudioStream ( StreamPtr  stream,
size_t length 
)

Definition at line 611 of file alffmpeg.c.

References getAVAudioData(), memcpy, NextPowerOf2(), NULL, and realloc.

Referenced by LoadSound().

uint8_t* getAVAudioData ( StreamPtr  stream,
size_t length 
)

Definition at line 503 of file alffmpeg.c.

References getNextPacket(), memmove, memset, and NULL.

Referenced by decodeAVAudioStream(), and readAVAudioData().

int getAVAudioInfo ( StreamPtr  stream,
ALuint rate,
ALenum channels,
ALenum type 
)
StreamPtr getAVAudioStream ( FilePtr  file,
int  streamnum 
)

Definition at line 318 of file alffmpeg.c.

References calloc, file, free, i, j, NULL, and realloc.

Referenced by LoadSound(), and OpenPlayerFile().

int getAVFileInfo ( FilePtr  file,
int numaudiostreams 
)

Definition at line 303 of file alffmpeg.c.

References i.

FilePtr openAVCustom ( const char *  name,
void user_data,
int(*)(void *user_data, uint8_t *buf, int buf_size)  read_packet,
int(*)(void *user_data, uint8_t *buf, int buf_size)  write_packet,
int64_t(*)(void *user_data, int64_t offset, int whence)  seek 
)

Definition at line 221 of file alffmpeg.c.

References calloc, done_init, file, free, and NULL.

FilePtr openAVData ( const char *  name,
char *  buffer,
size_t  buffer_len 
)

Definition at line 185 of file alffmpeg.c.

References calloc, done_init, file, free, MemData_read(), MemData_seek(), MemData_write(), and NULL.

FilePtr openAVFile ( const char *  fname)

Definition at line 161 of file alffmpeg.c.

References calloc, done_init, file, free, and NULL.

Referenced by LoadSound(), and OpenPlayerFile().

size_t readAVAudioData ( StreamPtr  stream,
void data,
size_t  length 
)

Definition at line 567 of file alffmpeg.c.

References getAVAudioData(), memcpy, and NULL.

Referenced by StartPlayer(), and UpdatePlayer().