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
There is enough overlap between the two enums that it doesn't make sense
to carry along both. Unify.
Change-Id: I9de8fbdb8d78a2002d8c1b62cea57188c937d61d
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
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
Allocate memory from bufferpool for per-stream stats. No functional
change, but it allows sharing these between kernel and user space.
Change-Id: I370a49e1d94bb91c7fd0a2bc7d00ba65f99c4f6a
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
In the file implementations follow the rules:
1. Firstly goes the correlated header file, then one empty row.
2. Secondly go system headers, so in angle-brackets, then one empty row.
3. Thirdly, go custom header files, so in double quotes,
then one empty row.
4. If there is "xt_RTPENGINE.h", it's mentioned next, but separately,
then one empty row.
5. If there are pre-processor definitions, they are added.
6. And eventually at least one empty row before the code.
In some situations it's allowed to step aside from the rules,
when inclusions are dependent on each other, so on the sequence,
and also possibly on some inline objects definitions, but if possible
to follow the rules, it's being done.
Change-Id: Ie512a970e230fe202398656d1942e8874bb14cd9
Fix all instances of argument-less function signatures.
Fix all instances of auto-cleanup variables declared after they need to
be in scope.
Change-Id: I3a005df03ede971e08d4f62d7c7711a1913fda5e
Similarly as for the `stats_rate_min_max()`,
move the `stats_counters_calc_rate()` functionality
to the same separate thread, so that we do the work
more efficiently and not be dependent on the call_timer
runs by poller.
Furthermore it makes more sense to keep in the `statistics.c`,
since it obviously has to do with statistics.
Additionally:
Update the test-stats due to these changes in the `call_timer()`
We have to call the `stats_counters_calc_rate()` now explicitely from
the test-stats.c, because the `call_timer()` is not anymore
responsible for providing stats counters rate calculations.
Change-Id: I1682eb76e3057f0f431c27b9633717d965313a1a
To do the work more efficiently,
and not be dependent on the call_timer runs by poller,
we should move the `stats_rate_min_max()` to a separate thread,
to make it faster and not be dependent on what happens in the `call_timer` at all.
Since it has nothing to do with the call timers.
Change-Id: I9a39e1b63cb8741377f5af5b2d52d4f8b428a0ad
Using a pointer array instead of a linked lists allows us to directly
reference a media section by index number, without having to spool into
the linked list.
No functional changes.
Change-Id: I8b0e93f0c2e9addbcb4c938894118ed4a6aec768