17 #ifndef __NUGU_DECODER_H__
18 #define __NUGU_DECODER_H__
118 size_t data_len,
size_t *output_len);
167 const void *data,
size_t data_len,
NuguBuffer *out_buf);
struct _nugu_buffer NuguBuffer
Buffer object.
Definition: nugu_buffer.h:52
NUGU_API int nugu_decoder_driver_remove(NuguDecoderDriver *driver)
Remove the driver from driver list.
NUGU_API NuguDecoderDriver * nugu_decoder_driver_find(const char *name)
Find a driver by name in the driver list.
NUGU_API int nugu_decoder_driver_register(NuguDecoderDriver *driver)
Register the driver to driver list.
NUGU_API NuguDecoderDriver * nugu_decoder_driver_find_bytype(enum nugu_decoder_type type)
Find a driver by type in the driver list.
NUGU_API int nugu_decoder_driver_free(NuguDecoderDriver *driver)
Destroy the decoder driver.
nugu_decoder_type
decoder type
Definition: nugu_decoder.h:146
struct _nugu_decoder_driver NuguDecoderDriver
decoder driver object
Definition: nugu_decoder.h:42
NUGU_API NuguDecoderDriver * nugu_decoder_driver_new(const char *name, enum nugu_decoder_type type, struct nugu_decoder_driver_ops *ops)
Create new decoder driver.
@ NUGU_DECODER_TYPE_CUSTOM
Definition: nugu_decoder.h:148
@ NUGU_DECODER_TYPE_OPUS
Definition: nugu_decoder.h:147
NUGU_API int nugu_decoder_set_driver_data(NuguDecoder *dec, void *data)
Set custom data for driver.
NUGU_API void * nugu_decoder_get_driver_data(NuguDecoder *dec)
Get custom data for driver.
NUGU_API int nugu_decoder_free(NuguDecoder *dec)
Destroy the decoder object.
NUGU_API int nugu_decoder_play(NuguDecoder *dec, const void *data, size_t data_len)
Decode the encoded data and pass the result to sink.
struct _nugu_decoder NuguDecoder
decoder object
Definition: nugu_decoder.h:36
NUGU_API NuguDecoder * nugu_decoder_new(NuguDecoderDriver *driver, NuguPcm *sink)
Create new decoder object.
NUGU_API void * nugu_decoder_decode(NuguDecoder *dec, const void *data, size_t data_len, size_t *output_len)
Decode the encoded data.
NUGU_API NuguPcm * nugu_decoder_get_pcm(NuguDecoder *dec)
Get pcm(sink) object.
struct _nugu_pcm NuguPcm
pcm object
Definition: nugu_pcm.h:37
decoder driver operations
Definition: nugu_decoder.h:155
int(* destroy)(NuguDecoderDriver *driver, NuguDecoder *dec)
Called when the decoder is destroyed.
Definition: nugu_decoder.h:172
int(* decode)(NuguDecoderDriver *driver, NuguDecoder *dec, const void *data, size_t data_len, NuguBuffer *out_buf)
Called when a decoding request is received from the decoder.
Definition: nugu_decoder.h:166
int(* create)(NuguDecoderDriver *driver, NuguDecoder *dec)
Called when creating a new decoder.
Definition: nugu_decoder.h:160