Add a callback type to read config groups and their contents based on a
group prefix.
Unused at this point.
Change-Id: I7d9e043e96f48e599bc4da2d8ef4079559cb8b47
Switch from specialised handling of config sections (used to load
signalling templates) to a more general approach using a callback
mechanism. This allows us to add more information to the config file
while keeping the details of the underlying GKeyFile hidden. Use a typed
hash table for type safety.
Change-Id: I71ddfda0202b47df363bcc5acf1725078774f8f1
These are potentially computed from inside each subdir, and in addition
due to what appears to be a regression in GNU make 4.4, where it is
reevaluating variables that contain $(shell) functions, many times (in
the order of thousands, this was slowing down the build, were on the
Debian amd64 build daemons it went from 5m with GNU make 4.3 to 2h40m
with GNU make 4.4. Although the bulk of the slow down has been fixed
with previous commits, the remaining optimizations are only to avoid
this potentially happening again in the future, and to reduce useless
duplicate work.
Instead of trying to cache the values from within make itself, where
programming this there is extremely painful, and does not seem to be
able to greatly reduce the number of calls, because the build system
is going to be called multiple times for different targets. Simply
externalize the generation into several shell scripts, that we call
to generate a make fragment that then we include from the various
Makefiles.
For a Debian build with GNU make 4.3, this reduces the amount of total
pkg-config calls from around ~1600 to 128, for dpkg-buildflags from
~1100 down to 6, and for dpkg-parsechangelog from ~56 to 17, but the
slow down is not as significant there anyway.
For a Debian build with GNU make 4.4, this reduces the amount of total
pkg-config calls from around ~2600 to 128, for dpkg-buildflags from
~2800 down to 6, and for dpkg-parsechangelog from ~350 to 21.
For a Debian build with GNU make 4.4, this reduces the build time
on this system from 2m10s to ~ 1m30s.
Change-Id: I427d0ea5106dc6ed1ff9e664ccdba2fa0725b7d0
This variable is unknown to dpkg-buildflags. This also reduces the
amount of global calls generated with GNU make 4.4 (which has a
regression causing massive amounts of shell calls to be generated).
Change-Id: Ia9d7099228bf5e181df4725939ed4f76f1e63dc9
This makes sure the target is the default, regardless of the place where
it gets declared, so that we do not get surprises due to targets
declared in includes that might happened to be performed before the
default target.
Change-Id: I2fab47ccb46d68dc56332acef966e369c5183c07
Starting with GNU make 4.4, build time have massively regressed
where before they would take 5m on amd64 now can take 2h40m. While this
seems clearly broken, the release notes are filled with notices for
breaking changes, and in particular the one for passing all make
variables down to the invoked programs executed via the «shell» GNU make
function, so it is not clear what is expected breakage and what is not.
This has been reported in Debian, but not yet upstream, and while it
seems like a clear regression, it's not clear what will be the upstream
take on it. For now apply workarounds that do not change semantics, and
which do not regress with older GNU make versions.
Use the GNU make «origin» function instead of «?=» which defaults to
defining a variable as a recursive one. Coerce already defined variables
into simple ones to avoid GNU make re-evaluating these variables for
each «shell» function invocation.
Ref: https://bugs.debian.org/1092051
Change-Id: I076fc05dd616918473a22e7e942fecfdc9851d47
Teach rtpengine to distinguish between G.729 with and without annex B,
which are incompatible to each other.
Change-Id: I09b66a097007ba3283546880f06f81b4f89e126d
This allows us to deallocate all held strings in one go without having
to iterate much.
Requires adjusting tests, Makefiles and dependencies.
Change-Id: Ic214f9dd2cd9609cb472301f52bb10d1918d859e
Change old code to directly return `str` objects instead of pointers to
allocated ones. Largely a no-op change but makes some code easier and
eliminates some old kludges.
Change-Id: I2be19dd24bb7ff046d86cc32a3af235283e65dd0
Make the macro return the appropriate pointer type, and make sure the
free function takes an argument of the same type. This also eliminates
some boilerplate type-casting code.
Change-Id: I3094271fa2c53ec93b9ff9f837d461cf422e0f12
In many transcoding scenarios resampling is not actually required. We
can shortcut the operation by just returning the original frame, instead
of a cloned and newly allocated one. We just need to distinguish between
the cases to determine whether the frame returned by resample_frame()
needs to be freed.
Change-Id: I3f36a46bd3b967f140c8353119fdb24ad8363c15
In some cases, in particular when multiple input codecs are transcoding
to the same output codec (e.g. audio + DTMF -> audio), it's possible
that one of the input decoders produces frames in a format different
from the one expected by the encoder. Add an encoder-side resampler to
compensate for that.
Change-Id: I74d55edf47ac2fa65f950e68f4a5975f1ab947bb
ffmpeg 7.1+ has deprecated direct usage of ->sample_fmts in favour of a
call to avcodec_get_supported_config(). Update accordingly.
Change-Id: I0fbecbbcf52c38976f3387e34d816d11e1d09480
When re-connecting to the remote redis server
try to re-resolve if the redist hostname
was an FQDN and not IP address.
Change-Id: Ie80e1d1a1ea76811c54123201ad4fe8cb64fc748
g_option_context_parse() modifies the argv given to it, so g_strfreev()
called during the cleanup cannot free all the strings that have been
duplicated by g_strdupv(). Make a second, shallow copy of the array, and
use that to free all the strings that were duplicated.
Change-Id: Ifcb31cb5e6141a1e15de47e11ab800c9d3e0ab10
Add support for simplified G.107 formula, with math changed to
fixed-point. Retain legacy formula as an option for backwards
compatibility.
Change-Id: I999fc7de7be1407876c201c251538cea72b04008
Fix the math in the sequencer code to determine ROC and extended
sequence number. This has become significant as the sequence numbers are
written into shared memory space.
Change-Id: I9e519a29a3822d02f7c389920ee0909b48828525
If a string is already stored within the call's memory arena, skip
duplicating the string content when making a copy, and simply return the
same pointer.
Change-Id: I50107d87b2625234a395da21e1e4551585966a60
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
Convenience wrapper for &STR()
This is useful so that STR() and STR_DUP() can be extended to avoid
duplicate expansion of its macro arguments.
Change-Id: Ieae170807c11b0cdd8b52fac9bab98dccdc2b951
Use a small stack buffer instead of obtaining a thread-local one when
writing directly to a GString.
Change-Id: Ia15b8eee365ddb14e35eddc72358c4793ccba7d9
This is needed on armel due to
/usr/bin/ld: ./../lib/auxlib.h:513: undefined reference to `__atomic_compare_exchange_8'
/usr/bin/ld: ./../lib/auxlib.h:507: undefined reference to `__atomic_load_8'
etc
Change-Id: I37793cb4d166a9cd8004a7a6b45ce67cb98d3798