Allocate all bufferpool shards of the same size, regardless of
underlying allocator. This way increase memory usage a bit, but we're
already quite heavy on that, so no big deal.
Change-Id: Icbe09cd2f9b33bc58ab1efe7de293dea00236fec
Use allocators that return memory blocks aligned to the requested size,
instead of generic malloc. This makes it easier to play tricks with the
memory blocks.
Change-Id: Iad4b1127c76e48c2e9b4ad8489118d4883a24f6a
Use provided macros for initrialise str objects everywhere instead of
manually setting .s and .len. This allows for flexibility to extend str
objects.
Change-Id: I5ebca0bc82b348301c2c8e94b974c7acbf249b82
Obsolete str_init(), rename STR_INIT() to just STR(), and replace all
instances of str_init() with STR().
no-op
Change-Id: I981529063ad2ea26089add467f7a84b638dbf423
There isn't any immediate benefit to this, but it prepares the code for
use of shared memory for statistics.
Use the opportunity to switch accesses to these to relaxed memory order.
Change-Id: I585fef7579202179fbbcbc1b843d3bbe440a723b
Switch all memory buffers used for RTP I/O from generic stack or heap
allocated memory to the bufferpool implementation. Use a per-thread
bufferpool to minimise lock contention.
This commit is just a one-for-one swap and doesn't use the bufferpool's
reference counting semantics yet.
Change-Id: I9cba4ec97bd0afcd374bf6c0be2b608a46e73e57
The poller-per-thread feature was broken with a division by zero. Take
the opportunity to rework it and eliminate the poller_map object. Use a
simple array of pollers for media sockets, plus one global poller for
control sockets. In the regular case only one poller is created and
everything points to that poller. In the poller-per-thread case, one
poller per thread is created, plus one poller (also with its own single
thread) for control connections. All control sockets use the single
control poller, while all media sockets get assigned one poller from the
pool in a round-robin fashion.
closes#1801
Change-Id: Iae91a3e10b7206455c6df33b1a472254c700ce21
Instead of using transcoding flag `_TRANSCODING`
on the monologue level, we have to use that on the media
level in order to properly reflect the level on which
transocding is being used, and also to be able to selectively
set this for specific media sessions.
Change-Id: I9a25dc7be24f80b2b6ada816448a67933c762d86
Convert each listener entity into a list.
Support a list of values for each option so that multiple
ports/addresses can be listed.
Keep previous behaviour unchanged: If ANY address is given, open
listeners for IPv4 and IPv6.
Change-Id: Ic54f28d1262f60d5e5c9d824a95e7c33ebc2aba9
Previous implementation assumes that we use the `call_subscription`
objects in:
- `call_offer_answer_ng()`
- `call_update_lookup_udp()`
- `call_request_lookup_tcp()`
when appealing to the `call_get_mono_dialogue()`, in order to
get the `call_subscription` objects, in order to then pass it
for usage in the `monologue_offer_answer()`, where the most important
again is to use monologue references stored inside
the given `call_subscription` objects.
Instead of using the `call_subscription`, just use `call_monologue`
objects as a base data objects for this work,
which will allow us in the coming commits to deprecate
the `call_subscriptions` based model and
get to the subscription model based on medias.
Change-Id: Ia9ee5ba66522929acbceca28854ebccd3705635a
These had unintentionally been disabled and so have fallen derelict.
Replace the makefile `with_amr_tests` conditional with
`RTPENGINE_EXTENDED_TESTS`. The previous `with_amr_tests` was not
actually set anywhere and so these tests never ran. The new
`RTPENGINE_EXTENDED_TESTS` is used as switch for other tests already.
Bring the tests up to date so that they compile and run.
Allow for alternative AMR bit encodings as different versions of the
codec produce different outputs.
Use an inline `struct cb_args` to pass these expected strings to the
callback functions.
Update `int` to `size_t` where appropriate.
Make a copy of the format string in `__sdp_pt_fmt` as the parsing
function temporarily writes into the string, which means a readonly
string literal doesn't work.
Update the AMR tests in test-transcode to the new API and new expected
values.
Change-Id: Ic3332e696522a28595ea06be9996001d3ab7686e
Transcoding is flow-specific, so it doesn't make sense to have a flag
for it in a call_media section. Instead we use the transcoding flag set
on the call_subscription objects (on subscribers), and set/unset a flag
on the monologue struct, depending on whether any media flows (going to
subscribers) have transcoding enabled.
Change-Id: Id671d56e56a22eaa8e56f6d449770b0c7b086cea
We have the subscription objects available now, so we can directly set
the transcoding flag without having to do a hash table lookup.
Change-Id: I2b85f34ca4d03dfaf81d92ea252902d1ee194efd
This commit parses out the string, but doesn't do anything with the
values except for the FEC flag. Move the FEC on/off switch from the
extra codec options into the `fmtp` string.
Change-Id: I51f74f7cb62dd49a9af9815920f077bf300cfa33
This type is used as const everywhere except internally, so make it part
of the typedef for brevity.
Change-Id: Ic4afe037b392239a991d5380c6708903011da29e
When doing the initial answer, the packet_stream endpoint port isn't
filled in yet. Use the stream_params port instead to test for rejected
streams.
closes#1499
Change-Id: I8f315d95521f874fb8c5e6222263d017800b5fc9
This eliminates a spurious false warning log message for rejected
streams that use a dummy payload type
Change-Id: Id628cafb8d7c4ea576cd01ff35f5dd9cd2151280
Special handling for codec lists that were received as part of an
answer: If the list includes a codec that was not offered, ignore that
codec. This prevents transcoders from being set up that were not
requested.
This brought to light some tests that were actually broken.
Change-Id: Iac71056ec5e10b5de5567917974f2c4e0261eb0c