|
ekg2
|
#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...) |
Zmienne | |
| codec_t * | audio_codecs |
| audio_t * | audio_inputs |
| stream_t * | streams |
| codec_t | |
| static | __DYNSTUFF_LIST_ADD |
| #define __SET | ( | args... | ) |
|
static |
| AUDIO_CONTROL | ( | stream_audio_control | ) |
| AUDIO_DEFINE | ( | stream | ) |
| int audio_deinitialize | ( | ) |
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 | ||
| ) |
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 | ||
| ) |
|
static |
| codec_t* audio_codecs |
| audio_t* audio_inputs |
| stream_t* streams |
1.8.1.2