From 5654c43f80a48b99bdbd5179d87f9b1a5cf55fa4 Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Sat, 20 Oct 2012 20:10:31 +0200 Subject: osmux: remove generic functions to register and get ccid Remove these functions: - osmux_xfrm_input_get_ccid - osmux_xfrm_input_register_ccid The ccid will be managed by the BSC and it will be stored in the mgcp_endpoint structure. Also adjust all tests and examples using the API. --- examples/osmux-test-input.c | 51 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 46 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/osmux-test-input.c b/examples/osmux-test-input.c index 3203b4d..67996ad 100644 --- a/examples/osmux-test-input.c +++ b/examples/osmux-test-input.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -84,11 +85,51 @@ struct osmux_in_handle h_input = { .deliver = osmux_deliver, }; +#define MAX_CONCURRENT_CALLS 8 + +static int ccid[MAX_CONCURRENT_CALLS]; + +static int get_ccid(uint32_t ssrc) +{ + int i, found = 0; + + for (i=0; ipayload_type == RTP_PT_AMR) amr_write(msg); - /* now build the osmux frame */ - if (osmux_xfrm_input_get_ccid(&h_input, rtph->ssrc) < 0) - osmux_xfrm_input_register_ccid(&h_input, rtph->ssrc); + ccid = get_ccid(rtph->ssrc); + if (ccid < 0) + register_ccid(rtph->ssrc); - while ((ret = osmux_xfrm_input(&h_input, msg)) > 0) { + while ((ret = osmux_xfrm_input(&h_input, msg, ccid)) > 0) { /* batch full, deliver it */ osmux_xfrm_input_deliver(&h_input); } -- cgit v1.2.3