#include "dynstuff.h"
#include "plugins.h"
Idź do kodu źródłowego tego pliku.
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) |
Dokumentacja definicji
#define AUDIO_DEFINE |
( |
|
x | ) |
|
Wartość:
.control_handler= (void*) x##_audio_control, \
.read_handler = x##_audio_read, \
.write_handler = x##_audio_write, \
}
#define CODEC_DEFINE |
( |
|
x | ) |
|
Wartość:
.control_handler= (void*) x##_codec_control, \
.code_handler = x##_codec_code, \
.decode_handler = x##_codec_decode, \
}
#define WATCHER_AUDIO |
( |
|
x | ) |
int x(int type, int fd, string_t buf, void *data) |
Dokumentacja definicji typów
typedef int audio_handler_func_t(int type, int fd, string_t buf, void *data) |
Dokumentacja typów wyliczanych
- Wartości wyliczeń:
AUDIO_CONTROL_INIT |
|
AUDIO_CONTROL_SET |
|
AUDIO_CONTROL_GET |
|
AUDIO_CONTROL_DEINIT |
|
AUDIO_CONTROL_HELP |
|
- Wartości wyliczeń:
AUDIO_READ |
|
AUDIO_WRITE |
|
AUDIO_RDWR |
|
Dokumentacja funkcji
int audio_deinitialize |
( |
| ) |
|
audio_find()
Find audio_t by name
- Parametry
-
- Zwraca
- if name founded, return struct describing it. else NULL
int audio_register |
( |
audio_t * |
audio | ) |
|
void audio_unregister |
( |
audio_t * |
audio | ) |
|
codec_find()
Find codec_t by name
- Parametry
-
- Zwraca
- if name founded, return struct describing it, else NULL
int codec_register |
( |
codec_t * |
codec | ) |
|
void codec_unregister |
( |
codec_t * |
codec | ) |
|
stream_create()
Function to create streams /input fd/ –> [codec function] –> /output fd or function/
- Nota
- in->fd must != -1, out->fd can be -1
- Do zrobienia:
- Implement errors. make param , char **error
Pass it to AUDIO_CONTROL_INIT and if smth fail, there should be allocated description of error.
- Do zrobienia:
- Implement stream_close()
- Zwraca
- 1 on sucess [created stream_t] or 0 if fail.