Decoder functions.
More...
|
typedef struct _nugu_decoder | NuguDecoder |
| decoder object
|
|
Decoder functions.
The decoder object decodes the encoded data. It also serves to pass the decoded result to the PCM sink.
◆ nugu_decoder_new()
◆ nugu_decoder_free()
Destroy the decoder object.
- Parameters
-
- Returns
- result
- Return values
-
- See also
- nugu_decoder_new()
◆ nugu_decoder_play()
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.
- Parameters
-
[in] | dec | decoder object |
[in] | data | encoded data |
[in] | data_len | encoded data length |
- Returns
- result
- Return values
-
- See also
- nugu_decoder_decode()
◆ nugu_decoder_set_driver_data()
NUGU_API int nugu_decoder_set_driver_data |
( |
NuguDecoder * |
dec, |
|
|
void * |
data |
|
) |
| |
Set custom data for driver.
- Parameters
-
[in] | dec | decoder object |
[in] | data | custom data managed by driver |
- Returns
- result
- Return values
-
- See also
- nugu_decoder_get_driver_data()
◆ nugu_decoder_get_driver_data()
NUGU_API void* nugu_decoder_get_driver_data |
( |
NuguDecoder * |
dec | ) |
|
◆ nugu_decoder_decode()
NUGU_API void* nugu_decoder_decode |
( |
NuguDecoder * |
dec, |
|
|
const void * |
data, |
|
|
size_t |
data_len, |
|
|
size_t * |
output_len |
|
) |
| |
Decode the encoded data.
- Parameters
-
[in] | dec | decoder object |
[in] | data | encoded data |
[in] | data_len | encoded data length |
[out] | output_len | output buffer length |
- Returns
- memory allocated decoded data. Developer must free the data manually.
◆ nugu_decoder_get_pcm()