#include "dynstuff.h"
#include "plugins.h"
#include "dynstuff.h"
#include "plugins.h"
Idź do kodu źródłowego tego pliku.
Struktury danych | |
struct | audio |
struct | audio_io_t |
struct | codec |
struct | audio_codec_t |
struct | stream |
Definicje | |
#define | WATCHER_AUDIO(x) int x(int type, int fd, string_t buf, void *data) |
#define | __AINIT(a, way, args...) a ? a->control_handler(AUDIO_CONTROL_SET, way, NULL, args, NULL) : NULL |
#define | __CINIT(c, args...) c ? c->control_handler(AUDIO_CONTROL_SET, AUDIO_RDWR, NULL, args, NULL) : NULL |
#define | __AINIT_F(name, way, args...) __AINIT((audio_find(name)), way, args) |
#define | __CINIT_F(name, args...) __CINIT((codec_find(name)), args) |
#define | CODEC_RECODE(x) int x(int type, string_t input, string_t output, void *data) |
#define | AUDIO_CONTROL(x) audio_io_t *x(audio_control_t type, audio_way_t way, audio_io_t *aio, ...) |
#define | CODEC_CONTROL(x) audio_codec_t *x(audio_control_t type, audio_way_t way, audio_codec_t *aco, ...) |
#define | AUDIO_DEFINE(x) |
#define | CODEC_DEFINE(x) |
Definicje typów | |
typedef int | audio_handler_func_t (int type, int fd, string_t buf, void *data) |
typedef struct audio | audio_t |
typedef struct codec | codec_t |
typedef struct stream | stream_t |
Wyliczenia | |
enum | audio_control_t { AUDIO_CONTROL_INIT = 0, AUDIO_CONTROL_SET, AUDIO_CONTROL_GET, AUDIO_CONTROL_DEINIT, AUDIO_CONTROL_HELP } |
enum | audio_way_t { AUDIO_READ = 0, AUDIO_WRITE, AUDIO_RDWR } |
enum | codec_way_t { CODEC_CODE = 0, CODEC_DECODE } |
Funkcje | |
int | stream_create (char *name, audio_io_t *in, audio_codec_t *co, audio_io_t *out) |
int | audio_register (audio_t *audio) |
audio_t * | audio_find (const char *name) |
void | audio_unregister (audio_t *audio) |
int | codec_register (codec_t *codec) |
codec_t * | codec_find (const char *name) |
void | codec_unregister (codec_t *codec) |
int | audio_initialize () |
int | audio_deinitialize () |
#define __AINIT | ( | a, | ||
way, | ||||
args... | ||||
) | a ? a->control_handler(AUDIO_CONTROL_SET, way, NULL, args, NULL) : NULL |
#define __CINIT | ( | c, | ||
args... | ||||
) | c ? c->control_handler(AUDIO_CONTROL_SET, AUDIO_RDWR, NULL, args, NULL) : NULL |
#define AUDIO_CONTROL | ( | x | ) | audio_io_t *x(audio_control_t type, audio_way_t way, audio_io_t *aio, ...) |
#define AUDIO_DEFINE | ( | x | ) |
extern AUDIO_CONTROL(x##_audio_control);\ extern WATCHER_AUDIO(x##_audio_read); \ extern WATCHER_AUDIO(x##_audio_write); \ audio_t x##_audio = { \ .name = #x, \ .control_handler= (void*) x##_audio_control, \ .read_handler = x##_audio_read, \ .write_handler = x##_audio_write, \ }
#define CODEC_CONTROL | ( | x | ) | audio_codec_t *x(audio_control_t type, audio_way_t way, audio_codec_t *aco, ...) |
#define CODEC_DEFINE | ( | x | ) |
extern CODEC_CONTROL(x##_codec_control);\ extern CODEC_RECODE(x##_codec_code); \ extern CODEC_RECODE(x##_codec_decode); \ codec_t x##_codec = { \ .name = #x, \ .control_handler= (void*) x##_codec_control, \ .code_handler = x##_codec_code, \ .decode_handler = x##_codec_decode, \ }
typedef int audio_handler_func_t(int type, int fd, string_t buf, void *data) |
enum audio_control_t |
enum audio_way_t |
enum codec_way_t |
int audio_deinitialize | ( | ) |
audio_t* audio_find | ( | const char * | name | ) |
Find audio_t by name
name | - name of audio_t |
int audio_initialize | ( | ) |
int audio_register | ( | audio_t * | audio | ) |
Register new audio I/O (audio)
audio | - audio_t to register |
void audio_unregister | ( | audio_t * | audio | ) |
Unregister audio_t
audio | - audio_t to unregister |
codec_t* codec_find | ( | const char * | name | ) |
Find codec_t by name
name | - name of codec_t |
int codec_register | ( | codec_t * | codec | ) |
Register new codec_t (codec)
codec | - codec_t to register |
void codec_unregister | ( | codec_t * | codec | ) |
Unregister codec_t
codec | - codec_t to unregister |
int stream_create | ( | char * | name, | |
audio_io_t * | in, | |||
audio_codec_t * | co, | |||
audio_io_t * | out | |||
) |
Function to create streams /input fd/ --> [codec function] --> /output fd or function/