diff options
author | Alfred E. Heggestad <alfred.heggestad@gmail.com> | 2018-02-03 18:32:38 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-03 18:32:38 +0100 |
commit | 74db759ddbed32127ae763ab72be552cff2aebcc (patch) | |
tree | 123ceaaf86cf06a211d8dc29a97007f36cdaa236 /include/baresip.h | |
parent | 671f293bbdf8f234a73d8c2e6fb75a8ee3d039ce (diff) |
Aucodec sample format (#352)
* aucodec: merge s16 and fmt encode/decode into one
having 2 different encode functions for s16 and other formats
turned out to be a bit impractical. better to have 1 function
where the sample format (fmt) can be specified.
* update some aucodec modules
* update test
* update codec2
* update g7221 module
Diffstat (limited to 'include/baresip.h')
-rw-r--r-- | include/baresip.h | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/include/baresip.h b/include/baresip.h index ee2cdbf..1e7e862 100644 --- a/include/baresip.h +++ b/include/baresip.h @@ -839,21 +839,17 @@ struct aucodec; typedef int (auenc_update_h)(struct auenc_state **aesp, const struct aucodec *ac, struct auenc_param *prm, const char *fmtp); -typedef int (auenc_encode_h)(struct auenc_state *aes, uint8_t *buf, - size_t *len, const int16_t *sampv, size_t sampc); -typedef int (auenc_encode_fmt_h)(struct auenc_state *aes, - uint8_t *buf, size_t *len, - int fmt, const void *sampv, size_t sampc); +typedef int (auenc_encode_h)(struct auenc_state *aes, + uint8_t *buf, size_t *len, + int fmt, const void *sampv, size_t sampc); typedef int (audec_update_h)(struct audec_state **adsp, const struct aucodec *ac, const char *fmtp); -typedef int (audec_decode_h)(struct audec_state *ads, int16_t *sampv, - size_t *sampc, const uint8_t *buf, size_t len); -typedef int (audec_decode_fmt_h)(struct audec_state *ads, - int fmt, void *sampv, size_t *sampc, - const uint8_t *buf, size_t len); +typedef int (audec_decode_h)(struct audec_state *ads, + int fmt, void *sampv, size_t *sampc, + const uint8_t *buf, size_t len); typedef int (audec_plc_h)(struct audec_state *ads, - int16_t *sampv, size_t *sampc); + int fmt, void *sampv, size_t *sampc); struct aucodec { struct le le; @@ -870,8 +866,6 @@ struct aucodec { audec_plc_h *plch; sdp_fmtp_enc_h *fmtp_ench; sdp_fmtp_cmp_h *fmtp_cmph; - auenc_encode_fmt_h *encfmth; - audec_decode_fmt_h *decfmth; }; void aucodec_register(struct list *aucodecl, struct aucodec *ac); |