#include <stdarg.h>#include <stdlib.h>#include <unistd.h>#include <sys/types.h>#include <sys/stat.h>#include <fcntl.h>#include <string.h>#include <errno.h>#include "audio.h"#include "commands.h"#include "debug.h"#include "dynstuff.h"#include "dynstuff_inline.h"#include "plugins.h"#include "themes.h"#include "stuff.h"#include "xmalloc.h"#include "audio_wav.h"Struktury danych | |
| struct | stream_private_t |
Definicje | |
| #define | __SET(args...) |
Funkcje | |
| AUDIO_DEFINE (stream) | |
| DYNSTUFF_LIST_DECLARE_NF (audio_inputs, audio_t, static __DYNSTUFF_LIST_ADD, static __DYNSTUFF_LIST_UNLINK) DYNSTUFF_LIST_DECLARE_NF(audio_codecs | |
| static static static __DYNSTUFF_LIST_UNLINK | __DYNSTUFF_LIST_ADD (streams, stream_t, NULL) |
| int | cmd_streams (const char *name, const char **params, session_t *session, const char *target, int quiet) |
| codec_t * | codec_find (const char *name) |
| int | codec_register (codec_t *codec) |
| void | codec_unregister (codec_t *codec) |
| audio_t * | audio_find (const char *name) |
| int | audio_register (audio_t *audio) |
| void | audio_unregister (audio_t *audio) |
| int | stream_audio_read (int type, int fd, string_t buf, void *data) |
| int | stream_audio_write (int type, int fd, string_t buf, void *data) |
| AUDIO_CONTROL (stream_audio_control) | |
| int | stream_handle_write (int type, int fd, const char *watch, void *data) |
| int | stream_handle (int type, int fd, watch_type_t watch, void *data) |
| int | stream_create (char *name, audio_io_t *in, audio_codec_t *co, audio_io_t *out) |
| audio_io_t * | stream_as_audio (stream_t *s) |
| int | audio_initialize () |
| int | audio_deinitialize () |
Zmienne | |
| codec_t * | audio_codecs |
| audio_t * | audio_inputs |
| stream_t * | streams |
| codec_t | |
| static | __DYNSTUFF_LIST_ADD |
| #define __SET | ( | args... | ) |
(co) ? co->c->control_handler(AUDIO_CONTROL_SET, AUDIO_RDWR, co, args) : \ out->a->control_handler(AUDIO_CONTROL_SET, AUDIO_RDWR, co, args)
| static static static __DYNSTUFF_LIST_UNLINK __DYNSTUFF_LIST_ADD | ( | streams | , | |
| stream_t | , | |||
| NULL | ||||
| ) | [static] |
| AUDIO_CONTROL | ( | stream_audio_control | ) |
| AUDIO_DEFINE | ( | stream | ) |
| 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 |
| int cmd_streams | ( | const char * | name, | |
| const char ** | params, | |||
| session_t * | session, | |||
| const char * | target, | |||
| int | quiet | |||
| ) |
| 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 |
| DYNSTUFF_LIST_DECLARE_NF | ( | audio_inputs | , | |
| audio_t | , | |||
| static | __DYNSTUFF_LIST_ADD, | |||
| static | __DYNSTUFF_LIST_UNLINK | |||
| ) |
| audio_io_t* stream_as_audio | ( | stream_t * | s | ) |
stream_create("Reencoding from MPEG to OGG",
__AINIT_F("stream", AUDIO_READ, "file", "plik.mp3", "format", "mp3"), READING FROM FILE: plik.mp3 WITH FORMAT mp3
__CINIT_F("lame", ....), INIT LAME CODEC
__AINI(stream_as_audio( INIT ANOTHER STREAM, HERE WE HAVE DATA IN PCM FORMAT
stream_create("Reencoding from MPEG to OGG (part II)",
NULL, WE PASS AS INPUT HERE NULL.
__CINIT_F("ogg", .....), INIT OGG CODEC
__AINIT_F("stream", AUDIO_WRITE, "file", "plik.ogg", "format", "ogg") WRITE OGG FILE TO DISK
))
)
);
But it was only idea... and i had/have no time for it. For now... So if you really want this feature. implement it ;)| s | - stream_t to convert. |
| int stream_audio_read | ( | int | type, | |
| int | fd, | |||
| string_t | buf, | |||
| void * | data | |||
| ) |
| int stream_audio_write | ( | int | type, | |
| int | fd, | |||
| string_t | buf, | |||
| void * | data | |||
| ) |
| 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/
| int stream_handle | ( | int | type, | |
| int | fd, | |||
| watch_type_t | watch, | |||
| void * | data | |||
| ) |
| int stream_handle_write | ( | int | type, | |
| int | fd, | |||
| const char * | watch, | |||
| void * | data | |||
| ) |
__DYNSTUFF_LIST_ADD [static] |
1.7.1