The GLib slice allocator has been obsoleted. Having a mixture of two
allocators can lead to hidden issues on systems that use different
implementations. Take the leap and replace everything with g_new/g_free.
Change-Id: I025c8383ef47b2c2472573360407fd6a6ca339b3
Teach rtpengine to distinguish between G.729 with and without annex B,
which are incompatible to each other.
Change-Id: I09b66a097007ba3283546880f06f81b4f89e126d
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
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
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
For typed hash tables, enforce the correct type in the arguments to the
hashing and equality functions.
Adapt existing affected callback functions and change their arguments
from void* to the respective types.
Add reverse casts to GHashFunc and GEqualFunc in instances where these
functions are used in non-typed hash tables (that should be converted at
a later point).
Add convenience macro to create typed wrapper functions for hash tables
that use "direct" hashing (i.e. the pointer value).
Add wrappers for existing GLib functions that have generic arguments so
that they can be used in typed hash tables.
Change-Id: I43bb32969208f4aae49584d95c0df8353df6e2a0
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
With hf-only=0 set and cmr=1 also set, we send a blank CMR with each
packet, which forces use of HF format packets. This in turn can lead to
size collisions (e.g. mode 1 = 18 bytes, + CMR + TOC = 20 bytes, which
is the same as mode 2) which can confuse the decoder. Add the required
size collision logic.
Change-Id: Icd540cfb321b4eaf77a0ed7d08be06d8681b6214
As we don't directly append to an existing GString any more anyway,
simplify the function signature by just returning a new GString if the
format string is known.
Change-Id: I9f8e6fbd93ea063eecb519cd57366effd4022f75
*) Remove packaging for -gpu packages
*) Remove build profile restrictions, except for the build dependency
itself
*) Remove script to generate dh fragments for -gpu packages
*) Convert --cudecs switch to a path argument pointing to the .so
*) Don't link against libcudecs during build
*) Only include the single types.h header needed for usage as a plugin
*) Resolve all symbols during startup after loading the .so
Change-Id: Ide99eec2156d5d3be8c40594391cb1603add4b16
Consider errors from dlopen() or dlsym() as hard errors. Don't just log
an error message and continue startup. If we were instructed to load a
plugin, make sure that we could actually load it.
Change-Id: I1fcfa149a0eae277ef528fd3cef249ea7882e781
Some gcc targets report ifunc as a supported attribute, while at the
same time actually trying to build the object fails with "ifunc not
supported on this target". Be more prejudicial with ifunc usage.
Change-Id: I5820338476938bf581d6d9e38fe0e6fd48f0b874
Introduce rtpe_has_cpu_flag() and associated enum to test for specific
CPU flags. Use singleton approach to do the CPUID only once.
Convert simd_float2int16_array() to float2int16_array() as an ifunc. The
resolver function uses rtpe_has_cpu_flag() to determine which
implementation to use.
If no SIMD implementation is available, use the linked evs_syn_output()
from the shared object as before, with an intermediate wrapper function,
which is needed as the dlopen() happens only after the
float2int16_array() is resolved.
Change-Id: I34fa03433ba5d6fa7d6d4f290455015db29fdd74
Generate the output fmtp= string based on the preferences received from
the opposite side. Also add the required format printing function.
Change-Id: I12124efe0b9876c6571bc32c1c45744af80b83d3
If the remote Opus decoder prefers receiving single-channel encoded
audio, honour it and send them single-channel audio.
Change-Id: I4bf952b9f922099c95e19b0ab51fbdffb2cc19db