Introduce a common NG commands table `ng_command_defs`
for all type of things: OP enum, name, escaped name,
short name and most important the handler.
This table operates on and returns a dedicated struct `ng_command_def`,
which has all the information required on the command (like
all type of things mentioned above) and may have either
single-parameter or double-parameter signature (for cases with
the `addr` requiring commands such as the offer command).
Also add unified signatures for X and XA handlers,
they will be used later accordingly. Most of those use single-parameter,
and those exceptional use the second one.
Also add dummy plug-functions for ping and block/unblock silence media.
The ping one doesn't have any particular handler, but because a new
structure of NG commands wants to see a real declaration of the func
handler, just give it. For the block/unblock silence media, there aren't
even handling of commands in the control NG, they are just dummy OPs,
so fulfill the actual NG commands structure, and give them dummy funcs.
Change-Id: I2064ddca1595079959a6c6843119556a8b6bf5d5
Keep enum `ng_opmode` generated from the command list,
and also keep `ng_command_strings[]`, `ng_command_strings_esc[]`
and `ng_command_strings_short[]`.
And add the wrapper func name into the array, to be able
to appeal to it later, when processing any coming NG command.
Change-Id: I6aa725679d2405277f4497db46c3a8010d9ccd56
The `OP_...` enum is meant to only represent commands list.
Then make the list from the NG commands macro
the actual source of truth for the enum count.
This eliminates human mistakes, when introducing a new command,
because no more need to update enum manually.
Additionally:
- move the command list macro to the header
- existing extern declarations remain untouched
- `OP_OTHER` remains sentinel
- eventually replace the manual enum with macro based one
Change-Id: I33d928367fe0a254571cb0b7d4aafe4445b30b77
Resolve file name conflicts between different components
Ensure shared log levels are identical across components
Encapsulates lib/*
Change-Id: If848d6fa0e4cd8eac88ce9e63ee77fc5a7a481fd
Expression like macroses should usually be
wrapped in parentheses.
Then they behave predictably, when for example
embedded into larger expressions,
and also so future edits do not accidentally introduce precedence bugs.
Change-Id: I4ac485c2e1ed58507f4efeec69de63a6080523c2
With timestamps handling, which want to operate on signed integers.
Return the signed max value given from the calls of `atomic64_get_na()`.
Raw-cast the output of `atomic64_get_na()` to the signed integer as well.
Change-Id: Icc6878c9b08545f456ad5eb267ed6a3333c11ab7
The `dialog_unconfirm()` func simply does similar
work as `__monologue_unconfirm()` but works instead
on subscriptions additionally.
So just deprecate it and then `__monologue_unconfirm()`
just takes the work on subscribers/subscriptions as well.
Change-Id: I047fd86b8eba700d0347b21137a2aa40fab01643
Instead of taking an average, take the minimum over the last X frames.
This fixes skew calculation in situations where the encoder is expected
to produce burst output (e.g. G.726).
Probably the exception for media playback can also be removed.
Change-Id: I92e03916c04c670f6e8e72ad243a67d675504690
Skip initialisation of seq_out to a random number and track its init
state with a dedicated flag. Initialise it to the first received seq.
Change-Id: Iecdd3d28c5d6fe36d0a7488dd231767ff788942e