API to access an audio microphone; provides access to hardware microphones; actually just wraps the gnunet-helper-audio-record. More...
Go to the source code of this file.
Data Structures | |
struct | Microphone |
Internal data structures for the microphone. More... | |
Functions | |
static int | process_record_messages (void *cls, const struct GNUNET_MessageHeader *msg) |
Function to process the audio from the record helper. More... | |
static int | enable (void *cls, GNUNET_MICROPHONE_RecordedDataCallback rdc, void *rdc_cls) |
Enable a microphone. More... | |
static void | disable (void *cls) |
Function that disables a microphone. More... | |
static void | destroy (void *cls) |
Function to destroy a microphone. More... | |
struct GNUNET_MICROPHONE_Handle * | GNUNET_MICROPHONE_create_from_hardware (const struct GNUNET_CONFIGURATION_Handle *cfg) |
Create a microphone that corresponds to the microphone hardware of our system. More... | |
void | GNUNET_MICROPHONE_destroy (struct GNUNET_MICROPHONE_Handle *microphone) |
Destroy a microphone. More... | |
API to access an audio microphone; provides access to hardware microphones; actually just wraps the gnunet-helper-audio-record.
Definition in file microphone.c.
|
static |
Function to process the audio from the record helper.
cls | clsoure with our struct Microphone |
msg | the message from the helper |
Definition at line 72 of file microphone.c.
References GNUNET_break, GNUNET_MESSAGE_TYPE_CONVERSATION_AUDIO, GNUNET_OK, GNUNET_SYSERR, mic, msg, GNUNET_MessageHeader::size, and GNUNET_MessageHeader::type.
Referenced by enable().
|
static |
Enable a microphone.
cls | clsoure with our struct Microphone |
rdc | function to call with recorded data |
rdc_cls | closure for dc |
Definition at line 99 of file microphone.c.
References _, GNUNET_ERROR_TYPE_ERROR, GNUNET_HELPER_start(), GNUNET_log, GNUNET_NO, GNUNET_OK, GNUNET_OS_project_data_gnunet(), GNUNET_SYSERR, mic, process_record_messages(), Microphone::rdc, and Microphone::rdc_cls.
Referenced by GNUNET_MICROPHONE_create_from_hardware().
|
static |
Function that disables a microphone.
cls | clsoure |
Definition at line 133 of file microphone.c.
References GNUNET_break, GNUNET_HELPER_destroy(), GNUNET_HELPER_kill(), GNUNET_NO, GNUNET_OK, and mic.
Referenced by destroy(), and GNUNET_MICROPHONE_create_from_hardware().
|
static |
Function to destroy a microphone.
cls | clsoure |
Definition at line 155 of file microphone.c.
References disable(), and mic.
Referenced by GNUNET_MICROPHONE_create_from_hardware(), and GNUNET_MQ_queue_for_callbacks().