libosmocodec 1.10.0.27-aec32
Osmocom codec library
|
#include <string.h>
#include <errno.h>
#include <osmocom/codec/ecu.h>
#include <osmocom/core/talloc.h>
Functions | |
struct osmo_ecu_state * | osmo_ecu_init (void *ctx, enum osmo_ecu_codec codec) |
initialize an ECU instance for given codec. More... | |
void | osmo_ecu_destroy (struct osmo_ecu_state *st) |
destroy an ECU instance More... | |
int | osmo_ecu_frame_in (struct osmo_ecu_state *st, bool bfi, const uint8_t *frame, unsigned int frame_bytes) |
process a received frame a substitute/erroneous frame. More... | |
int | osmo_ecu_frame_out (struct osmo_ecu_state *st, uint8_t *frame_out) |
generate output data for a substitute/erroneous frame. More... | |
bool | osmo_ecu_is_dtx_pause (struct osmo_ecu_state *st) |
check if the current state of this ECU is a DTX pause. More... | |
int | osmo_ecu_register (const struct osmo_ecu_ops *ops, enum osmo_ecu_codec codec) |
register an ECU implementation for a given codec More... | |
Variables | |
static const struct osmo_ecu_ops * | g_ecu_ops [_NUM_OSMO_ECU_CODECS] |
void osmo_ecu_destroy | ( | struct osmo_ecu_state * | st | ) |
destroy an ECU instance
References ARRAY_SIZE, osmo_ecu_state::codec, osmo_ecu_ops::destroy, and g_ecu_ops.
int osmo_ecu_frame_in | ( | struct osmo_ecu_state * | st, |
bool | bfi, | ||
const uint8_t * | frame, | ||
unsigned int | frame_bytes | ||
) |
process a received frame a substitute/erroneous frame.
[in] | st | ECU state/instance on which to operate |
[in] | bfi | Bad Frame Indication |
[in] | frame | received codec frame to be processed |
[in] | frame_bytes | number of bytes available in frame |
References ARRAY_SIZE, osmo_ecu_state::codec, osmo_ecu_ops::frame_in, and g_ecu_ops.
int osmo_ecu_frame_out | ( | struct osmo_ecu_state * | st, |
uint8_t * | frame_out | ||
) |
generate output data for a substitute/erroneous frame.
[in] | st | ECU state/instance on which to operate |
[out] | frame_out | buffer for generated output frame |
References ARRAY_SIZE, osmo_ecu_state::codec, osmo_ecu_ops::frame_out, and g_ecu_ops.
struct osmo_ecu_state * osmo_ecu_init | ( | void * | ctx, |
enum osmo_ecu_codec | codec | ||
) |
initialize an ECU instance for given codec.
[in] | ctx | talloc context from which to allocate |
[in] | codec | codec for which to initialize/create ECU |
References ARRAY_SIZE, osmo_ecu_state::codec, g_ecu_ops, and osmo_ecu_ops::init.
bool osmo_ecu_is_dtx_pause | ( | struct osmo_ecu_state * | st | ) |
check if the current state of this ECU is a DTX pause.
[in] | st | ECU state/instance on which to operate |
References ARRAY_SIZE, osmo_ecu_state::codec, g_ecu_ops, and osmo_ecu_ops::is_dtx_pause.
int osmo_ecu_register | ( | const struct osmo_ecu_ops * | ops, |
enum osmo_ecu_codec | codec | ||
) |
register an ECU implementation for a given codec
References ARRAY_SIZE, osmo_ecu_state::codec, and g_ecu_ops.
Referenced by __attribute__().
|
static |
Referenced by osmo_ecu_destroy(), osmo_ecu_frame_in(), osmo_ecu_frame_out(), osmo_ecu_init(), osmo_ecu_is_dtx_pause(), and osmo_ecu_register().