This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
dexter gerrit-no-reply at lists.osmocom.orgdexter has uploaded this change for review. ( https://gerrit.osmocom.org/c/libosmocore/+/15574 Change subject: ecu_fr: remove osmo_ecu_fr function prototypes from ecu.h ...................................................................... ecu_fr: remove osmo_ecu_fr function prototypes from ecu.h The specific ECU implementation should not be reachable from outside. Remove those prototypes from ecu.h and use the ecu abstration api to carry out the unit-tests Change-Id: Ib0c8a9b164f14ea4fa00688f760a76cdb4890af4 --- M include/osmocom/codec/ecu.h M tests/codec/codec_ecu_fr_test.c 2 files changed, 6 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/74/15574/1 diff --git a/include/osmocom/codec/ecu.h b/include/osmocom/codec/ecu.h index 927ca0d..15f2ccb 100644 --- a/include/osmocom/codec/ecu.h +++ b/include/osmocom/codec/ecu.h @@ -11,9 +11,6 @@ uint8_t frame_backup[GSM_FR_BYTES]; }; -void osmo_ecu_fr_reset(struct osmo_ecu_fr_state *state, const uint8_t *frame); -int osmo_ecu_fr_conceal(struct osmo_ecu_fr_state *state, uint8_t *frame); - enum osmo_ecu_codec { OSMO_ECU_CODEC_HR, OSMO_ECU_CODEC_FR, diff --git a/tests/codec/codec_ecu_fr_test.c b/tests/codec/codec_ecu_fr_test.c index 7ebc558..ff57902 100644 --- a/tests/codec/codec_ecu_fr_test.c +++ b/tests/codec/codec_ecu_fr_test.c @@ -145,7 +145,7 @@ /* Simulate a real life situation: voice frames with a few dropouts */ void test_fr_concealment_realistic() { - struct osmo_ecu_fr_state state; + struct osmo_ecu_state *state = osmo_ecu_init(NULL, OSMO_ECU_CODEC_FR); uint8_t frame[GSM_FR_BYTES]; unsigned int frame_len; int rc, i = 0; @@ -161,12 +161,12 @@ if (frame_len == GSM_FR_BYTES) { printf(" * input: %s\n", fr_frames_hex[i]); osmo_hexparse(fr_frames_hex[i], frame, GSM_FR_BYTES); - osmo_ecu_fr_reset(&state, frame); + osmo_ecu_frame_in(state, false, frame, GSM_FR_BYTES); } else { printf(" * input: (bad)\n"); memset(frame, 0x00, GSM_FR_BYTES); - rc = osmo_ecu_fr_conceal(&state, frame); - OSMO_ASSERT(rc == 0); + rc = osmo_ecu_frame_out(state, frame); + OSMO_ASSERT(rc == GSM_FR_BYTES); } /* Print result */ @@ -176,6 +176,8 @@ /* Go to the next frame */ i++; } + + osmo_ecu_destroy(state); } /* Simulate a real life situation: voice frames with a few dropouts, using generic core */ -- To view, visit https://gerrit.osmocom.org/c/libosmocore/+/15574 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: libosmocore Gerrit-Branch: master Gerrit-Change-Id: Ib0c8a9b164f14ea4fa00688f760a76cdb4890af4 Gerrit-Change-Number: 15574 Gerrit-PatchSet: 1 Gerrit-Owner: dexter <pmaier at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190919/e042cfbb/attachment.htm>