17 #ifndef __NUGU_RECORDER_H__
18 #define __NUGU_RECORDER_H__
34 #define NUGU_RECORDER_FRAME_SIZE 512
39 #define NUGU_RECORDER_MAX_FRAMES 100
44 #define NUGU_RECORDER_BUFFER_SIZE \
45 (NUGU_RECORDER_FRAME_SIZE * NUGU_RECORDER_MAX_FRAMES)
243 int *size,
int timeout);
NUGU_API int nugu_recorder_driver_set_default(NuguRecorderDriver *driver)
Set the default recorder driver.
NUGU_API NuguRecorderDriver * nugu_recorder_driver_find(const char *name)
Find a driver by name in the driver list.
NUGU_API int nugu_recorder_driver_remove(NuguRecorderDriver *driver)
Remove the driver from driver list.
NUGU_API int nugu_recorder_driver_free(NuguRecorderDriver *driver)
Destroy the recorder driver object.
NUGU_API NuguRecorderDriver * nugu_recorder_driver_new(const char *name, struct nugu_recorder_driver_ops *ops)
Create new recorder driver object.
NUGU_API NuguRecorderDriver * nugu_recorder_driver_get_default(void)
Get the default recorder driver.
NUGU_API int nugu_recorder_driver_register(NuguRecorderDriver *driver)
Register the driver to driver list.
struct _nugu_recorder_driver NuguRecorderDriver
recorder driver object
Definition: nugu_recorder.h:57
NUGU_API NuguRecorder * nugu_recorder_find(const char *name)
Find a recorder object by name in the managed list.
NUGU_API int nugu_recorder_start(NuguRecorder *rec)
Start recording.
NUGU_API int nugu_recorder_get_frame_timeout(NuguRecorder *rec, char *data, int *size, int timeout)
Get recorded data with timeout.
NUGU_API int nugu_recorder_get_frame_count(NuguRecorder *rec)
Get frame count.
NUGU_API int nugu_recorder_set_frame_size(NuguRecorder *rec, int size, int max)
Set frame size.
NUGU_API int nugu_recorder_clear(NuguRecorder *rec)
Clear recording data.
NUGU_API int nugu_recorder_push_frame(NuguRecorder *rec, const char *data, int size)
Push recorded data.
NUGU_API int nugu_recorder_get_frame(NuguRecorder *rec, char *data, int *size)
Get recorded data.
NUGU_API NuguRecorder * nugu_recorder_new(const char *name, NuguRecorderDriver *driver)
Create new recorder object.
NUGU_API int nugu_recorder_is_recording(NuguRecorder *rec)
Get the status of recording.
NUGU_API void nugu_recorder_free(NuguRecorder *rec)
Destroy the recorder object.
NUGU_API int nugu_recorder_add(NuguRecorder *rec)
Add recorder object to managed list.
struct _nugu_recorder NuguRecorder
recorder object
Definition: nugu_recorder.h:51
NUGU_API int nugu_recorder_stop(NuguRecorder *rec)
Stop recording.
NUGU_API int nugu_recorder_get_frame_size(NuguRecorder *rec, int *size, int *max)
Get frame size.
NUGU_API int nugu_recorder_set_driver_data(NuguRecorder *rec, void *data)
Set custom data for driver.
NUGU_API int nugu_recorder_remove(NuguRecorder *rec)
Remove recorder object from managed list.
NUGU_API void * nugu_recorder_get_driver_data(NuguRecorder *rec)
Get custom data for driver.
NUGU_API int nugu_recorder_set_property(NuguRecorder *rec, NuguAudioProperty property)
Set property to recorder object.
audio property
Definition: nugu_audio.h:92
Definition: nugu_recorder.h:268
int(* start)(NuguRecorderDriver *driver, NuguRecorder *rec, NuguAudioProperty property)
Called when recording is started.
Definition: nugu_recorder.h:273
int(* stop)(NuguRecorderDriver *driver, NuguRecorder *rec)
Called when recording is stopped.
Definition: nugu_recorder.h:280